From e9c0e2edf44d6d185ae02adfc88b3ddabf660776 Mon Sep 17 00:00:00 2001
From: "kali kaneko (leap communications)" <kali@leap.se>
Date: Thu, 11 Feb 2021 21:12:05 +0100
Subject: [PATCH] [pkg] build debian package

---
 .gitlab-ci.yml | 12 +++++++++++-
 debian/control |  8 ++++----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4f6efa4e..697a2a3f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,7 @@
 stages:
   - build
   - push
-  - trigger
+  - debian
   - vendor
 
 build_test:
@@ -53,6 +53,16 @@ build_test:
 #     - echo "Triggering CI pipeline on https://0xacab.org/leap/riseup-vpn_package/pipelines"
 #     - "curl -X POST -F token=$RISEUP_VPN_DEB_TRIGGER_TOKEN -F ref=master https://0xacab.org/api/v4/projects/1916/trigger/pipeline"
 
+debian:
+  # TODO use a buster builder image, but upgrade golang version for compatibility
+  image: registry.0xacab.org/leap/bitmask-vpn:latest
+  stage: debian
+  script:
+    - 'PROVIDER="riseup" make vendor && rm -rf .build && mkdir -p .build && rm -f *.deb && cp -dR * .build/. && cd .build && debuild -us -uc'
+  artifacts:
+    paths:
+      - '*.deb'
+
 vendorize:
   image: registry.0xacab.org/leap/bitmask-vpn:latest
   stage: vendor
diff --git a/debian/control b/debian/control
index 595033d6..194ba39e 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,7 @@ Section: net
 Priority: extra
 Maintainer: LEAP Encryption Access Project <debian@leap.se>
 Build-Depends: debhelper-compat (= 12), golang-go (>= 2:1.9), make, pkg-config, g++, git,
-        qt5-qmake, qttools5-dev-tools, libqt5qml5, libqt5quick5, qtdeclarative5-dev,
-        qtbase5-dev
+        qt5-qmake, qttools5-dev-tools, qtbase5-dev, libqt5qml5, libqt5quick5, qtdeclarative5-dev
 Standards-Version: 4.4.1
 Homepage: https://0xacab.org/leap/bitmask-vpn
 #Vcs-Browser: https://0xacab.org/leap/bitmask-vpn
@@ -13,9 +12,10 @@ Homepage: https://0xacab.org/leap/bitmask-vpn
 Package: riseup-vpn
 Architecture: any
 Enhances: openvpn
-Depends: ${shlibs:Depends}, ${misc:Depends}, openvpn, policykit-1-gnome | polkit-1-auth-agent, python3,
+Depends: libqt5core5a, libqt5gui5 | libqt5gui5-gles, libqt5qml5, libqt5widgets5, libstdc++6,
         qml-module-qtquick2, qml-module-qtquick-controls, qml-module-qtquick-dialogs,
-        qml-module-qtquick-extras, qml-module-qt-labs-platform
+        qml-module-qtquick-extras, qml-module-qt-labs-platform,
+        openvpn, policykit-1-gnome | polkit-1-auth-agent, python3
 Description: Easy, fast, and secure VPN service from riseup.net.
  .
  The service does not require a user account, keep logs, or track you in any
-- 
GitLab