#!/usr/bin/make -f # -*- makefile -*- configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: configure-stamp dh_testdir #cd mscore/manual && \ #python ProcessHTML.py -o $(MAKE) PREFIX="/usr" release cp mscore/packaging/mscore.1 mscore/packaging/musescore.1 touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp rm -f mscore/share/locale/mscore_*.qm rm -f mscore/manual/*.pyc mscore/manual/*.pdf mscore/manual/*.html rm -rf web $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) DESTDIR=$(CURDIR)/debian/musescore install # Build architecture-independent files here. binary-indep: build install # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs $(CURDIR)/mscore/ChangeLog dh_installdocs dh_install rm -r $(CURDIR)/debian/musescore/usr/share/mscore* cd $(CURDIR)/debian/musescore-common/usr/share && ln -s mscore-* mscore rm -r $(CURDIR)/debian/musescore-common/usr/share/mscore/sound mv $(CURDIR)/debian/musescore/usr/bin/mscore \ $(CURDIR)/debian/musescore/usr/bin/mscore.real chrpath -d $(CURDIR)/debian/musescore/usr/bin/mscore.real install -T -m0755 $(CURDIR)/debian/mscore.sh \ $(CURDIR)/debian/musescore/usr/bin/mscore dh_installman dh_installmenu dh_installmime dh_link dh_strip dh_icons dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch get-orig-source: version = $(shell uscan --force-download --dehs --destdir . | sed -n 's/.*\(.*\)<\/upstream-version>.*/\1/p') get-orig-source: -mkdir tmp-musescore-$(version) tar -C tmp-musescore-$(version) -xjf mscore-$(version).tar.bz2 cd tmp-musescore-$(version)/mscore* && \ find -name *pdf -exec rm {} + && \ rm mscore/rtf2html/rtf2html mv tmp-musescore-$(version)/mscore* \ tmp-musescore-$(version)/musescore-$(version)\+dfsg tar -C tmp-musescore-$(version) -czf musescore_$(version)\+dfsg.orig.tar.gz \ musescore-$(version)\+dfsg/ #mv musescore_$(version)\+dfsg.orig.tar.gz ../ rm -r tmp-musescore-$(version) -rm mscore*bz2 musescore*bz2 #this requires subversion #get-orig-source: version = "0.9.6~beta1+dfsg" #get-orig-source: revision = 2674 #get-orig-source: # svn co -r $(revision) https://mscore.svn.sourceforge.net/svnroot/mscore/trunk \ # musescore-$(version) # cd musescore-$(version) && \ # find -name *pdf -exec rm {} + && \ # find -name .svn -exec rm -rf {} + # tar czf musescore_$(version).orig.tar.gz musescore-$(version)/ # rm -r musescore-$(version) #### ----------------- Note on usage of below rules ------------------ #### ## The update-to-svn and build-svn rules are written from an Ubuntu ## ## perspective, designed to be able to automate the building of packages ## ## from svn for either Debian or Ubuntu systems, on Ubuntu systems. ## ## Apart from the standard coreutils and dephelper, the rules may ## ## require the following packages: svn, lsb-release, ubuntu-dev-tools ## ## and python-pisa. By default, packages for Debian unstable are ## ## produced. If Ubuntu packages are required, set the environment ## ## variable "BUILD_UBUNTU". This will build for the currently running ## ## release by default; if you wish to build for any other, set the ## ## environment variable "UBUNTU_RELEASE" to the codename of that ## ## release. ## #### ----------------------------------------------------------------- #### update-to-svn: version = $(shell svn up > /dev/null; make version) update-to-svn: pkgdate = $(shell date +"%a, %d %b %Y %T %z") update-to-svn: mv debian .. find -name *pdf -exec rm {} + -rm mscore/rtf2html/rtf2html cp -r . ../svn-musescore-$(version) cd ../svn-musescore-$(version) && find -name .svn -exec rm -rf {} + if [ ! -e ../musescore_$(version)+dfsg.orig.tar.gz ]; then \ tar czf ../musescore_$(version)+dfsg.orig.tar.gz ../svn-musescore-$(version); \ fi rm -rf ../svn-musescore-$(version) mv ../debian . #cp -r ./debian ../svn-musescore-$(version)/ mv debian/changelog debian/changelog.old if [ "$(BUILD_UBUNTU)" -o "$(UBUNTU_RELEASE)" ]; then \ if [ "$(UBUNTU_RELEASE)" ]; then \ echo "musescore ($(version)+dfsg-0ubuntu~$(UBUNTU_RELEASE)1) $(UBUNTU_RELEASE); urgency=low" > debian/changelog.new; \ else \ echo "musescore ($(version)+dfsg-0ubuntu~$(shell lsb_release -sc)1) $(shell lsb_release -sc); urgency=low" > debian/changelog.new; \ fi; \ else \ echo "musescore ($(version)+dfsg-1) unstable; urgency=low" > debian/changelog.new; \ fi echo >> debian/changelog.new echo " * New svn revision" >> debian/changelog.new echo >> debian/changelog.new echo " -- Toby Smithe $(pkgdate)" >> debian/changelog.new echo >> debian/changelog.new cat debian/changelog.new debian/changelog.old > debian/changelog rm debian/changelog.new debian/changelog.old build-svn: version = $(shell dpkg-parsechangelog -n0 | grep Version | cut -c10-) build-svn: dist = $(shell dpkg-parsechangelog -n0 | grep Distribution | cut -c15-) build-svn: update-to-svn debuild --no-tgz-check -S -sa -i".svn"\|"/.svn"\|"/.bzr" -k3939EBEE cd .. && \ pbuilder-dist $(dist) build musescore_$(version).dsc .PHONY: update-to-svn build-svn build-manuals get-orig-source build clean binary-indep binary-arch binary install configure