archrelease: copy trunk to community-any
[ArchLinux/community.git] / freeradius / repos / community-x86_64 / PKGBUILD
blob68c11e628178566b8a13084a9e5f971d5f2e14c8
1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
2 # Contributor: Jason R Begley (jayray@digitalgoat.com>
3 # Contributor: Daniel Micay <danielmicay@gmail.com>
5 pkgname=freeradius
6 pkgver=3.2.2
7 pkgrel=2
8 pkgdesc='The premier open source RADIUS server'
9 arch=('x86_64')
10 url='https://freeradius.org/'
11 license=('GPL')
12 depends=('krb5' 'net-snmp' 'postgresql-libs' 'mariadb-libs' 'talloc'
13          'libpcap' 'libxcrypt' 'libcrypt.so' 'smbclient')
14 makedepends=('curl' 'freetds' 'hiredis' 'json-c' 'libmemcached' 'perl'
15              'python' 'samba' 'sqlite' 'unixodbc' 'yubico-c-client')
16 optdepends=('curl: for REST'
17             'freetds: for Sybase and MS SQL'
18             'hiredis: for redis support'
19             'json-c: rlm_rest module'
20             'libmemcached: for memcached'
21             'perl: for Perl'
22             'python: for Python'
23             'sqlite: for sqlite'
24             'unixodbc: for ODBC'
25             'yubico-c-client: for yubicloud')
26 options=('!makeflags')
27 validpgpkeys=('BF2384EC6938B9744B03E2A620E37C25995B4F85') # FreeRADIUS - Package Signing [...] <packages@freeradius.org>
28 source=("ftp://ftp.freeradius.org/pub/radius/freeradius-server-$pkgver.tar.bz2"{,.sig}
29         '0001-python-3-10.patch'
30         '0002-Use-accessor-function-for-PyFrameObject-members.patch'
31         'freeradius-sysusers.conf'
32         'freeradius-tmpfiles.conf'
33         'freeradius.service')
34 sha256sums=('8b31cb10b7b5ecfb03e22a9756e49484f98410e697798f3fd0ce1b3a135ba1fe'
35             'SKIP'
36             'a84b6489f58083639d9b1854b1bd8610a0f672bcf2a6d902a78da0868fca1317'
37             '5ae5a2860969b8f4973a873d9adde2ad3a8a2af2cf6f669627c619745d549382'
38             '8ecaca94c7d0f4806b326685312dd4e543ce9c6c183d3d7ad01c1a0197bdfb94'
39             'f536a9aa972e3e42a6b1a6d8ee17166eb721c7cba2e80f60473811497c7bd8bc'
40             'c469e1a3f9edad769da01c324779babe783ee85a9b53ce4638d3d2d09c7c8d4b')
42 prepare() {
43   cd "$srcdir"/freeradius-server-$pkgver
45   patch -Np1 < ../0001-python-3-10.patch
46   patch -Np1 < ../0002-Use-accessor-function-for-PyFrameObject-members.patch
49 build() {
50   cd "$srcdir"/freeradius-server-$pkgver
52   ./configure \
53     --prefix=/usr \
54     --sbindir=/usr/bin \
55     --sysconfdir=/etc \
56     --libdir=/usr/lib/freeradius \
57     --localstatedir=/var \
58     --enable-heimdal-krb5 \
59     --enable-reproducible-builds \
60     --with-system-libltdl \
61     --with-system-libtool \
62     --with-udpfromto
63   make PACKAGE='archlinux'
66 package() {
67   cd "$srcdir"/freeradius-server-$pkgver
69   make install R="$pkgdir" PACKAGE='archlinux'
70   chmod o+r "$pkgdir"/etc/raddb/*
71   mv "$pkgdir"/etc/raddb "$pkgdir"/etc/raddb.default
72   rm -rf "$pkgdir"/var/run
74   install -D -m0644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
75   install -D -m0644 "$srcdir"/$pkgname-sysusers.conf "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
76   install -D -m0644 "$srcdir"/$pkgname-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf