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
|
#include "variables"
<:##############################################################################:>//
<:# WARNING: The rules file AUTOMATICALLY REGENERATE itself from this very one #:>//
<:# Read the GNU Make Manual if you don't understand Makefile Remaking! #:>//
<:##############################################################################:>//
#! /usr/bin/make -f
#
# BEWARE: The rules file is AUTOMATICALLY GENERATED from rules.in
#
# rules file for Debian <:=$PACKAGE:> package.
# $Id: rules.in,v 1.6 2003/06/28 16:10:18 salve Exp $
#
<:=@COPYRIGHT:>//
tmp := $(shell pwd)/debian/tmp/
SHELL = /bin/bash
INSTDIR = install -m 755 -d
INSTPROG = install -m 755 -s
INSTDATA = install -m 644
INSTSCRIPT = install -m 755
STRIP = strip -R .note -R .comment
DFILES := debian/README debian/copyright \
debian/preinst debian/postinst debian/prerm debian/postrm
# WARNING: debian/rules SHOULD NOT be in $(DFILES), for Debian policy
# (it's CVS registered), lest it will be deleted by clean.
# Beside, it's automatically remade by make
debian/system.variables: /home/salve/Debian/Packages/system.variables
$(INSTDATA) $< $@
debian/rules: debian/variables
# Eperl is simply great: thanks, Ralf!
% :: %.in
eperl -P -o $@ $<
build: $(DFILES)
$(checkdir)
# Note the use of prefix=<:=$usr:> w/out $(tmp): it leads to correct FILES section in lacheck.1.
$(MAKE) CC=gcc CFLAGS="-O2 -Wall" prefix=<:=$usr:> lacheck lacheck.1
touch build
clean:
$(checkdir)
-rm -rf build core $(tmp) debian/files* debian/substvars
-rm -f $(DFILES)
-$(MAKE) clean
binary: binary-indep binary-arch
binary-arch: checkroot build
$(checkdir)
-rm -rf $(tmp)
# install package
$(INSTDIR) $(tmp)/<:=$bin:> $(tmp)/<:=$man:>/man1/
$(MAKE) prefix=$(tmp)/<:=$usr:> mandir=$(tmp)/<:=$man:>/man1/ install
$(STRIP) $(addprefix $(tmp)/<:=$bin:>, <:=$BINS:>)
gzip -9frv $(tmp)/<:=$man:>
# install Debian doc
$(INSTDIR) $(tmp)/<:=$doc:>
$(INSTDATA) <:=$DOCS:> $(tmp)/<:=$doc:>
$(INSTDATA) debian/README $(tmp)/<:=$doc:>/README.Debian
$(INSTDATA) debian/changelog $(tmp)/<:=$doc:>/changelog.Debian
gzip -9frv $(tmp)/<:=$doc:>
$(INSTDATA) debian/copyright $(tmp)/<:=$doc:>
# install Debian control files
$(INSTDIR) $(tmp)/<:=$debian:>
$(INSTSCRIPT) debian/{preinst,postinst,prerm,postrm} $(tmp)/<:=$debian:>
# standard stuff
#-# cd $(tmp) && du -k * | grep -v 'DEBIAN' | sort -k 2 -o $(tmp)/<:=$debian:>/du
cd $(tmp) && md5sum \
$$(find ./ -path './DEBIAN' -prune -o -type f -printf "%P\n") \
| sort -k 2 -o $(tmp)/<:=$debian:>/md5sums
dpkg-shlibdeps <:=$BINS:>
dpkg-gencontrol -isp
chown -R root.root $(tmp)
chmod -R go=rX $(tmp)
dpkg --build $(tmp) ..
binary-indep: checkroot build
$(checkdir)
test: build
$(checkdir)
$(MAKE) check
checkdir = test -f debian/rules
checkroot:
$(checkdir)
test root = "$$(whoami)"
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: binary binary-arch binary-indep clean checkroot
### Local Variables:
### mode: makefile
### End:
|