Skip to content
Snippets Groups Projects
Verified Commit 47161aa6 authored by Pea Nut's avatar Pea Nut
Browse files

Add PKGBUILD to build Arch Linux development package

- provider is bitmask
- version is current main, as testing latest stable in the CI after
  each commit does not have a real benefit
- Added a new directory ArchLinux (there is already a for directory debian)
- There is a new target `package_arch` to create the Arch package - There is a check before if we are on a Arch System
- I did not add the `package_arch`  to the `packages` target (we can not be an Debian and Arch on the same time)
- `make clean` deletes temporary build files
- Updated .gitignore
parent 4ee5fba6
No related branches found
No related tags found
1 merge request!216Add PKGBUILD to build bitmaks-vpn package for Arch Linux in CI, fixes #849
......@@ -29,3 +29,9 @@ debian/files
# IDE
.idea
.vs
# Arch Linux package
ArchLinux/src
ArchLinux/pkg
ArchLinux/bitmask-vpn
ArchLinux/*.tar.zst
# Maintainer: Pea <peanut2 [aaaaat] systemli [dooot] org>
pkgname=bitmask-vpn-git
pkgrel=1
pkgdesc="Bitmask is an open source application to provide easy and secure encrypted communication with a VPN"
pkgver=0.24.6.rc.1.r10.g4ee5fba
arch=("x86_64")
license=("GPL-3.0-only")
url="https://0xacab.org/leap/bitmask-vpn"
conflicts=('riseup-vpn' 'riseup-vpn-git')
source=("git+$url.git")
sha256sums=('SKIP')
# qt6-tools has /usr/lib/qt6/bin/lrelease
makedepends=('git' 'make' 'go' 'qt6-tools')
depends=('qt6-base' 'qt6-declarative' 'qt6-svg' 'openvpn' 'python' 'lxsession' 'iptables')
pkgver() {
cd bitmask-vpn
git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd bitmask-vpn
export GOCACHE="$srcdir/GOCACHE"
PROVIDER=bitmask make vendor
}
build() {
cd bitmask-vpn
export GOCACHE="$srcdir/GOCACHE"
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"
export PROVIDER=bitmask
export QMAKE=qmake6
export LRELEASE=/usr/lib/qt6/bin/lrelease
make build -j $(nproc)
}
check() {
cd bitmask-vpn
export GOCACHE="$srcdir/GOCACHE"
CI="dont run integration tests as they are broken" make test
}
package() {
cd bitmask-vpn
install -Dm755 build/qt/release/bitmask-vpn "$pkgdir/usr/bin/bitmask-vpn"
install -Dm755 helpers/bitmask-root "$pkgdir/usr/bin/bitmask-root"
install -Dm644 helpers/se.leap.bitmask.policy "$pkgdir/usr/share/polkit-1/actions/se.leap.bitmask.policy"
install -Dm644 build/bitmask/debian/bitmask-vpn.desktop "$pkgdir/usr/share/applications/bitmask-vpn.desktop"
install -Dm644 build/bitmask/debian/icons/scalable/bitmask-vpn.png "$pkgdir/usr/share/icons/hicolor/128x128/apps/bitmask-vpn.png"
}
......@@ -297,6 +297,7 @@ clean:
@rm -rf lib/*
@rm -rf build/
@-unlink branding/assets/default
@cd ArchLinux && rm -rf bitmask-vpn pkg src *.tar.zst
########################################################################
......@@ -435,6 +436,11 @@ package_snap:
package_deb:
@${MAKE} -C build/${PROVIDER} pkg_deb
package_arch:
grep -q "Arch Linux" /etc/issue || (echo "Arch Linux system is required to build the Arch Linux package" && exit 1)
# at least the makepkg binary is mandatory, makepkg is part pacman package
(cd ArchLinux && makepkg --syncdeps --noconfirm)
sign_artifact:
@find ${FILE} -type f -not -name "*.asc" -print0 | xargs -0 -n1 -I{} sha256sum -b "{}" | sed 's/*deploy\///' > ${FILE}.sha256
@gpg --clear-sign --armor ${FILE}.sha256
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment