summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2019-01-24 00:52:41 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2019-01-24 02:05:42 +0100
commit6d0164d023718031357fd53f3aec5c9d1d764bcd (patch)
treebf0b1d4e1b7914b20db3dd7e77ef5f12ced609df
parent2231cce159bcf92004fbcc23a20399b26bc49243 (diff)
[pkg] update deb after code refactor
this must be run from the Makefile. it also needs recent changes to bitmask-vpn, including the removal of golang.org/x/text and others from the vendor.
-rw-r--r--.gitignore1
-rwxr-xr-xMakefile20
-rw-r--r--debian/control6
-rw-r--r--debian/riseup-vpn.desktop14
-rwxr-xr-xdebian/rules16
5 files changed, 42 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index 3184271..3bfee2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@
*.pyc
staging/*
dist/*
+build/*
__pycache__
win/*-installer.nsi
diff --git a/Makefile b/Makefile
index bf3296d..de677c5 100755
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+APPNAME := riseup-vpn
SYSTRAY := 0xacab.org/leap/bitmask-vpn
STAGING := staging
SYSTRAY_BIN := bitmask-vpn
@@ -7,7 +8,7 @@ BUILD_RELEASE?=no
OSX_CERT = "Developer ID Installer: LEAP Encryption Access Project"
VERSION = $(shell git -C `go env GOPATH`/src/$(SYSTRAY) describe --tags --always)
-TGZ_PATH = $(shell pwd)/dist/riseup-vpn-$(VERSION)
+TGZ_PATH = $(shell pwd)/dist/$(APPNAME)-$(VERSION)
tgz:
mkdir -p $(TGZ_PATH)
git -C `go env GOPATH`/src/$(SYSTRAY) archive HEAD | tar -x -C $(TGZ_PATH)
@@ -15,7 +16,7 @@ tgz:
wget -O $(TGZ_PATH)/helpers/bitmask-root https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root
chmod +x $(TGZ_PATH)/helpers/bitmask-root
wget -O $(TGZ_PATH)/helpers/se.leap.bitmask.policy https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/se.leap.bitmask.policy
- cd dist; tar cvzf riseup-vpn-$(VERSION).tgz riseup-vpn-$(VERSION)
+ cd dist; tar cvzf $(APPNAME)-$(VERSION).tgz $(APPNAME)-$(VERSION)
rm -r $(TGZ_PATH)
# -----------------------------------------------------------------------------
@@ -104,14 +105,25 @@ build_snap:
snapcraft build
snapcraft snap
mkdir -p dist
- mv riseup-vpn* dist/
+ mv $(APPNAME)* dist/
+
+DEB_VER = $(shell dpkg-parsechangelog -SVersion | cut -d '-' -f 1)
+build_deb: tgz
+ echo "[+] building deb..."
+ mkdir -p build
+ mkdir -p dist
+ cp dist/$(APPNAME)-$(VERSION).tgz build/$(APPNAME)_$(DEB_VER).orig.tar.gz
+ cd build && tar xzf $(APPNAME)_$(DEB_VER).orig.tar.gz
+ cp -r debian/ build/$(APPNAME)-$(VERSION)/
+ cd build/$(APPNAME)-$(VERSION) && debuild -us -uc
+ cp build/$(APPNAME)_$(shell dpkg-parsechangelog -SVersion)_*.deb dist/
# -----------------------------------------------------------------------------
# Utils
# -----------------------------------------------------------------------------
clean:
- rm -rf dist/
+ rm -rf dist/ build/
staging\nssm.exe:
xcopy /y "C:\ProgramData\chocolatey\lib\NSSM\tools\nssm.exe" $(STAGING)
diff --git a/debian/control b/debian/control
index 8a22150..cd11b9e 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: riseup-vpn
Section: net
Priority: extra
Maintainer: LEAP Encryption Access Project <debian@leap.se>
-Build-Depends: debhelper (>= 10.0.0), golang-go, dh-golang
+Build-Depends: debhelper (>= 10.0.0), dh-golang, golang-go, golang-golang-x-text-dev (>= 0.3.0-2)
Standards-Version: 3.9.8
Package: riseup-vpn
@@ -13,9 +13,9 @@ Depends: ${misc:Depends},
policykit-1-gnome | polkit-1-auth-agent,
python2 | python3,
Enhances: openvpn
-Description: Easy, fast, and secure VPN service from RiseUp.
+Description: Easy, fast, and secure VPN service from Riseup.
This package is a custom build of the new Bitmask VPN client, preconfigured
- to use the RiseUp provider.
+ to use the https://riseup.net provider.
.
The service does not require a user account, keep logs, or track you in any
way. The service is paid for entirely by donations from users.
diff --git a/debian/riseup-vpn.desktop b/debian/riseup-vpn.desktop
new file mode 100644
index 0000000..6b847e6
--- /dev/null
+++ b/debian/riseup-vpn.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=RiseupVPN
+Comment=Easy VPN by Riseup
+Comment[es]=VPN Facil de Riseup
+Comment[de]=Easy VPN by Riseup
+Exec=riseup-vpn %U
+Terminal=false
+Icon=riseup-vpn
+Categories=Network;Application;
+StartupNotify=true
+X-AppInstall-Package=riseup-vpn
+Keywords=encryption;vpn;riseup;leap
diff --git a/debian/rules b/debian/rules
index 193f2a9..7bfad39 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@
# This has to be exported to make some magic below work.
export DH_OPTIONS
-export DH_GOPKG = 0xacab.org/leap/riseup_vpn
+export DH_GOPKG = 0xacab.org/leap/bitmask-vpn
export DH_GOLANG_EXCLUDES = vendor
%:
@@ -13,11 +13,9 @@ export DH_GOLANG_EXCLUDES = vendor
override_dh_auto_test:
override_dh_auto_build:
- # FIXME how ugly is this?
- # this is the only way I found of having a quilt package made for the customized builds that gets
- # in place the sources for bitmask-vpn
- # XXX What var can I use instead of the hardcoded build dir?
- ln -s `pwd` obj-x86_64-linux-gnu/src/0xacab.org/leap/bitmask-systray
+ rm -rf src/0xacab.org/leap/bitmask-vpn/tools/transifex
+ rm -rf obj-x86_64-linux-gnu/src/0xacab.org/leap/bitmask-vpn/tools/transifex
+ rm -rf tools
dh_auto_build
override_dh_install:
@@ -26,6 +24,8 @@ override_dh_install:
mkdir -p $(CURDIR)/debian/riseup-vpn/usr/share/polkit-1/actions
cp $(CURDIR)/helpers/se.leap.bitmask.policy $(CURDIR)/debian/riseup-vpn/usr/share/polkit-1/actions
rm -fr $(CURDIR)/debian/riseup-vpn/usr/share/gocode
- rm -fr $(CURDIR)/debian/riseup-vpn/usr/bin/transifex
- strip $(CURDIR)/debian/riseup-vpn/usr/bin/riseup_vpn
+ strip $(CURDIR)/debian/riseup-vpn/usr/bin/bitmask-vpn
+ rm $(CURDIR)/debian/riseup-vpn/usr/bin/bitmask-helper
+ rm $(CURDIR)/debian/riseup-vpn/usr/bin/bitmask-connect
+ mv $(CURDIR)/debian/riseup-vpn/usr/bin/bitmask-vpn $(CURDIR)/debian/riseup-vpn/usr/bin/riseup-vpn
dh_install