lars
32fcf96ad1
upload release cryptobox-server v0.3.4.5 upload source file of cryptobox-server v0.3.4.4
97 lines
2.7 KiB
Makefile
Executable file
97 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
|
|
PY_VER=$(shell pyversions -vr | cut -f 1 -d " ")
|
|
CB_PYDIR=$(DEB_BUILD_DIR)/usr/lib/python${PY_VER}/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
|