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
|
#!/usr/bin/make -f
# debian/rules -*- Makefile -*-
# $Id: rules,v 1.16 2000/01/14 07:18:15 elf Exp $
#
# written by Marc Singer
# 13 October 1998
#
# Copyright 1998 Marc Singer
#
# These rules provide the glue between Debian and this ${package}.
# The interesting target is binary which builds the binary package by
# configuring, compiling, and installing it in the debian/tmp
# directory and then invoking the Debian packaging tools.
#
package=buici-clock
base=buici
version=`cat .version`
prefix=/usr/X11R6
doc=/usr/doc
RELEASE_PATH=${HOME}/release/debian
build:
$(checkdir)
./configure --prefix=$(prefix)
$(MAKE)
# CFLAGS=-O2 LDFLAGS=
touch build
build-release: build
$(MAKE) $(package).README
clean:
$(checkdir)
-rm -f build
-$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
-rm -rf debian/tmp debian/*~ debian/files* debian/substvars
binary-indep: 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: checkroot build build-release
$(checkdir)
-rm -rf debian/tmp
install -d debian/tmp/DEBIAN
install -d debian/tmp$(doc)/$(package)
install -d debian/tmp/usr/lib/menu
install -m 755 debian/{postinst,postrm} debian/tmp/DEBIAN
$(MAKE) CFLAGS=-O2 LDFLAGS=-s INSTALL='install' \
prefix=`pwd`/debian/tmp$(prefix) install
# gzip -9v debian/tmp$(prefix)/info/*
cp debian/copyright debian/tmp$(doc)/$(package)/.
cp debian/changelog debian/tmp$(doc)/$(package)/changelog.Debian
# Give them the sources readme
cp ChangeLog debian/tmp$(doc)/$(package)/changelog
# Give them the customized README
mv $(package)-$(version).README debian/tmp$(doc)/$(package)/README
# Compress all man pages
find debian/tmp$(prefix)/man -type f -exec gzip -9v \{\} \;
# Compress changelog files
gzip -9v debian/tmp$(doc)/$(package)/changelog{,.Debian}
# Install menu link
cp menu/$(package) debian/tmp/usr/lib/menu
dpkg-shlibdeps $(package)
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
# if test -d ${RELEASE_PATH} ; then \
# dpkg --build debian/tmp ${RELEASE_PATH} ;\
# else \
dpkg --build debian/tmp .. ;\
# fi
define checkdir
test -f $(base).xbm -a -f debian/rules
endef
.PHONY: source
source:
$(checkdir)
-rm -rf debian/$(package)-$(version)
-rm -rf _source
cvs -Q export -rHEAD -d _source $(base)
mv _source debian/$(package)-$(version)
cvs -Q export -rHEAD -d _source xo
mv _source debian/$(package)-$(version)/xo
dpkg-source -b debian/$(package)-$(version)
-rm -rf debian/$(package)-$(version)
mv $(package)_*.dsc $(package)_*.tar.gz ..
.PHONY: package
package:
$(checkdir)
mkdir debian/package
cvs -Q co -d debian/package/$(package)-$(version) $(base)
cvs -Q co -d debian/package/$(package)-$(version)/xo xo
cd debian/package/$(package)-$(version) ; dpkg-buildpackage -rsudo
sudo rm -rf debian/package/$(package)-$(version)
# Perform the final staging before releasing the package to the debian
# servers. (elf target)
.PHONY: prerelease
prerelease:
dpkg-genchanges > ../$(package)_$(version).changes
if test -d ${RELEASE_PATH} ; then \
mv ../$(package)_$(version)* ~/release/debian ;\
fi
# Perform full release build, binary and source and prerelease so that
# we're ready for upload. (elf target)
.PHONY: fullrelease
fullrelease: binary source prerelease
# Below here is fairly generic really
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|