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