mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
108 lines
2.7 KiB
Makefile
Executable File
108 lines
2.7 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
# -*- makefile -*-
|
|
|
|
#export DH_VERBOSE=1
|
|
export DH_OPTIONS
|
|
export DH_GOPKG := github.com/ubuntu-core/snappy
|
|
#export DEB_BUILD_OPTIONS=nocheck
|
|
export DH_GOLANG_EXCLUDES=integration-tests
|
|
|
|
RELEASE = $(shell lsb_release -c -s)
|
|
|
|
%:
|
|
dh $@ --buildsystem=golang --with=golang --fail-missing --with systemd
|
|
|
|
override_dh_systemd_enable:
|
|
# enable boot-ok
|
|
dh_systemd_enable \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.boot-ok.service
|
|
# enable the security policy generation
|
|
dh_systemd_enable \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.run-hooks.service
|
|
# enable the first boot service
|
|
dh_systemd_enable \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.firstboot.service
|
|
# enable the grub-migrate boot service
|
|
dh_systemd_enable \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.grub-migrate.service
|
|
# we want the autopilot timer enabled by default
|
|
dh_systemd_enable \
|
|
-pubuntu-snappy \
|
|
snappy-autopilot.timer
|
|
# but the autopilot service disabled
|
|
dh_systemd_enable \
|
|
--no-enable \
|
|
-pubuntu-snappy \
|
|
snappy-autopilot.service
|
|
# enable wait4network
|
|
dh_systemd_enable \
|
|
-pubuntu-snappy \
|
|
snappy-wait4network.service
|
|
# enable snapd
|
|
dh_systemd_enable \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.snapd.socket
|
|
|
|
override_dh_systemd_start:
|
|
# start boot-ok
|
|
dh_systemd_start \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.boot-ok.service
|
|
# start grub-migrate
|
|
dh_systemd_start \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.grub-migrate.service
|
|
# start run-hooks
|
|
dh_systemd_start \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.run-hooks.service
|
|
# we want to start the autopilot timer
|
|
dh_systemd_start \
|
|
-pubuntu-snappy \
|
|
snappy-autopilot.timer
|
|
# but not start the service
|
|
dh_systemd_start \
|
|
--no-start \
|
|
-pubuntu-snappy \
|
|
snappy-autopilot.service
|
|
# start wait4network
|
|
dh_systemd_start \
|
|
-pubuntu-snappy \
|
|
snappy-wait4network.service
|
|
# start snapd
|
|
dh_systemd_start \
|
|
-pubuntu-snappy \
|
|
ubuntu-snappy.snapd.socket
|
|
|
|
# we need the builddir; is there a simpler way to get it?
|
|
BUILDDIR:=${CURDIR}/obj-$(shell dpkg-architecture -qDEB_TARGET_GNU_TYPE)
|
|
|
|
override_dh_auto_build:
|
|
dh_auto_build
|
|
# this will update the i18n stuff using our build-in xgettext-go
|
|
if [ "$(RELEASE)" = "vivid" ]; then\
|
|
GOPATH=${BUILDDIR} ./update-pot;\
|
|
else\
|
|
GOPATH=${BUILDDIR} go generate ./i18n;\
|
|
fi;
|
|
|
|
override_dh_auto_install: snappy.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/ubuntu-snappy/usr/share/gocode
|
|
# toolbelt is not shippable
|
|
rm -f ${CURDIR}/debian/tmp/usr/bin/toolbelt
|
|
|
|
snappy.8:
|
|
${BUILDDIR}/bin/snappy man > $@
|
|
|
|
override_dh_auto_clean:
|
|
dh_auto_clean -O--buildsystem=golang
|
|
rm -vf snappy.8
|