]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Install nscd systemd files allan/config-files
authorAllan McRae <allan@archlinux.org>
Sun, 8 Feb 2015 07:18:16 +0000 (17:18 +1000)
committerAllan McRae <allan@archlinux.org>
Sun, 8 Feb 2015 09:57:54 +0000 (19:57 +1000)
Install nscd systemd services file and tmpfile when glibc is configured with
--with-systemdsystemunitdir=<dir>

Makeconfig
config.make.in
configure
configure.ac
nscd/Makefile

index 751e9ffa32149ba8854cc6fb7404a5902305dc37..d9faa49e1a7dae48077ead74fe1f09db5fd7988a 100644 (file)
@@ -306,6 +306,8 @@ ifndef sysincludedir
 sysincludedir = /usr/include
 endif
 
+# Directory to install systemd service files
+inst_systemdsystemunitdir = $(install_root)$(systemd-system-unit-dir)
 
 # Commands to install files.
 ifndef INSTALL_DATA
index ad4dd30607199543fd7f3e6f3656e80c8be87104..c73af0b5894a8f1c3d1be8a4877053ce317b511f 100644 (file)
@@ -94,6 +94,7 @@ use-nscd = @use_nscd@
 build-hardcoded-path-in-tests= @hardcoded_path_in_tests@
 build-pt-chown = @build_pt_chown@
 enable-lock-elision = @enable_lock_elision@
+systemd-system-unit-dir = @systemdsystemunitdir@
 
 # Build tools.
 CC = @CC@
index ce0c6a01f114d009945dcca58d039fa5123d648e..e21e1e48e45c94f26fddb28d67c9ac02849952e0 100755 (executable)
--- a/configure
+++ b/configure
@@ -675,6 +675,7 @@ bindnow
 enable_lock_elision
 hardcoded_path_in_tests
 use_default_link
+systemdsystemunitdir
 sysheaders
 with_fp
 READELF
@@ -753,6 +754,7 @@ with_fp
 with_binutils
 with_selinux
 with_headers
+with_systemdsystemunitdir
 with_default_link
 enable_sanity_checks
 enable_shared
@@ -1454,6 +1456,8 @@ Optional Packages:
   --with-selinux          if building with SELinux support
   --with-headers=PATH     location of system headers to use (for example
                           /usr/src/linux/include) [default=compiler default]
+  --with-systemdsystemunitdir=DIR
+                          directory for systemd service files
   --with-default-link     do not use explicit linker scripts
   --with-cpu=CPU          select code for CPU variant
 
@@ -3422,6 +3426,16 @@ fi
 
 
 
+# Check whether --with-systemdsystemunitdir was given.
+if test "${with_systemdsystemunitdir+set}" = set; then :
+  withval=$with_systemdsystemunitdir; systemdsystemunitdir=$withval
+else
+  systemdsystemunitdir=''
+fi
+
+
+
+
 
 # Check whether --with-default-link was given.
 if test "${with_default_link+set}" = set; then :
index d89aaf0cdf329f1fe6247dbbfad49693642c570f..464ffcda088f54291d20b103675f9f346201af09 100644 (file)
@@ -127,6 +127,13 @@ AC_ARG_WITH([headers],
            [sysheaders=''])
 AC_SUBST(sysheaders)
 
+AC_ARG_WITH([systemdsystemunitdir],
+           AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
+                          [directory for systemd service files]),
+           [systemdsystemunitdir=$withval],
+           [systemdsystemunitdir=''])
+AC_SUBST(systemdsystemunitdir)
+
 AC_SUBST(use_default_link)
 AC_ARG_WITH([default-link],
            AC_HELP_STRING([--with-default-link],
index 184c921b129c9c2254b837e1a60c62a622f4dc66..1d65c00ba26a3ef1557edd23bb87a244eaf1fe90 100644 (file)
@@ -27,6 +27,10 @@ routines := nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
            nscd_initgroups nscd_getserv_r nscd_netgroup
 aux    := nscd_helper
 install-others = $(inst_sysconfdir)/nscd.conf
+ifneq ($(systemd-system-unit-dir),)
+install-others += $(inst_systemdsystemunitdir)/nscd.service
+install-others += $(inst_libdir)/tmpfiles.d/nscd.conf
+endif
 endif
 
 # To find xmalloc.c
@@ -108,3 +112,11 @@ endif
 
 $(inst_sysconfdir)/nscd.conf: nscd.conf $(+force)
        $(do-install)
+
+ifneq ($(systemd-system-unit-dir),)
+$(inst_systemdsystemunitdir)/nscd.service: nscd.service $(+force)
+       $(do-install)
+
+$(inst_libdir)/tmpfiles.d/nscd.conf: nscd.tmpfiles $(+force)
+       $(do-install)
+endif