archrelease: copy trunk to extra-x86_64
[arch-packages.git] / ipset / repos / extra-x86_64 / PKGBUILD
blob041f9faa3bc10c98cfc318e6346d20244afa5c03
1 # Maintainer: Sébastien Luttringer
3 pkgname=ipset
4 pkgver=7.15
5 pkgrel=1
6 pkgdesc='Administration tool for IP sets'
7 arch=('x86_64')
8 url='https://netfilter.org/projects/ipset/'
9 license=('GPL2')
10 makedepends=('git')
11 depends=('glibc' 'libmnl')
12 backup=("etc/$pkgname.conf")
13 source=("git://git.netfilter.org/ipset.git#tag=v$pkgver"
14         "$pkgname.service")
15 sha256sums=('SKIP'
16             '5a0e326a80fd5ab2d9545faa1189b647cc866c9568ab6a9dd0833ba5863f39ce')
18 prepare() {
19   cd $pkgname
20   # apply patch from the source array (should be a pacman feature)
21   local filename
22   for filename in "${source[@]}"; do
23     if [[ "$filename" =~ \.patch$ ]]; then
24       echo "Applying patch ${filename##*/}"
25       patch -p1 -N -i "$srcdir/${filename##*/}"
26     fi
27   done
28   :
31 build() {
32   cd $pkgname
33   ./autogen.sh
34   ./configure --prefix=/usr --sbindir=/usr/bin --with-kmod=no
35   make
38 package() {
39   pushd $pkgname
40   make DESTDIR="$pkgdir" install
41   # install doc
42   install -dm755 "$pkgdir/usr/share/doc/$pkgname"
43   install -m644 README UPGRADE ChangeLog "$pkgdir/usr/share/doc/$pkgname"
44   # install pkgconfig file
45   install -Dm644 lib/libipset.pc "$pkgdir/usr/lib/pkgconfig/libipset.pc"
46   popd
47   # systemd
48   install -Dm 644 $pkgname.service \
49     "$pkgdir/usr/lib/systemd/system/$pkgname.service"
50   # default config file
51   install -Dm 644 /dev/null "$pkgdir/etc/$pkgname.conf"
52   # bash completion
53   install -Dm 644 ipset/utils/ipset_bash_completion/ipset \
54     "$pkgdir/usr/share/bash-completion/completions/ipset"
57 # vim:set ts=2 sw=2 et: