]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
patch::: 1.3.152.jcn3
[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/$(package)
15 TMP = `pwd`/$(r)
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 compatibility version to use.
22 export DH_COMPAT=2
23
24 build: build-stamp
25 build-stamp:
26         dh_testdir
27
28         ./configure --enable-checking --disable-debugging \
29                 --enable-printing --prefix=/usr --enable-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/user ps
36         $(MAKE) -C Documentation/pictures pngs
37
38         touch build-stamp
39
40 clean:
41         dh_testdir
42         dh_testroot
43         rm -f build-stamp
44         -$(MAKE) distclean
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: build
53         dh_testdir
54         dh_testroot
55         dh_clean -k
56         dh_installdirs usr/share/doc/texmf \
57                 $(d)/examples \
58                 usr/share/emacs/site-lisp \
59                 usr/share/texmf/tex \
60                 usr/share/texmf/fonts/source/public \
61                 usr/share/texmf/fonts/afm/public \
62                 usr/share/texmf/fonts/tfm/public
63         ln -fs ../$(package) $(r)/usr/share/doc/texmf/lilypond
64
65         $(MAKE) prefix=$(TMP)/usr install
66
67         ln -s ../../lilypond/tex $(r)/usr/share/texmf/tex/lilypond
68         ln -s ../../../../lilypond/mf $(r)/usr/share/texmf/fonts/source/public/lilypond
69         ln -s ../../../../lilypond/afm $(r)/usr/share/texmf/fonts/afm/public/lilypond
70         ln -s ../../../../lilypond/tfm $(r)/usr/share/texmf/fonts/tfm/public/lilypond
71
72         # Change from an absolute symlink to a relative symlink (Lintian)
73         if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
74                 rm -f $(r)/usr/share/lilypond/cmtfm; \
75                 ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
76         fi
77
78 # Build architecture-independent files here.
79 binary-indep: build install
80 # We have nothing to do by default.
81
82 binary-arch: build install
83         dh_testversion 2
84         dh_testdir
85         dh_testroot
86         cp -av lilypond-mode.el lilypond-font-lock.el \
87                 $(r)/usr/share/emacs/site-lisp/
88         dh_installdocs DEDICATION NEWS ROADMAP *.txt \
89                 Documentation/pictures/out/*.png \
90                 Documentation/out/*.txt \
91                 Documentation/*/out/[a-z]*.dvi \
92                 Documentation/*/out/*.ps
93         mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
94         cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
95         cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
96 #       dh_installexamples input
97         cp -aP `find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
98                 $(r)/$(d)/examples
99         for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
100                 mv -fv $$i/* $$i/..; rmdir $$i; done
101 #       dh_installmenu
102         dh_installemacsen
103 #       dh_installcron
104 #       dh_installmanpages
105 #       dh_undocumented
106         dh_installchangelogs -k CHANGES
107         dh_link
108         dh_strip
109         dh_compress
110         dh_fixperms
111 #       dh_suidregister
112         dh_installdeb
113         dh_shlibdeps
114         dh_gencontrol
115 #       dh_makeshlibs
116         dh_md5sums
117         dh_builddeb
118
119 binary: binary-indep binary-arch
120 .PHONY: build clean install binary-indep binary-arch binary