2 # Made with the aid of debhelper by Joey Hess,
3 # based on the sample debian/rules file for GNU hello by Ian Jackson.
5 # This is free software; see the GNU General Public Licence
6 # version 2 or later for copying conditions. There is NO warranty.
8 # Currently maintained by Anthony Fok <foka@debian.org>
9 # for Debian GNU/Linux.
15 r_doc = debian/$(package)-doc
16 d = usr/share/doc/$(package)
18 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
19 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
20 export extra_mem_top = 100000
21 export extra_mem_bot = 100000
24 export USER_CFLAGS = -DDEBIAN
25 export DEB_BUILD = yes
26 export MAILADDRESS = lilypond@packages.debian.org
28 # Uncomment this to turn on verbose mode.
31 # This is the debhelper compatibility version to use.
34 # This has to be exported to make some magic below work.
41 ./configure --enable-checking --disable-debugging \
42 --prefix=/usr --enable-optimise \
43 --infodir='$${prefix}/share/info' \
44 --mandir='$${prefix}/share/man'
45 $(MAKE) MAKE_PFA_FILES=1
49 build-doc: build build-doc-stamp
53 $(MAKE) -C Documentation
61 rm -f build-stamp build-doc-stamp
62 -$(MAKE) WWW-clean top-WWW-clean
65 # Still not clean enough? Let's use... BRUTE STRENGTH! :-)
66 find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
76 # Add here commands to install the package into debian/tmp.
78 $(MAKE) prefix=$(PWD)/$(r)/usr MAKE_PFA_FILES=1 install
80 # Change from an absolute symlink to a relative symlink (Lintian)
81 if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
82 rm -f $(r)/usr/share/lilypond/cmtfm; \
83 ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
86 # Build architecture-independent files here.
87 binary-indep: DH_OPTIONS=-i
88 binary-indep: build-doc install
91 # Extract LilyPond website tarball ...
92 tar -C $(r_doc)/$(d)/html -xvzf out/web.tar.gz
93 # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
95 && cp -s `find html/Documentation -name '*.ps.gz'` . \
96 && cp -s html/Documentation/pictures/out-www/*.png .
97 # Copy the DVI docs too ...
98 cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
103 dh_compress -Xusr/share/doc/lilypond/html/
110 binary-arch: DH_OPTIONS=-a
111 binary-arch: build install
114 cp -av lilypond-mode.el lilypond-font-lock.el lilypond-indent.el \
115 $(r)/usr/share/emacs/site-lisp/
116 dh_installdocs DEDICATION NEWS ROADMAP *.txt
118 # dh_installdocs DEDICATION NEWS ROADMAP *.txt \
119 # Documentation/pictures/out/*.png
120 # Documentation/out/*.txt
121 # $(DVI_FILES) $(PS_FILES)
122 # mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
123 # cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
124 # cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
126 # dh_installexamples input
127 cp -aP `find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
129 for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
130 mv -fv $$i/* $$i/..; rmdir $$i; done
136 dh_installchangelogs -k CHANGES
148 binary: binary-indep binary-arch
149 .PHONY: build clean install binary-indep binary-arch binary