summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-06-21 22:14:17 +0200
committerLennart Poettering <lennart@poettering.net>2012-06-21 22:14:17 +0200
commit590f18a27c05524f5332819b9580afc327b95d84 (patch)
tree71161407dccc6e608734e64e3a522b815c899f0a /Makefile.am
parent20747498c68575646fae88f4dd270fab219a25a6 (diff)
rpm: include RPM macro definition for .spec snippets
Let's try to standardize a bit the RPM macros used for installing/uninstalling services. This only covers the non-SysV compat bits, since that tends to vary widely between the various distros. Usage: Add %{?systemd_requires} to the header of the spec file. And then: %post %systemd_post foobar.service %preun %systemd_preun foobar.service %postun %systemd_postun foobar.service And, instead of the latter, in case the service shall be restarted on updates: %postun %systemd_postun_restart foobar.service
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 77b4aa74e..4616b30f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -57,6 +57,7 @@ pkgconfigdatadir=$(datadir)/pkgconfig
pkgconfiglibdir=$(libdir)/pkgconfig
polkitpolicydir=$(datadir)/polkit-1/actions
bashcompletiondir=$(sysconfdir)/bash_completion.d
+rpmmacrosdir=$(sysconfdir)/rpm
# Our own, non-special dirs
pkgsysconfdir=$(sysconfdir)/systemd
@@ -885,8 +886,12 @@ org.freedesktop.systemd1.%.xml: systemd
pkgconfigdata_DATA = \
src/core/systemd.pc
+nodist_rpmmacros_DATA = \
+ src/core/macros.systemd
+
EXTRA_DIST += \
- src/core/systemd.pc.in
+ src/core/systemd.pc.in \
+ src/core/macros.systemd.in
# ------------------------------------------------------------------------------
noinst_PROGRAMS += \
@@ -3015,6 +3020,9 @@ sysctl.d/%: sysctl.d/%.in Makefile
%.pc: %.pc.in Makefile
$(SED_PROCESS)
+src/core/macros.%: src/core/macros.%.in Makefile
+ $(SED_PROCESS)
+
src/%.policy.in: src/%.policy.in.in Makefile
$(SED_PROCESS)