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 $(MAKE) doc WEB_TARGETS="offline"
80 rm -f build-stamp build-doc-stamp
81 [ ! -f Makefile ] || $(MAKE) web-clean
82 [ ! -f Makefile ] || $(MAKE) distclean
84 rm -f ./stepmake/bin/config.guess ./stepmake/bin/config.guess.sub
86 # Still not clean enough? Let's use... BRUTE STRENGTH! :-)
87 find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
88 rm -f buildscripts/*.pyc
89 rm -f lib/lilypond/python examples.html
90 rm -f debian/emacsen-startup
91 rm -f debian/lilypond1.7*.dirs debian/lilypond.dirs
92 rm -f debian/postinst debian/prerm debian/postrm
93 rm -f debian/lilypond-data.doc-base debian/lilypond.doc-base
94 rm -f GNUmakefile config.log config.make config.status config.hh
105 # Add here commands to install the package into debian/tmp.
106 $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
108 dh_install --sourcedir=debian/tmp --list-missing
110 # Build architecture-independent files here.
111 binary-indep: DH_OPTIONS=-i
112 binary-indep: build-doc install
115 # Install LilyPond web documentation...
116 $(MAKE) install-doc prefix=$(CURDIR)/debian/lilypond-doc/usr/
117 # it installs a random dir-dep file for no reason
118 rm -f $(CURDIR)/debian/lilypond-doc/usr/share/info/*-dir-dep*
121 find $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html \
122 -type d -empty -delete
125 #find input \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \) ! -regex '.*/out-www/.*' \
126 # -exec cp -a --parents '{}' $(r_data)/$(d)/examples ';'
127 install -m 644 debian/xiao-haizi-guai-guai.ly debian/sakura-sakura.ly \
128 $(r_data)/$(d)/examples
131 # mv $(r_data)/usr/share/lilypond/$(VERSION)/fonts/map/lilypond.map \
132 # $(r_data)/etc/texmf/dvips/lilypond.map
134 dh_link usr/share/lilypond/$(VERSION)/tex \
135 usr/share/texmf/tex/lilypond \
136 usr/share/lilypond/$(VERSION)/fonts/source \
137 usr/share/texmf/fonts/source/public/lilypond \
138 usr/share/lilypond/$(VERSION)/fonts/afm \
139 usr/share/texmf/fonts/afm/public/lilypond \
140 usr/share/lilypond/$(VERSION)/fonts/tfm \
141 usr/share/texmf/fonts/tfm/public/lilypond \
142 usr/share/lilypond/$(VERSION)/fonts/type1 \
143 usr/share/texmf/fonts/type1/public/lilypond \
144 etc/texmf/dvips/lilypond.map \
145 usr/share/lilypond/$(VERSION)/dvips/lilypond.map
147 dh_pysupport /usr/share/lilypond/${VERSION}/python
149 dh_compress -X$(d)/html/
156 binary-arch: DH_OPTIONS=-s
157 binary-arch: build install
160 dh_installdocs AUTHORS.txt NEWS.txt README.txt \
165 dh_installchangelogs Documentation/misc/CHANGES* Documentation/misc/ChangeLog*
176 binary: binary-indep binary-arch
177 .PHONY: build clean install binary-indep binary-arch binary