File: rules

package info (click to toggle)
python-poppler 0.12.1-8
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,624 kB
  • sloc: sh: 10,208; python: 89; makefile: 51; ansic: 37
file content (36 lines) | stat: -rwxr-xr-x 1,391 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
33
34
35
36
#!/usr/bin/make -f

PYTHONS := $(shell pyversions -vr debian/control)

%:
	dh $@ --with python2,autoreconf

override_dh_strip:
	dh_strip --dbg-package=python-poppler-dbg -Xpoppler_d.so

override_dh_clean:
	rm -fr build
	dh_clean

override_dh_auto_configure:
	for pyvers in ${PYTHONS}; do \
		mkdir -p build/py$$pyvers; cp -Rl `ls . | grep -v build | grep -v debian` build/py$$pyvers;\
		(cd build/py$$pyvers; ./configure --prefix=/usr PYTHON=python$$pyvers); \
		mkdir -p build/py$$pyvers-dbg; cp -Rl `ls . | grep -v build | grep -v debian` build/py$$pyvers-dbg; \
		(cd build/py$$pyvers-dbg; ./configure --prefix=/usr PYTHON=python$$pyvers-dbg CFLAGS="-g -ggdb "); \
	done

override_dh_auto_build:  
	for pyvers in ${PYTHONS}; do \
		$(MAKE) -C build/py$$pyvers/ PYTHON=python$$pyvers; \
		$(MAKE) -C build/py$$pyvers-dbg/ PYTHON=python$$pyvers-dbg PYTHON_INCLUDES=`python$$pyvers-dbg-config --include`; \
	done

override_dh_auto_install:
	for pyvers in ${PYTHONS}; do \
	$(MAKE) -C build/py$$pyvers/ install DESTDIR=$(CURDIR)/debian/python-poppler; \
	$(MAKE) -C build/py$$pyvers-dbg/ install DESTDIR=$(CURDIR)/debian/python-poppler-dbg; \
	(cd $(CURDIR)/debian/python-poppler-dbg/usr/lib/python$$pyvers/*-packages; mv poppler.so poppler_d.so); \
	done
	find $(CURDIR)/debian/python-poppler -name "*.la" -delete
	find $(CURDIR)/debian/python-poppler-dbg -name "*poppler" -exec rm -fr {} +