]> git.ipfire.org Git - ipfire-3.x.git/blob - lldpd/lldpd.nm
9d35918e6bf12c6af48962f33c0246f0d3e2b66a
[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 = 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
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-seccomp \
37 --with-xml \
38 --with-privsep-user=lldpd \
39 --with-privsep-group=lldpd
40
41 prepare_cmds
42 %{create_user}
43 end
44
45 install_cmds
46 # Create tmp directory.
47 mkdir -pv -m 700 %{BUILDROOT}/run/lldpd
48 chown -v lldpd.lldpd %{BUILDROOT}/run/lldpd
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