summaryrefslogtreecommitdiff
path: root/community/arptables/PKGBUILD
blob: 21023214b07cf7f8b20835d02ea26f29c27eb58c (plain)
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
# $Id: PKGBUILD 71317 2012-05-26 14:59:39Z seblu $
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: Michal Soltys <soltys@ziu.info>

pkgname=arptables
pkgver=0.0.3_4
pkgrel=3
pkgdesc='ARP filtering utility'
arch=('i686' 'x86_64' 'mips64el')
url='http://ebtables.sourceforge.net/'
license=('GPL')
backup=("etc/$pkgname.conf" "etc/conf.d/$pkgname")
install=$pkgname.install
source=("http://downloads.sourceforge.net/ebtables/$pkgname-v${pkgver//_/-}.tar.gz"
        "$pkgname.conf"
        "$pkgname.rc"
        "$pkgname.systemd"
        "$pkgname.service")
md5sums=('1d4ab05761f063b0751645d8f2b8f8e5'
         '00bfb5bd8a83a5b466c650ee5d8f86f3'
         '60e0319b55b1ef9e13d9ac03dd98c8d4'
         '65a9ed0b866f727184a87e4d480975bd'
         'b26771191e52905d8aea6333c26cb1c3')

build() {
  cd $pkgname-v${pkgver//_/-}
  make
}

package() {
  pushd $pkgname-v${pkgver//_/-}
  make install \
    DESTDIR="$pkgdir" \
    PREFIX=/usr \
    LIBDIR=/usr/lib/arptables \
    BINDIR=/usr/sbin \
    MANDIR=/usr/share/man \
    INITDIR=/etc/rc.d \
    SYSCONFIGDIR=/etc
  popd
  # install initscripts
  install -Dm 755 $pkgname.rc "$pkgdir/etc/rc.d/$pkgname"
  install -Dm 644 $pkgname.conf "$pkgdir/etc/conf.d/$pkgname"
  # install systemd service
  install -Dm 755 $pkgname.systemd \
    "$pkgdir/usr/lib/systemd/scripts/$pkgname"
  install -Dm 644 $pkgname.service \
    "$pkgdir/usr/lib/systemd/system/$pkgname.service"
  # default config file
  install -Dm 644 /dev/null "$pkgdir/etc/$pkgname.conf"
}

# vim:set ts=2 sw=2 ft=sh et: