From 6fe026fdb9b5f1590b6bf375ef0a9a4ee4a3493b Mon Sep 17 00:00:00 2001 From: steelman Date: Wed, 15 Mar 2017 00:16:47 +0100 Subject: [PATCH] build-sys: make RPM macros installation path configurable (#5564) --with-rpmmacrosdir=no disables installation of the macros. Change-Id: Ia663c3fb86bf658da57b59a4c17916c5c22645af Origin: https://github.com/systemd/systemd/commit/ff2e33db54719bfe8feea833571652318c6d197c --- Makefile.am | 6 +++++- configure.ac | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index be9eb0a..52bc2a3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,7 +57,7 @@ pkgconfiglibdir=$(libdir)/pkgconfig polkitpolicydir=$(datadir)/polkit-1/actions bashcompletiondir=@bashcompletiondir@ zshcompletiondir=@zshcompletiondir@ -rpmmacrosdir=$(prefix)/lib/rpm/macros.d +rpmmacrosdir=@rpmmacrosdir@ sysvinitdir=$(SYSTEM_SYSVINIT_PATH) sysvrcnddir=$(SYSTEM_SYSVRCND_PATH) varlogdir=$(localstatedir)/log @@ -167,6 +167,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=) @@ -1436,8 +1437,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 @@ -6362,6 +6365,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 diff --git a/configure.ac b/configure.ac index 057beaa..7260e31 100644 --- a/configure.ac +++ b/configure.ac @@ -1491,6 +1491,12 @@ AC_ARG_WITH([pamconfdir], [with_pamconfdir=${sysconfdir}/pam.d]) 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]), [], @@ -1561,6 +1567,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]) @@ -1659,6 +1666,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} -- 2.7.4