File: rules

package info (click to toggle)
xmms2 0.8+dfsg-20
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 14,024 kB
  • sloc: ansic: 63,803; python: 15,537; cpp: 5,718; xml: 1,479; perl: 338; ruby: 243; makefile: 83; sh: 59; asm: 7
file content (72 lines) | stat: -rwxr-xr-x 2,354 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/make -f

export NOCOLOR=1

PYVERSIONS := $(shell py3versions -s)
RUBYVERSIONS := $(shell dh_ruby --print-supported)
VENDOR ?= $(shell if dpkg-vendor --is Ubuntu || dpkg-vendor --derives-from Ubuntu; then echo "Ubuntu"; else echo "Debian"; fi)

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
else
	NUMJOBS := 1
endif

ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
	NUMJOBS := 1
endif

WAFFLAGS := --prefix=/usr -j $(NUMJOBS)
ifeq ($(VENDOR),Ubuntu)
additional_wafflags := --with-default-output-plugin=pulse
endif

define \n


endef

export DEB_CFLAGS_MAINT_APPEND = -DHAVE_G_FILE_QUERY_FILE_TYPE

%:
	dh $@ --with python3

override_dh_auto_clean:
	rm -rf _build_*_
	./waf distclean
	# Clean up after waf
	find waflib waftools -name '*.pyc' -delete

override_dh_auto_configure:
	./waf configure $(WAFFLAGS) \
		--with-perl-archdir=$(shell /usr/bin/perl -MConfig -le'print $$Config{vendorarch}') \
		--with-perl-binary=/usr/bin/perl \
		--without-optionals=ruby,et,python,vistest $(additional_wafflags)
	mv _build_ _build_without_python_
	$(foreach pyversion,$(PYVERSIONS),\
		PYTHON=$(pyversion) CYTHON=cython3 ./waf configure $(WAFFLAGS) --without-xmms2d --with-optionals=python && \
		mv _build_ _build_$(pyversion)_$(\n))
	$(foreach rubyversion,$(RUBYVERSIONS),\
		RUBY=/usr/bin/$(rubyversion) ./waf configure $(WAFFLAGS) --without-xmms2d --with-optionals=ruby \
		--with-ruby-archdir=$(shell $(rubyversion) -rrbconfig -e'print RbConfig::CONFIG["vendorarchdir"]') \
		--with-ruby-libdir=$(shell $(rubyversion) -rrbconfig -e'print RbConfig::CONFIG["vendordir"]') && \
		mv _build_ _build_$(rubyversion)_$(\n))

override_dh_auto_build:
	$(foreach pyversion,without_python $(PYVERSIONS) $(RUBYVERSIONS),\
		mv _build_$(pyversion)_ _build_ && \
		./waf -v && \
		mv _build_ _build_$(pyversion)_$(\n))

override_dh_auto_install:
	$(foreach pyversion,without_python $(PYVERSIONS) $(RUBYVERSIONS),\
		mv _build_$(pyversion)_ _build_ && \
		./waf install --destdir=$(CURDIR)/debian/tmp --without-ldconfig && \
		mv _build_ _build_$(pyversion)_$(\n))
ifeq ($(VENDOR),Ubuntu)
	echo "misc:Depends=xmms2-plugin-pulse" >> debian/xmms2.substvars
endif

override_dh_makeshlibs:
	# For new symbols when compiled with GCC >= 7
	dh_makeshlibs -V'libxmmsclient++4v5 (>= 0.8+dfsg-18.2~)'