summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ef2862828eb54f8fbc81325ffb6d8416a0e0f0e6 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=ebtables-git
pkgver=2.0.11.r7.g916d420
pkgrel=2
pkgdesc="A filtering tool for a Linux-based bridging firewall"
arch=('i686' 'x86_64')
url="https://ebtables.netfilter.org/"
license=('GPL2')
depends=('glibc' 'perl' 'iptables')
makedepends=('git')
provides=("ebtables=$pkgver")
conflicts=('ebtables')
backup=('etc/ebtables.conf')
source=("git://git.netfilter.org/ebtables"
        "ebtables.service::https://gitlab.archlinux.org/archlinux/packaging/packages/iptables/-/raw/main/ebtables.service")
sha256sums=('SKIP'
            'SKIP')


pkgver() {
  cd "ebtables"

  git describe --long --tags | sed 's/^ebtables-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "ebtables"

  ./autogen.sh
  ./configure \
    --prefix="/usr" \
    --sbindir="/usr/bin" \
    --sysconfdir="/etc"
  make
}

package() {
  cd "ebtables"

  make DESTDIR="$pkgdir" install

  install -Dm644 "$srcdir/ebtables.service" -t "$pkgdir/usr/lib/systemd/system"
  install -Dm644 "/dev/null" "$pkgdir/etc/ebtables.conf"
}