-
Notifications
You must be signed in to change notification settings - Fork 90
/
PKGBUILD
42 lines (34 loc) · 1.14 KB
/
PKGBUILD
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: ArchStrike <team@archstrike.org>
buildarch=1
_pkgname=dpkt-git
pkgname=("python-${_pkgname}" "python2-${_pkgname}")
pkgver=20210102.r628
pkgrel=1
pkgdesc='Python library for interacting with and creating packets.'
arch=('any')
url='https://github.com/kbandla/dpkt'
license=('custom')
makedepends=('git' 'python-setuptools' 'python2-setuptools')
replaces=('python2-dpkt')
source=("${pkgname}::git+https://github.com/kbandla/dpkt.git")
sha512sums=('SKIP')
pkgver() {
cd "${srcdir}/${pkgname}"
printf "%s.r%s" "$(git show -s --format=%ci master | sed 's/\ .*//g;s/-//g')" "$(git rev-list --count HEAD)"
}
prepare(){
cd "${srcdir}"
cp -a "${pkgname}"{,-py2}
}
package_python-dpkt-git() {
depends=('python' 'python-mock' 'python-sphinx')
cd "${srcdir}/python-dpkt-git"
python setup.py install "--root=${pkgdir}" -O1
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package_python2-dpkt-git() {
depends=('python2' 'python2-mock' 'python2-sphinx')
cd "${srcdir}/python-dpkt-git-py2"
python2 setup.py install "--root=${pkgdir}" -O1
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}