Skip to content

Add PKGBUILD to build bitmaks-vpn package for Arch Linux in CI, fixes #849

Pea Nut requested to merge fix-849 into main

Let's have a discussion - see below

# Maintainer: Pea <peanut2 [aaaaat] systemli [dooot] org>

pkgname=bitmask-vpn
pkgver=0.24.5
pkgrel=1
pkgdesc="desktop client of LEAP VPN - a VPN service for censorship circumvention, location anonymization and traffic encryption"
arch=("x86_64")
license=("GPL-3.0-only")
url="https://0xacab.org/leap/bitmask-vpn"

source=("git+$url.git#tag=$pkgver")
sha256sums=('accbd199b20b91a642194d59f3a5e37d7ca3c4a606203093d17cdf69776f1bc1')

#source=("https://0xacab.org/leap/bitmask-vpn/-/archive/$pkgver/bitmask-vpn-$pkgver.tar.gz")
#sha256sums=('e56a12d27678c4820defb6fb8d436891cf7e60d6569c3fd2cb41d179832749f6')

# 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')

conflicts=('riseup-vpn' 'riseup-vpn-git')

prepare() {
  #cd "$pkgname-$pkgver"
  cd bitmask-vpn
  export GOCACHE="$srcdir/GOCACHE"
  PROVIDER=bitmask make vendor
}


build() {
  #cd "$pkgname-$pkgver"
  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"
  PROVIDER=bitmask QMAKE=qmake6 LRELEASE=/usr/lib/qt6/bin/lrelease make build -j $(nproc)
}

check() {
  #cd "$pkgname-$pkgver"
  cd bitmask-vpn
  CI="dont run CI tests as they are broken" make test
}

package() {
  #cd "$pkgname-$pkgver"
  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"
}

Merge request reports

Loading