#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # This file is public domain software, originally written by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk #DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) #ifeq ($(DEB_HOST_ARCH),i386) #splaymidi := splaymidi #endif debian/po/templates.pot: debian/templates @debconf-updatepo build: build-stamp build-stamp: debian/po/templates.pot dh_testdir echo 2 | $(MAKE) INCNC= INCAWE= playmidi xplaymidi $(splaymidi) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp debian/xplaymidi.c debian/xplaymidi $(MAKE) distclean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs etc/X11/app-defaults etc/playmidi usr/bin \ usr/lib/playmidi usr/share/doc/playmidi/examples \ $(if $(splaymidi),usr/share/lintian/overrides) install -m644 XPlaymidi.ad debian/playmidi/etc/X11/app-defaults/XPlaymidi install -m644 drums.* std.* debian/playmidi/etc/playmidi # compile xplaymidi wrapper sh debian/xplaymidi.sh install playmidi debian/xplaymidi $(splaymidi) debian/playmidi/usr/bin install xplaymidi debian/playmidi/usr/lib/playmidi set -e && cd debian/midi && find -type f | sed -e 's/\.uue$$//' | \ while read i; do \ perl -e 'undef $$/; $$file = <> or die; print unpack ("u", $$file) or die' \ <$$i.uue >../../debian/playmidi/usr/share/doc/playmidi/examples/$$i; \ done -chmod 644 debian/midi/* ifneq ($(splaymidi),) install -m644 debian/lintian \ debian/playmidi/usr/share/lintian/overrides/playmidi endif # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installdebconf dh_installdocs BUGS QuickStart README.1ST dh_installexamples *.mid dh_installmenu dh_installmime dh_installman playmidi.1 dh_installchangelogs dh_link usr/share/man/man1/playmidi.1 \ usr/share/man/man1/xplaymidi.1 \ $(if $(splaymidi),usr/share/man/man1/playmidi.1 \ usr/share/man/man1/splaymidi.1) dh_strip dh_compress dh_fixperms ifneq ($(splaymidi),) chmod 4755 debian/playmidi/usr/bin/splaymidi endif dh_installdeb dh_shlibdeps -ldebian/playmidi -- -dDepends debian/playmidi/usr/bin/playmidi -dRecommends debian/playmidi/usr/bin/xplaymidi ifneq ($(splaymidi),) perl -pi -e 's/svgalibg1(\s*\(.*?\))?/$$& | svgalib-dummyg1$$1/' \ debian/playmidi.substvars endif dh_gencontrol dh_md5sums dh_builddeb build-arch: build build-indep: build binary: binary-indep binary-arch .PHONY: build build-arch build-indep clean binary-indep binary-arch binary install