]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
release: 1.1.37
[lilypond.git] / debian / rules
1 #!/usr/bin/make -f
2 # Made with the aid of debhelper by 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 d = usr/doc/$(package)
16
17 # Uncomment this to turn on verbose mode.
18 #export DH_VERBOSE=1
19
20 build: build-stamp
21 build-stamp:
22         dh_testdir
23
24         ./configure --disable-checking --disable-debugging \
25                 --enable-printing --prefix=/usr --disable-optimise \
26                 --enable-shared
27         $(MAKE) all
28         $(MAKE) -C Documentation/pictures pngs
29
30         # Remove the "-" and the "-k" once the \times segfault
31         # bug is fixed.  (lilypond-1.1.31, 1999-02-17)
32         -$(MAKE) -k -C Documentation/tex dvi
33         -$(MAKE) -C Documentation info
34
35         # $(MAKE) htmldoc
36
37         touch build-stamp
38
39 clean:
40         dh_testdir
41         dh_testroot
42         rm -f build-stamp install-stamp
43         -$(MAKE) distclean
44         rm -f stepmake/stepmake/aclocal.m4
45         dh_clean
46
47         # Correct the owner of the out/dummy.dep files when built with sudo.
48         if [ -n "$$SUDO_USER" -a -n "$$SUDO_GID" ]; then \
49                 find . -user root | xargs -r chown --dereference $$SUDO_USER.$$SUDO_GID; \
50         fi
51
52 install: install-stamp
53 install-stamp: build-stamp
54         dh_testdir
55         dh_testroot
56         dh_clean -k
57         dh_installdirs usr/doc/texmf \
58                 usr/lib/emacs/site-lisp \
59                 usr/doc/$(package)/examples \
60                 usr/lib/texmf/tex \
61                 usr/lib/texmf/fonts/source/public \
62                 usr/lib/texmf/fonts/afm/public \
63                 usr/lib/texmf/fonts/tfm/public
64         ln -fs ../lilypond $(r)/usr/doc/texmf/lilypond
65
66         $(MAKE) prefix=`pwd`/$(r)/usr install
67
68         ln -s ../../../share/lilypond/tex $(r)/usr/lib/texmf/tex/lilypond
69         ln -s ../../../../../share/lilypond/mf $(r)/usr/lib/texmf/fonts/source/public/lilypond
70         ln -s ../../../../../share/lilypond/afm $(r)/usr/lib/texmf/fonts/afm/public/lilypond
71         ln -s ../../../../../share/lilypond/tfm $(r)/usr/lib/texmf/fonts/tfm/public/lilypond
72
73         touch install-stamp
74
75 # Build architecture-independent files here.
76 binary-indep: build install
77 # We have nothing to do by default.
78
79 binary-arch: build install
80         dh_testdir
81         dh_testroot
82         cp -av mudela-mode.el $(r)/usr/lib/emacs/site-lisp
83         dh_installdocs ANNOUNCE* NEWS-* DEDICATION \
84                 BUGS TODO *.txt \
85                 Documentation/pictures/out/*.png \
86                 Documentation/out/*.txt \
87                 Documentation/tex/*.doc \
88                 Documentation/tex/*.bib \
89                 Documentation/tex/out/*.dvi
90 #       dh_installexamples input
91         cp -aP `find input mutopia \( -name '*.ly' -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 NEWS
101         dh_strip
102         dh_compress
103         dh_fixperms
104         dh_suidregister
105         dh_installdeb
106         dh_shlibdeps
107         dh_gencontrol
108 #       dh_makeshlibs
109         dh_md5sums
110         dh_builddeb
111
112 source diff:
113         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
114
115 binary: binary-indep binary-arch
116 .PHONY: build clean install binary-indep binary-arch binary