]>
Commit | Line | Data |
---|---|---|
320b7b55 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
320b7b55 SS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = lldpd |
cf8712ae TE |
7 | version = 0.7.1 |
8 | release = 1 | |
320b7b55 | 9 | |
802ea3af | 10 | groups = Networking/Tools |
cf8712ae | 11 | url = http://vincentbernat.github.com/lldpd/ |
802ea3af MT |
12 | license = GPL |
13 | summary = Utilities for the Link Layer Discovery Protocol. | |
320b7b55 | 14 | |
802ea3af | 15 | description |
da3efef2 | 16 | The LLDPD project aims to provide a comprehensive implementation of |
320b7b55 | 17 | the IEEE standard 802.1AB Link Layer Discovery Protocol. |
802ea3af MT |
18 | end |
19 | ||
cf8712ae | 20 | source_dl = http://media.luffy.cx/files/lldpd/ |
802ea3af MT |
21 | |
22 | build | |
23 | requires | |
cf8712ae | 24 | libevent-devel |
802ea3af MT |
25 | libxml2-devel |
26 | pkg-config | |
cf8712ae | 27 | readline-devel |
da3efef2 | 28 | shadow-utils |
802ea3af MT |
29 | zlib-devel |
30 | end | |
31 | ||
32 | configure_options += \ | |
cf8712ae | 33 | --with-readline \ |
802ea3af MT |
34 | --with-xml \ |
35 | --with-privsep-user=lldpd \ | |
36 | --with-privsep-group=lldpd | |
da3efef2 MT |
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 | |
802ea3af MT |
53 | end |
54 | ||
55 | packages | |
56 | package %{name} | |
7d9b1d61 SS |
57 | prerequires |
58 | shadow-utils | |
59 | systemd-units | |
60 | end | |
da3efef2 MT |
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 | |
802ea3af | 83 | end |
1f9bc2f0 | 84 | |
cf8712ae TE |
85 | package %{name}-devel |
86 | template DEVEL | |
87 | end | |
88 | ||
1f9bc2f0 MT |
89 | package %{name}-debuginfo |
90 | template DEBUGINFO | |
91 | end | |
802ea3af | 92 | end |