1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file for the Debian/GNU Linux centericq package
# Copyright 2002-2003 by Julien LEMOINE <speedblue@debian.org>
#include dpatch makefile
include /usr/share/dpatch/dpatch.make
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CXXFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CXXFLAGS += -O0
else
CXXFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
source := $(shell head -1 debian/changelog | \
perl -nle 'm/^([a-z]+)/ and print $$1')
package := $(shell head -1 debian/changelog | \
perl -nle 'm/^(\S+)\s+/ and print $$1')
version := $(shell head -1 debian/changelog | \
perl -nle 'm/\S+\s+\((\S+)-\S+\)/ and print $$1')
major := $(shell head -1 debian/changelog | perl -nle \
'm/\S+\s+\((\d\.\d)\.\d+-\S+\)/ and print $$1')
pcommon=$(package)-common
pfribidi=$(package)-fribidi
putf8=$(package)-utf8
config.status: configure
dh_testdir
cp centericq.1 centericq-fribidi.1
cp centericq.1 centericq-utf8.1
CFLAGS="$(CXXFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--with-included-gettext --with-ssl \
|| cat config.log
build: patch build-stamp
build-stamp: config.status
dh_testdir
#build centericq
$(MAKE)
mv src/centericq src/centericq-normal
#build centericq-utf8
cd kkconsui-0.1; $(MAKE) clean
perl -pi -e "s:<ncurses.h>:<ncursesw/ncurses.h>:" \
kkconsui-0.1/include/conscommon.h
perl -pi -e "s/lncurses/lncursesw/" src/Makefile
$(MAKE)
mv src/centericq src/centericq-utf8
perl -pi -e "s:<ncursesw/ncurses.h>:<ncurses.h>:" \
kkconsui-0.1/include/conscommon.h
perl -pi -e "s/lncursesw/lncurses/" src/Makefile
#build centericq-fribidi
cd kkconsui-0.1; $(MAKE) distclean
CFLAGS="$(CXXFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--with-included-gettext --with-fribidi=/usr --with-ssl
$(MAKE)
mv src/centericq src/centericq-fribidi
touch build-stamp
clean: unpatch
dh_testdir
dh_testroot
-$(MAKE) distclean
rm -f build-stamp intl/libintl.h config.cache \
config.guess config.log config.status config.sub \
config.h config.sub src/centericq-normal \
src/centericq-fribidi centericq-fribidi.1 \
src/centericq-utf8 centericq-utf8.1 \
po/centericq.pot po/cat-id-tbl.c po/*.gmo
find ./ -name config.status -print | xargs rm || true
find ./ -name config.log -print | xargs rm || true
-test -r /usr/share/misc/config.sub && \
cp -f /usr/share/misc/config.sub config.sub && \
cp -f /usr/share/misc/config.sub kkconsui-0.1/config.sub
-test -r /usr/share/misc/config.guess && \
cp -f /usr/share/misc/config.guess config.guess && \
cp -f /usr/share/misc/config.guess kkconsui-0.1/config.guess
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install-data prefix=$(CURDIR)/debian/$(pcommon)/usr
mv src/centericq-normal src/centericq
install -m 755 src/centericq $(CURDIR)/debian/$(package)/usr/bin/
install -m 755 src/centericq-fribidi $(CURDIR)/debian/$(pfribidi)/usr/bin
install -m 755 src/centericq-utf8 $(CURDIR)/debian/$(putf8)/usr/bin
rm -rf $(CURDIR)/debian/$(pcommon)/usr/share/man/man1/
rm -rf $(CURDIR)/debian/$(pcommon)/usr/include
install -m 755 misc/cicqconv $(CURDIR)/debian/$(pcommon)/usr/bin
install -m 755 misc/cicqsync $(CURDIR)/debian/$(pcommon)/usr/bin
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installman -p$(pcommon) misc/cicqconv.1 misc/cicqsync.1
dh_installman -p$(package) centericq.1
dh_installman -p$(pfribidi) centericq-fribidi.1
dh_installman -p$(putf8) centericq-utf8.1
dh_installchangelogs ChangeLog
dh_installexamples debian/external.example
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|