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'
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
67 rm -f debian
/doc-base debian
/TODO
77 # Add here commands to install the package into debian/tmp.
79 $(MAKE
) prefix=$(PWD
)/$(r
)/usr
install
81 # Change from an absolute symlink to a relative symlink (Lintian)
82 if
[ -L
$(r
)/usr
/share
/lilypond
/cmtfm
]; then \
83 rm -f
$(r
)/usr
/share
/lilypond
/cmtfm
; \
84 ln
-s ..
/texmf
/fonts
/tfm
/public
/cm
$(r
)/usr
/share
/lilypond
/cmtfm
; \
87 # Build architecture-independent files here.
88 binary-indep
: DH_OPTIONS
=-i
89 binary-indep
: build-doc
install
92 # Extract LilyPond website tarball ...
93 tar -C
$(r_doc
)/$(d
)/html
-xvzf out
/web.
tar.gz
94 # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
96 && cp
-s
`find html/Documentation -name '*.ps.gz'` . \
97 && cp
-s html
/Documentation
/pictures
/out-www
/*.png .
98 # Copy the DVI docs too ...
99 cp
-a
`find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
104 dh_compress
-Xusr
/share
/doc
/lilypond
/html
/
111 binary-arch
: DH_OPTIONS
=-a
112 binary-arch
: build
install
115 cp
-av lilypond-mode.el lilypond-font-lock.el \
116 $(r
)/usr
/share
/emacs
/site-lisp
/
117 dh_installdocs DEDICATION NEWS ROADMAP
*.txt
119 # dh_installdocs DEDICATION NEWS ROADMAP *.txt \
120 # Documentation/pictures/out/*.png
121 # Documentation/out/*.txt
122 # $(DVI_FILES) $(PS_FILES)
123 # mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
124 # cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
125 # cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
127 # dh_installexamples input
128 cp
-aP
`find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
130 for i in
`find $(r)/$(d)/examples/ -type d -name out`; do \
131 mv
-fv
$$i/* $$i/..
; rmdir
$$i; done
137 dh_installchangelogs
-k CHANGES
149 binary
: binary-indep binary-arch
150 .PHONY
: build
clean install binary-indep binary-arch binary