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)
19 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
21 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
22 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
23 # export extra_mem_top = 100000
24 # export extra_mem_bot = 100000
25 # But now, building lilypond.dvi requires increased pool_size (2002-02-18)
26 # export pool_size = 500000
27 # But now, it seems that none of the above is needed in 1.4.11 (2002-02-24)
30 export USER_CFLAGS = -DDEBIAN
31 export DEB_BUILD = yes
32 export MAILADDRESS = lilypond@packages.debian.org
34 # Uncomment this to turn on verbose mode.
37 # This has to be exported to make some magic below work.
44 ./configure --disable-checking --enable-debugging \
45 --prefix=/usr --enable-optimising \
46 --infodir='$${prefix}/share/info' \
47 --mandir='$${prefix}/share/man'
52 build-doc: build build-doc-stamp
57 $(MAKE) -C Documentation
60 $(MAKE) -C Documentation/user omf
61 # find . -type d -name 'out-www' | xargs rm -rf
68 rm -f build-stamp build-doc-stamp
69 -$(MAKE) WWW-clean top-WWW-clean
72 # Still not clean enough? Let's use... BRUTE STRENGTH! :-)
73 find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
74 rm -f lib/lilypond/python examples.html
75 rm -f debian/emacsen-startup
76 rm -f debian/lilypond1.7*.dirs debian/lilypond.dirs
77 rm -f debian/postinst debian/prerm debian/postrm
78 rm -f debian/lilypond-data.doc-base debian/lilypond.doc-base
89 # Add here commands to install the package into debian/tmp.
90 $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
92 dh_install --sourcedir=debian/tmp --list-missing
94 # # Change from an absolute symlink to a relative symlink (Lintian)
95 # if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
96 # rm -f $(r)/usr/share/lilypond/cmtfm; \
97 # ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
100 # Build architecture-independent files here.
101 binary-indep: DH_OPTIONS=-i
102 binary-indep: build-doc install
105 # Install LilyPond web documentation...
106 $(MAKE) prefix=$(PWD)/$(r_doc)/usr webdir=$(PWD)/$(r_doc)/$(d)/html out=www web-install
107 # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
109 && cp -s `find html/Documentation -name '*.ps.gz'` . \
110 && cp -s html/Documentation/pictures/out-www/*.png .
111 # # Copy the DVI docs too ...
112 # cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
118 find input \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \) ! -regex '.*/out-www/.*' \
119 -exec cp -a --parents '{}' $(r_data)/$(d)/examples ';'
122 mv $(r_data)/usr/share/lilypond/$(VERSION)/dvips/lilypond.map \
123 $(r_data)/etc/texmf/dvips/lilypond.map
125 dh_link usr/share/lilypond/$(VERSION)/tex \
126 usr/share/texmf/tex/lilypond \
127 usr/share/lilypond/$(VERSION)/fonts/source \
128 usr/share/texmf/fonts/source/public/lilypond \
129 usr/share/lilypond/$(VERSION)/fonts/afm \
130 usr/share/texmf/fonts/afm/public/lilypond \
131 usr/share/lilypond/$(VERSION)/fonts/tfm \
132 usr/share/texmf/fonts/tfm/public/lilypond \
133 usr/share/lilypond/$(VERSION)/fonts/type1 \
134 usr/share/texmf/fonts/type1/public/lilypond \
135 etc/texmf/dvips/lilypond.map \
136 usr/share/lilypond/$(VERSION)/dvips/lilypond.map
138 dh_compress -X$(d)/html/
145 binary-arch: DH_OPTIONS=-s
146 binary-arch: build install
149 dh_installdocs AUTHORS.txt NEWS.txt README.txt \
152 # dh_installdocs DEDICATION NEWS ROADMAP *.txt \
153 # Documentation/pictures/out/*.png
154 # Documentation/out/*.txt
155 # $(DVI_FILES) $(PS_FILES)
156 # mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
157 # cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
158 # cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
160 # dh_installexamples input
162 # for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
163 # mv -fv $$i/* $$i/..; rmdir $$i; done
171 dh_installchangelogs ChangeLog
183 binary: binary-indep binary-arch
184 .PHONY: build clean install binary-indep binary-arch binary