3 # Uncomment this to turn on verbose mode.
8 include /usr/share/dpatch/dpatch.make
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)
20 build-indep: build-indep-stamp
21 build-indep-stamp: doc-orig patch
24 cd libextl && $(MAKE) libextl-mkexports
25 #cd doc && $(MAKE) all all-pdf
27 touch build-indep-stamp
29 build-arch: build-arch-stamp
30 build-arch-stamp: doc-orig patch
35 touch build-arch-stamp
37 build: build-indep build-arch
42 rm -f build-indep-stamp build-arch-stamp
46 if [ -d doc-orig ]; then \
53 install-indep: build-indep
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)/{} \;
65 install-arch: build-arch
72 PREFIX=$(CURDIR)/$(INSTDIR)/usr \
73 ETCDIR=$(CURDIR)/$(INSTDIR)/etc/X11/$(PACKAGE)
75 # install other things (mainly -dev)
78 # fix the installation
79 rm -f $(INSTDIR)/etc/X11/$(PACKAGE)/draw.lua
81 binary-indep: build-indep install-indep
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
89 dh_link -p$(PACKAGE_DEV) usr/share/doc/$(PACKAGE) \
90 usr/share/doc/$(PACKAGE_DEV)
92 dh_installchangelogs -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 \
101 # dh_installexamples -i
104 # dh_installdebconf -i
105 # dh_installlogrotate -i
106 # dh_installemacsen -i
127 binary-arch: build-arch install-arch
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
135 dh_installchangelogs -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
142 install -m644 debian/ion3.menu-method.i18n \
143 $(INSTDIR)/etc/menu-methods/ion3-i18n
145 cat $(CURDIR)/debian/patches/extra/debian-menu.cfg >> $(INSTDIR)/etc/X11/ion3/cfg_ioncore.lua
147 # dh_installdebconf -a
148 # dh_installlogrotate -a
149 # dh_installemacsen -a
159 dh_compress -a -X.lua
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