]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - lldpd/lldpd.nm
Merge remote-tracking branch 'maniacikarus/ids'
[people/pmueller/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 = 0.5.4
8 release = 1
9
10 groups = Networking/Tools
11 url = https://trac.luffy.cx/lldpd/
12 license = GPL
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 =
21
22 build
23 requires
24 libxml2-devel
25 pkg-config
26 shadow-utils
27 zlib-devel
28 end
29
30 configure_options += \
31 --with-xml \
32 --with-privsep-user=lldpd \
33 --with-privsep-group=lldpd
34
35 prepare_cmds
36 %{create_user}
37 end
38
39 install_cmds
40 # Create tmp directory.
41 mkdir -pv -m 700 %{BUILDROOT}/run/lldpd
42 chown -v lldpd.lldpd %{BUILDROOT}/run/lldpd
43 end
44 end
45
46 create_user
47 getent group lldpd >/dev/null || groupadd -r lldpd
48 getent passwd lldpd >/dev/null || \
49 useradd -r -g lldpd -d / -s /sbin/nologin lldpd
50 end
51
52 packages
53 package %{name}
54 prerequires = shadow-utils systemd-units
55
56 script prein
57 %{create_user}
58 end
59
60 script postin
61 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
62 end
63
64 script preun
65 /bin/systemctl --no-reload disable lldpd.service >/dev/null 2>&1 || :
66 /bin/systemctl stop lldpd.service >/dev/null 2>&1 || :
67 end
68
69 script postun
70 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
71 end
72
73 script postup
74 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
75 /bin/systemctl try-restart lldpd.service >/dev/null 2>&1 || :
76 end
77 end
78
79 package %{name}-debuginfo
80 template DEBUGINFO
81 end
82 end