File: rules

package info (click to toggle)
browserpass 2.0.22-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 568 kB
  • sloc: sh: 128; makefile: 112
file content (39 lines) | stat: -rwxr-xr-x 1,967 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/make -f
#export DH_VERBOSE = 1

%:
	dh $@ --with=golang --buildsystem=golang

override_dh_auto_build:
	dh_auto_build
	# browserify-lite needs the dependencies locally
	-mkdir node_modules
	ln -s /usr/lib/nodejs/fuzzysort/ /usr/lib/nodejs/mithril/ /usr/lib/nodejs/url /usr/lib/nodejs/punycode /usr/lib/nodejs/tldjs node_modules
	browserify-lite $$(pwd)/chrome/script.browserify.js --outfile $$(pwd)/chrome/script.js
	browserify-lite $$(pwd)/chrome/options.browserify.js --outfile $$(pwd)/chrome/options.js
	# browserify-lite creates a non-working file, use upstream's version for the time being
	#browserify-lite $$(pwd)/chrome/background.browserify.js --outfile $$(pwd)/chrome/background.js

	sed -e 's#%%replace%%#/usr/lib/browserpass/browserpass#' chrome/host.json > chrome-host.json
	sed -e 's#%%replace%%#/usr/lib/browserpass/browserpass#' firefox/host.json > firefox-host.json

	# The extension ID seems to be different in our build
	sed -i -e 's#"chrome-extension://naepdomgkenhinolocfifgehidddafch/",#"chrome-extension://naepdomgkenhinolocfifgehidddafch/",\n    "chrome-extension://cbfnbkdnigbahbkcikfppmaonggdbcpa/",#' chrome-host.json

override_dh_auto_install:
	dh_auto_install -- --no-source

override_dh_install:
	dh_install -X LIXENSE.txt
	
	# clean up the installation
	mv debian/webext-browserpass/usr/bin/browserpass debian/webext-browserpass/usr/lib/browserpass
	rmdir debian/webext-browserpass/usr/bin
	mv debian/webext-browserpass/etc/chromium/native-messaging-hosts/chrome-host.json debian/webext-browserpass/etc/chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json
	mv debian/webext-browserpass/usr/lib/mozilla/native-messaging-hosts/firefox-host.json debian/webext-browserpass/usr/lib/mozilla/native-messaging-hosts/com.dannyvankooten.browserpass.json

override_dh_clean:
	dh_clean
	-rm -fr chrome/background.js chrome/options.js chrome/script.js chrome-host.json firefox-host.json node_modules

override_dh_auto_test: