lilypond-1.4.4
[lilypond.git] / debian / rules
blob15dbc650d634371f6bb64639188cc1151915e3c9
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.
5 # This is free software; see the GNU General Public Licence
6 # version 2 or later for copying conditions. There is NO warranty.
8 # Currently maintained by Anthony Fok <foka@debian.org>
9 # for Debian GNU/Linux.
11 package = lilypond
13 SHELL = /bin/sh
14 r = debian/$(package)
15 r_doc = debian/$(package)-doc
16 d = usr/share/doc/$(package)
18 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
19 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
20 export extra_mem_top = 100000
21 export extra_mem_bot = 100000
22 export MODE = ljfour
23 export BDPI = 600
24 export USER_CFLAGS = -DDEBIAN
25 export DEB_BUILD = yes
26 export MAILADDRESS = lilypond@packages.debian.org
28 # Uncomment this to turn on verbose mode.
29 #export DH_VERBOSE=1
31 # This is the debhelper compatibility version to use.
32 export DH_COMPAT=3
34 # This has to be exported to make some magic below work.
35 export DH_OPTIONS
37 build: build-stamp
38 build-stamp:
39 dh_testdir
41 ./configure --enable-checking --disable-debugging \
42 --prefix=/usr --enable-optimise \
43 --infodir='$${prefix}/share/info' \
44 --mandir='$${prefix}/share/man'
45 $(MAKE)
47 touch build-stamp
49 build-doc: build build-doc-stamp
50 build-doc-stamp:
51 dh_testdir
53 $(MAKE) -C Documentation
54 $(MAKE) web
56 touch build-doc-stamp
58 clean:
59 dh_testdir
60 dh_testroot
61 rm -f build-stamp build-doc-stamp
62 -$(MAKE) WWW-clean top-WWW-clean
63 -$(MAKE) distclean
65 # Still not clean enough? Let's use... BRUTE STRENGTH! :-)
66 find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
67 rm -f debian/doc-base debian/TODO
69 dh_clean
71 install: DH_OPTIONS=
72 install: build
73 dh_testdir
74 dh_testroot
75 dh_clean -k
77 # Add here commands to install the package into debian/tmp.
78 dh_installdirs
79 $(MAKE) prefix=$(PWD)/$(r)/usr install
81 # Change from an absolute symlink to a relative symlink (Lintian)
82 if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
83 rm -f $(r)/usr/share/lilypond/cmtfm; \
84 ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
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 -Xusr/share/doc/lilypond/html/
105 dh_fixperms
106 dh_installdeb
107 dh_gencontrol
108 dh_md5sums
109 dh_builddeb
111 binary-arch: DH_OPTIONS=-a
112 binary-arch: build install
113 dh_testdir
114 dh_testroot
115 cp -av lilypond-mode.el lilypond-font-lock.el \
116 $(r)/usr/share/emacs/site-lisp/
117 dh_installdocs DEDICATION NEWS ROADMAP *.txt
119 # dh_installdocs DEDICATION NEWS ROADMAP *.txt \
120 # Documentation/pictures/out/*.png
121 # Documentation/out/*.txt
122 # $(DVI_FILES) $(PS_FILES)
123 # mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
124 # cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
125 # cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
127 # dh_installexamples input
128 cp -aP `find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
129 $(r)/$(d)/examples
130 for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
131 mv -fv $$i/* $$i/..; rmdir $$i; done
132 # dh_installmenu
133 dh_installemacsen
134 # dh_installcron
135 # dh_installman
136 # dh_undocumented
137 dh_installchangelogs -k CHANGES
138 dh_link
139 dh_strip
140 dh_compress
141 dh_fixperms
142 dh_installdeb
143 dh_shlibdeps
144 dh_gencontrol
145 # dh_makeshlibs
146 dh_md5sums
147 dh_builddeb
149 binary: binary-indep binary-arch
150 .PHONY: build clean install binary-indep binary-arch binary