File: do-not-install-service-files.patch

package info (click to toggle)
nftables 1.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,876 kB
  • sloc: ansic: 49,428; sh: 19,000; yacc: 5,611; python: 1,714; lex: 1,346; makefile: 371
file content (42 lines) | stat: -rw-r--r-- 1,262 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Author: Jeremy Sowden <azazel@debian.org>
Last-Update: 2025-09-17
Forwarded: https://lore.kernel.org/netfilter-devel/20250917203458.1469939-3-jeremy@azazel.net/
Description: build: don't install ancillary files without systemd
 service file
 .
 If the systemd service file is not installed, currently the related man-page
 and example nft file are still installed.  Instead only install them when the
 service file is installed.

--- a/Makefile.am
+++ b/Makefile.am
@@ -413,10 +413,14 @@
 	tools/nftables.service.in \
 	$(NULL)
 
+if BUILD_SERVICE
 CLEANFILES += tools/nftables.service
+endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libnftables.pc
+
+if BUILD_SERVICE
 unit_DATA = tools/nftables.service
 man_MANS = tools/nftables.service.8
 doc_DATA = files/nftables/main.nft
@@ -424,3 +428,4 @@
 tools/nftables.service: tools/nftables.service.in ${top_builddir}/config.status
 	${AM_V_GEN}${MKDIR_P} tools
 	${AM_V_at}sed -e 's|@''sbindir''@|${sbindir}|g;s|@''pkgsysconfdir''@|${pkgsysconfdir}|g' <${srcdir}/tools/nftables.service.in >$@
+endif
--- a/configure.ac
+++ b/configure.ac
@@ -130,6 +130,7 @@
 	[unitdir=""]
 )
 AC_SUBST([unitdir])
+AM_CONDITIONAL([BUILD_SERVICE], [test "x$unitdir" != x])
 
 AC_CONFIG_FILES([					\
 		Makefile				\