]> 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 = 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 --enable-checking --enable-debugging \
45                 --prefix=/usr --enable-optimise \
46                 --infodir='$${prefix}/share/info' \
47                 --mandir='$${prefix}/share/man'
48         $(MAKE) MAKE_PFA_FILES=1
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
79         dh_clean
80
81 install: DH_OPTIONS=
82 install: build
83         dh_testdir
84         dh_testroot
85         dh_clean -k
86         dh_installdirs
87
88         # Add here commands to install the package into debian/tmp.
89         $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr MAKE_PFA_FILES=1
90
91         dh_install --sourcedir=debian/tmp --list-missing
92
93 #       # Change from an absolute symlink to a relative symlink (Lintian)
94 #       if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
95 #               rm -f $(r)/usr/share/lilypond/cmtfm; \
96 #               ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
97 #       fi
98
99 # Build architecture-independent files here.
100 binary-indep: DH_OPTIONS=-i
101 binary-indep: build-doc install
102         dh_testdir
103         dh_testroot
104         # Install LilyPond web documentation...
105         $(MAKE) prefix=$(PWD)/$(r_doc)/usr webdir=$(PWD)/$(r_doc)/$(d)/html out=www web-install
106         # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
107         cd $(r_doc)/$(d) \
108             && cp -s `find html/Documentation -name '*.ps.gz'` . \
109             && cp -s html/Documentation/pictures/out-www/*.png .
110 #       # Copy the DVI docs too ...
111 #       cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
112 #               $(r_doc)/$(d)/
113         dh_installdocs
114         dh_installemacsen
115         dh_scrollkeeper
116
117         find input \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \) ! -regex '.*/out-www/.*' \
118                 -exec cp -a --parents '{}' $(r_data)/$(d)/examples ';'
119         dh_installchangelogs
120
121         mv $(r_data)/usr/share/lilypond/$(VERSION)/dvips/lilypond.map \
122            $(r_data)/etc/texmf/dvips/lilypond.map
123
124         dh_link usr/share/lilypond/$(VERSION)/tex \
125                         usr/share/texmf/tex/lilypond \
126                 usr/share/lilypond/$(VERSION)/fonts/source \
127                         usr/share/texmf/fonts/source/public/lilypond \
128                 usr/share/lilypond/$(VERSION)/fonts/afm \
129                         usr/share/texmf/fonts/afm/public/lilypond \
130                 usr/share/lilypond/$(VERSION)/fonts/tfm \
131                         usr/share/texmf/fonts/tfm/public/lilypond \
132                 usr/share/lilypond/$(VERSION)/fonts/type1 \
133                         usr/share/texmf/fonts/type1/public/lilypond \
134                 etc/texmf/dvips/lilypond.map \
135                         usr/share/lilypond/$(VERSION)/dvips/lilypond.map
136
137         dh_compress -X$(d)/html/
138         dh_fixperms
139         dh_installdeb
140         dh_gencontrol
141         dh_md5sums
142         dh_builddeb
143
144 binary-arch: DH_OPTIONS=-s
145 binary-arch: build install
146         dh_testdir
147         dh_testroot
148         dh_installdocs AUTHORS.txt NEWS.txt README.txt \
149                 DEDICATION THANKS 
150
151 #       dh_installdocs DEDICATION NEWS ROADMAP *.txt \
152 #               Documentation/pictures/out/*.png
153 #               Documentation/out/*.txt
154 #               $(DVI_FILES) $(PS_FILES)
155 #       mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
156 #       cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
157 #       cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
158
159 #       dh_installexamples input
160
161 #       for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
162 #               mv -fv $$i/* $$i/..; rmdir $$i; done
163
164 #       dh_installmenu
165         dh_installemacsen
166         dh_scrollkeeper
167 #       dh_installcron
168 #       dh_installman
169 #       dh_undocumented
170         dh_installchangelogs ChangeLog
171
172         dh_strip
173         dh_compress
174         dh_fixperms
175         dh_installdeb
176         dh_shlibdeps
177         dh_gencontrol
178 #       dh_makeshlibs
179         dh_md5sums
180         dh_builddeb
181
182 binary: binary-indep binary-arch
183 .PHONY: build clean install binary-indep binary-arch binary