6 .PHONY: override_dh_dkms override_dh_strip override_dh_installinit \
7 override_dh_auto_build override_dh_fixperms
8 export VERSION := $(shell head -n 1 debian/changelog | sed -r 's/.*([0-9]+\.[0-9]+.*)-[0-9]+.*/\1/g')
10 export RAW_VERSION := $(shell cat $(CURDIR)/version)
14 if [ -d $(CURDIR)/debian ] && [ ! -e $(CURDIR)/debian/control ] && \
15 [ -e $(CURDIR)/debian/control.in ] ; then \
16 cat $(CURDIR)/debian/control.in | sed "s/#VERSION#/$(RAW_VERSION)/g" \
17 > $(CURDIR)/debian/control ; git add $(CURDIR)/debian/control ;\
19 dh $@ --with dkms --with python2
25 dh_strip -plibxseg0 --dbg-package=libxseg0-dbg
26 dh_strip -parchipelago --dbg-package=archipelago-dbg
28 override_dh_installinit:
29 dh_installinit --no-start
31 override_dh_auto_build:
32 dh_auto_build -- build
35 dh_fixperms --exclude var/log/ganeti/extstorage
36 # chmod 0750 $(DESTDIR)/var/log/ganeti/extstorage
39 cat $(CURDIR)/debian/archipelago-modules-dkms.install.in | sed "s/#VERSION#/$(VERSION)/g" \
40 > $(CURDIR)/debian/archipelago-modules-dkms.install
42 (cd debian/archipelago-modules-source/usr/src \
43 && chown -R root:root modules \
44 && tar -c modules | bzip2 > archipelago-modules.tar.bz2 \