summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f6f5656ea7b9ed321688f5e6565d1ad5b3daf044 (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
# Maintainer: taotieren <admin@taotieren.com>

pkgname=netscripts-atzlinux-git
pkgver=1.0.9.r2.g52e906b
pkgrel=6
pkgdesc="some simple network scripts no need any parameter"
arch=("any")
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
groups=()
depends=('git' 'curl' 'iftop' 'net-tools' 'iproute2' 'gawk')
makedepends=()
optdepends=()
conflicts=()
url="https://www.atzlinux.com"
license=('GPL-3.0-only')
options=()
install=${pkgname}.install
source=("git+https://gitee.com/atzlinux/netscripts-atzlinux.git"
    "${pkgname}.install")
sha256sums=('SKIP'
    '6067b7e16b3c8193729e9620983c183de05d12d6f669d05cb2af591a52e5adea')

pkgver() {
    cd "${srcdir}/${pkgname%-git}"
    git describe --long --tags | sed 's|^debian/||g;s|atzlinux/||g;s/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
    install -Dm644 "${srcdir}/netscripts-atzlinux/debian/copyright" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
    cp -r "${srcdir}/netscripts-atzlinux/usr/bin" "${pkgdir}/usr"
    cp -r "${srcdir}/netscripts-atzlinux/usr/sbin/." "${pkgdir}/usr/bin"

    ln -sf "/usr/bin/localip" "${pkgdir}/usr/bin/lip"
    ln -sf "/usr/bin/localip" "${pkgdir}/usr/bin/lanip"
    ln -sf "/usr/bin//wanip" "${pkgdir}/usr/bin/wip"
    ln -sf "/usr/bin/iftopgw" "${pkgdir}/usr/bin/iftopg"
    ln -sf "/usr/bin/iftopbluetooth" "${pkgdir}/usr/bin/iftopb"

}

#
# makepkg --printsrcinfo > .SRCINFO
#