2006-03-28 21:46:39 +00:00
|
|
|
#!/usr/bin/make -f
|
2007-10-14 10:05:12 +00:00
|
|
|
|
2006-03-28 21:46:39 +00:00
|
|
|
SHELL := sh -e
|
2015-06-28 19:30:14 +00:00
|
|
|
VERSION_DEBIAN_BINNMU := $(shell echo "$(DEB_VERSION)" | sed -ne 's,.*\+b\(.*\)$$,\1,p')
|
2006-03-28 21:46:39 +00:00
|
|
|
|
|
|
|
include debian/rules.defs
|
|
|
|
|
2013-07-02 05:15:33 +00:00
|
|
|
build: build-arch build-indep
|
|
|
|
|
|
|
|
build-arch: debian/control $(STAMPS_DIR)/build-base
|
2011-07-31 11:32:31 +00:00
|
|
|
$(STAMPS_DIR)/build-base: $(STAMPS_DIR)
|
2006-03-28 21:46:39 +00:00
|
|
|
dh_testdir
|
|
|
|
$(MAKE) -f debian/rules.gen build
|
|
|
|
touch $@
|
|
|
|
|
2013-07-02 05:15:33 +00:00
|
|
|
build-indep: debian/control
|
|
|
|
|
2011-07-31 11:02:37 +00:00
|
|
|
$(STAMPS_DIR):
|
2006-03-28 21:46:39 +00:00
|
|
|
@[ -d $@ ] || mkdir $@
|
|
|
|
|
2015-06-28 19:30:14 +00:00
|
|
|
DIR_ORIG = ../orig/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)
|
|
|
|
TAR_ORIG_NAME = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz
|
2007-10-14 10:05:12 +00:00
|
|
|
TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
|
2006-03-28 21:46:39 +00:00
|
|
|
|
2007-10-14 10:05:12 +00:00
|
|
|
orig: $(DIR_ORIG)
|
2013-12-02 05:25:21 +00:00
|
|
|
rsync --delete --exclude /debian --exclude .svk --exclude .svn --exclude .git --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
|
2013-03-02 16:15:44 +00:00
|
|
|
QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_PC=.pc quilt push --quiltrc - -a -q --fuzz=0
|
2007-10-14 10:05:12 +00:00
|
|
|
|
|
|
|
$(DIR_ORIG):
|
|
|
|
ifeq ($(TAR_ORIG),)
|
|
|
|
$(error Cannot find orig tarball $(TAR_ORIG_NAME))
|
|
|
|
else
|
|
|
|
mkdir -p ../orig
|
2012-08-21 04:49:15 +00:00
|
|
|
tar -C ../orig -xaf $(TAR_ORIG)
|
2007-10-14 10:05:12 +00:00
|
|
|
endif
|
2006-03-28 21:46:39 +00:00
|
|
|
|
|
|
|
maintainerclean:
|
2011-07-31 11:18:48 +00:00
|
|
|
rm -f debian/control debian/control.md5sum debian/rules.gen
|
2015-08-11 17:09:44 +00:00
|
|
|
rm -rf $(filter-out debian .svk .svn .git, $(wildcard * .[^.]*))
|
2006-03-28 21:46:39 +00:00
|
|
|
|
|
|
|
clean: debian/control
|
|
|
|
dh_testdir
|
2011-07-31 11:02:37 +00:00
|
|
|
make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR)
|
2011-07-31 11:32:31 +00:00
|
|
|
rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc
|
2006-03-28 21:46:39 +00:00
|
|
|
dh_clean
|
|
|
|
|
|
|
|
binary-indep:
|
|
|
|
dh_testdir
|
|
|
|
|
|
|
|
binary-arch:
|
|
|
|
dh_testdir
|
|
|
|
$(MAKE) -f debian/rules.gen binary-arch
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
|
2007-10-14 10:05:12 +00:00
|
|
|
CONTROL_FILES = debian/changelog $(wildcard debian/templates/control.*)
|
2006-03-28 21:46:39 +00:00
|
|
|
debian/control debian/rules.gen: debian/bin/gencontrol.py $(CONTROL_FILES)
|
2011-11-17 03:17:16 +00:00
|
|
|
ifeq ($(wildcard debian/control.md5sum),)
|
|
|
|
$(MAKE) -f debian/rules debian/control-real
|
|
|
|
else ifeq ($(VERSION_DEBIAN_BINNMU),)
|
|
|
|
md5sum --check debian/control.md5sum --status || \
|
|
|
|
$(MAKE) -f debian/rules debian/control-real
|
|
|
|
else
|
|
|
|
grep -v debian/changelog debian/control.md5sum | md5sum --check - --status || \
|
|
|
|
$(MAKE) -f debian/rules debian/control-real
|
|
|
|
endif
|
2006-03-28 21:46:39 +00:00
|
|
|
|
|
|
|
debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES)
|
|
|
|
chmod +x $<
|
|
|
|
$<
|
|
|
|
md5sum $^ > debian/control.md5sum
|
|
|
|
@echo
|
|
|
|
@echo This target is made to fail intentionally, to make sure
|
|
|
|
@echo that it is NEVER run during the automated build. Please
|
|
|
|
@echo ignore the following error, the debian/control file has
|
|
|
|
@echo been generated SUCCESSFULLY.
|
|
|
|
@echo
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
.PHONY: clean build setup binary-indep binary-arch binary
|