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
|
#!/usr/bin/make -f
# -*- makefile -*-
#
# debian/rules - Makefile for Debian wterm and wterm-ml packages
#
# Copyright 1996-2004 Brian Mays <brian@debian.org>
# Initial version. Patterned after hello package by Ian Jackson.
# Copyright 2005 Jeff Stevens <jeff@mossycup.com>
# Substantial rewrite and simplification. Implemented debhelper and dpatch.
#
# This program is licensed under the terms of the GNU General Public License
# version 2 or later.
#
# On Debian GNU/Linux systems the complete text of the GNU General Public
# License can be found in `/usr/share/common-licenses/GPL-2`.
#
#
# Buildtime Options
#
# The following flags may be added to the environment variable
# DEB_BUILD_OPTIONS to affect package build:
#
# noopt - Disable compile time optimization.
# nostrip - Disable stripping of symbols from binaries.
include /usr/share/dpatch/dpatch.make
BASEDIR := /usr
MANDIR := $(BASEDIR)/man
CFLAGS := -Wall -g
COMMON_OPTIONS := --prefix=$(BASEDIR) \
--mandir=$(MANDIR) \
--enable-utmp \
--enable-ttygid \
--x-includes=/usr/X11R6/include \
--enable-xgetdefault \
--with-term=rxvt
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
clean: unpatch
dh_testdir
dh_testroot
test ! -e build-stamp || rm build-stamp
test ! -e builds || rm -r builds
test ! -e Makefile || $(MAKE) distclean
dh_clean
build: patch-stamp build-stamp
build-stamp:
dh_testdir
mkdir builds
./configure $(COMMON_OPTIONS) && \
$(MAKE) CFLAGS="$(CFLAGS)" all && \
mv src/wterm builds/wterm
$(MAKE) distclean
./configure $(COMMON_OPTIONS) --enable-kanji && \
$(MAKE) CFLAGS="$(CFLAGS)" all && \
mv src/wterm builds/kwterm
$(MAKE) distclean
./configure $(COMMON_OPTIONS) --enable-big5 && \
$(MAKE) CFLAGS="$(CFLAGS)" all && \
mv src/wterm builds/cwterm
$(MAKE) distclean
./configure $(COMMON_IPTIONS) --enable-greek && \
$(MAKE) CFLAGS="$(CFLAGS)" all && \
mv src/wterm builds/gwterm
touch build-stamp
binary: binary-indep binary-arch
binary-indep: build
binary-arch: build
dh_testdir
dh_testroot
dh_install
dh_installmenu
dh_installman
dh_installdocs
dh_installexamples
dh_installchangelogs doc/changes.txt
dh_installdeb
dh_link
dh_strip
dh_compress
dh_fixperms
chown root:utmp \
debian/wterm/usr/bin/wterm \
debian/wterm-ml/usr/bin/kwterm \
debian/wterm-ml/usr/bin/cwterm \
debian/wterm-ml/usr/bin/gwterm
chmod 2755 \
debian/wterm/usr/bin/wterm \
debian/wterm-ml/usr/bin/kwterm \
debian/wterm-ml/usr/bin/cwterm \
debian/wterm-ml/usr/bin/gwterm
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
.PHONY: clean build binary binary-indep binary-arch
|