*** empty log message ***
[lilypond.git] / debian / rules
blobe9e88ae787c0a4a2a9b49a7cbca4bdedc8816e5e
1 #!/usr/bin/make -f
2 # debian/rules for LilyPond in Debian.
4 # This is free software; see the GNU General Public Licence
5 # version 2 or later for copying conditions. There is NO warranty.
7 # Currently maintained by Anthony Fok <foka@debian.org>
8 # for Debian GNU/Linux.
10 package = lilypond
12 SHELL = /bin/sh
13 r = debian/$(package)
14 r_data = debian/$(package)-data
15 r_doc = debian/$(package)-doc
17 # FIXME: /usr
18 d = usr/share/doc/$(package)
19 info = /usr/share/info/$(package)
21 include VERSION
22 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
24 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
25 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
26 # export extra_mem_top = 100000
27 # export extra_mem_bot = 100000
28 # But now, building lilypond.dvi requires increased pool_size (2002-02-18)
29 # export pool_size = 500000
30 # But now, it seems that none of the above is needed in 1.4.11 (2002-02-24)
31 export MODE = ljfour
32 export BDPI = 600
33 export USER_CFLAGS = -DDEBIAN
34 export DEB_BUILD = yes
35 export MAILADDRESS = lilypond@packages.debian.org
37 # Uncomment this to turn on verbose mode.
38 #export DH_VERBOSE=1
40 # This has to be exported to make some magic below work.
41 export DH_OPTIONS
43 build: build-stamp
44 build-stamp:
45 dh_testdir
47 ./configure --disable-checking --enable-debugging \
48 --prefix=/usr --enable-optimising \
49 --infodir='$${prefix}/share/info' \
50 --mandir='$${prefix}/share/man'
51 $(MAKE)
53 touch build-stamp
55 build-doc: build build-doc-stamp
56 build-doc-stamp:
57 dh_testdir
59 # make info
60 $(MAKE) -C Documentation
61 # make html
62 $(MAKE) web
63 $(MAKE) -C Documentation/user omf
64 # find . -type d -name 'out-www' | xargs rm -rf
66 touch build-doc-stamp
68 clean:
69 dh_testdir
70 dh_testroot
71 rm -f build-stamp build-doc-stamp
72 -$(MAKE) WWW-clean top-WWW-clean
73 -$(MAKE) distclean
75 # Still not clean enough? Let's use... BRUTE STRENGTH! :-)
76 find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
77 rm -f lib/lilypond/python examples.html
78 rm -f debian/emacsen-startup
79 rm -f debian/lilypond1.7*.dirs debian/lilypond.dirs
80 rm -f debian/postinst debian/prerm debian/postrm
81 rm -f debian/lilypond-data.doc-base debian/lilypond.doc-base
83 dh_clean
85 install: DH_OPTIONS=
86 install: build
87 dh_testdir
88 dh_testroot
89 dh_clean -k
90 dh_installdirs
92 # Add here commands to install the package into debian/tmp.
93 $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
95 dh_install --sourcedir=debian/tmp --list-missing
97 # # Change from an absolute symlink to a relative symlink (Lintian)
98 # if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
99 # rm -f $(r)/usr/share/lilypond/cmtfm; \
100 # ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
101 # fi
103 # Build architecture-independent files here.
104 binary-indep: DH_OPTIONS=-i
105 binary-indep: build-doc install
106 dh_testdir
107 dh_testroot
108 # Install LilyPond web documentation...
109 $(MAKE) prefix=$(PWD)/$(r_doc)/usr webdir=$(PWD)/$(r_doc)/$(d)/html out=www web-install
110 # Add symlinks to the PostScript docs and LilyPond logo PNGs for HTML...
111 cd $(r_doc)/$(d) \
112 && cp -s `find html/Documentation -name '*.ps.gz'` . \
113 && cp -s html/Documentation/pictures/out-www/*.png .
114 # Add symlinks to the documentation PNGs for info...
115 cd $(r_doc)/$(info) \
116 && cp -s ../../doc/$(package)/html/Documentation/user/out-www/*.png .
117 # # Copy the DVI docs too ...
118 # cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
119 # $(r_doc)/$(d)/
120 dh_installdocs
121 dh_installemacsen
122 dh_scrollkeeper
124 find input \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \) ! -regex '.*/out-www/.*' \
125 -exec cp -a --parents '{}' $(r_data)/$(d)/examples ';'
126 dh_installchangelogs
128 mv $(r_data)/usr/share/lilypond/$(VERSION)/fonts/map/lilypond.map \
129 $(r_data)/etc/texmf/dvips/lilypond.map
131 dh_link usr/share/lilypond/$(VERSION)/tex \
132 usr/share/texmf/tex/lilypond \
133 usr/share/lilypond/$(VERSION)/fonts/source \
134 usr/share/texmf/fonts/source/public/lilypond \
135 usr/share/lilypond/$(VERSION)/fonts/afm \
136 usr/share/texmf/fonts/afm/public/lilypond \
137 usr/share/lilypond/$(VERSION)/fonts/tfm \
138 usr/share/texmf/fonts/tfm/public/lilypond \
139 usr/share/lilypond/$(VERSION)/fonts/type1 \
140 usr/share/texmf/fonts/type1/public/lilypond \
141 etc/texmf/dvips/lilypond.map \
142 usr/share/lilypond/$(VERSION)/dvips/lilypond.map
144 dh_compress -X$(d)/html/
145 dh_fixperms
146 dh_installdeb
147 dh_gencontrol
148 dh_md5sums
149 dh_builddeb
151 binary-arch: DH_OPTIONS=-s
152 binary-arch: build install
153 dh_testdir
154 dh_testroot
155 dh_installdocs AUTHORS.txt NEWS.txt README.txt \
156 DEDICATION THANKS
158 # dh_installdocs DEDICATION NEWS ROADMAP *.txt \
159 # Documentation/pictures/out/*.png
160 # Documentation/out/*.txt
161 # $(DVI_FILES) $(PS_FILES)
162 # mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
163 # cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
164 # cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
166 # dh_installexamples input
168 # for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
169 # mv -fv $$i/* $$i/..; rmdir $$i; done
171 # dh_installmenu
172 dh_installemacsen
173 dh_scrollkeeper
174 # dh_installcron
175 # dh_installman
176 # dh_undocumented
177 dh_installchangelogs ChangeLog
179 dh_strip
180 dh_compress
181 dh_fixperms
182 dh_installdeb
183 dh_shlibdeps
184 dh_gencontrol
185 # dh_makeshlibs
186 dh_md5sums
187 dh_builddeb
189 binary: binary-indep binary-arch
190 .PHONY: build clean install binary-indep binary-arch binary