]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
release: 1.3.32
[lilypond.git] / debian / rules
1 #!/usr/bin/make -f
2 # Made with the aid of debhelper by Joey Hess,
3 # based on the sample debian/rules file for GNU hello by Ian Jackson.
4 #
5 # This is free software; see the GNU General Public Licence
6 # version 2 or later for copying conditions.  There is NO warranty.
7 #
8 # Currently maintained by Anthony Fok <foka@debian.org>
9 # for Debian GNU/Linux.
10
11 package = lilypond1.3
12
13 SHELL = /bin/sh
14 r = debian/tmp
15 TMP = `pwd`/debian/tmp
16 d = usr/share/doc/$(package)
17
18 # Uncomment this to turn on verbose mode.
19 #export DH_VERBOSE=1
20
21 # This is the debhelper compatability version to use.
22 export DH_COMPAT=1
23
24 build: build-stamp
25 build-stamp:
26         dh_testdir
27
28         ./configure --disable-checking --disable-debugging \
29                 --enable-printing --prefix=/usr --disable-optimise \
30                 --enable-shared \
31                 --infodir='$${prefix}/share/info' \
32                 --mandir='$${prefix}/share/man'
33         $(MAKE) all
34         $(MAKE) -C Documentation
35 #       $(MAKE) -C Documentation/programmer ps
36         $(MAKE) -C Documentation/user ps
37         $(MAKE) -C Documentation/pictures pngs
38
39         touch build-stamp
40
41 clean:
42         dh_testdir
43         dh_testroot
44         rm -f build-stamp install-stamp
45         -$(MAKE) distclean
46         rm -f stepmake/stepmake/aclocal.m4
47         dh_clean
48
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; \
52         fi
53
54 install: build
55         dh_testdir
56         dh_testroot
57         dh_clean -k
58         dh_installdirs usr/share/doc/texmf \
59                 usr/share/emacs/site-lisp \
60                 $(d)/examples \
61                 usr/share/texmf/tex \
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
66
67         $(MAKE) prefix=$(TMP)/usr install
68
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
73
74 # Build architecture-independent files here.
75 binary-indep: build install
76 # We have nothing to do by default.
77
78 binary-arch: build install
79         dh_testdir
80         dh_testroot
81         cp -av lilypond-mode.el $(r)/usr/share/emacs/site-lisp
82         dh_installdocs DEDICATION TODO *.txt \
83                 Documentation/pictures/out/*.png \
84                 Documentation/out/*.txt \
85                 Documentation/*/out/[a-z]*.dvi \
86                 Documentation/*/out/*.ps
87         mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
88         cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography
89         cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc
90 #       dh_installexamples input
91         cp -aP `find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
92                 $(r)/$(d)/examples
93         for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
94                 mv -fv $$i/* $$i/..; rmdir $$i; done
95 #       dh_installmenu
96 #       dh_installemacsen
97 #       dh_installcron
98 #       dh_installmanpages
99 #       dh_undocumented
100         dh_installchangelogs -k CHANGES
101         dh_link
102         dh_strip
103         dh_compress
104         dh_fixperms
105 #       dh_suidregister
106         dh_installdeb
107         dh_shlibdeps
108         dh_gencontrol
109 #       dh_makeshlibs
110         dh_md5sums
111         dh_builddeb
112
113 binary: binary-indep binary-arch
114 .PHONY: build clean install binary-indep binary-arch binary