blob: 3b839b8224ebdee886c8909247f38adeab62eaf9 (
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: Hans-Nikola Viessmann <hans AT viess DOT mn>
_name=eduvpn-common
pkgname="python-${_name/-/_}"
pkgver=2.1.0
pkgrel=2
pkgdesc='EduVPN common library for python clients'
arch=('x86_64')
url="https://codeberg.org/eduVPN/eduvpn-common"
license=('MIT')
depends=('python' 'glibc')
makedepends=('go' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools')
source=("$url/releases/download/$pkgver/$_name-$pkgver.tar".{xz,xz.asc})
sha256sums=('3a07229c478a303b598f74f0fbb70cb05dfce59653051fc9e5da888a10d3963f'
'SKIP')
validpgpkeys=('227FF3F8F829D9A9314D9EBA02BB8048BBFF222C')
# NOTE GPG keys can be found under the `keys/` directory in `src/eduvpn-common-$pkgver`.
build() {
cd "$_name-$pkgver"
# build the C shared library
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw -tags=release"
make
# build wrapper
cd wrappers/python
make pack
}
package() {
cd "$_name-$pkgver/wrappers/python"
# install wrapper module
PYTHONHASHSEED=0 /usr/bin/python -m installer --destdir="$pkgdir" dist/*.whl
# other installs
install -Dm644 ../../LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
|