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)
16 UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -r 's/^Version: ([0-9]*:)?(.*)-[^-]*$$/\2/; t; d')
21 build-indep: build-indep-stamp
22 build-indep-stamp: doc-orig patch
25 cd libextl && $(MAKE) libextl-mkexports
26 #cd doc && $(MAKE) all all-pdf
28 touch build-indep-stamp
30 build-arch: build-arch-stamp
31 build-arch-stamp: doc-orig patch
36 touch build-arch-stamp
38 build: build-indep build-arch
43 rm -f build-indep-stamp build-arch-stamp
47 if [ -d doc-orig ]; then \
54 install-indep: build-indep
62 find . \( -name debian -o -name config.h -o -name snprintf.h \) \
63 -prune -o -name '*.h' -exec install -m644 -D {} \
64 $(INSTDIR_DEV)/usr/include/$(PACKAGE)/{} \;
66 install-arch: build-arch
73 PREFIX=$(CURDIR)/$(INSTDIR)/usr \
74 ETCDIR=$(CURDIR)/$(INSTDIR)/etc/X11/$(PACKAGE)
76 # install other things (mainly -dev)
79 # fix the installation
80 rm -f $(INSTDIR)/etc/X11/$(PACKAGE)/draw.lua
82 binary-indep: build-indep install-indep
86 # automatically keep track of api version
87 echo Ion:ApiVersion=$$((cat version.h; echo ION_API_VERSION) \
88 | cpp -P | tail -1 | sed 's/"//g') >>debian/ion3-dev.substvars
90 dh_installchangelogs -i
92 # remove empty images and TeX droppings
93 find $(INSTDIR_DOC)/usr/share/doc/$(PACKAGE_DOC) \
94 -name '*.png' -size 0 \
95 -o -name '*.aux' -o -name '*.idx' -o -name '*.log' \
96 -o -name '*.out' -o -name '*.pl' -o -name WARNINGS \
99 # dh_installexamples -i
102 # dh_installdebconf -i
103 # dh_installlogrotate -i
104 # dh_installemacsen -i
125 binary-arch: build-arch install-arch
129 # automatically keep track of api version
130 echo Ion:ApiVersion=$$((cat version.h; echo ION_API_VERSION) \
131 | cpp -P | tail -1 | sed 's/"//g') >>debian/ion3.substvars
133 dh_installchangelogs -a
135 rm -f $(INSTDIR)/usr/share/doc/ion3/LICENSE
136 mv $(INSTDIR)/usr/share/doc/ion3/ChangeLog $(INSTDIR)/usr/share/doc/ion3/changelog
137 # dh_installexamples -a
140 install -m644 debian/ion3.menu-method.i18n \
141 $(INSTDIR)/etc/menu-methods/ion3-i18n
143 cat $(CURDIR)/debian/patches/extra/debian-menu.cfg >> $(INSTDIR)/etc/X11/ion3/cfg_ioncore.lua
146 # dh_installlogrotate -a
147 # dh_installemacsen -a
157 dh_compress -a -X.lua
163 sed -i 's/^UPSTREAM_VERSION=/UPSTREAM_VERSION=$(UPSTREAM_VERSION)/' \
164 debian/ion3/DEBIAN/postinst
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