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