]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
* debian/: Debian patch (Anthony Fok).
[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/$(package)
15 r_doc = debian/$(package)-doc
16 d = usr/share/doc/$(package)
17
18 include VERSION
19 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
20
21 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
22 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
23 # export extra_mem_top = 100000
24 # export extra_mem_bot = 100000
25 # But now, building lilypond.dvi requires increased pool_size (2002-02-18)
26 # export pool_size = 500000
27 # But now, it seems that none of the above is needed in 1.4.11  (2002-02-24)
28 export MODE = ljfour
29 export BDPI = 600
30 export USER_CFLAGS = -DDEBIAN
31 export DEB_BUILD = yes
32 export MAILADDRESS = lilypond@packages.debian.org
33
34 # Uncomment this to turn on verbose mode.
35 #export DH_VERBOSE=1
36
37 # This is the debhelper compatibility version to use.
38 export DH_COMPAT=3
39
40 # This has to be exported to make some magic below work.
41 export DH_OPTIONS
42
43 build: build-stamp
44 build-stamp:
45         dh_testdir
46
47         ./configure --enable-checking --disable-debugging \
48                 --prefix=/usr --enable-optimise \
49                 --infodir='$${prefix}/share/info' \
50                 --mandir='$${prefix}/share/man'
51         $(MAKE) MAKE_PFA_FILES=1
52
53         touch build-stamp
54
55 build-doc: build build-doc-stamp
56 build-doc-stamp:
57         dh_testdir
58
59         $(MAKE) -C Documentation
60         $(MAKE) web
61
62         touch build-doc-stamp
63
64 clean:
65         dh_testdir
66         dh_testroot
67         rm -f build-stamp build-doc-stamp
68         -$(MAKE) WWW-clean top-WWW-clean
69         -$(MAKE) distclean
70
71         # Still not clean enough?  Let's use... BRUTE STRENGTH!  :-)
72         find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
73         rm -f debian/lilypond.links
74
75         dh_clean
76
77 install: DH_OPTIONS=
78 install: build
79         dh_testdir
80         dh_testroot
81         dh_clean -k
82
83         # Add here commands to install the package into debian/tmp.
84         dh_installdirs
85         $(MAKE) prefix=$(PWD)/$(r)/usr MAKE_PFA_FILES=1 install
86
87 #       # Change from an absolute symlink to a relative symlink (Lintian)
88 #       if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
89 #               rm -f $(r)/usr/share/lilypond/cmtfm; \
90 #               ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
91 #       fi
92
93 # Build architecture-independent files here.
94 binary-indep: DH_OPTIONS=-i
95 binary-indep: build-doc install
96         dh_testdir
97         dh_testroot
98         # Extract LilyPond website tarball ...
99         tar -C $(r_doc)/$(d)/html -xvzf out/web.tar.gz
100         # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
101         cd $(r_doc)/$(d) \
102             && cp -s `find html/Documentation -name '*.ps.gz'` . \
103             && cp -s html/Documentation/pictures/out-www/*.png .
104         # Copy the DVI docs too ...
105         cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
106                 $(r_doc)/$(d)/
107         dh_installdocs
108         dh_installchangelogs
109         dh_link
110         dh_compress -Xusr/share/doc/lilypond/html/
111         dh_fixperms
112         dh_installdeb
113         dh_gencontrol
114         dh_md5sums
115         dh_builddeb
116
117 binary-arch: DH_OPTIONS=-a
118 binary-arch: build install
119         dh_testdir
120         dh_testroot
121         cp -av lilypond-mode.el lilypond-font-lock.el lilypond-indent.el \
122                 $(r)/usr/share/emacs/site-lisp/
123         dh_installdocs DEDICATION NEWS ROADMAP *.txt
124
125 #       dh_installdocs DEDICATION NEWS ROADMAP *.txt \
126 #               Documentation/pictures/out/*.png
127 #               Documentation/out/*.txt
128 #               $(DVI_FILES) $(PS_FILES)
129 #       mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
130 #       cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
131 #       cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
132
133 #       dh_installexamples input
134         find input \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \) \
135                 -exec cp -a --parents '{}' $(r)/$(d)/examples ';'
136         for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
137                 mv -fv $$i/* $$i/..; rmdir $$i; done
138 #       dh_installmenu
139         dh_installemacsen
140 #       dh_installcron
141 #       dh_installman
142 #       dh_undocumented
143         dh_installchangelogs -k CHANGES
144         dh_link usr/share/lilypond/$(VERSION)/tex \
145                         usr/share/texmf/tex/lilypond \
146                 usr/share/lilypond/$(VERSION)/fonts/source \
147                         usr/share/texmf/fonts/source/public/lilypond \
148                 usr/share/lilypond/$(VERSION)/fonts/afm \
149                         usr/share/texmf/fonts/afm/public/lilypond \
150                 usr/share/lilypond/$(VERSION)/fonts/tfm \
151                         usr/share/texmf/fonts/tfm/public/lilypond \
152                 usr/share/lilypond/$(VERSION)/dvips/lilypond.map \
153                         usr/share/texmf/dvips/config/lilypond.map
154         dh_strip
155         dh_compress
156         dh_fixperms
157         dh_installdeb
158         dh_shlibdeps
159         dh_gencontrol
160 #       dh_makeshlibs
161         dh_md5sums
162         dh_builddeb
163
164 binary: binary-indep binary-arch
165 .PHONY: build clean install binary-indep binary-arch binary