diff options
author | Kali Kaneko <kali@leap.se> | 2017-07-19 11:35:55 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-10 15:24:11 -0400 |
commit | 6b3f2fa26cce9e35f473cd3bc8218d4a6970e644 (patch) | |
tree | 151ecc00b53112197e0cf01343a3c1073535e0f7 /debian/rules | |
parent | 7c9581a656dd1e01d8960bd278d29066af3ec560 (diff) |
[pkg] initial port of the debian package
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..cbeb5a6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,81 @@ +#!/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. +DH_VERBOSE=1 +DEB_BUILD_OPTIONS=nocheck +package=bitmask + +PYTHON2=$(shell pyversions -vr) + +%: + dh $@ --with python2 --buildsystem=python_distutils +#dh $@ --with python2,sphinxdoc --buildsystem=python_distutils + +override_dh_prep: + rst2man docs/man/bitmask.1.rst docs/man/bitmask.1 + rst2man docs/man/bitmask-root.1.rst docs/man/bitmask-root.1 + + dh_prep + mv src/leap.bitmask.egg-info src/leap.bitmask.egg-info.orig + mv src/leap/bitmask/core src/bitmask-core.orig + mv src/leap/bitmask/cli src/bitmask-cli.orig + + # this will re-generate the resource files and locales. + make -f ./Makefile + +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + +# run tests! +# + +#test-python%: +# xvfb-run ./run_tests.sh -x -N + +override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%) +endif + +#dh_auto_build should be enough to build the python2 version + +build-python%: + python$* setup.py build + +override_dh_install: + dh_install + rm -rf src/leap.bitmask.egg-info + mv src/leap.bitmask.egg-info.orig src/leap.bitmask.egg-info + mv src/bitmask-core.orig src/leap/bitmask/core/ + mv src/bitmask-cli.orig src/leap/bitmask/cli/ + +# build and install sphinx docs +# +override_dh_installdocs: +# python setup.py build_sphinx + dh_installdocs + +#COMMENTING OUT TO WORKAROUND THIS ERROR: +#dh_sphinxdoc: error: unknown JavaScript code: debian/bitmask/usr/share/doc/bitmask/html/_static/jquery.js +#dh_installdocs build/sphinx/html + +override_dh_installchangelogs: + dh_installchangelogs CHANGELOG.rst + +override_dh_auto_clean: + dh_auto_clean + rm -rf .tox + rm -rf bin + rm -rf build + rm -rf dist + rm -rf lib/ + rm -rf docs/_build + rm -rf *.egg-info + rm -rf .eggs/ + rm -f docs/man/bitmask.1 + rm -f docs/man/bitmask-root.1 + rm -rf docs/covhtml + rm -rf docker |