summaryrefslogtreecommitdiff
path: root/branding/templates/debian
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2019-07-29 18:06:53 +0200
committerRuben Pollan <meskio@sindominio.net>2019-08-05 11:46:21 -0400
commitd5f06cc47dcdfa4b61219ffbf280157a312e0efa (patch)
treee37e01bca8bf43ecf92357d959b8bf5377efb8ec /branding/templates/debian
parente709b4209e710eb1bb5e7facff73f72adae66d65 (diff)
[pkg] debian template
Diffstat (limited to 'branding/templates/debian')
-rw-r--r--branding/templates/debian/app.desktop-template14
-rw-r--r--branding/templates/debian/changelog-template5
-rw-r--r--branding/templates/debian/compat1
-rw-r--r--branding/templates/debian/control-template23
-rw-r--r--branding/templates/debian/copyright25
-rwxr-xr-xbranding/templates/debian/generate.py32
-rwxr-xr-xbranding/templates/debian/rules-template37
-rw-r--r--branding/templates/debian/source/format1
8 files changed, 138 insertions, 0 deletions
diff --git a/branding/templates/debian/app.desktop-template b/branding/templates/debian/app.desktop-template
new file mode 100644
index 0000000..eb831f7
--- /dev/null
+++ b/branding/templates/debian/app.desktop-template
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=${applicationName}
+Comment=Easy VPN by ${name}
+Comment[es]=VPN Facil de ${name}
+Comment[de]=Easy VPN by ${name}
+Exec=${binaryName} %U
+Terminal=false
+Icon=riseupvpn
+Categories=Network;Application;
+StartupNotify=true
+X-AppInstall-Package=${binaryName}
+Keywords=encryption;vpn;${name};leap
diff --git a/branding/templates/debian/changelog-template b/branding/templates/debian/changelog-template
new file mode 100644
index 0000000..7e44a93
--- /dev/null
+++ b/branding/templates/debian/changelog-template
@@ -0,0 +1,5 @@
+${binaryName} (${version}) unstable; urgency=medium
+
+ * Initial package.
+
+ -- LEAP Encryption Access Project <debian@leap.se> Mon, 29 Jul 2019 10:00:00 +0100
diff --git a/branding/templates/debian/compat b/branding/templates/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/branding/templates/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/branding/templates/debian/control-template b/branding/templates/debian/control-template
new file mode 100644
index 0000000..aaec638
--- /dev/null
+++ b/branding/templates/debian/control-template
@@ -0,0 +1,23 @@
+Source: ${binaryName}
+Section: net
+Priority: extra
+Maintainer: LEAP Encryption Access Project <debian@leap.se>
+Build-Depends: debhelper (>= 10.0.0), dh-golang, golang-go (> 2:1.9),
+ golang-golang-x-text-dev (>= 0.3.0-2),
+ libgtk-3-dev, libappindicator3-dev, pkg-config
+Standards-Version: 3.9.8
+
+Package: ${binaryName}
+Architecture: any
+Multi-Arch: foreign
+Depends: ${misc:Depends},
+ openvpn, libgtk-3-0, libappindicator3-1,
+ policykit-1-gnome | polkit-1-auth-agent,
+ python3,
+Enhances: openvpn
+Description: Easy, fast, and secure VPN service from ${name}.
+ This package is a custom build of the new Bitmask VPN client, preconfigured
+ to use the ${providerURL} 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/branding/templates/debian/copyright b/branding/templates/debian/copyright
new file mode 100644
index 0000000..e2a1670
--- /dev/null
+++ b/branding/templates/debian/copyright
@@ -0,0 +1,25 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: auth-pam
+Source: <https://0xacab.org/leap/riseup_vpn>
+
+Files: *
+Copyright: 2018 LEAP Encryption Access Project <info@leap.se>
+License: GPLv3
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/branding/templates/debian/generate.py b/branding/templates/debian/generate.py
new file mode 100755
index 0000000..141d8f9
--- /dev/null
+++ b/branding/templates/debian/generate.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+"""
+generate.py
+
+Generate a snap package for a given provider.
+"""
+
+import json
+import os
+from string import Template
+
+
+TEMPLATES = ('app.desktop', 'changelog', 'control', 'rules')
+
+
+here = os.path.split(os.path.realpath(__file__))[0]
+data = json.load(open(os.path.join(here, 'data.json')))
+
+
+def write_from_template(target):
+ template = Template(open(target + '-template').read())
+
+ with open(target, 'w') as output:
+ output.write(template.safe_substitute(data))
+
+
+for target in TEMPLATES:
+ write_from_template(target)
+
+
+print("[+] Debian files written to {path}".format(
+ path=os.path.abspath(here)))
diff --git a/branding/templates/debian/rules-template b/branding/templates/debian/rules-template
new file mode 100755
index 0000000..686cdd7
--- /dev/null
+++ b/branding/templates/debian/rules-template
@@ -0,0 +1,37 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+export DH_GOPKG = 0xacab.org/leap/bitmask-vpn
+export DH_GOLANG_EXCLUDES = vendor
+
+# TODO get the static version that gen_pkg generated instead??
+VERSION = debian-$(shell git describe --tags --always)
+APPNAME = ${binaryName}
+
+%:
+ dh $@ --with golang --buildsystem golang
+
+override_dh_auto_test:
+
+override_dh_auto_build:
+ rm -rf src/0xacab.org/leap/bitmask-vpn/tools/transifex
+ rm -rf obj-$(DEB_BUILD_GNU_TYPE)/src/0xacab.org/leap/bitmask-vpn/tools/transifex
+ rm -rf tools
+ dh_auto_build -O--buildsystem=golang -- -ldflags "-X main.version=$(VERSION)"
+
+override_dh_install:
+ mkdir -p $(CURDIR)/debian/${APPNAME}/usr/sbin
+ cp $(CURDIR)/helpers/bitmask-root $(CURDIR)/debian/${binaryName}/usr/sbin/
+ mkdir -p $(CURDIR)/debian/${APPNAME}/usr/share/polkit-1/actions
+ cp $(CURDIR)/helpers/se.leap.bitmask.policy $(CURDIR)/debian/${APPNAME}/usr/share/polkit-1/actions
+ rm -fr $(CURDIR)/debian/${APPNAME}/usr/share/gocode
+ strip $(CURDIR)/debian/${APPNAME}/usr/bin/bitmask-vpn
+ rm $(CURDIR)/debian/${APPNAME}/usr/bin/bitmask-helper
+ rm $(CURDIR)/debian/${APPNAME}/usr/bin/bitmask-connect
+ mv $(CURDIR)/debian/${APPNAME}/usr/bin/bitmask-vpn $(CURDIR)/debian/${APPNAME}/usr/bin/${APPNAME}
+ mkdir -p $(CURDIR)/debian/${APPNAME}/usr/share/${APPNAME}
+ cp $(CURDIR)/debian/icons/scalable/icon.svg $(CURDIR)/debian/${APPNAME}/usr/share/${APPNAME}/icon.svg
+ dh_install
diff --git a/branding/templates/debian/source/format b/branding/templates/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/branding/templates/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)