build it as a debian package and then test circleci

This commit is contained in:
idk
2019-09-24 22:33:30 -04:00
parent 3bda43a77d
commit 608b344c45
3 changed files with 60 additions and 23 deletions

16
.circleci/config.yml Normal file
View File

@@ -0,0 +1,16 @@
version: 2
jobs:
build:
docker:
- image: debian:stretch
steps:
- checkout
- run:
name: Dependencies
command: apt-get -yq install devscripts build-essential lintian zip make
- run:
name: Build
command: make zip deb

View File

@@ -1,26 +1,28 @@
PREFIX:=/usr
default: zip
install: uninstall
mkdir -p /usr/share/webext/i2psetproxy.js@eyedeekay.github.io \
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
cp -rv options /usr/share/webext/i2psetproxy.js@eyedeekay.github.io/options
cp -rv icons /usr/share/webext/i2psetproxy.js@eyedeekay.github.io/icons
cp -rv _locales /usr/share/webext/i2psetproxy.js@eyedeekay.github.io/_locales
cp background.js /usr/share/webext/i2psetproxy.js@eyedeekay.github.io
cp proxy.js /usr/share/webext/i2psetproxy.js@eyedeekay.github.io
cp info.js /usr/share/webext/i2psetproxy.js@eyedeekay.github.io
cp content.js /usr/share/webext/i2psetproxy.js@eyedeekay.github.io
cp info.css /usr/share/webext/i2psetproxy.js@eyedeekay.github.io
cp window.html /usr/share/webext/i2psetproxy.js@eyedeekay.github.io
cp manifest.json /usr/share/webext/i2psetproxy.js@eyedeekay.github.io/
cp README.md /usr/share/webext/i2psetproxy.js@eyedeekay.github.io
cp LICENSE /usr/share/webext/i2psetproxy.js@eyedeekay.github.io
ln -sf /usr/share/webext/i2psetproxy.js@eyedeekay.github.io \
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2psetproxy.js@eyedeekay.github.io
install -d $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io \
$(PREFIX)/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
install -d options $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io/options
install -d icons $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io/icons
install -d _locales $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io/_locales
install background.js $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io
install proxy.js $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io
install info.js $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io
install content.js $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io
install info.css $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io
install window.html $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io
install manifest.json $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io/
install README.md $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io
install LICENSE $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io
ln -sf $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io \
$(PREFIX)/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2psetproxy.js@eyedeekay.github.io
uninstall:
rm -rf /usr/share/webext/i2psetproxy.js@eyedeekay.github.io \
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2psetproxy.js@eyedeekay.github.io
rm -rf $(PREFIX)/share/webext/i2psetproxy.js@eyedeekay.github.io \
$(PREFIX)/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2psetproxy.js@eyedeekay.github.io
clobber:
rm -f ../i2psetproxy.js.zip ../i2p_proxy*.xpi
@@ -45,7 +47,7 @@ profile-install:
cp ./i2psetproxy.js@eyedeekay.github.io.xpi $(HOME)/.mozilla/firefox/.firefox.profile.i2p.default/extensions
to-profile:
cp ./i2psetproxy.js@eyedeekay.github.io.xpi /usr/local/lib/firefox.profile.i2p/firefox.profile.i2p/extensions/
cp ./i2psetproxy.js@eyedeekay.github.io.xpi $(PREFIX)/local/lib/firefox.profile.i2p/firefox.profile.i2p/extensions/
pi: profile-install
@@ -68,4 +70,7 @@ fmt:
deborig:
rm -rfv ../i2psetproxy.js-$(VERSION)
cp -rv . ../i2psetproxy.js-$(VERSION)
tar --exclude=.git -cvzf ../i2psetproxy.js-$(VERSION).tar.gz .
tar --exclude='./.git' -cvzf ../i2psetproxy.js-$(VERSION).tar.gz .
deb: deborig
cd ../i2psetproxy.js-$(VERSION) && debuild -us -uc -rfakeroot

22
debian/rules vendored
View File

@@ -6,10 +6,26 @@
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
dh $@
dh $@
#override_dh_auto_install:
# dh_auto_install -- prefix=/usr
override_dh_auto_install:
install -d $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io \
$$(pwd)/debian/i2psetproxy.js/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
install -d options $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io/options
install -d icons $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io/icons
install -d _locales $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io/_locales
install background.js $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io
install proxy.js $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io
install info.js $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io
install content.js $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io
install info.css $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io
install window.html $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io
install manifest.json $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io/
install README.md $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io
install LICENSE $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io
ln -sf $$(pwd)/debian/i2psetproxy.js/share/webext/i2psetproxy.js@eyedeekay.github.io \
$$(pwd)/debian/i2psetproxy.js/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2psetproxy.js@eyedeekay.github.io
#dh_auto_install -- prefix=/usr
#override_dh_install:
# dh_install --list-missing -X.pyc -X.pyo