File: rules

package info (click to toggle)
compizconfig-python 2%3A0.8.18-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,576 kB
  • sloc: sh: 4,160; makefile: 62
file content (42 lines) | stat: -rwxr-xr-x 1,008 bytes parent folder | download | duplicates (2)
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
37
38
39
40
41
42
#!/usr/bin/make -f
# -*- makefile -*-

PY3VERS=$(shell py3versions -r)

%:
	dh $@ --with python3

override_dh_clean:
	for p in $(PY3VERS); do \
		rm -f build-$$p/src/compizconfig.pyx; \
		[ ! -f build-$$p/Makefile ] || $(MAKE) -C build-$$p distclean; \
	done
	dh_clean 

override_dh_auto_configure:
	autoreconf -v --install
	for p in $(PY3VERS); do \
		mkdir build-$$p; \
		( cd build-$$p && \
		../configure --prefix=/usr --libdir=/usr/lib \
		--disable-static PYTHON=$$p --with-cython=cython3); \
		ln -s ../../src/compizconfig.pyx build-$$p/src; \
	done

override_dh_auto_build:
	for p in $(PY3VERS); do \
		$(MAKE) -C build-$$p; \
	done

override_dh_auto_install:
	for p in $(PY3VERS); do \
		$(MAKE) -C build-$$p \
		DESTDIR=$(CURDIR)/debian/python3-compizconfig install; \
	done

override_dh_install:
	# clean up some upstream cruft
	find $(CURDIR)/debian/python3-compizconfig \
	-type f -name '*.la' -print0 | xargs -0 rm -f
	rm -rf $(CURDIR)/debian/python3-compizconfig/usr/lib/pkgconfig
	dh_install