File: rules

package info (click to toggle)
libsass-python 0.12.3-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 460 kB
  • ctags: 460
  • sloc: python: 2,356; cpp: 598; makefile: 173
file content (32 lines) | stat: -rwxr-xr-x 1,304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/make -f
export DH_VERBOSE=1
export PYTHON_EGG_CACHE=$(CURDIR)/debian/tmp
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dpkg-query -f '${Version}\n' -W libsass-dev|sed 's/-.*//' > .libsass-upstream-version
	dh $@ --with python2,python3 --buildsystem=pybuild

override_dh_auto_build:
	pybuild --build -p "$(shell pyversions -vr; py3versions -vr)"
	# build doc once
	pybuild -s custom --build -p $(shell pyversions -vd) \
		--build-args="env PYTHONPATH={build_dir} sphinx-build -N -bman docs/ build/man"

override_dh_auto_install:
	dh_auto_install -O--buildsystem=pybuild
	mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man1
	cp $(CURDIR)/build/man/*.1 $(CURDIR)/debian/tmp/usr/share/man/man1/
	# Renaming sassc script to pysassc while waiting for upstream
	sed -i '1c#!/usr/bin/python' $(CURDIR)/debian/tmp/usr/bin/sassc
	mv $(CURDIR)/debian/tmp/usr/bin/sassc $(CURDIR)/debian/tmp/usr/bin/pysassc

override_dh_auto_test:
	pybuild -s custom --test -p "$(shell pyversions -vr; py3versions -vr)" \
		--test-args="cp -fr test testpkg {build_dir}/; \
		{interpreter} setup.py bdist_egg --dist-dir {build_dir}/testpkg/.eggs; \
		cd {build_dir}; {interpreter} -m unittest sasstests"

override_dh_auto_clean:
	dh_auto_clean -O--buildsystem=pybuild
	rm -fr libsass.egg-info .libsass-upstream-version