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
|
#! /usr/bin/make -f
############################ -*- Mode: Makefile -*- ###########################
## rules ---
## Author : Andreas Tille <tillea@rki.de>
## Created On : Mon, 12 Dec 1998 20:30:10 -0100
## Description : debian/rules for xteddy
###############################################################################
pkg := xteddy
# Configuration variables (these should be pretty generic)
CC = cc
CFLAGS = -O2
LDFLAGS = -s
PREFIX = /usr/X11R6
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/man
DOCDIR = /usr/share/doc
# TEDDYS = /usr/share/$(pkg)
FILES_TO_CLEAN = debian/files
DIRS_TO_CLEAN = debian/tmp
STAMPS_TO_CLEAN = stamp-configure stamp-build stamp-binary
install_file= install -p -o root -g root -m 644
install_program= install -p -o root -g root -m 755
make_directory= install -d -o root -g root -m 755
all build: stamp-build
# Builds the binary package.
configure: stamp-configure
stamp-configure:
./configure --prefix=$(PREFIX)
touch stamp-configure
stamp-build:
# Builds the binary package.
$(checkdir)
-test -f stamp-configure || $(MAKE) -f debian/rules configure
$(MAKE) CC="$(CC)" LDFLAGS="$(LDFLAGS)"
## leave CFLAGS up to the upstream Makefile.
touch stamp-build
clean:
# Undoes the effect of `$(MAKE) -f debian/rules build'.
$(checkdir)
-test -f Makefile && $(MAKE) recursive-clean
-test -f Makefile && $(MAKE) distclean
-rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
-rm -rf $(DIRS_TO_CLEAN)
-rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS
binary: binary-arch binary-indep
binary-indep: build
binary-arch: build stamp-binary
stamp-binary:
# Makes the binary package.
@test root = "`whoami`" || (echo need root priviledges; exit 1)
$(checkdir)
test -f stamp-build || $(MAKE) -f debian/rules build
rm -rf debian/tmp
$(make_directory) debian/tmp/DEBIAN
$(make_directory) debian/tmp/$(DOCDIR)/$(pkg)
$(MAKE) install prefix=`pwd`/debian/tmp/$(PREFIX)
# dh_installmanpages
# rm -rf debian/tmp/usr/man
mv debian/tmp/$(PREFIX)/share/$(pkg) debian/tmp/usr/share
$(install_file) AUTHORS README xteddy.README xtuxxy.credit debian/tmp/$(DOCDIR)/$(pkg)
for i in `ls debian/tmp/usr/share/$(pkg)` ; do \
if [ `basename $$i .png` != $(pkg) ] ; then ( ln -s $(pkg) debian/tmp/$(PREFIX)/bin/`basename $$i .png`; ln -s $(pkg).1.gz debian/tmp/$(PREFIX)/man/man1/`basename $$i .png`.1.gz ) fi \
done
ln -s $(pkg).1.gz debian/tmp/$(PREFIX)/man/man1/xtoys.1.gz
ln -s $(pkg).1.gz debian/tmp/$(PREFIX)/man/man1/xteddy_test.1.gz
debstd ChangeLog copyright
dpkg-shlibdeps debian/tmp/usr/X11R6/bin/xteddy
dpkg-gencontrol -p$(pkg) -Pdebian/tmp
chown -R root.root debian/tmp
dpkg --build debian/tmp ..
checkroot:
@test root = "`whoami`" || (echo need root priviledges; exit 1)
define checkdir
test -f xteddy.c -a -f debian/rules
endef
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: binary clean
|