]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
Delete the omf and input directories; we don't need to distribute the regression...
[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
8 export MAILADDRESS = lilypond@packages.debian.org
9
10 # fontconfig blows chunks if it can't write to $HOME; and some
11 # buildds set it to a bogus value.
12 export HOME = /tmp
13
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))
21 else
22   config_opt = --enable-optimising
23 endif
24
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))))
28 endif
29
30 %:
31         dh $@ --parallel --with autotools-dev --with python2
32
33
34 override_dh_auto_configure: 
35         dh_auto_configure -- --disable-checking --enable-debugging $(config_opt)
36
37 override_dh_auto_build-indep:
38         dh_auto_build
39         $(MAKE) $(DOC_OPTIONS) doc
40
41 override_dh_auto_install-indep:
42         $(MAKE) install-doc prefix=$(CURDIR)/debian/tmp/usr/
43         rm -rf $(CURDIR)/debian/tmp/usr/share/omf
44         rm -rf $(CURDIR)/debian/tmp/usr/share/doc/lilypond/html/input
45
46 ## we need to install only the png, ly and english html files into the
47 ## doc-html package, and only the english pdfs into the doc-pdf
48 ## package. Because dh_install doesn't support regexes, we'll use find
49 ## to replace the contents of the .install file before we call
50 ## dh_install
51 override_dh_install:
52         echo -e 'usr/share/doc/lilypond/html/*/*/*.ly\nusr/share/doc/lilypond/html/*/*/*.png' \
53                 > $(CURDIR)/debian/lilypond-doc-html.install
54         find $(CURDIR)/debian/tmp/ -type f \
55                 -regex '.*usr/share/doc/lilypond/.*/[^\.]+.html' \
56                 -printf '%P\n' >> $(CURDIR)/debian/lilypond-doc-html.install
57         echo -e ''> $(CURDIR)/debian/lilypond-doc-pdf.install
58         find $(CURDIR)/debian/tmp/ -type f \
59                 -regex '.*usr/share/doc/lilypond/.*/[^\.]+.pdf' \
60                 -printf '%P\n' >> $(CURDIR)/debian/lilypond-doc-pdf.install
61         dh_install
62
63
64 ## this rule will update debian/control and the per-language install
65 ## files; all of the files it generates/modifies should be included in
66 ## the Debian package and should not need to be regenerated or
67 ## modified.
68 update-doc-packages:
69         perl debian/update_doc_packages
70
71
72 ## # Build architecture-independent files here.
73 ## binary-indep: DH_OPTIONS=-i
74 ## binary-indep: build-doc install
75 ##      dh_testdir
76 ##      dh_testroot
77 ##      # Install LilyPond web documentation...
78 ##      $(MAKE) install-doc prefix=$(CURDIR)/debian/lilypond-doc/usr/
79 ##      # it installs a random dir-dep file for no reason
80 ##      rm -f $(CURDIR)/debian/lilypond-doc/usr/share/info/*-dir-dep*
81 ## 
82 ##      dh_installinfo
83 ##      dh_installdocs
84 ##      # remove the useless offline-root directory
85 ##      mv $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html/offline-root/* \
86 ##              $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html/.;
87 ##      rmdir $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html/offline-root;
88 ##      find $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html \
89 ##              -type d -empty -delete
90 ##      dh_installemacsen
91 ## 
92 ##      install -m 644 debian/xiao-haizi-guai-guai.ly debian/sakura-sakura.ly \
93 ##              $(r_data)/$(d)/examples
94 ##      dh_installchangelogs
95 ## 
96 ##      dh_link usr/share/lilypond/$(VERSION)/tex \
97 ##                      usr/share/texmf/tex/lilypond \
98 ##              usr/share/lilypond/$(VERSION)/fonts/source \
99 ##                      usr/share/texmf/fonts/source/public/lilypond \
100 ##              usr/share/lilypond/$(VERSION)/fonts/type1 \
101 ##                      usr/share/texmf/fonts/type1/public/lilypond \
102 ## 
103 ##      dh_pysupport /usr/share/lilypond/${VERSION}/python
104 ## 
105 ##      dh_compress -X$(d)/html/
106 ##      dh_fixperms
107 ##      dh_installdeb
108 ##      dh_gencontrol
109 ##      dh_md5sums
110 ##      dh_builddeb
111 ## 
112 ## binary-arch: DH_OPTIONS=-s
113 ## binary-arch: build install
114 ##      dh_testdir
115 ##      dh_testroot
116 ##      dh_installdocs AUTHORS.txt NEWS.txt README.txt \
117 ##              DEDICATION THANKS 
118 ## 
119 ## 
120 ##      dh_installemacsen
121 ##      dh_installchangelogs Documentation/misc/CHANGES* Documentation/misc/ChangeLog*
122 ## 
123 ##      dh_strip
124 ##      dh_pysupport /usr/share/lilypond/${VERSION}/python
125 ##      dh_compress
126 ##      dh_fixperms
127 ##      dh_installdeb
128 ##      dh_shlibdeps
129 ##      dh_gencontrol
130 ##      dh_md5sums
131 ##      dh_builddeb