1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# Maintainer: Shalygin Konstantin <k0ste@k0ste.ru>
# Contributor: Shalygin Konstantin <k0ste@k0ste.ru>
pkgname='frr'
pkgver='10.2'
pkgrel='1'
pkgdesc='FRRouting (quagga fork) supports BGP, OSPF, ISIS, RIP, PIM, LDP, BFD, VRRP, NHRP and EIGRP'
arch=('x86_64' 'aarch64' 'armv7h')
url="https://frrouting.org"
license=('GPL2')
depends=('libcap' 'libnl' 'readline' 'ncurses' 'perl' 'pam' 'json-c' 'net-snmp'
'rtrlib' 'libyang>=2.1.128' 'libunwind' 'c-ares' 'protobuf-c' 'pcre2'
'lua53' 'sqlite')
makedepends=('gcc' 'bison' 'perl-xml-libxml' 'python-sphinx')
checkdepends=('python-pytest')
optdepends=('rsyslog: syslog support')
conflicts=('quagga' 'babeld' 'quagga_cumulus')
provides=('quagga' 'quagga_cumulus')
backup=("etc/${pkgname}/${pkgname}.conf"
"etc/${pkgname}/daemons"
"etc/${pkgname}/vtysh.conf")
source=("https://github.com/FRRouting/${pkgname}/archive/${pkgname}-${pkgver}.tar.gz"
"https://gitlab.com/redhat/centos-stream/rpms/${pkgname}/-/raw/c10s/${pkgname}-tmpfiles.conf"
"https://gitlab.com/redhat/centos-stream/rpms/${pkgname}/-/raw/c10s/${pkgname}-sysusers.conf")
sha256sums=('f9212701a8bba9ce32b4f2d361149db7778bb7bdc053bfb27415ec1948d83a47'
'edd7b01b11f2be66bb6b4531496d1eaf6536add9f4b549c659b27f5a32cdc512'
'c6f5a54402aa5f11e21dac3bd0e6cdeadfbf7937e9b34775b5fd368a9ca96fa4')
prepare() {
# Systemd use /run, not the /var/run
sed -i -e 's|/var/run/'"${pkgname}"'|/run/'"${pkgname}"'|g' "${pkgname}-sysusers.conf"
cd "${pkgname}-${pkgname}-${pkgver}"
# RPKI hacks from SPEC
sed -i -e 's/^\(bgpd_options=\)\(.*\)\(".*\)/\1\2 -M rpki\3/' \
"tools/etc/${pkgname}/daemons"
# Systemd use /run, not the /var/run
sed -i -e 's|/var/run/'"${pkgname}"'|/run/'"${pkgname}"'|g' \
"redhat/${pkgname}.logrotate"
# Hardcoded path
sed -i -e 's|/usr/lib/'"${pkgname}"'|/usr/bin|g' \
"tools/${pkgname}-reload"
sed -i -e 's|/var/run/'"${pkgname}"'|/run/'"${pkgname}"'|g' \
"tools/${pkgname}-reload.py"
sed -i -e 's|frr_libstatedir="\\${localstatedir}/lib/frr"|frr_libstatedir="\\${localstatedir}/frr/lib"|g' \
"configure.ac"
autoreconf -fvi
LUA_INCLUDE="-I /usr/include/lua5.3" ./configure \
--prefix="/usr" \
--sbindir="/usr/bin" \
--sysconfdir="/etc" \
--localstatedir="/run" \
--runstatedir="/run" \
--with-scriptdir="/etc/${pkgname}/scripts" \
--with-libpam \
--disable-static \
--enable-snmp="agentx" \
--enable-multipath=256 \
--enable-user="${pkgname}" \
--enable-group="${pkgname}" \
--enable-vty-group="${pkgname}vty" \
--enable-configfile-mask="0640" \
--enable-logfile-mask="0640" \
--enable-config-rollbacks \
--enable-pcre2posix \
--enable-scripting \
--enable-rpki \
--enable-fpm
}
build() {
cd "${pkgname}-${pkgname}-${pkgver}"
make
}
check() {
cd "${pkgname}-${pkgname}-${pkgver}"
make check
}
package() {
cd "${pkgname}-${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -Dm0644 "../${pkgname}-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
install -Dm0644 "../${pkgname}-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
rm -rf "${pkgdir}/usr/bin/"{${pkgname},ssd,fpm_listener}
pushd "redhat"
install -Dm0644 "${pkgname}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgname}"
install -Dm0644 "${pkgname}.pam" "${pkgdir}/etc/pam.d/${pkgname}"
popd
pushd "tools"
install -Dm0644 "${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system"
popd
pushd "tools/etc"
install -Dm0644 "${pkgname}/daemons" -t "${pkgdir}/etc/${pkgname}"
install -Dm0644 "iproute2/rt_protos.d/${pkgname}.conf" -t "${pkgdir}/etc/iproute2/rt_protos.d"
install -Dm0644 "${pkgname}/${pkgname}.conf" -t "${pkgdir}/etc/${pkgname}"
install -Dm0644 "${pkgname}/vtysh.conf" -t "${pkgdir}/etc/${pkgname}"
install -Dm0644 "rsyslog.d/45-${pkgname}.conf" -t "${pkgdir}/etc/rsyslog.d"
popd
}
|