]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
release: 1.2.6
[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 = lilypond
12
13 SHELL = /bin/sh
14 r = debian/tmp
15 TMP = `pwd`/debian/tmp
16 d = usr/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/pictures pngs
35
36         # Remove the "-" and the "-k" once the \times segfault
37         # bug is fixed.  (lilypond-1.1.31, 1999-02-17)
38         # -$(MAKE) -k -C Documentation/tex dvi
39         -$(MAKE) -C Documentation/tex dvi
40         -$(MAKE) -C Documentation info
41
42         # $(MAKE) htmldoc
43
44         touch build-stamp
45
46 clean:
47         dh_testdir
48         dh_testroot
49         rm -f build-stamp install-stamp
50         -$(MAKE) distclean
51         rm -f stepmake/stepmake/aclocal.m4
52         dh_clean
53
54         # Correct the owner of the out/dummy.dep files when built with sudo.
55         if [ -n "$$SUDO_USER" -a -n "$$SUDO_GID" ]; then \
56                 find . -user root | xargs -r chown --dereference $$SUDO_USER.$$SUDO_GID; \
57         fi
58
59 install: install-stamp
60 install-stamp: build-stamp
61         dh_testdir
62         dh_testroot
63         dh_clean -k
64         dh_installdirs usr/doc/texmf \
65                 usr/lib/emacs/site-lisp \
66                 usr/doc/$(package)/examples \
67                 usr/share/texmf/tex \
68                 usr/share/texmf/fonts/source/public \
69                 usr/share/texmf/fonts/afm/public \
70                 usr/share/texmf/fonts/tfm/public
71         ln -fs ../lilypond $(r)/usr/doc/texmf/lilypond
72
73         $(MAKE) prefix=$(TMP)/usr install
74
75         ln -s ../../lilypond/tex $(r)/usr/share/texmf/tex/lilypond
76         ln -s ../../../../lilypond/mf $(r)/usr/share/texmf/fonts/source/public/lilypond
77         ln -s ../../../../lilypond/afm $(r)/usr/share/texmf/fonts/afm/public/lilypond
78         ln -s ../../../../lilypond/tfm $(r)/usr/share/texmf/fonts/tfm/public/lilypond
79
80         touch install-stamp
81
82 # Build architecture-independent files here.
83 binary-indep: build install
84 # We have nothing to do by default.
85
86 binary-arch: build install
87         dh_testdir
88         dh_testroot
89         cp -av mudela-mode.el $(r)/usr/lib/emacs/site-lisp
90         dh_installdocs AIMS ANNOUNCE* NEWS-* DEDICATION \
91                 BUGS TASKS TODO *.txt \
92                 Documentation/pictures/out/*.png \
93                 Documentation/out/*.txt \
94                 Documentation/tex/*.doc \
95                 Documentation/tex/out/*.dvi 
96 #               Documentation/tex/*.bib
97 #       dh_installexamples input
98         cp -aP `find input mutopia \( -name '*.ly' -o -name '*.tex' -o -name 'TODO' \)` \
99                 $(r)/$(d)/examples
100         for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
101                 mv -fv $$i/* $$i/..; rmdir $$i; done
102 #       dh_installmenu
103 #       dh_installemacsen
104 #       dh_installcron
105 #       dh_installmanpages
106 #       dh_undocumented
107         dh_installchangelogs -k NEWS
108         dh_link
109         dh_strip
110         dh_compress
111         dh_fixperms
112         dh_suidregister
113         dh_installdeb
114         dh_shlibdeps
115         dh_gencontrol
116 #       dh_makeshlibs
117         dh_md5sums
118         dh_builddeb
119
120 source diff:
121         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
122
123 binary: binary-indep binary-arch
124 .PHONY: build clean install binary-indep binary-arch binary