2006-05-10 21:53:05 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
# Sample debian/rules that uses debhelper.
|
|
|
|
# This file was originally written by Joey Hess and Craig Small.
|
|
|
|
# As a special exception, when this file is copied by dh-make into a
|
|
|
|
# dh-make output file, you may use that output file without restriction.
|
|
|
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
|
|
|
# necessary for dpatch
|
|
|
|
.NOTPARALLEL:
|
|
|
|
|
2006-11-27 20:25:26 +01:00
|
|
|
DEB_BUILD_DIR=$(CURDIR)/debian/cryptobox-server
|
2006-11-23 21:52:30 +01:00
|
|
|
CB_PYDIR=$(DEB_BUILD_DIR)/usr/lib/python$(shell pyversions -vr)/site-packages/cryptobox
|
2006-05-10 21:53:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
build: build-stamp
|
|
|
|
|
2006-11-23 21:52:30 +01:00
|
|
|
build-stamp:
|
2006-05-10 21:53:05 +02:00
|
|
|
dh_testdir
|
2006-11-23 21:52:30 +01:00
|
|
|
python setup.py build
|
2006-05-10 21:53:05 +02:00
|
|
|
touch build-stamp
|
|
|
|
|
|
|
|
clean: clean-patched unpatch
|
|
|
|
|
|
|
|
clean-patched:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2006-11-23 21:52:30 +01:00
|
|
|
python setup.py clean
|
|
|
|
rm -f build-stamp
|
|
|
|
rm -rf build
|
2006-11-28 14:49:24 +01:00
|
|
|
find -type f -name '*.mo' -print0 | xargs -0 rm -f
|
2006-11-27 20:25:26 +01:00
|
|
|
find -type f -name '*.py[co]' -print0 | xargs -0 rm -f
|
2006-11-23 21:52:30 +01:00
|
|
|
rm -f MANIFEST
|
2006-05-10 21:53:05 +02:00
|
|
|
dh_clean
|
|
|
|
|
|
|
|
patch: patch-stamp
|
|
|
|
patch-stamp:
|
|
|
|
dpatch apply-all
|
|
|
|
touch patch-stamp
|
|
|
|
|
|
|
|
unpatch:
|
|
|
|
dpatch deapply-all
|
|
|
|
rm -rf patch-stamp debian/patched
|
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
2006-11-23 21:52:30 +01:00
|
|
|
python setup.py install --root=$(DEB_BUILD_DIR)
|
2006-11-28 14:49:24 +01:00
|
|
|
# compile language files
|
|
|
|
find $(DEB_BUILD_DIR) -type f -name \*.po | while read pofile; \
|
|
|
|
do msgfmt -o "$${pofile%.po}.mo" "$$pofile"; rm "$$pofile"; done
|
2006-11-23 21:52:30 +01:00
|
|
|
# the cryptobox is a webserver - it should be installed in /usr/sbin
|
|
|
|
mv $(DEB_BUILD_DIR)/usr/bin/CryptoBoxWebserver $(DEB_BUILD_DIR)/usr/sbin/
|
|
|
|
mv $(DEB_BUILD_DIR)/usr/bin/CryptoBoxRootActions $(DEB_BUILD_DIR)/usr/sbin/
|
|
|
|
# remove tests
|
2006-11-24 12:03:20 +01:00
|
|
|
rm -r $(CB_PYDIR)/tests
|
2006-12-18 14:37:08 +01:00
|
|
|
# remove doc directory (installed by debian scripts anyway)
|
|
|
|
rm -r $(DEB_BUILD_DIR)/usr/share/doc/cryptobox-server
|
2006-11-24 12:03:20 +01:00
|
|
|
# install lintian override file: for multiple dependency caused by {python:Depends}
|
2006-11-27 20:25:26 +01:00
|
|
|
install -D -m 644 debian/cryptobox-server.lintian \
|
|
|
|
$(DEB_BUILD_DIR)/usr/share/lintian/overrides/cryptobox-server
|
2006-11-23 21:52:30 +01:00
|
|
|
|
2006-05-10 21:53:05 +02:00
|
|
|
|
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep: build install
|
|
|
|
|
|
|
|
# Build architecture-dependent files here.
|
|
|
|
binary-arch: build install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_installexamples
|
2006-11-22 16:21:21 +01:00
|
|
|
dh_installlogrotate
|
2006-11-27 20:25:26 +01:00
|
|
|
dh_installdirs
|
2006-05-10 21:53:05 +02:00
|
|
|
dh_installman
|
2006-11-23 21:52:30 +01:00
|
|
|
dh_install
|
|
|
|
dh_pycentral
|
2006-11-24 12:03:20 +01:00
|
|
|
@# pycentral must be called before installinit - otherwise the DEBHELPER part
|
2006-11-27 20:25:26 +01:00
|
|
|
@# in the postinst script is filled in the wrong order - this causes a failing
|
|
|
|
@# shutdown after removal, as the "pycentral pkgremove" call stops the daemon before
|
2006-11-24 12:03:20 +01:00
|
|
|
dh_installinit
|
2006-05-10 21:53:05 +02:00
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
2006-11-23 21:52:30 +01:00
|
|
|
.PHONY: build clean binary-indep binary-arch binary install clean-patched patch patch-stamp unpatch
|