2 # debian/rules for LilyPond in Debian.
4 # This is free software; see the GNU General Public Licence
5 # version 2 or later for copying conditions. There is NO warranty.
7 # Currently maintained by Anthony Fok <foka@debian.org>
8 # for Debian GNU/Linux.
14 r_data = debian/$(package)-data
15 r_doc = debian/$(package)-doc
16 d = usr/share/doc/$(package)
18 # since I'm building this a few times on my 8-way machine, try to
20 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
21 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22 MAKEFLAGS += -j$(NUMJOBS) CPU_COUNT=$(NUMJOBS)
27 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
29 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
30 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
31 # export extra_mem_top = 100000
32 # export extra_mem_bot = 100000
33 # But now, building lilypond.dvi requires increased pool_size (2002-02-18)
34 # export pool_size = 500000
35 # But now, it seems that none of the above is needed in 1.4.11 (2002-02-24)
38 export USER_CFLAGS = -DDEBIAN
39 export DEB_BUILD = yes
40 export MAILADDRESS = lilypond@packages.debian.org
42 # fontconfig blows chunks if it can't write $HOME; and some buildd's
43 # set it to a bogus value.
46 # Uncomment this to turn on verbose mode.
49 # This has to be exported to make some magic below work.
56 cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./stepmake/bin/
57 ./configure --disable-checking --enable-debugging \
58 --prefix=/usr --enable-optimising \
59 --infodir='$${prefix}/share/info' \
60 --mandir='$${prefix}/share/man'
66 build-doc: build build-doc-stamp
71 # unfortunatly, this does not work well with multiple processors
72 $(MAKE) -j1 doc WEB_TARGETS="offline"
81 rm -f build-stamp build-doc-stamp
82 [ ! -f Makefile ] || $(MAKE) web-clean
83 [ ! -f Makefile ] || $(MAKE) distclean
85 rm -f ./stepmake/bin/config.guess ./stepmake/bin/config.guess.sub ./stepmake/bin/config.sub
87 # Still not clean enough? Let's use... BRUTE STRENGTH! :-)
88 find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
89 rm -f buildscripts/*.pyc
90 rm -f lib/lilypond/python examples.html
91 rm -f debian/emacsen-startup
92 rm -f debian/lilypond1.7*.dirs debian/lilypond.dirs
93 rm -f debian/postinst debian/prerm debian/postrm
94 rm -f debian/lilypond-data.doc-base debian/lilypond.doc-base
95 rm -f GNUmakefile config.log config.make config.status config.hh
106 # Add here commands to install the package into debian/tmp.
107 $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
109 dh_install --sourcedir=debian/tmp --list-missing
111 # Build architecture-independent files here.
112 binary-indep: DH_OPTIONS=-i
113 binary-indep: build-doc install
116 # Install LilyPond web documentation...
117 $(MAKE) install-doc prefix=$(CURDIR)/debian/lilypond-doc/usr/
118 # it installs a random dir-dep file for no reason
119 rm -f $(CURDIR)/debian/lilypond-doc/usr/share/info/*-dir-dep*
122 find $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html \
123 -type d -empty -delete
126 install -m 644 debian/xiao-haizi-guai-guai.ly debian/sakura-sakura.ly \
127 $(r_data)/$(d)/examples
130 dh_link usr/share/lilypond/$(VERSION)/tex \
131 usr/share/texmf/tex/lilypond \
132 usr/share/lilypond/$(VERSION)/fonts/source \
133 usr/share/texmf/fonts/source/public/lilypond \
134 usr/share/lilypond/$(VERSION)/fonts/afm \
135 usr/share/texmf/fonts/afm/public/lilypond \
136 usr/share/lilypond/$(VERSION)/fonts/tfm \
137 usr/share/texmf/fonts/tfm/public/lilypond \
138 usr/share/lilypond/$(VERSION)/fonts/type1 \
139 usr/share/texmf/fonts/type1/public/lilypond \
140 etc/texmf/dvips/lilypond.map \
141 usr/share/lilypond/$(VERSION)/dvips/lilypond.map
143 dh_pysupport /usr/share/lilypond/${VERSION}/python
145 dh_compress -X$(d)/html/
152 binary-arch: DH_OPTIONS=-s
153 binary-arch: build install
156 dh_installdocs AUTHORS.txt NEWS.txt README.txt \
161 dh_installchangelogs Documentation/misc/CHANGES* Documentation/misc/ChangeLog*
164 dh_pysupport /usr/share/lilypond/${VERSION}/python
173 binary: binary-indep binary-arch
174 .PHONY: build clean install binary-indep binary-arch binary