]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build-sys: make RPM macros installation path configurable (#5564)
authorsteelman <stlman@poczta.fm>
Tue, 14 Mar 2017 23:16:47 +0000 (00:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 14 Mar 2017 23:16:47 +0000 (19:16 -0400)
--with-rpmmacrosdir=no disables installation of the macros.

Makefile.am
configure.ac

index bd313a5d157b572f498790f9c72d4defa244fe34..514d0e2c3a571b6ff909b50cf93fbb8e9899fbe7 100644 (file)
@@ -59,7 +59,7 @@ polkitrulesdir=$(datadir)/polkit-1/rules.d
 polkitpkladir=$(localstatedir)/lib/polkit-1/localauthority/10-vendor.d
 bashcompletiondir=@bashcompletiondir@
 zshcompletiondir=@zshcompletiondir@
-rpmmacrosdir=$(prefix)/lib/rpm/macros.d
+rpmmacrosdir=@rpmmacrosdir@
 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
 varlogdir=$(localstatedir)/log
@@ -178,6 +178,7 @@ CLEANFILES = $(BUILT_SOURCES) \
        $(pkgconfiglib_DATA) \
        $(nodist_bashcompletion_data) \
        $(nodist_zshcompletion_data) \
+       $(nodist_rpmmacros_DATA) \
        $(in_files:.in=) $(in_in_files:.in.in=) \
        $(m4_files:.m4=)
 
@@ -1497,8 +1498,10 @@ polkitpolicy_in_in_files += \
 pkgconfigdata_DATA += \
        src/core/systemd.pc
 
+if ENABLE_RPM_MACROS
 nodist_rpmmacros_DATA = \
        src/core/macros.systemd
+endif
 
 BUILT_SOURCES += \
        src/core/triggers.systemd
@@ -6567,6 +6570,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
        --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
        --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
+       --with-rpmmacrosdir=$$dc_install_base/$(rpmmacrosdir) \
        --with-rootprefix=$$dc_install_base \
        --enable-compat-libs
 
index 1efeb3a73e4c073c70780a1f63a355752928596d..c0e5ec4fae7c91927916e8a2d763a3b2a0fb84f3 100644 (file)
@@ -1577,6 +1577,12 @@ AC_ARG_WITH([pamconfdir],
 AM_CONDITIONAL(ENABLE_PAM_CONFIG, [test "$with_pamconfdir" != "no"])
 AX_NORMALIZE_PATH([with_pamconfdir])
 
+AC_ARG_WITH([rpmmacrosdir],
+        AS_HELP_STRING([--with-rpmmacrosdir=DIR], [directory to store macros for RPM]),
+        [], [with_rpmmacrosdir=\${prefix}/lib/rpm/macros.d])
+AM_CONDITIONAL(ENABLE_RPM_MACROS, [test "$with_rpmmacrosdir" != "no"])
+AX_NORMALIZE_PATH([with_rpmmacrosdir])
+
 AC_ARG_ENABLE([split-usr],
         AS_HELP_STRING([--enable-split-usr], [assume that /bin, /sbin aren't symlinks into /usr]),
         [],
@@ -1647,6 +1653,7 @@ AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
 AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
 AC_SUBST([pamlibdir], [$with_pamlibdir])
 AC_SUBST([pamconfdir], [$with_pamconfdir])
+AC_SUBST([rpmmacrosdir], [$with_rpmmacrosdir])
 AC_SUBST([rootprefix], [$with_rootprefix])
 AC_SUBST([rootlibdir], [$with_rootlibdir])
 
@@ -1746,6 +1753,7 @@ AC_MSG_RESULT([
         build Python:                      ${PYTHON}
         PAM modules dir:                   ${with_pamlibdir}
         PAM configuration dir:             ${with_pamconfdir}
+        RPM macros dir:                    ${with_rpmmacrosdir}
         D-Bus policy dir:                  ${with_dbuspolicydir}
         D-Bus session dir:                 ${with_dbussessionservicedir}
         D-Bus system dir:                  ${with_dbussystemservicedir}