summaryrefslogtreecommitdiff
path: root/debian/rules
blob: ecc1743e523c055aad1e38dfef1e3234eb0eaa9a (plain)
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 
#!/usr/bin/make -f # -*- makefile -*- #export DH_VERBOSE=1 export DH_OPTIONS export DH_GOPKG := github.com/snapcore/snapd #export DEB_BUILD_OPTIONS=nocheck export DH_GOLANG_EXCLUDES=tests export DH_GOLANG_GO_GENERATE=1 export PATH:=${PATH}:${CURDIR} RELEASE = $(shell lsb_release -c -s) TAGS= ifneq (,$(filter testkeys,$(DEB_BUILD_OPTIONS)))	TAGS=-tags withtestkeys endif %:	dh $@ --buildsystem=golang --with=golang --fail-missing --with systemd --builddirectory=_build override_dh_auto_build:	mkdir -p _build/src/$(DH_GOPKG)/cmd/snap/test-data	cp -a cmd/snap/test-data/*.gpg _build/src/$(DH_GOPKG)/cmd/snap/test-data/	dh_auto_build -- $(TAGS) override_dh_auto_test:	dh_auto_test ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))	# check that only the main trusted account-key is included	[ $$(strings _build/bin/snapd|grep -c -E "public-key-sha3-384: [a-zA-Z0-9_-]{64}") -eq 1 ]	strings _build/bin/snapd|grep -c "^public-key-sha3-384: -CvQKAwRQ5h3Ffn10FILJoEZUXOv6km9FwA80-Rcj-f-6jadQ89VRswHNiEB9Lxk$$" endif override_dh_systemd_enable:	# enable boot-ok	dh_systemd_enable \	-psnapd \	snapd.boot-ok.service	# enable the first boot service	dh_systemd_enable \	-psnapd \	snapd.firstboot.service	# we want the auto-update timer enabled by default	dh_systemd_enable \	-psnapd \	snapd.refresh.timer	# but the auto-update service disabled	dh_systemd_enable \	--no-enable \	-psnapd \	snapd.refresh.service	# enable snapd	dh_systemd_enable \	-psnapd \	snapd.socket	dh_systemd_enable \	-psnapd \	snapd.service override_dh_systemd_start:	# start boot-ok	dh_systemd_start \	-psnapd \	snapd.boot-ok.service	# we want to start the auto-update timer	dh_systemd_start \	-psnapd \	snapd.refresh.timer	# but not start the service	dh_systemd_start \	--no-start \	-psnapd \	snapd.refresh.service	# start snapd	dh_systemd_start \	-psnapd \	snapd.socket	dh_systemd_start \	-psnapd \	snapd.service override_dh_auto_install: snap.8	dh_auto_install -O--buildsystem=golang	# we do not need this in the package, its just needed during build	rm -rf ${CURDIR}/debian/tmp/usr/bin/xgettext-go	# Making the packages private	rm -rf ${CURDIR}/debian/snapd/usr/share/gocode	# we do not like /usr/bin/snappy anymore	rm -f ${CURDIR}/debian/tmp/usr/bin/snappy snap.8:	$(CURDIR)/_build/bin/snap help --man > $@ override_dh_auto_clean:	dh_auto_clean -O--buildsystem=golang	rm -vf snap.8