archrelease: copy trunk to community-any
[ArchLinux/community.git] / ucarp / repos / community-x86_64 / PKGBUILD
blobc7d534353d799fd4e0b1f690f6bcfde1e8aca039
1 # Maintainer: Sébastien Luttringer
3 pkgname=ucarp
4 pkgver=1.5.2
5 pkgrel=8
6 pkgdesc='Userspace implementation of the CARP protocol'
7 arch=('x86_64')
8 url='https://www.pureftpd.org/project/ucarp'
9 license=('GPL2')
10 depends=('libpcap')
11 optdepends=('iproute2')
12 source=("https://download.pureftpd.org/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
13         "$pkgname.service"
14         "$pkgname.8"
15         '01-fix-getopt.patch'
16         '02-fix-downscript-on-error.patch')
17 validpgpkeys=('54A2B8892CC3D6A597B92B6C210627AABA709FE1') # Frank Denis
18 md5sums=('e3caa733316a32c09e5d3817617e9145'
19          'SKIP'
20          'fdc72a8d6f89224b40c78705df1f46f9'
21          '2ccfdc464b88c437b38bd0324cf1fef3'
22          '3f20699aaf2ef8139dcd337f1e7f06ab'
23          '09d26233c37956cf08e629554a91b8cd')
25 prepare() {
26   cd $pkgname-$pkgver
27   # apply patch from the source array (should be a pacman feature)
28   local filename
29   for filename in "${source[@]}"; do
30     if [[ "$filename" =~ \.patch$ ]]; then
31       msg2 "Applying patch ${filename##*/}"
32       patch -p1 -N -i "$srcdir/${filename##*/}"
33     fi
34   done
35   :
38 build() {
39   cd $pkgname-$pkgver
40   CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
41   ./configure --prefix=/usr --sbindir=/usr/bin
42   make
46 package() {
47   pushd $pkgname-$pkgver
48   make DESTDIR="$pkgdir" install
49   # install examples files
50   install -D -m 644 examples/linux/vip-down.sh \
51     "$pkgdir/usr/share/doc/$pkgname/examples/vip-down.sh"
52   install -D -m 644 examples/linux/vip-up.sh \
53     "$pkgdir/usr/share/doc/$pkgname/examples/vip-up.sh"
54   # install README
55   install -D -m 644 README "$pkgdir/usr/share/doc/$pkgname/README"
56   popd
57   # add manpage
58   install -D -m 644 $pkgname.8 "$pkgdir/usr/share/man/man8/$pkgname.8"
59   # systemd
60   install -D -m 644 $pkgname.service \
61     "$pkgdir/usr/lib/systemd/system/$pkgname.service"
65 # vim:set ts=2 sw=2 et: