]> git.ipfire.org Git - ipfire-3.x.git/blob - lldpd/lldpd.nm
json-c: Update to version 0.17-20230812
[ipfire-3.x.git] / lldpd / lldpd.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = lldpd
7 version = 1.0.16
8 release = 2.1
9
10 groups = Networking/Tools
11 url = https://lldpd.github.io
12 license = ISC
13 summary = Utilities for the Link Layer Discovery Protocol
14
15 description
16 The LLDPD project aims to provide a comprehensive implementation of
17 the IEEE standard 802.1AB Link Layer Discovery Protocol.
18 end
19
20 source_dl = https://media.luffy.cx/files/lldpd/
21
22 build
23 requires
24 libcap-devel
25 libevent-devel
26 (libseccomp-devel if arch(x86_64))
27 libxml2-devel
28 pkg-config
29 readline-devel
30 shadow-utils
31 end
32
33 configure_options += \
34 --without-embedded-libevent \
35 --with-readline \
36 --with-xml \
37 --with-privsep-user=lldpd \
38 --with-privsep-group=lldpd
39
40 # lldpd does not support seccomp on aarch64.
41 if "%{DISTRO_ARCH}" == "aarch64"
42 configure_options += --without-seccomp
43 else
44 configure_options += --with-seccomp
45 end
46
47 prepare_cmds
48 %{create_user}
49 end
50 end
51
52 create_user
53 getent group lldpd >/dev/null || groupadd -r lldpd
54 getent passwd lldpd >/dev/null || \
55 useradd -r -g lldpd -d / -s /sbin/nologin lldpd
56 end
57
58 packages
59 package %{name}
60 prerequires
61 shadow-utils
62 systemd-units
63 end
64
65 script prein
66 %{create_user}
67 end
68
69 script postin
70 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
71 end
72
73 script preun
74 /bin/systemctl --no-reload disable lldpd.service >/dev/null 2>&1 || :
75 /bin/systemctl stop lldpd.service >/dev/null 2>&1 || :
76 end
77
78 script postun
79 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
80 end
81
82 script postup
83 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
84 /bin/systemctl try-restart lldpd.service >/dev/null 2>&1 || :
85 end
86 end
87
88 package %{name}-devel
89 template DEVEL
90 end
91
92 package %{name}-debuginfo
93 template DEBUGINFO
94 end
95 end