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
|
#!/usr/bin/make -f
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself. (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
#
# Modified to be a prototype for debmake by Christoph Lameter <clameter@debian.org>
package=gwm
package-second=gwm-doc
build-gwm:
$(checkdir)
xmkmf
cp gwm-parsers/lex.yy.c .
cp gwm-parsers/y.tab.c .
$(MAKE) LDFLAGS=-s Makefiles
$(MAKE) LDFLAGS=-s depend
$(MAKE) LDFLAGS=-s CCOPTIONS='-DNO_KOALA_SPY'
touch build-gwm
clean: clean-gwm-doc
$(checkdir)
-rm -f build-gwm
-$(MAKE) -i clean
-rm -f `find . -name "*~" -o -name "Makefile.bak"`
-rm -rf debian/tmp debian/gwm-doc debian/files* core
-rm -f doc/gwm.dvi
binary-indep-gwm: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch-gwm: checkroot build-gwm
$(checkdir)
-rm -rf debian/tmp
install -d debian/tmp
install -d `pwd`/debian/tmp/usr/lib/menu
install -m 0644 debian/gwm.menu `pwd`/debian/tmp/usr/lib/menu/gwm
cd debian/tmp;install -d `cat ../dirs`
$(MAKE) CFLAGS=-O2 LDFLAGS=-s DESTDIR=`pwd`/debian/tmp install
$(MAKE) CFLAGS=-O2 LDFLAGS=-s DESTDIR=`pwd`/debian/tmp install.man
debstd CHANGES README
dpkg-gencontrol -pgwm -isp
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
binary-gwm: binary-indep-gwm binary-arch-gwm
build-gwm-doc:
$(checkdir)
cd doc; $(MAKE)
touch build-gwm-doc
clean-gwm-doc:
$(checkdir)
-rm -rf build-gwm-doc
-rm -rf debian/gwm-doc
binary-indep-gwm-doc: checkroot build-gwm-doc
$(checkdir)
-rm -rf debian/gwm-doc
-rm -f debian/menu
install -d debian/gwm-doc/DEBIAN
install -d debian/gwm-doc
install -d debian/gwm-doc/usr/share/doc/$(package-second)
install -m 644 debian/changelog \
debian/gwm-doc/usr/share/doc/$(package-second)/changelog.Debian
gzip -9 debian/gwm-doc/usr/share/doc/$(package-second)/changelog.Debian
install -m 644 doc/gwm.ps debian/gwm-doc/usr/share/doc/$(package-second)
install -d debian/gwm-doc/usr/share/doc-base
install -m 0644 debian/gwm-doc.doc-base \
debian/gwm-doc/usr/share/doc-base/gwm-doc
install -m 644 debian/copyright \
debian/gwm-doc/usr/share/doc/$(package-second)/copyright
debstd CHANGES README
dpkg-gencontrol -p$(package-second) -isp
chown -R root.root debian/gwm-doc
chmod -R go=rX debian/gwm-doc
dpkg --build debian/gwm-doc ..
binary-arch-gwm-doc: checkroot
$(checkdir)
binary-gwm-doc: binary-indep-gwm-doc binary-arch-gwm-doc
build: build-gwm build-gwm-doc
binary: binary-gwm binary-gwm-doc
clean: clean-gwm clean-gwm-doc
binary-indep: binary-indep-gwm binary-indep-gwm-doc
binary-arch: binary-arch-gwm binary-arch-gwm-doc
define checkdir
test -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot \
binary-arch-gwm binary-indep-gwm clean-gwm checkroot-gwm \
binary-arch-gwm-doc binary-indep-gwm-doc clean-gwm-doc \
checkroot-gwm-doc
|