Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vladimir KozLove
bitmask-vpn
Commits
50372107
Unverified
Commit
50372107
authored
5 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[pkg] squash targets
parent
81e9e16e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Makefile
+72
-40
72 additions, 40 deletions
Makefile
branding/README.rst
+21
-22
21 additions, 22 deletions
branding/README.rst
docker/Dockerfile
+25
-0
25 additions, 0 deletions
docker/Dockerfile
docker/Makefile
+10
-0
10 additions, 0 deletions
docker/Makefile
pkg/config/config.go
+1
-1
1 addition, 1 deletion
pkg/config/config.go
with
129 additions
and
63 deletions
Makefile
+
72
−
40
View file @
50372107
#########################################################################
# Multiplatform build and packaging recipes for BitmaskVPN
# (c) LEAP Encryption Access Project, 2019
#########################################################################
.PHONY
:
all get build build_bitmaskd icon locales generate_locales clean
TAGS
?=
gtk_3_18
...
...
@@ -15,6 +20,10 @@ SCRIPTS = "branding/scripts"
all
:
icon locales get build
#########################################################################
# go build
#########################################################################
depends
:
-
@make depends
$(
UNAME
)
go get
-u
golang.org/x/text/cmd/gotext github.com/cratonica/2goarray
...
...
@@ -34,6 +43,43 @@ get:
go get
-tags
$(
TAGS
)
./...
go get
-tags
"
$(
TAGS
)
bitmaskd"
./...
build
:
$(foreach path
,
$(wildcard cmd/*)
,
build_$(patsubst cmd/%
,
%
,
$(path)))
build_%
:
go build
-tags
$(
TAGS
)
-ldflags
"-X main.version=
`
git describe
--tags
`
"
-o
$*
./cmd/
$*
# FIXME does not work in osx
# strip $*
mkdir
-p
build/bin
mv
$*
build/bin/
mkdir
-p
build/
${
PROVIDER
}
/staging
ln
-s
../../bin/
$*
build/
${
PROVIDER
}
/staging/
$*
test
:
go
test
-tags
"integration
$(
TAGS
)
"
./...
build_bitmaskd
:
go build
-tags
"
$(
TAGS
)
bitmaskd"
-ldflags
"-X main.version=
`
git describe
--tags
`
"
./cmd/
*
build_win
:
powershell
-Command
'$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*'
clean
:
rm
-f
build/
${
PROVIDER
}
/bin/bitmask-
*
unlink
branding/assets/default
#########################################################################
# packaging templates
#########################################################################
prepare
:
prepare_templates gen_pkg_win gen_pkg_osx gen_pkg_snap gen_pkg_deb
prepare_templates
:
generate relink_default tgz
mkdir
-p
build/
${
PROVIDER
}
/bin/
cp
${
TEMPLATES
}
/makefile/Makefile build/
${
PROVIDER
}
/Makefile
VERSION
=
${
VERSION
}
PROVIDER_CONFIG
=
${
PROVIDER_CONFIG
}
${
SCRIPTS
}
/generate-vendor-make.py build/
${
PROVIDER
}
/vendor.mk
${
SCRIPTS
}
/check-ca-crt.py
${
PROVIDER
}
${
PROVIDER_CONFIG
}
generate
:
go generate cmd/bitmask-vpn/main.go
...
...
@@ -43,13 +89,17 @@ ifneq (,$(wildcard ${DEFAULT_PROVIDER}))
endif
cd
branding/assets
&&
ln
-s
${
PROVIDER
}
default
prepare
:
generate relink_default tgz
mkdir
-p
build/
${
PROVIDER
}
/bin/
cp
${
TEMPLATES
}
/makefile/Makefile build/
${
PROVIDER
}
/Makefile
VERSION
=
${
VERSION
}
PROVIDER_CONFIG
=
${
PROVIDER_CONFIG
}
${
SCRIPTS
}
/generate-vendor-make.py build/
${
PROVIDER
}
/vendor.mk
${
SCRIPTS
}
/check-ca-crt.py
${
PROVIDER
}
${
PROVIDER_CONFIG
}
# FIXME trouble in win - better get into repo
#-@make icon
TGZ_NAME
=
bitmask-vpn_
${
VERSION
}
-src
TGZ_PATH
=
$(
shell
pwd
)
/build/
${
TGZ_NAME
}
tgz
:
mkdir
-p
$(
TGZ_PATH
)
git archive HEAD |
tar
-x
-C
$(
TGZ_PATH
)
mkdir
$(
TGZ_PATH
)
/helpers
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
build/
&&
tar
cvzf bitmask-vpn_
$(
VERSION
)
.tgz
${
TGZ_NAME
}
rm
-r
$(
TGZ_PATH
)
gen_pkg_win
:
mkdir
-p
build/
${
PROVIDER
}
/windows/
...
...
@@ -88,46 +138,28 @@ gen_pkg_deb:
cd
build/
${
PROVIDER
}
/debian
&&
python3 generate.py
cd
build/
${
PROVIDER
}
/debian
&&
rm
app.desktop-template changelog-template rules-template control-template generate.py data.json
&&
chmod
+x rules
gen_pkg_all
:
prepare gen_pkg_win gen_pkg_osx gen_pkg_snap gen_pkg_deb
build
:
$(foreach path
,
$(wildcard cmd/*)
,
build_$(patsubst cmd/%
,
%
,
$(path)))
build_%
:
go build
-tags
$(
TAGS
)
-ldflags
"-X main.version=
`
git describe
--tags
`
"
-o
$*
./cmd/
$*
# FIXME does not work in osx
# strip $*
mkdir
-p
build/bin
mv
$*
build/bin/
mkdir
-p
build/
${
PROVIDER
}
/staging
ln
-s
../../bin/
$*
build/
${
PROVIDER
}
/staging/
$*
#########################################################################
# packaging action
#########################################################################
test
:
go
test
-tags
"integration
$(
TAGS
)
"
./...
pkg
:
pkg_win pkg_osx pkg_deb pkg_snap
build_bitmaskd
:
go build
-tags
"
$(
TAGS
)
bitmaskd"
-ldflags
"-X main.version=
`
git describe
--tags
`
"
./cmd/
*
pkg_win
:
@
make
-C
build/
${
PROVIDER
}
pkg_win
build_win
:
powershell
-Command
'$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*'
pkg_osx
:
@
make
-C
build/
${
PROVIDER
}
pkg_osx
pkg_deb
:
@
make
-C
build/
${
PROVIDER
}
pkg_deb
TGZ_NAME
=
bitmask-vpn_
${
VERSION
}
-src
TGZ_PATH
=
$(
shell
pwd
)
/build/
${
TGZ_NAME
}
tgz
:
mkdir
-p
$(
TGZ_PATH
)
git archive HEAD |
tar
-x
-C
$(
TGZ_PATH
)
mkdir
$(
TGZ_PATH
)
/helpers
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
build/
&&
tar
cvzf bitmask-vpn_
$(
VERSION
)
.tgz
${
TGZ_NAME
}
rm
-r
$(
TGZ_PATH
)
pkg_snap
:
@
make
-C
build/
${
PROVIDER
}
pkg_snap
clean
:
make
-C
icon clean
rm
-f
build/
${
PROVIDER
}
/bin/bitmask-
*
unlink
branding/assets/default
#########################################################################
# icons & locales
#########################################################################
icon
:
make
-C
icon
...
...
This diff is collapsed.
Click to expand it.
branding/README.
tx
t
→
branding/README.
rs
t
+
21
−
22
View file @
50372107
...
...
@@ -8,21 +8,16 @@ BitmaskVPN for your provider.
Configure
--------------------------------------------------------------------------------
-
Copy or edit the file at 'branding/config/vendor.conf'. Add all the needed variables.
-
Copy your provider CA certificate to the same folder: 'branding/config/<provider>-ca.crt'
-
Make sure that the folder 'branding/assets/<provider>' exists. Copy there all the needed assets.
*
Copy or edit the file at 'branding/config/vendor.conf'. Add all the needed variables.
*
Copy your provider CA certificate to the same folder: 'branding/config/<provider>-ca.crt'
*
Make sure that the folder 'branding/assets/<provider>' exists. Copy there all the needed assets.
Checkout
--------------------------------------------------------------------------------
git clone https://0xacab.org/leap/bitmask-vpn
cd bitmask-vpn
git pull --tags
Build
--------------------------------------------------------------------------------
make build
git clone https://0xacab.org/leap/bitmask-vpn
cd bitmask-vpn
git pull --tags
Package
...
...
@@ -32,21 +27,25 @@ NOTE: Some of the following scripts need network access, since they will check
whether the configuration published by your provider matches what is configured
before the build.
Run:
Run::
PROVIDER=example make prepare
You can also specify a custom config file::
PROVIDER=example make prepare
_all
PROVIDER=example
PROVIDER_CONFIG=/path/to/vendor.conf
make prepare
You can also specify a cusom config fil
e:
Then you need to build the packag
e:
:
PROVIDER=example PROVIDER_CONFIG=/path/to/vendor.conf make prepare_all
make build
make build
After this, you will find the build scripts ready in the following folder
:
Then you can build all the packages:
:
cd build/example
make pkg
make package_win
make package_osx
make package_snap
make package_deb
Alternatively, you can build only for an specific os::
make pkg_win
make pkg_osx
make pkg_snap
make pkg_deb
This diff is collapsed.
Click to expand it.
docker/Dockerfile
0 → 100644
+
25
−
0
View file @
50372107
# An image to build and package the Bitmask Lite (RiseupVPN and other branded builds)
# (c) LEAP Encryption Access Project 2018
FROM
ubuntu:disco
MAINTAINER
LEAP Encryption Access Project <info@leap.se>
LABEL
Description="An image to build Bitmask Lite" Vendor="LEAP" Version="1.1"
RUN
apt update
&&
apt upgrade
-y
# Install all the deps for building and packaging bitmask-vpn
RUN
apt
install
-y
--no-install-recommends
\
build-essential
\
make
\
git curl wget
\
golang libappindicator3-dev libgtk-3-dev
\
mingw-w64 upx-ucl python snapcraft
\
unzip
\
devscripts fakeroot debhelper dh-golang golang-golang-x-text-dev
# we need nsis >= 3.0
RUN
echo
'deb http://archive.ubuntu.com/ubuntu cosmic universe'
>>
/etc/apt/sources.list
RUN
apt update
RUN
apt
install
-y
--no-install-recommends
-t
cosmic nsis
This diff is collapsed.
Click to expand it.
docker/Makefile
0 → 100644
+
10
−
0
View file @
50372107
IMAGE
=
bitmask-vpn
build
:
docker build
-t
0xacab.org:4567/leap/docker/
$(
IMAGE
)
:latest .
push
:
docker push 0xacab.org:4567/leap/docker/
$(
IMAGE
)
:latest
prune
:
docker system prune
login
:
docker login 0xacab.org:4567
This diff is collapsed.
Click to expand it.
pkg/config/config.go
+
1
−
1
View file @
50372107
// Code generated by go generate; DO NOT EDIT.
// This file was generated by vendorize.py
// At 2019-0
7-30 21:50:50
// At 2019-0
8-06 16:59:01
package
config
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment