summaryrefslogtreecommitdiff
path: root/debian/rules
blob: c96b0672dfa10135828c586fd0d5816f569fa92b (plain)
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
#!/usr/bin/make -f

DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)

ifeq ($(DEB_BUILD_ARCH),i386)
additional_confflags := --disable-sse2
endif

%:
	dh $@ --parallel

override_dh_auto_configure:
	ln -sf /usr/share/misc/config.sub .
	ln -sf /usr/share/misc/config.guess .
	dh_auto_configure -- --disable-rpath --enable-chardet $(additional_confflags)

override_dh_auto_clean:
	dh_auto_clean
	rm -f man/*.1 config.status config.log config.h *.pc buildsys.mk
	rm -f src/audacious/dbus-client-bindings.h src/audacious/dbus-server-bindings.h
	find -name '.deps' -delete

override_dh_auto_build:
	# Change build id from UNSUPPORTED VERSION to <vendor> package
	echo "const char *build_stamp = \"$(shell dpkg-vendor --query vendor) package\";" > src/audacious/build_stamp.c;
	dh_auto_build --parallel

override_dh_strip:
	dh_strip --dbg-package=audacious-dbg

override_dh_installdirs:
	dh_installdirs
	mkdir -p ./debian/tmp/usr/share/pixmaps
	for size in 16 22 24 32 36 48; do \
		convert $(CURDIR)/pixmaps/audacious2.png -resize $${size} \
			./debian/tmp/usr/share/pixmaps/audacious-$${size}.xpm || exit 1; \
		mkdir -p ./debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/apps || exit 1;  \
		convert $(CURDIR)/pixmaps/audacious2.png -resize $${size} \
			./debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/apps/audacious2.png || exit 1; \
	done
	rm -f ./debian/tmp/usr/share/pixmaps/audacious2.png