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 # TELY_FILES := $(notdir $(wildcard Documentation/user/*.tely))
19 # DVI_FILES = $(addprefix Documentation/user/out/, $(TELY_FILES:.tely=.dvi))
20 # PS_FILES = $(DVI_FILES:.dvi=.ps)
22 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
23 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
24 export extra_mem_top=100000
25 export extra_mem_bot=100000
28 export MAILADDRESS=lilypond@packages.debian.org
30 # Uncomment this to turn on verbose mode.
33 # This is the debhelper compatibility version to use.
36 # This has to be exported to make some magic below work.
43 ./configure --enable-checking --disable-debugging \
44 --prefix=/usr --enable-optimise \
45 --infodir='$${prefix}/share/info' \
46 --mandir='$${prefix}/share/man'
47 $(MAKE) USER_CFLAGS=-DDEBIAN all
51 build-doc: build build-doc-stamp
55 $(MAKE) -C Documentation
63 rm -f build-stamp build-doc-stamp
64 -$(MAKE) WWW-clean top-WWW-clean
67 # Still not clean enough? Let's use... BRUTE STRENGTH! :-)
68 find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
69 rm -f debian/doc-base debian/TODO
79 # Add here commands to install the package into debian/tmp.
81 $(MAKE) prefix=$(PWD)/$(r)/usr USER_CFLAGS=-DDEBIAN install
83 # Change from an absolute symlink to a relative symlink (Lintian)
84 if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
85 rm -f $(r)/usr/share/lilypond/cmtfm; \
86 ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
89 # Build architecture-independent files here.
90 binary-indep: DH_OPTIONS=-i
91 binary-indep: build-doc install
94 # Extract LilyPond website tarball ...
95 tar -C $(r_doc)/$(d)/html -xvzf out/web.tar.gz
96 # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
98 && cp -s `find html/Documentation -name '*.ps.gz'` . \
99 && cp -s html/Documentation/pictures/out-www/*.png .
100 # Copy the DVI docs too ...
101 cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
113 binary-arch: DH_OPTIONS=-a
114 binary-arch: build install
117 cp -av lilypond-mode.el lilypond-font-lock.el \
118 $(r)/usr/share/emacs/site-lisp/
119 dh_installdocs DEDICATION NEWS ROADMAP *.txt
121 # dh_installdocs DEDICATION NEWS ROADMAP *.txt \
122 # Documentation/pictures/out/*.png
123 # Documentation/out/*.txt
124 # $(DVI_FILES) $(PS_FILES)
125 # mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
126 # cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
127 # cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
129 # dh_installexamples input
130 cp -aP `find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
132 for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
133 mv -fv $$i/* $$i/..; rmdir $$i; done
139 dh_installchangelogs -k CHANGES
146 # Ugh, ugly kludge to avoid the circular symlinks under html/
147 cd debian/lilypond && dpkg-shlibdeps -T../substvars -dDepends \
148 usr/bin/lilypond usr/bin/midi2ly
154 binary: binary-indep binary-arch
155 .PHONY: build clean install binary-indep binary-arch binary