summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e987b9a448077b617e088474ebf2f7e764fe75ff (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
# Maintainer: Andrew J. Hesford <ajh+arch AT sideband DOT org>

pkgname=ifmetric
pkgver=0.3
pkgrel=2
pkgdesc="A tool to adjust the routing metric for a network interface"
arch=("x86_64")
url="http://0pointer.de/lennart/projects/ifmetric/"
license=("GPL2")
# Debian patches for proper functionality
patchurl="https://deb.debian.org/debian/pool/main/i/ifmetric/"
patchver="5"

source=("${url}${pkgname}-${pkgver}.tar.gz"
        "${patchurl}${pkgname}_${pkgver}-${patchver}.debian.tar.xz")
sha256sums=('0fa8510a4e34e555f136f9df81d26618313f2d69a4880c0fb5967f19502f1aec'
            '5aa7b4df05e88edfd3704e3255c588da0b74ab984b2abaca4d1a14c0a65aa4e7')

prepare() {
    cd "${pkgname}-${pkgver}"

    # Apply patches from Debian package
    while read PATCH; do
        patch -Np1 < "${srcdir}/debian/patches/${PATCH}";
    done < "${srcdir}/debian/patches/series"
}

build() {
    cd "${pkgname}-${pkgver}"
    ./configure --prefix=/usr --sbindir=/usr/bin --disable-static --disable-lynx
    make
}

check() {
    cd "${pkgname}-${pkgver}"
    make check
}

package() {
    cd "${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
}