diff options
author | Mark Wagie | 2020-11-10 12:32:12 -0700 |
---|---|---|
committer | Mark Wagie | 2020-11-10 12:32:12 -0700 |
commit | 6bccfcb14a4e3bea4f40a548f6aff5b517fb3844 (patch) | |
tree | 9d0320389039cfa64d56fc6002a0edbad264c1bb | |
parent | fec0d090a3ee7b5011912093020eceaec75dfb69 (diff) | |
download | aur-6bccfcb14a4e3bea4f40a548f6aff5b517fb3844.tar.gz |
adjust build for Go package guidelines
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 21 |
3 files changed, 20 insertions, 11 deletions
@@ -1,6 +1,6 @@ pkgbase = opensnitch-git pkgdesc = A GNU/Linux application firewall - pkgver = 1.0.1.r3.544ce11 + pkgver = 1.2.0.r0.6a8670c pkgrel = 1 url = https://github.com/gustavo-iniguez-goya/opensnitch install = opensnitch.install diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..44e3ec946769 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# Ignore everything +* + +# But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO +!opensnitch.install @@ -3,7 +3,7 @@ # Contributor: Adam Hose <adis@blad.is> pkgname=opensnitch-git -pkgver=1.0.1.r3.544ce11 +pkgver=1.2.0.r0.6a8670c pkgrel=1 pkgdesc="A GNU/Linux application firewall" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') @@ -26,10 +26,6 @@ pkgver() { } prepare() { - mkdir -p gopath/src/github.com/gustavo-iniguez-goya - ln -rTsf "$srcdir/${pkgname%-git}" \ - "gopath/src/github.com/gustavo-iniguez-goya/${pkgname%-git}" - export GOPATH="$srcdir/gopath" go clean -modcache @@ -38,22 +34,26 @@ prepare() { } build() { - cd "gopath/src/github.com/gustavo-iniguez-goya/${pkgname%-git}/daemon" + cd "$srcdir/${pkgname%-git}" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" - export GOFLAGS="-buildmode=pie -trimpath" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external" + pushd daemon make + popd # Clean mod cache for makepkg -C go clean -modcache - cd "$srcdir/${pkgname%-git}/proto" + pushd proto make + popd - cd "$srcdir/${pkgname%-git}/ui" + pushd ui python setup.py build + popd } package() { @@ -66,6 +66,7 @@ package() { install -Dm644 "debian/${pkgname%-git}.logrotate" \ "$pkgdir/etc/logrotate.d/${pkgname%-git}" - cd "$srcdir/${pkgname%-git}/ui" + pushd ui python setup.py install --root="$pkgdir/" --optimize=1 --skip-build + popd } |