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
|
#!/usr/bin/make -f
DEB_BUILDDIR = build
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
include /usr/share/cdbs/1/rules/utils.mk
# setup.py uses setuptools.
CDBS_BUILD_DEPENDS += , python-setuptools, dh-python
# Don't compress useful docs.
DEB_COMPRESS_EXCLUDE = .py .wav
# Suppress unneeded auto-resolved build-dependency on python-dev
CDBS_BUILD_DEPENDS_class_python-distutils = python$(cdbs_python_nondefault_version)
## get-orig-source rule ##
# Path to the debian directory
DEBIAN_DIR := $(shell echo ${MAKEFILE_LIST} | awk '{print $$1}' | xargs dirname )
UPSTREAM_VERSION ?=$(shell uscan --dehs | sed -n 's/.*<upstream-version>\(.*\)<\/upstream-version>.*/\1/p')
CURRENT_TREEISH =$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*svn.{9}([^-]+)\+dfsg.*,\1,p')
CURVER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
PACKAGE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
SOURCE_DIR=$(PACKAGE)-$(CURVER)
TARBALL=$(PACKAGE)_$(CURVER).orig.tar.gz
$(SOURCE_DIR):
svn co http://svn2.assembla.com/svn/elements $(SOURCE_DIR).temp
cd $(SOURCE_DIR).temp && svn export -r ${CURRENT_TREEISH} . ../$(SOURCE_DIR)
dfsg-clean: $(SOURCE_DIR)
# contrib: Binaries, duplicate unused code from other projects
rm -r $(SOURCE_DIR)/contrib
# misc: Libraries, spreadsheets, speed tests, oh my!
# ... adds nothing to the project, contains embedded libs.
rm -r $(SOURCE_DIR)/misc
$(TARBALL): dfsg-clean
tar czvf $(TARBALL) $(SOURCE_DIR)
get-orig-source: $(TARBALL)
rm -rf $(SOURCE_DIR) $(SOURCE_DIR).temp
clean::
rm -rf *.egg-info build
|