]>
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 |
fb0b5f5a | 8 | release = 2.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 | |
da3efef2 MT |
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 | |
802ea3af MT |
56 | end |
57 | ||
58 | packages | |
59 | package %{name} | |
7d9b1d61 SS |
60 | prerequires |
61 | shadow-utils | |
62 | systemd-units | |
63 | end | |
da3efef2 MT |
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 | |
802ea3af | 86 | end |
1f9bc2f0 | 87 | |
cf8712ae TE |
88 | package %{name}-devel |
89 | template DEVEL | |
90 | end | |
91 | ||
1f9bc2f0 MT |
92 | package %{name}-debuginfo |
93 | template DEBUGINFO | |
94 | end | |
802ea3af | 95 | end |