aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2013-02-13 21:07:40 +0000
committerRalph Sennhauser <sera@gentoo.org>2013-02-13 21:07:40 +0000
commite34976ee88fe4af11ac893a5d14d433b8fb0ff4d (patch)
treec9d37fea27c350c0e1871226b586228309acd292
parentAdd missing bug reference to NEWS (diff)
downloadeselect-java-e34976ee88fe4af11ac893a5d14d433b8fb0ff4d.tar.gz
eselect-java-e34976ee88fe4af11ac893a5d14d433b8fb0ff4d.tar.bz2
eselect-java-e34976ee88fe4af11ac893a5d14d433b8fb0ff4d.zip
Prefixify run-java-tool
svn path=/projects/eselect-java/trunk/; revision=9207
-rw-r--r--Makefile.am13
-rw-r--r--configure.ac2
-rw-r--r--src/scripts/run-java-tool.bash.in (renamed from src/scripts/run-java-tool.bash)8
3 files changed, 17 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index c65c41c..a257f86 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,9 @@
dist_pkglibexec_SCRIPTS= \
src/scripts/run-java-tool.bash
+EXTRA_DIST = \
+ src/scripts/run-java-tool.bash.in
+
modulesdir=$(datadir)/eselect/modules/
modules_DATA = \
@@ -9,13 +12,13 @@ modules_DATA = \
src/modules/java-vm.eselect \
src/modules/maven.eselect
-EXTRA_DIST = \
+EXTRA_DIST += \
src/modules/ecj.eselect.in \
src/modules/java-nsplugin.eselect.in \
src/modules/java-vm.eselect.in \
src/modules/maven.eselect.in
-CLEANFILES = $(modules_DATA)
+CLEANFILES = $(dist_pkglibexec_SCRIPTS) $(modules_DATA)
MAINTAINERCLEANFILES = \
aclocal.m4 \
@@ -35,6 +38,12 @@ EXTRA_DIST += \
README
+create-scripts-dir:
+ $(MKDIR_P) $(top_builddir)/src/scripts
+
+$(dist_pkglibexec_SCRIPTS): | create-scripts-dir
+ $(SED) "s|\@GENTOO_PORTAGE_EPREFIX\@|@EPREFIX@|g" $(top_srcdir)/$@.in >$@
+
create-modules-dir:
$(MKDIR_P) $(top_builddir)/src/modules
diff --git a/configure.ac b/configure.ac
index cb1a32c..b38fc94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,8 @@ AC_PROG_LN_S
AC_PROG_MKDIR_P
AC_PROG_SED
+AC_ARG_VAR([EPREFIX],[Gentoo Prefix offset])
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/src/scripts/run-java-tool.bash b/src/scripts/run-java-tool.bash.in
index 57106a9..d6b41d4 100644
--- a/src/scripts/run-java-tool.bash
+++ b/src/scripts/run-java-tool.bash.in
@@ -1,10 +1,10 @@
-#!/bin/bash
+#!@GENTOO_PORTAGE_EPREFIX@/bin/bash
-user_vm="${HOME}/.gentoo/java-config-2/current-user-vm"
-system_vm="/etc/java-config-2/current-system-vm"
+user_vm="${HOME}/.gentoo@GENTOO_PORTAGE_EPREFIX@/java-config-2/current-user-vm"
+system_vm="@GENTOO_PORTAGE_EPREFIX@/etc/java-config-2/current-system-vm"
# Try GENTOO_VM
if [[ -n ${GENTOO_VM} ]]; then
- vmpath="/usr/lib/jvm/${GENTOO_VM}/"
+ vmpath="@GENTOO_PORTAGE_EPREFIX@/usr/lib/jvm/${GENTOO_VM}/"
# Then user VM
elif [[ -h ${user_vm} ]]; then
vmpath=$(readlink ${user_vm})