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
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
include /usr/share/dpkg/architecture.mk
WRAPPER_TARGETS:=mpg123-oss mpg123-jack mpg123-openal mpg123-portaudio
ifeq ($(DEB_HOST_ARCH_OS),linux)
WRAPPER_TARGETS += mpg123-alsa mpg123-pulse
endif
CONF_i386:=--with-cpu=x86_dither
CONF_armhf:=--with-cpu=arm_fpu
CONF_arm64:=--with-cpu=aarch64
mpg123-%: debian/mpg123-wrapper.in
dh_testdir
o=`echo $@ | sed -e 's/^mpg123-\([^-]\+\).*/\1/'`; \
sed -e "s/@OUTPUT@/$$o/g" < debian/mpg123-wrapper.in > $@
override_dh_auto_configure:
dh_auto_configure -- \
--enable-static=no \
--enable-shared \
--enable-lfs-alias \
--includedir=\$${prefix}/include/$(DEB_HOST_MULTIARCH) \
$(CONF_$(DEB_HOST_ARCH))
execute_after_dh_auto_clean:
rm -f $(WRAPPER_TARGETS)
execute_after_dh_auto_install: $(WRAPPER_TARGETS)
mv $(CURDIR)/debian/tmp/usr/bin/mpg123 \
$(CURDIR)/debian/tmp/usr/bin/mpg123.bin
mv $(CURDIR)/debian/tmp/usr/share/man/man1/mpg123.1 \
$(CURDIR)/debian/tmp/usr/share/man/man1/mpg123.bin.1
install $(WRAPPER_TARGETS) $(CURDIR)/debian/tmp/usr/bin/
for i in $(WRAPPER_TARGETS); do \
install debian/mpg123-wrapper.1 \
$(CURDIR)/debian/tmp/usr/share/man/man1/$$i.1; \
done
override_dh_installchangelogs:
dh_installchangelogs -pmpg123 NEWS
dh_installchangelogs --remaining-packages
%:
dh $@
|