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