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.
8 export MAILADDRESS = lilypond@packages.debian.org
10 # fontconfig blows chunks if it can't write to $HOME; and some
11 # buildds set it to a bogus value.
14 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
15 CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
16 CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
17 ifneq (,$(filter $(DEB_HOST_ARCH), i386 kfreebsd-i386))
18 config_opt = --disable-optimising
19 CFLAGS := $(filter-out -O%, $(CFLAGS))
20 CXXFLAGS := $(filter-out -O%, $(CXXFLAGS))
22 config_opt = --enable-optimising
25 DOC_OPTIONS := WEB_TARGETS="offline"
26 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
27 DOC_OPTIONS := $(DOC_OPTIONS) $(DEB_BUILD_OPTIONS) CPU_COUNT=$(firstword $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
31 dh $@ --parallel --with-autotools-dev
34 override_dh_auto_configure:
35 dh_auto_configure -- --disable-checking --enable-debugging $(config_opt)
37 override_dh_auto_build-indep:
39 $(MAKE) $(DOC_OPTIONS) doc
41 override_dh_auto_install-indep:
42 $(MAKE) install-doc prefix=$(CURDIR)/debian/tmp/usr/
44 ## this rule will update debian/control and the per-language install
45 ## files; all of the files it generates/modifies should be included in
46 ## the Debian package and should not need to be regenerated or
49 perl debian/update_doc_packages
52 ## # Build architecture-independent files here.
53 ## binary-indep: DH_OPTIONS=-i
54 ## binary-indep: build-doc install
57 ## # Install LilyPond web documentation...
58 ## $(MAKE) install-doc prefix=$(CURDIR)/debian/lilypond-doc/usr/
59 ## # it installs a random dir-dep file for no reason
60 ## rm -f $(CURDIR)/debian/lilypond-doc/usr/share/info/*-dir-dep*
64 ## # remove the useless offline-root directory
65 ## mv $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html/offline-root/* \
66 ## $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html/.;
67 ## rmdir $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html/offline-root;
68 ## find $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html \
69 ## -type d -empty -delete
72 ## install -m 644 debian/xiao-haizi-guai-guai.ly debian/sakura-sakura.ly \
73 ## $(r_data)/$(d)/examples
74 ## dh_installchangelogs
76 ## dh_link usr/share/lilypond/$(VERSION)/tex \
77 ## usr/share/texmf/tex/lilypond \
78 ## usr/share/lilypond/$(VERSION)/fonts/source \
79 ## usr/share/texmf/fonts/source/public/lilypond \
80 ## usr/share/lilypond/$(VERSION)/fonts/type1 \
81 ## usr/share/texmf/fonts/type1/public/lilypond \
83 ## dh_pysupport /usr/share/lilypond/${VERSION}/python
85 ## dh_compress -X$(d)/html/
92 ## binary-arch: DH_OPTIONS=-s
93 ## binary-arch: build install
96 ## dh_installdocs AUTHORS.txt NEWS.txt README.txt \
101 ## dh_installchangelogs Documentation/misc/CHANGES* Documentation/misc/ChangeLog*
104 ## dh_pysupport /usr/share/lilypond/${VERSION}/python