]> git.decadent.org.uk Git - ion3.git/blob - debian/rules
Removed junk from docs.
[ion3.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 export SHELL=/bin/bash
7
8 include /usr/share/dpatch/dpatch.make
9
10 PACKAGE := ion3
11 PACKAGE_DEV := $(PACKAGE)-dev
12 PACKAGE_DOC := $(PACKAGE)-doc
13 INSTDIR := debian/$(PACKAGE)
14 INSTDIR_DEV := debian/$(PACKAGE_DEV)
15 INSTDIR_DOC := debian/$(PACKAGE_DOC)
16
17 doc-orig:
18         cp -R doc doc-orig
19
20 build-indep: build-indep-stamp
21 build-indep-stamp: doc-orig patch
22         dh_testdir
23
24         cd libextl && $(MAKE) libextl-mkexports
25         #cd doc && $(MAKE) all all-pdf
26
27         touch build-indep-stamp
28
29 build-arch: build-arch-stamp
30 build-arch-stamp: doc-orig patch
31         dh_testdir
32
33         $(MAKE)
34
35         touch build-arch-stamp
36
37 build: build-indep build-arch
38
39 clean: unpatch
40         dh_testdir
41         dh_testroot
42         rm -f build-indep-stamp build-arch-stamp
43
44         $(MAKE) realclean
45
46         if [ -d doc-orig ]; then \
47                 rm -rf doc; \
48                 mv doc-orig doc; \
49         fi
50
51         dh_clean
52
53 install-indep: build-indep
54         dh_testdir
55         dh_testroot
56         dh_clean -i -k
57         dh_installdirs -i
58         dh_install -i
59
60 # install headers
61         find . \( -name debian -o -name config.h -o -name snprintf.h \) \
62                 -prune -o -name '*.h' -exec install -m644 -D {} \
63                 $(INSTDIR_DEV)/usr/include/$(PACKAGE)/{} \;
64
65 install-arch: build-arch
66         dh_testdir
67         dh_testroot
68         dh_clean -a -k
69         dh_installdirs -a
70
71         $(MAKE) install \
72                 PREFIX=$(CURDIR)/$(INSTDIR)/usr \
73                 ETCDIR=$(CURDIR)/$(INSTDIR)/etc/X11/$(PACKAGE)
74
75 # install other things (mainly -dev)
76         dh_install -a
77
78 # fix the installation
79         rm -f $(INSTDIR)/etc/X11/$(PACKAGE)/draw.lua
80
81 binary-indep: build-indep install-indep
82         dh_testdir
83         dh_testroot
84
85 # automatically keep track of api version
86         echo Ion:ApiVersion=$$((cat version.h; echo ION_API_VERSION) \
87                 | cpp -P | tail -1 | sed 's/"//g') >>debian/ion3-dev.substvars
88
89         dh_link -p$(PACKAGE_DEV) usr/share/doc/$(PACKAGE) \
90                 usr/share/doc/$(PACKAGE_DEV)
91
92         dh_installchangelogs -i
93         dh_installdocs -i
94 # remove empty images and TeX droppings
95         find $(INSTDIR_DOC)/usr/share/doc/$(PACKAGE_DOC) \
96                 -name '*.png' -size 0 \
97                 -o -name '*.aux' -o -name '*.idx' -o -name '*.log' \
98                 -o -name '*.out' -o -name '*.pl' -o -name WARNINGS \
99                 | xargs rm --
100
101 #       dh_installexamples -i
102 #       dh_install -i
103 #       dh_installmenu -i
104 #       dh_installdebconf -i
105 #       dh_installlogrotate -i
106 #       dh_installemacsen -i
107 #       dh_installpam -i
108 #       dh_installmime -i
109 #       dh_installinit -i
110 #       dh_installcron -i
111 #       dh_installinfo -i
112 #       dh_undocumented -i
113 #       dh_installman -i
114 #       dh_link -i
115 #       dh_strip -i
116         dh_compress -i
117         dh_fixperms -i
118 #       dh_perl -i
119 #       dh_python -i
120 #       dh_makeshlibs -i
121         dh_installdeb -i
122 #       dh_shlibdeps -i
123         dh_gencontrol -i
124         dh_md5sums -i
125         dh_builddeb -i
126
127 binary-arch: build-arch install-arch
128         dh_testdir
129         dh_testroot
130
131 # automatically keep track of api version
132         echo Ion:ApiVersion=$$((cat version.h; echo ION_API_VERSION) \
133                 | cpp -P | tail -1 | sed 's/"//g') >>debian/ion3.substvars
134
135         dh_installchangelogs -a
136         dh_installdocs -a
137         rm -f $(INSTDIR)/usr/share/doc/ion3/LICENSE
138         mv $(INSTDIR)/usr/share/doc/ion3/ChangeLog $(INSTDIR)/usr/share/doc/ion3/changelog
139 #       dh_installexamples -a
140 #       dh_install -a
141         dh_installmenu -a
142         install -m644 debian/ion3.menu-method.i18n \
143                 $(INSTDIR)/etc/menu-methods/ion3-i18n
144
145         cat $(CURDIR)/debian/patches/extra/debian-menu.cfg >> $(INSTDIR)/etc/X11/ion3/cfg_ioncore.lua
146
147 #       dh_installdebconf        -a
148 #       dh_installlogrotate -a
149 #       dh_installemacsen -a
150 #       dh_installpam -a
151 #       dh_installmime -a
152 #       dh_installinit -a
153 #       dh_installcron -a
154 #       dh_installinfo -a
155 #       dh_undocumented -a
156 #       dh_installman -a
157         dh_link -a
158 #       dh_strip -a
159         dh_compress -a -X.lua
160         dh_fixperms -a
161 #       dh_perl -a
162 #       dh_python -a
163 #       dh_makeshlibs -a
164         dh_installdeb -a
165         dh_shlibdeps -a
166         dh_gencontrol -a
167         dh_md5sums -a
168         dh_builddeb -a
169
170 binary: binary-indep binary-arch
171 .PHONY: build-indep build-arch build clean binary-indep binary-arch binary \
172         install-indep install-arch unpatch