From 2517bd4eb68d06e45f312aca9cd8977234bed669 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Wed, 13 Feb 2013 22:08:09 +0000 Subject: Prefixify files that need it svn path=/projects/baselayout-java/trunk/; revision=9212 --- Makefile.am | 20 +++++++++++++++++--- configure.ac | 7 ++++++- src/20java-config | 1 - src/20java-config.in | 1 + src/java-config-2.csh | 22 ---------------------- src/java-config-2.csh.in | 21 +++++++++++++++++++++ src/java-config-2.sh | 34 ---------------------------------- src/java-config-2.sh.in | 33 +++++++++++++++++++++++++++++++++ 8 files changed, 78 insertions(+), 61 deletions(-) delete mode 100644 src/20java-config create mode 100644 src/20java-config.in delete mode 100644 src/java-config-2.csh create mode 100644 src/java-config-2.csh.in delete mode 100644 src/java-config-2.sh create mode 100644 src/java-config-2.sh.in diff --git a/Makefile.am b/Makefile.am index f6c9eb0..02c411d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,19 +11,28 @@ dist_pixmaps_DATA = \ icons/java-icon48.png envddir = $(sysconfdir)/env.d -dist_envd_DATA = \ +envd_DATA = \ src/20java-config +EXTRA_DIST = \ + src/20java-config.in + profileddir = $(sysconfdir)/profile.d -dist_profiled_DATA = \ +profiled_DATA = \ src/java-config-2.csh \ src/java-config-2.sh +EXTRA_DIST += \ + src/java-config-2.csh.in \ + src/java-config-2.sh.in + revdepdir = $(sysconfdir)/revdep-rebuild dist_revdep_DATA = \ src/60-java -EXTRA_DIST = \ +CLEANFILES = $(envd_DATA) $(profiled_DATA) + +EXTRA_DIST += \ COPYING \ NEWS \ README @@ -36,6 +45,11 @@ MAINTAINERCLEANFILES = \ Makefile.in \ INSTALL +create-src-dir: + $(MKDIR_P) $(top_builddir)/src + +$(envd_DATA) $(profiled_DATA): | create-src-dir + $(SED) "s|\@GENTOO_PORTAGE_EPREFIX\@|@EPREFIX@|g" $(top_srcdir)/$@.in >$@ dist-hook: if test -d "$(srcdir)"/.svn ; then \ diff --git a/configure.ac b/configure.ac index 5f2c456..87f0b82 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,13 @@ AC_INIT([baselayout-java],[0.1.0],[java@gentoo.org],[baselayout-java],[https://bugs.gentoo.org/]) AC_PREREQ([2.68]) -AC_CONFIG_SRCDIR([src/java-config-2.sh]) +AC_CONFIG_SRCDIR([src/java-config-2.sh.in]) AM_INIT_AUTOMAKE([1.11]) +AC_PROG_MKDIR_P +AC_PROG_SED + +AC_ARG_VAR([EPREFIX],[Gentoo Prefix offset]) + AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/src/20java-config b/src/20java-config deleted file mode 100644 index 1128b5d..0000000 --- a/src/20java-config +++ /dev/null @@ -1 +0,0 @@ -MANPATH="/etc/java-config-2/current-system-vm/man/" diff --git a/src/20java-config.in b/src/20java-config.in new file mode 100644 index 0000000..bad776c --- /dev/null +++ b/src/20java-config.in @@ -0,0 +1 @@ +MANPATH="@GENTOO_PORTAGE_EPREFIX@/etc/java-config-2/current-system-vm/man/" diff --git a/src/java-config-2.csh b/src/java-config-2.csh deleted file mode 100644 index 517a054..0000000 --- a/src/java-config-2.csh +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/files/java-config-2.profiled.csh,v 1.3 2007/01/13 17:17:08 grobian Exp $ - -set gentoo_user_vm = "${HOME}/.gentoo/java-config-2/current-user-vm" -set gentoo_system_vm = "/etc/java-config-2/current-system-vm" - -## If we have a current-user-vm (and aren't root)... set it to JAVA_HOME -## Otherwise set to the current system vm -if ( ( "$uid" != "0" ) && ( -l $gentoo_user_vm ) ) then - setenv JAVA_HOME $gentoo_user_vm -else if ( -l $gentoo_system_vm ) then - setenv JAVA_HOME $gentoo_system_vm -endif -unset gentoo_user_vm gentoo_system_vm - -if ( $?JAVA_HOME ) then - # prepending to come before generation 1 - setenv MANPATH "${JAVA_HOME}/man:${MANPATH}" - setenv JDK_HOME $JAVA_HOME - setenv JAVAC ${JDK_HOME}/bin/javac -endif diff --git a/src/java-config-2.csh.in b/src/java-config-2.csh.in new file mode 100644 index 0000000..ad2df86 --- /dev/null +++ b/src/java-config-2.csh.in @@ -0,0 +1,21 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +set gentoo_user_vm = "${HOME}/.gentoo@GENTOO_PORTAGE_EPREFIX@/java-config-2/current-user-vm" +set gentoo_system_vm = "@GENTOO_PORTAGE_EPREFIX@/etc/java-config-2/current-system-vm" + +## If we have a current-user-vm (and aren't root)... set it to JAVA_HOME +## Otherwise set to the current system vm +if ( ( "$uid" != "0" ) && ( -l $gentoo_user_vm ) ) then + setenv JAVA_HOME $gentoo_user_vm +else if ( -l $gentoo_system_vm ) then + setenv JAVA_HOME $gentoo_system_vm +endif +unset gentoo_user_vm gentoo_system_vm + +if ( $?JAVA_HOME ) then + # prepending to come before generation 1 + setenv MANPATH "${JAVA_HOME}/man:${MANPATH}" + setenv JDK_HOME $JAVA_HOME + setenv JAVAC ${JDK_HOME}/bin/javac +endif diff --git a/src/java-config-2.sh b/src/java-config-2.sh deleted file mode 100644 index 49155d1..0000000 --- a/src/java-config-2.sh +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/files/java-config-2.profiled.sh-r1,v 1.1 2007/03/16 11:13:16 betelgeuse Exp $ - -# If we have a current-user-vm (and aren't root)... set it to JAVA_HOME -gentoo_user_vm="${HOME}/.gentoo/java-config-2/current-user-vm" -gentoo_system_vm="/etc/java-config-2/current-system-vm" - -# Please make sure that this script is POSIX compliant -# See https://bugs.gentoo.org/show_bug.cgi?id=169925 -# for more details" - -if [ -z "${UID}" ] ; then - # id lives in /usr/bin which might not be mounted - if type id >/dev/null 2>/dev/null ; then - user_id=$(id -u) - else - [ "${USER}" = "root" ] && user_id=0 - fi -fi - -# The root user uses the system vm -if [ "${user_id}" != 0 -a -L "${gentoo_user_vm}" ]; then - export JAVA_HOME=${gentoo_user_vm} -# Otherwise set to the current system vm -elif [ -L /etc/java-config-2/current-system-vm ]; then - export JAVA_HOME=${gentoo_system_vm} -fi - -# prepending to come before generation 1 -export MANPATH="${JAVA_HOME}/man:${MANPATH}" -export JDK_HOME=${JAVA_HOME} -export JAVAC=${JDK_HOME}/bin/javac -unset gentoo_user_vm gentoo_system_vm user_id diff --git a/src/java-config-2.sh.in b/src/java-config-2.sh.in new file mode 100644 index 0000000..70f3e7d --- /dev/null +++ b/src/java-config-2.sh.in @@ -0,0 +1,33 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +# If we have a current-user-vm (and aren't root)... set it to JAVA_HOME +gentoo_user_vm="${HOME}/.gentoo@GENTOO_PORTAGE_EPREFIX@/java-config-2/current-user-vm" +gentoo_system_vm="@GENTOO_PORTAGE_EPREFIX@/etc/java-config-2/current-system-vm" + +# Please make sure that this script is POSIX compliant +# See https://bugs.gentoo.org/show_bug.cgi?id=169925 +# for more details" + +if [ -z "${UID}" ] ; then + # id lives in /usr/bin which might not be mounted + if type id >/dev/null 2>/dev/null ; then + user_id=$(id -u) + else + [ "${USER}" = "root" ] && user_id=0 + fi +fi + +# The root user uses the system vm +if [ "${user_id}" != 0 -a -L "${gentoo_user_vm}" ]; then + export JAVA_HOME=${gentoo_user_vm} +# Otherwise set to the current system vm +elif [ -L "@GENTOO_PORTAGE_EPREFIX@/etc/java-config-2/current-system-vm" ]; then + export JAVA_HOME=${gentoo_system_vm} +fi + +# prepending to come before generation 1 +export MANPATH="${JAVA_HOME}/man:${MANPATH}" +export JDK_HOME=${JAVA_HOME} +export JAVAC=${JDK_HOME}/bin/javac +unset gentoo_user_vm gentoo_system_vm user_id -- cgit v1.2.3-65-gdbad