]>
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 |
d8b3c708 | 7 | version = 1.0.16 |
1ff51fee | 8 | release = 1.1 |
320b7b55 | 9 | |
802ea3af | 10 | groups = Networking/Tools |
d8b3c708 | 11 | url = https://lldpd.github.io |
aa279d21 MT |
12 | license = ISC |
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 | ||
aa279d21 | 20 | source_dl = https://media.luffy.cx/files/lldpd/ |
802ea3af MT |
21 | |
22 | build | |
23 | requires | |
d8b3c708 | 24 | libcap-devel |
cf8712ae | 25 | libevent-devel |
1ff51fee | 26 | (libseccomp-devel if arch(x86_64)) |
802ea3af MT |
27 | libxml2-devel |
28 | pkg-config | |
cf8712ae | 29 | readline-devel |
da3efef2 | 30 | shadow-utils |
802ea3af MT |
31 | end |
32 | ||
33 | configure_options += \ | |
d8b3c708 | 34 | --without-embedded-libevent \ |
cf8712ae | 35 | --with-readline \ |
802ea3af MT |
36 | --with-xml \ |
37 | --with-privsep-user=lldpd \ | |
38 | --with-privsep-group=lldpd | |
da3efef2 | 39 | |
1ff51fee MT |
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 | ||
da3efef2 MT |
47 | prepare_cmds |
48 | %{create_user} | |
49 | end | |
50 | ||
51 | install_cmds | |
52 | # Create tmp directory. | |
53 | mkdir -pv -m 700 %{BUILDROOT}/run/lldpd | |
54 | chown -v lldpd.lldpd %{BUILDROOT}/run/lldpd | |
55 | end | |
56 | end | |
57 | ||
58 | create_user | |
59 | getent group lldpd >/dev/null || groupadd -r lldpd | |
60 | getent passwd lldpd >/dev/null || \ | |
61 | useradd -r -g lldpd -d / -s /sbin/nologin lldpd | |
802ea3af MT |
62 | end |
63 | ||
64 | packages | |
65 | package %{name} | |
7d9b1d61 SS |
66 | prerequires |
67 | shadow-utils | |
68 | systemd-units | |
69 | end | |
da3efef2 MT |
70 | |
71 | script prein | |
72 | %{create_user} | |
73 | end | |
74 | ||
75 | script postin | |
76 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
77 | end | |
78 | ||
79 | script preun | |
80 | /bin/systemctl --no-reload disable lldpd.service >/dev/null 2>&1 || : | |
81 | /bin/systemctl stop lldpd.service >/dev/null 2>&1 || : | |
82 | end | |
83 | ||
84 | script postun | |
85 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
86 | end | |
87 | ||
88 | script postup | |
89 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : | |
90 | /bin/systemctl try-restart lldpd.service >/dev/null 2>&1 || : | |
91 | end | |
802ea3af | 92 | end |
1f9bc2f0 | 93 | |
cf8712ae TE |
94 | package %{name}-devel |
95 | template DEVEL | |
96 | end | |
97 | ||
1f9bc2f0 MT |
98 | package %{name}-debuginfo |
99 | template DEBUGINFO | |
100 | end | |
802ea3af | 101 | end |