]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
(Vertical spacing):
[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 = lilypond
11
12 SHELL = /bin/sh
13 r = debian/$(package)
14 r_data = debian/$(package)-data
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 has to be exported to make some magic below work.
38 export DH_OPTIONS
39
40 build: build-stamp
41 build-stamp:
42         dh_testdir
43
44         ./configure --disable-checking --enable-debugging \
45                 --prefix=/usr --enable-optimising \
46                 --infodir='$${prefix}/share/info' \
47                 --mandir='$${prefix}/share/man'
48         $(MAKE)
49
50         touch build-stamp
51
52 build-doc: build build-doc-stamp
53 build-doc-stamp:
54         dh_testdir
55
56         # make info
57         $(MAKE) -C Documentation
58         # make html
59         $(MAKE) web
60         $(MAKE) -C Documentation/user omf
61 #       find . -type d -name 'out-www' | xargs rm -rf
62
63         touch build-doc-stamp
64
65 clean:
66         dh_testdir
67         dh_testroot
68         rm -f build-stamp build-doc-stamp
69         -$(MAKE) WWW-clean top-WWW-clean
70         -$(MAKE) distclean
71
72         # Still not clean enough?  Let's use... BRUTE STRENGTH!  :-)
73         find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
74         rm -f lib/lilypond/python examples.html
75         rm -f debian/emacsen-startup
76         rm -f debian/lilypond1.7*.dirs debian/lilypond.dirs
77         rm -f debian/postinst debian/prerm debian/postrm
78         rm -f debian/lilypond-data.doc-base debian/lilypond.doc-base
79
80         dh_clean
81
82 install: DH_OPTIONS=
83 install: build
84         dh_testdir
85         dh_testroot
86         dh_clean -k
87         dh_installdirs
88
89         # Add here commands to install the package into debian/tmp.
90         $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
91
92         dh_install --sourcedir=debian/tmp --list-missing
93
94 #       # Change from an absolute symlink to a relative symlink (Lintian)
95 #       if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
96 #               rm -f $(r)/usr/share/lilypond/cmtfm; \
97 #               ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
98 #       fi
99
100 # Build architecture-independent files here.
101 binary-indep: DH_OPTIONS=-i
102 binary-indep: build-doc install
103         dh_testdir
104         dh_testroot
105         # Install LilyPond web documentation...
106         $(MAKE) prefix=$(PWD)/$(r_doc)/usr webdir=$(PWD)/$(r_doc)/$(d)/html out=www web-install
107         # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
108         cd $(r_doc)/$(d) \
109             && cp -s `find html/Documentation -name '*.ps.gz'` . \
110             && cp -s html/Documentation/pictures/out-www/*.png .
111 #       # Copy the DVI docs too ...
112 #       cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
113 #               $(r_doc)/$(d)/
114         dh_installdocs
115         dh_installemacsen
116         dh_scrollkeeper
117
118         find input \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \) ! -regex '.*/out-www/.*' \
119                 -exec cp -a --parents '{}' $(r_data)/$(d)/examples ';'
120         dh_installchangelogs
121
122         mv $(r_data)/usr/share/lilypond/$(VERSION)/dvips/lilypond.map \
123            $(r_data)/etc/texmf/dvips/lilypond.map
124
125         dh_link usr/share/lilypond/$(VERSION)/tex \
126                         usr/share/texmf/tex/lilypond \
127                 usr/share/lilypond/$(VERSION)/fonts/source \
128                         usr/share/texmf/fonts/source/public/lilypond \
129                 usr/share/lilypond/$(VERSION)/fonts/afm \
130                         usr/share/texmf/fonts/afm/public/lilypond \
131                 usr/share/lilypond/$(VERSION)/fonts/tfm \
132                         usr/share/texmf/fonts/tfm/public/lilypond \
133                 usr/share/lilypond/$(VERSION)/fonts/type1 \
134                         usr/share/texmf/fonts/type1/public/lilypond \
135                 etc/texmf/dvips/lilypond.map \
136                         usr/share/lilypond/$(VERSION)/dvips/lilypond.map
137
138         dh_compress -X$(d)/html/
139         dh_fixperms
140         dh_installdeb
141         dh_gencontrol
142         dh_md5sums
143         dh_builddeb
144
145 binary-arch: DH_OPTIONS=-s
146 binary-arch: build install
147         dh_testdir
148         dh_testroot
149         dh_installdocs AUTHORS.txt NEWS.txt README.txt \
150                 DEDICATION THANKS 
151
152 #       dh_installdocs DEDICATION NEWS ROADMAP *.txt \
153 #               Documentation/pictures/out/*.png
154 #               Documentation/out/*.txt
155 #               $(DVI_FILES) $(PS_FILES)
156 #       mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
157 #       cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
158 #       cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
159
160 #       dh_installexamples input
161
162 #       for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
163 #               mv -fv $$i/* $$i/..; rmdir $$i; done
164
165 #       dh_installmenu
166         dh_installemacsen
167         dh_scrollkeeper
168 #       dh_installcron
169 #       dh_installman
170 #       dh_undocumented
171         dh_installchangelogs ChangeLog
172
173         dh_strip
174         dh_compress
175         dh_fixperms
176         dh_installdeb
177         dh_shlibdeps
178         dh_gencontrol
179 #       dh_makeshlibs
180         dh_md5sums
181         dh_builddeb
182
183 binary: binary-indep binary-arch
184 .PHONY: build clean install binary-indep binary-arch binary