| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
export DH_COMPAT=4 |
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
|---|
| 12 |
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
|---|
| 13 |
CONFIGURE_OPTIONS = --disable-dependency-tracking |
|---|
| 14 |
|
|---|
| 15 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
|---|
| 16 |
CFLAGS += -O0 |
|---|
| 17 |
else |
|---|
| 18 |
CFLAGS += -O4 |
|---|
| 19 |
endif |
|---|
| 20 |
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
|---|
| 21 |
INSTALL_PROGRAM += -s |
|---|
| 22 |
endif |
|---|
| 23 |
ifneq (,$(findstring nossl,$(DEB_BUILD_OPTIONS))) |
|---|
| 24 |
CONFIGURE_OPTIONS += --disable-ssl |
|---|
| 25 |
else |
|---|
| 26 |
CONFIGURE_OPTIONS += --enable-ssl |
|---|
| 27 |
endif |
|---|
| 28 |
ifneq (,$(findstring notcl,$(DEB_BUILD_OPTIONS))) |
|---|
| 29 |
CONFIGURE_OPTIONS += --disable-tcl |
|---|
| 30 |
else |
|---|
| 31 |
CONFIGURE_OPTIONS += --enable-tcl |
|---|
| 32 |
endif |
|---|
| 33 |
ifneq (,$(findstring noxmpp,$(DEB_BUILD_OPTIONS))) |
|---|
| 34 |
CONFIGURE_OPTIONS += --disable-xmpp |
|---|
| 35 |
else |
|---|
| 36 |
CONFIGURE_OPTIONS += --enable-xmpp |
|---|
| 37 |
endif |
|---|
| 38 |
ifneq (,$(findstring autopackage,$(DEB_BUILD_OPTIONS))) |
|---|
| 39 |
CONFIGURE_OPTIONS += --enable-autopackage |
|---|
| 40 |
endif |
|---|
| 41 |
|
|---|
| 42 |
ifeq (,$(CLIMM_EXTRAVERSION)) |
|---|
| 43 |
CLIMM_EXTRAVERSION = Debian hand compiled |
|---|
| 44 |
endif |
|---|
| 45 |
export CLIMM_EXTRAVERSION |
|---|
| 46 |
|
|---|
| 47 |
configure: configure-stamp |
|---|
| 48 |
configure-stamp: |
|---|
| 49 |
dh_testdir |
|---|
| 50 |
./configure --host=$(DEB_HOST_GNU_TYPE) \ |
|---|
| 51 |
--build=$(DEB_BUILD_GNU_TYPE) \ |
|---|
| 52 |
--prefix=/usr \ |
|---|
| 53 |
--mandir=\$${prefix}/share/man \ |
|---|
| 54 |
$(CONFIGURE_OPTIONS) |
|---|
| 55 |
touch configure-stamp |
|---|
| 56 |
|
|---|
| 57 |
build: configure-stamp build-stamp |
|---|
| 58 |
build-stamp: |
|---|
| 59 |
$(MAKE) |
|---|
| 60 |
touch build-stamp |
|---|
| 61 |
|
|---|
| 62 |
clean: |
|---|
| 63 |
-$(MAKE) distclean |
|---|
| 64 |
dh_clean |
|---|
| 65 |
rm -rf configure-stamp build-stamp src/.cvsupdate |
|---|
| 66 |
|
|---|
| 67 |
install: |
|---|
| 68 |
dh_clean -k |
|---|
| 69 |
dh_testroot |
|---|
| 70 |
$(MAKE) install DESTDIR=`pwd`/debian/climm |
|---|
| 71 |
mkdir -p debian/climm/etc/apt/sources.list.d |
|---|
| 72 |
. /etc/lsb-release && echo "deb http://www.climm.org/deb/ $DISTRIB_CODENAME main" \ |
|---|
| 73 |
> debian/climm/etc/apt/sources.list.d/climm |
|---|
| 74 |
|
|---|
| 75 |
binary-indep: build install |
|---|
| 76 |
|
|---|
| 77 |
binary-arch: build install |
|---|
| 78 |
dh_testroot |
|---|
| 79 |
dh_installdocs |
|---|
| 80 |
|
|---|
| 81 |
dh_installchangelogs ChangeLog |
|---|
| 82 |
install -D -m 644 doc/climm.xpm debian/climm/usr/share/pixmaps/climm.xpm |
|---|
| 83 |
install -D -m 644 doc/climm@48x48.png debian/climm/usr/share/icons/hicolor/48x48/apps/climm.png |
|---|
| 84 |
install -D -m 644 doc/climm@32x32.png debian/climm/usr/share/icons/hicolor/32x32/apps/climm.png |
|---|
| 85 |
install -D -m 644 doc/climm@16x16.png debian/climm/usr/share/icons/hicolor/16x16/apps/climm.png |
|---|
| 86 |
dh_installmenu |
|---|
| 87 |
|
|---|
| 88 |
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
|---|
| 89 |
dh_strip |
|---|
| 90 |
endif |
|---|
| 91 |
dh_compress |
|---|
| 92 |
dh_fixperms |
|---|
| 93 |
dh_installdeb |
|---|
| 94 |
dh_shlibdeps |
|---|
| 95 |
dh_gencontrol |
|---|
| 96 |
dh_md5sums |
|---|
| 97 |
dh_builddeb |
|---|
| 98 |
|
|---|
| 99 |
binary: install binary-indep binary-arch |
|---|
| 100 |
.PHONY: build clean binary-indep binary-arch binary install |
|---|