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_doc
= debian
/$(package
)-doc
15 d
= usr
/share
/doc
/$(package
)
18 VERSION
= $(MAJOR_VERSION
).
$(MINOR_VERSION
).
$(PATCH_LEVEL
)
20 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
21 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
22 # export extra_mem_top = 100000
23 # export extra_mem_bot = 100000
24 # But now, building lilypond.dvi requires increased pool_size (2002-02-18)
25 # export pool_size = 500000
26 # But now, it seems that none of the above is needed in 1.4.11 (2002-02-24)
29 export USER_CFLAGS
= -DDEBIAN
30 export DEB_BUILD
= yes
31 export MAILADDRESS
= lilypond@packages.debian.org
33 # Uncomment this to turn on verbose mode.
36 # This is the debhelper compatibility version to use.
39 # This has to be exported to make some magic below work.
46 .
/configure
--enable-checking
--enable-debugging \
47 --prefix=/usr
--enable-optimise \
48 --infodir='$${prefix}/share/info' \
49 --mandir='$${prefix}/share/man'
50 $(MAKE
) MAKE_PFA_FILES
=1
54 build-doc
: build build-doc-stamp
59 $(MAKE
) -C Documentation
62 $(MAKE
) -C Documentation
/user omf
63 # find . -type d -name 'out-www' | xargs rm -rf
70 rm -f build-stamp build-doc-stamp
71 -$(MAKE
) WWW-clean top-WWW-clean
74 # Still not clean enough? Let's use... BRUTE STRENGTH! :-)
75 find .
-type d
-name
'out' -o
-name
'out-www' | xargs
rm -rf
85 # Add here commands to install the package into debian/tmp.
87 $(MAKE
) prefix=$(PWD
)/$(r
)/usr MAKE_PFA_FILES
=1 install
88 # Ugh, remove hundred music-glossary copies
89 # find . -name 'music-glossary.info-*' | xargs rm -f
91 # # Change from an absolute symlink to a relative symlink (Lintian)
92 # if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
93 # rm -f $(r)/usr/share/lilypond/cmtfm; \
94 # ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
97 # Build architecture-independent files here.
98 binary-indep
: DH_OPTIONS
=-i
99 binary-indep
: build-doc
install
102 # Install LilyPond web documentation...
103 $(MAKE
) prefix=$(PWD
)/$(r_doc
)/usr webdir
=$(PWD
)/$(r_doc
)/$(d
)/html out
=www web-install
104 # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
106 && cp
-s
`find html/Documentation -name '*.ps.gz'` . \
107 && cp
-s html
/Documentation
/pictures
/out-www
/*.png .
108 # # Copy the DVI docs too ...
109 # cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
114 dh_compress
-X
$(d
)/html
/
121 binary-arch
: DH_OPTIONS
=-s
122 binary-arch
: build
install
125 dh_installdocs AUTHORS.txt NEWS.txt README.txt \
128 # dh_installdocs DEDICATION NEWS ROADMAP *.txt \
129 # Documentation/pictures/out/*.png
130 # Documentation/out/*.txt
131 # $(DVI_FILES) $(PS_FILES)
132 # mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
133 # cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
134 # cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
136 # dh_installexamples input
138 find input \
( -name
'*.*ly' -o
-name
'*.abc' -o
-name
'*.tex' -o
-name
'TODO' \
) ! -regex
'.*/out-www/.*' \
139 -exec cp
-a
--parents
'{}' $(r
)/$(d
)/examples
';'
140 # for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
141 # mv -fv $$i/* $$i/..; rmdir $$i; done
149 dh_installchangelogs ChangeLog
151 mv
$(r
)/usr
/share
/lilypond
/$(VERSION
)/dvips
/lilypond.map \
152 $(r
)/etc
/texmf
/dvips
/lilypond.map
153 dh_link usr
/share
/lilypond
/$(VERSION
)/tex \
154 usr
/share
/texmf
/tex/lilypond \
155 usr
/share
/lilypond
/$(VERSION
)/fonts
/source \
156 usr
/share
/texmf
/fonts
/source
/public
/lilypond \
157 usr
/share
/lilypond
/$(VERSION
)/fonts
/afm \
158 usr
/share
/texmf
/fonts
/afm
/public
/lilypond \
159 usr
/share
/lilypond
/$(VERSION
)/fonts
/tfm \
160 usr
/share
/texmf
/fonts
/tfm
/public
/lilypond \
161 usr
/share
/lilypond
/$(VERSION
)/fonts
/type1 \
162 usr
/share
/texmf
/fonts
/type1
/public
/lilypond \
163 etc
/texmf
/dvips
/lilypond.map \
164 usr
/share
/lilypond
/$(VERSION
)/dvips
/lilypond.map
175 binary
: binary-indep binary-arch
176 .PHONY
: build
clean install binary-indep binary-arch binary