cryptonas-archive/v0.3.4.5/debian/rules
lars 152e67283a created new tag v0.3.4.5 (based on v0.3.4.3)
merged changeset 969
updated list of contributers
2007-08-21 23:31:35 +00:00

96 lines
2.7 KiB
Makefile
Executable file

#!/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:
DEB_BUILD_DIR=$(CURDIR)/debian/cryptobox-server
CB_PYDIR=$(DEB_BUILD_DIR)/usr/lib/python$(shell pyversions -vr)/site-packages/cryptobox
build: build-stamp
build-stamp:
dh_testdir
python setup.py build
touch build-stamp
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
python setup.py clean
rm -f build-stamp
rm -rf build
find -type f -name '*.mo' -print0 | xargs -0 rm -f
find -type f -name '*.py[co]' -print0 | xargs -0 rm -f
rm -f MANIFEST
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
python setup.py install --root=$(DEB_BUILD_DIR)
# compile language files
find $(DEB_BUILD_DIR) -type f -name \*.po | while read pofile; \
do msgfmt -o "$${pofile%.po}.mo" "$$pofile"; rm "$$pofile"; done
# 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
rm -r $(CB_PYDIR)/tests
# remove doc directory (installed by debian scripts anyway)
rm -r $(DEB_BUILD_DIR)/usr/share/doc/cryptobox-server
# install lintian override file: for multiple dependency caused by {python:Depends}
install -D -m 644 debian/cryptobox-server.lintian \
$(DEB_BUILD_DIR)/usr/share/lintian/overrides/cryptobox-server
# 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
dh_installlogrotate
dh_installdirs
dh_installman
dh_install
dh_pycentral
@# pycentral must be called before installinit - otherwise the DEBHELPER part
@# 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
dh_installinit
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install clean-patched patch patch-stamp unpatch