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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | sed 's/^Version: \([^+]*\).*/\1/')
DISTRO := $(shell dpkg-parsechangelog | egrep '^Distribution:' | sed 's/^Distribution: \([^+]*\).*/\1/')
REPORTBUG_VERSION := $(shell python -c "import reportbug; print reportbug.VERSION_NUMBER")
build: build-stamp
build-stamp:
dh_testdir
# Test if versions are synchronized (only if releasing); this will bomb if not synced
if [ "$(DISTRO)" != "UNRELEASED" -a "$(REPORTBUG_VERSION)" != "$(VERSION)" ] ; \
then \
echo 'Please update VERSION_NUMBER variable in reportbug/__init__.py'; exit 1 ; \
fi
python setup.py build
touch build-stamp
clean:
dh_testdir
dh_testroot
python setup.py clean
rm -rf `find . -name '*~' -o -name '.#*' -o -name '*.orig' -o -name '*.rej' -o -name '*.py[co]'` sed-script
rm -rf build
rm -rf reportbug.egg-info
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/reportbug.
python setup.py install --root $(CURDIR)/debian/reportbug --install-layout=deb
mv $(CURDIR)/debian/reportbug/usr/lib $(CURDIR)/debian/python-reportbug/usr
chmod 0755 $(CURDIR)/debian/reportbug/usr/bin/*
cp -p conf/reportbug.conf $(CURDIR)/debian/reportbug/etc
cp -p debian/desktop $(CURDIR)/debian/reportbug/usr/share/applications/reportbug.desktop
touch install-stamp
# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installmenu
dh_installman man/*
dh_installchangelogs
dh_compress
dh_fixperms
dh_pysupport
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|