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.
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)
24 # Uncomment this to turn on verbose mode.
27 # This is the debhelper compatibility version to use.
30 # This has to be exported to make some magic below work.
37 ./configure --enable-checking --disable-debugging \
38 --enable-printing --prefix=/usr --enable-optimise \
40 --infodir='$${prefix}/share/info' \
41 --mandir='$${prefix}/share/man'
42 $(MAKE) USER_CFLAGS=-DDEBIAN all
43 $(MAKE) -C Documentation/user dvi ps
44 $(MAKE) -C Documentation/pictures pngs
55 # Correct the owner of the out/dummy.dep files when built with sudo.
56 if [ -n "$$SUDO_USER" -a -n "$$SUDO_GID" ]; then \
57 find . -user root | xargs -r chown --dereference $$SUDO_USER.$$SUDO_GID; \
65 dh_installdirs usr/share/doc/texmf \
67 usr/share/emacs/site-lisp \
69 usr/share/texmf/fonts/source/public \
70 usr/share/texmf/fonts/afm/public \
71 usr/share/texmf/fonts/tfm/public
72 ln -fs ../$(package) $(r)/usr/share/doc/texmf/lilypond
74 $(MAKE) prefix=$(TMP)/usr USER_CFLAGS=-DDEBIAN install
76 ln -s ../../lilypond/tex $(r)/usr/share/texmf/tex/lilypond
77 ln -s ../../../../lilypond/mf $(r)/usr/share/texmf/fonts/source/public/lilypond
78 ln -s ../../../../lilypond/afm $(r)/usr/share/texmf/fonts/afm/public/lilypond
79 ln -s ../../../../lilypond/tfm $(r)/usr/share/texmf/fonts/tfm/public/lilypond
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 install
102 binary-arch: DH_OPTIONS=-a
103 binary-arch: build install
106 cp -av lilypond-mode.el lilypond-font-lock.el \
107 $(r)/usr/share/emacs/site-lisp/
108 dh_installdocs DEDICATION NEWS ROADMAP *.txt \
109 Documentation/pictures/out/*.png \
110 Documentation/out/*.txt \
111 $(DVI_FILES) $(PS_FILES)
112 mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
113 cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
114 cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
115 # dh_installexamples input
116 cp -aP `find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
118 for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
119 mv -fv $$i/* $$i/..; rmdir $$i; done
125 dh_installchangelogs -k CHANGES
137 binary: binary-indep binary-arch
138 .PHONY: build clean install binary-indep binary-arch binary