summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanno Meyer-Thurow <h.mth@web.de>2011-04-20 15:30:08 +0200
committerPetr Mladek <pmladek@suse.cz>2011-04-20 15:30:08 +0200
commitc612724331a3d66d2ee488d91161a54f4d3576bd (patch)
tree35745aa6d18369765e7c45fac191877271ef7cd5
parent2efa28e7ab9ebee44274b47091454da36b0c286b (diff)
make the installation dir better configurable
install to %libdir% intead of %prefix% as it is usual for other projects; use the usual DESTDIR instead of OODESTDIR Note that the default installation path is /usr/local/lib/libreoffice; it can be redefined by --prefix, --libdir, --with-install-dirname configure options Some of these changes contributed by Petr Mladek <pmladek@suse.cz>
-rw-r--r--Makefile.in10
-rwxr-xr-xconfigure.in22
-rwxr-xr-xsolenv/bin/ooinstall6
3 files changed, 32 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in
index 54e93cfae..37c138982 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -8,6 +8,10 @@ else
GBUILD_OPT:=--gmake
endif
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+libdir = @libdir@
+
all: Makefile dmake/dmake@EXEEXT@ src.downloaded
@. ./*[Ee]nv.[Ss]et.sh && \
@@ -16,11 +20,11 @@ all: Makefile dmake/dmake@EXEEXT@ src.downloaded
install:
@. ./*[Ee]nv.[Ss]et.sh && \
- echo "Installing in $${prefix:-@prefix@}..." && \
- ooinstall "$${prefix:-@prefix@}" && \
+ echo "Installing in $${libdir:-@libdir@}/@INSTALL_DIRNAME@..." && \
+ ooinstall "$${libdir:-@libdir@}/@INSTALL_DIRNAME@" && \
echo "" && \
echo "Installation finished, you can now execute:" && \
- echo "$${prefix:-@prefix@}/program/soffice"
+ echo "$${libdir:-@libdir@}/@INSTALL_DIRNAME@/program/soffice"
dev-install:
@. ./*[Ee]nv.[Ss]et.sh && \
diff --git a/configure.in b/configure.in
index 18de3ffa7..8cbcd7488 100755
--- a/configure.in
+++ b/configure.in
@@ -1207,6 +1207,20 @@ AC_ARG_WITH(vendor,
],
,)
+AC_ARG_WITH(install-dirname,
+ AS_HELP_STRING([--with-install-dirname],
+ [Specify the directory name of the core LibO install dir. The final
+ installation path is defined by <libdir>/<install-dirname>.
+ The default value is "libreoffice" and the default installation
+ patch is /usr/lib/libreoffice.
+
+ FIXME: It affects only the installation by "make install" and not the
+ generated installation sets.])
+ [
+ Usage: --with-install-dirname=lo-3.4.2
+ ],
+,)
+
AC_ARG_WITH(unix-wrapper,
AS_HELP_STRING([--with-unix-wrapper],
[Redefines the name of the UNIX wrapper that will be used in the desktop
@@ -7817,6 +7831,14 @@ else
fi
AC_SUBST(UNIXWRAPPERNAME)
+INSTALL_DIRNAME=libreoffice
+AC_MSG_CHECKING([for install dirname])
+if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes" ; then
+ INSTALL_DIRNAME="$with_install_dirname"
+fi
+AC_MSG_RESULT([$INSTALL_DIRNAME])
+AC_SUBST(INSTALL_DIRNAME)
+
AC_MSG_CHECKING([whether to statically link to Gtk])
if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
ENABLE_STATIC_GTK="TRUE"
diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall
index 2a2d2ad2c..83717fa68 100755
--- a/solenv/bin/ooinstall
+++ b/solenv/bin/ooinstall
@@ -67,9 +67,9 @@ my @larr = grep { $_ ne '' } split(/ /, $langs);
$langs = join (",", @larr);
$destdir='';
-if ( defined $ENV{OODESTDIR} &&
- $ENV{OODESTDIR} ne "" ) {
- $destdir = "-destdir \"$ENV{OODESTDIR}\"";
+if ( defined $ENV{DESTDIR} &&
+ $ENV{DESTDIR} ne "" ) {
+ $destdir = "-destdir \"$ENV{DESTDIR}\"";
}
$strip='';