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 TMP = `pwd`/debian/tmp
16 d = usr/share/doc/$(package)
18 # Uncomment this to turn on verbose mode.
21 # This is the debhelper compatibility version to use.
28 ./configure --enable-checking --disable-debugging \
29 --enable-printing --prefix=/usr --enable-optimise \
31 --infodir='$${prefix}/share/info' \
32 --mandir='$${prefix}/share/man'
34 $(MAKE) -C Documentation
35 $(MAKE) -C Documentation/user ps
36 $(MAKE) -C Documentation/pictures pngs
45 # Remove obsolete files which are still in the upstream tarball (1.3.42)
46 rm -f debian/control.in debian/doc-base debian/prerm
49 # Correct the owner of the out/dummy.dep files when built with sudo.
50 if [ -n "$$SUDO_USER" -a -n "$$SUDO_GID" ]; then \
51 find . -user root | xargs -r chown --dereference $$SUDO_USER.$$SUDO_GID; \
58 dh_installdirs usr/share/doc/texmf \
60 usr/share/emacs/site-lisp \
62 usr/share/texmf/fonts/source/public \
63 usr/share/texmf/fonts/afm/public \
64 usr/share/texmf/fonts/tfm/public
65 ln -fs ../$(package) $(r)/usr/share/doc/texmf/lilypond
67 $(MAKE) prefix=$(TMP)/usr install
69 ln -s ../../lilypond/tex $(r)/usr/share/texmf/tex/lilypond
70 ln -s ../../../../lilypond/mf $(r)/usr/share/texmf/fonts/source/public/lilypond
71 ln -s ../../../../lilypond/afm $(r)/usr/share/texmf/fonts/afm/public/lilypond
72 ln -s ../../../../lilypond/tfm $(r)/usr/share/texmf/fonts/tfm/public/lilypond
74 # Change from an absolute symlink to a relative symlink (Lintian)
75 if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
76 rm -f $(r)/usr/share/lilypond/cmtfm; \
77 ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
80 # Build architecture-independent files here.
81 binary-indep: build install
82 # We have nothing to do by default.
84 binary-arch: build install
87 cp -av lilypond-mode.el lilypond-font-lock.el \
88 $(r)/usr/share/emacs/site-lisp/
89 dh_installdocs DEDICATION NEWS ROADMAP *.txt \
90 Documentation/pictures/out/*.png \
91 Documentation/out/*.txt \
92 Documentation/*/out/[a-z]*.dvi \
93 Documentation/*/out/*.ps
94 mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
95 cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
96 cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
97 # dh_installexamples input
98 cp -aP `find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
100 for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
101 mv -fv $$i/* $$i/..; rmdir $$i; done
107 # dh_installchangelogs -k CHANGES
108 # dh_installchangelogs CHANGES
109 # These give all errrors.
110 # Strange, in the maint-guide, it says add the upstream changelog name.
111 # Let's install as doc, then. --jcn
112 dh_installdocs CHANGES
126 binary: binary-indep binary-arch
127 .PHONY: build clean install binary-indep binary-arch binary