diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-07-15 01:31:06 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-07-15 01:31:06 +0200 |
commit | ae446765eb0605d2451bb4dd7c336672bcc7ab0c (patch) | |
tree | 3de40da1b0faa1855c8309200c4e57272da49696 /Makefile.am | |
parent | 673eab9bf0d2d79a72f3d7c430807b8786de7ee3 (diff) |
libsystemd-daemon: support installation in --with-rootlibdir
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index fc59b57c0f..54f414a750 100644 --- a/Makefile.am +++ b/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) \ |