| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
# Sample debian/rules that uses debhelper. |
| 4 |
# GNU copyright 1997 to 1999 by Joey Hess. |
| 5 |
# |
| 6 |
# Modified to make a template file for a multi-binary package with separated |
| 7 |
# build-arch and build-indep targets by Bill Allombert 2001 |
| 8 |
|
| 9 |
# Uncomment this to turn on verbose mode. |
| 10 |
#export DH_VERBOSE=1 |
| 11 |
|
| 12 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 13 |
|
| 14 |
# This has to be exported to make some magic below work. |
| 15 |
export DH_OPTIONS |
| 16 |
|
| 17 |
|
| 18 |
MLTERM_COMMON=$(CURDIR)/debian/mlterm-common |
| 19 |
MLTERM=$(CURDIR)/debian/mlterm |
| 20 |
MLTERM_TINY=$(CURDIR)/debian/mlterm-tiny |
| 21 |
MLTERM_TOOLS=$(CURDIR)/debian/mlterm-tools |
| 22 |
MLTERM_IM_UIM=$(CURDIR)/debian/mlterm-im-uim |
| 23 |
MLTERM_IM_M17NLIB=$(CURDIR)/debian/mlterm-im-m17nlib |
| 24 |
MLTERM_IM_SCIM=$(CURDIR)/debian/mlterm-im-scim |
| 25 |
MLTERM_IM_IBUS=$(CURDIR)/debian/mlterm-im-ibus |
| 26 |
MLTERM_IM_FCITX=$(CURDIR)/debian/mlterm-im-fcitx |
| 27 |
|
| 28 |
OPTS_COMMON=--x-includes=/usr/X11R6/include \ |
| 29 |
--x-libraries=/usr/X11R6/lib \ |
| 30 |
--disable-rpath \ |
| 31 |
--disable-iiimf \ |
| 32 |
--disable-canna \ |
| 33 |
--enable-vt52 |
| 34 |
# --enable-utmp \ |
| 35 |
|
| 36 |
OPTS_TINY=$(OPTS_COMMON) \ |
| 37 |
--with-type-engines=xcore \ |
| 38 |
--with-tools=no \ |
| 39 |
--with-scrollbars=sample \ |
| 40 |
--disable-uim \ |
| 41 |
--disable-m17nlib \ |
| 42 |
--disable-scim \ |
| 43 |
--disable-fcitx \ |
| 44 |
--disable-ibus \ |
| 45 |
--disable-wnn \ |
| 46 |
--disable-skk |
| 47 |
|
| 48 |
OPTS_MAIN=$(OPTS_COMMON) \ |
| 49 |
--with-imagelib=gdk-pixbuf --with-type-engines=xcore,xft,cairo \ |
| 50 |
--enable-optimize-redrawing \ |
| 51 |
--with-tools=mlclient,mlconfig,mlterm-menu,mlcc,mlterm-zoom \ |
| 52 |
--with-gtk=4.0 \ |
| 53 |
--with-scrollbars=sample,extra,pixmap_engine |
| 54 |
|
| 55 |
%: |
| 56 |
dh $@ |
| 57 |
|
| 58 |
override_dh_auto_clean: |
| 59 |
dh_auto_clean |
| 60 |
rm -rf main-tiny |
| 61 |
|
| 62 |
override_dh_autoreconf: |
| 63 |
|
| 64 |
override_dh_auto_configure: |
| 65 |
# Make mlterm-common, mlterm, mlterm-tools, mlterm-im-* |
| 66 |
DH_COMPAT=10 dh_auto_configure -- $(OPTS_MAIN) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS) -Wl,--as-needed" |
| 67 |
|
| 68 |
override_dh_auto_build: |
| 69 |
dh_auto_build |
| 70 |
|
| 71 |
# Make mlterm-tiny |
| 72 |
DH_COMPAT=10 dh_auto_configure -- $(OPTS_TINY) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS) -Wl,--as-needed" |
| 73 |
cp -a main main-tiny |
| 74 |
rm -f uitoolkit/*.o main-tiny/*.o |
| 75 |
$(MAKE) -C uitoolkit |
| 76 |
$(MAKE) -C main-tiny VPATH=$(CURDIR)/main-tiny |
| 77 |
|
| 78 |
# configure again for installation (later) |
| 79 |
DH_COMPAT=10 dh_auto_configure -- $(OPTS_MAIN) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS) -Wl,--as-needed" |
| 80 |
|
| 81 |
override_dh_install: |
| 82 |
# mlterm-common: |
| 83 |
dh_install -pmlterm-common -Xuim -Xm17 -Xscim -Xibus -Xfcitx -Xwnn -Xskk -Xman1 |
| 84 |
rm $(MLTERM_COMMON)/usr/lib/*/libpobl.so |
| 85 |
rm $(MLTERM_COMMON)/usr/lib/*/libmef.so |
| 86 |
for i in main font aafont key termcap xim color menu ; \ |
| 87 |
do install -m 644 debian/config-$$i \ |
| 88 |
$(MLTERM_COMMON)/etc/mlterm/$$i ; done |
| 89 |
# the rest: |
| 90 |
dh_install -Nmlterm-common |
| 91 |
|
| 92 |
override_dh_auto_test: |
| 93 |
|
| 94 |
override_dh_makeshlibs: |
| 95 |
dh_makeshlibs -Xusr/lib/$(DEB_HOST_MULTIARCH)/mlterm -Xusr/lib/$(DEB_HOST_MULTIARCH)/mef |
| 96 |
|
| 97 |
override_dh_installdocs: |
| 98 |
dh_installdocs --link-doc=mlterm-common |