mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
libsystemd-daemon: support installation in --with-rootlibdir
This commit is contained in:
parent
673eab9bf0
commit
ae446765eb
22
Makefile.am
22
Makefile.am
@ -194,10 +194,11 @@ endif
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
libsystemd-daemon.la \
|
||||
libsystemd-login.la
|
||||
libsystemd-login.la
|
||||
|
||||
pkginclude_HEADERS = \
|
||||
src/sd-login.h
|
||||
src/sd-daemon.h \
|
||||
src/sd-login.h
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
test-engine \
|
||||
@ -1380,6 +1381,19 @@ libsystemd_daemon_la_LDFLAGS = \
|
||||
-version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
|
||||
-Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon.sym
|
||||
|
||||
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
|
||||
libsystemd-daemon-install-hook:
|
||||
if test "$(libdir)" != "$(rootlibdir)"; then \
|
||||
mkdir -p $(DESTDIR)$(rootlibdir) && \
|
||||
so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
|
||||
so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
|
||||
ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
|
||||
mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
|
||||
fi
|
||||
|
||||
libsystemd-daemon-uninstall-hook:
|
||||
rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
|
||||
|
||||
libsystemd_login_la_SOURCES = \
|
||||
src/sd-login.c \
|
||||
src/cgroup-util.c
|
||||
@ -1808,6 +1822,10 @@ if HAVE_SYSV_COMPAT
|
||||
$(LN_S) ../var-lock.mount var-lock.mount )
|
||||
endif
|
||||
|
||||
install-exec-hook: libsystemd-daemon-install-hook
|
||||
|
||||
uninstall-hook: libsystemd-daemon-uninstall-hook
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
|
||||
--with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
|
||||
|
2
README
2
README
@ -31,7 +31,7 @@ LICENSE:
|
||||
|
||||
REQUIREMENTS:
|
||||
Linux kernel >= 2.6.30 (with devtmpfs, cgroups; optional but strongly recommended: autofs4, ipv6)
|
||||
libudev >= 163
|
||||
libudev >= 172
|
||||
dbus >= 1.4.0
|
||||
libcap
|
||||
gtk+ >= 2.20 (optional)
|
||||
|
12
autogen.sh
12
autogen.sh
@ -52,6 +52,10 @@ if type -p colorgcc > /dev/null ; then
|
||||
export CC=colorgcc
|
||||
fi
|
||||
|
||||
libdir() {
|
||||
echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
|
||||
}
|
||||
|
||||
if [ "x$1" = "xam" ] ; then
|
||||
run_versioned automake "$AM_VERSION" -a -c --foreign
|
||||
./config.status
|
||||
@ -67,7 +71,13 @@ else
|
||||
run_versioned automake "$AM_VERSION" --copy --foreign --add-missing
|
||||
|
||||
if [ "x$1" != "xac" ]; then
|
||||
CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --with-rootdir= --libexecdir=/usr/lib "$@"
|
||||
CFLAGS="$CFLAGS -g -O0" ./configure \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--libexecdir=/usr/lib \
|
||||
--libdir=$(libdir /usr/local/lib) \
|
||||
--with-rootdir= \
|
||||
"$@"
|
||||
make clean
|
||||
fi
|
||||
fi
|
||||
|
15
configure.ac
15
configure.ac
@ -521,6 +521,11 @@ AC_ARG_WITH([rootdir],
|
||||
[],
|
||||
[with_rootdir=${ac_default_prefix}])
|
||||
|
||||
AC_ARG_WITH([rootlibdir],
|
||||
AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
|
||||
[],
|
||||
[with_rootlibdir=${libdir}])
|
||||
|
||||
AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
|
||||
AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
|
||||
AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
|
||||
@ -528,11 +533,11 @@ AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
|
||||
AC_SUBST([udevrulesdir], [$with_udevrulesdir])
|
||||
AC_SUBST([pamlibdir], [$with_pamlibdir])
|
||||
AC_SUBST([rootdir], [$with_rootdir])
|
||||
AC_SUBST([rootlibdir], [$with_rootlibdir])
|
||||
|
||||
AC_CONFIG_FILES([Makefile po/Makefile.in])
|
||||
AC_OUTPUT
|
||||
|
||||
echo "
|
||||
AC_MSG_RESULT([
|
||||
$PACKAGE_NAME $VERSION
|
||||
|
||||
Distribution: ${with_distro}
|
||||
@ -550,10 +555,12 @@ echo "
|
||||
plymouth: ${have_plymouth}
|
||||
prefix: ${prefix}
|
||||
root dir: ${with_rootdir}
|
||||
udev rules dir: ${with_udevrulesdir}
|
||||
lib dir: ${libdir}
|
||||
rootlib dir: ${with_rootlibdir}
|
||||
pam modules dir: ${with_pamlibdir}
|
||||
udev rules dir: ${with_udevrulesdir}
|
||||
dbus policy dir: ${with_dbuspolicydir}
|
||||
dbus session dir: ${with_dbussessionservicedir}
|
||||
dbus system dir: ${with_dbussystemservicedir}
|
||||
dbus interfaces dir: ${with_dbusinterfacedir}
|
||||
"
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user