#!/usr/bin/make -f # -*- makefile -*- include /usr/share/dpkg/pkg-info.mk PYTHONS:=$(shell pyversions -vr) UPSTREAM_GIT?=https://github.com/andrix/python-snappy GIT_TAG?=$(shell echo '$(DEB_VERSION_UPSTREAM_REVISION)' | sed -e 's/~/_/') export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --with python2 --buildsystem=python_distutils override_dh_auto_clean: dh_auto_clean rm -rf build rm -rf shadowsocks.egg-info override_dh_auto_install: set -e ; for pyvers in $(PYTHONS); do \ python$$pyvers setup.py install --install-layout=deb \ --root $(CURDIR)/debian/shadowsocks; \ done gen-orig-xz: git tag -v $(GIT_TAG) || true if [ ! -f ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM_REVISION).orig.tar.xz ] ; then \ git archive --prefix=$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM_REVISION)/ $(GIT_TAG) \ | xz >../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM_REVISION).orig.tar.xz ; \ fi [ ! -e ../build-area ] && mkdir ../build-area || true [ ! -e ../build-area/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM_REVISION).orig.tar.xz ] \ && cp ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM_REVISION).orig.tar.xz ../build-area fetch-upstream-remote: git remote add upstream $(UPSTREAM_GIT) || true git remote set-url upstream $(UPSTREAM_GIT) git fetch upstream