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
|
#!/usr/bin/make -f
# -*- Makefile -*-
#
# This rules file was adapted from the
# 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
# The name of the package (for example, `emacs').
package := nosql3
prefix := /usr/lib
bin := $(prefix)/$(package)
lib := /usr/share/$(package)
doc := /usr/share/doc/$(package)
tmp := $(shell pwd)/debian/tmp
build: clean
# the html in the doc directory is already built.
clean:
-[ ! -f Makefile ] || make distclean
rm -f build
-rm -rf src/.deps
-rm -rf $(tmp) debian/*~ debian/files*
binary-indep:
binary-arch: build
-rm -rf $(tmp)
mkdir -p $(tmp)/DEBIAN\
$(tmp)/$(bin) $(tmp)/$(lib)\
$(tmp)/$(doc) $(tmp)/usr/share/doc-base
(printf '\n'; echo yes)|env LESS=+q\
DESTDIR=$(tmp) PREFIX=/usr/lib/\
BINDIR=$(bin) DOCDIR=$(doc) LIBDIR=$(lib) HELPDIR=$(lib)\
./install-sh && touch build
strip --strip-all --remove-section=.comment --remove-section=.note \
$(tmp)/$(bin)/_index
# Move doc directory into FHS-compliant place
# mv $(tmp)/$(prefix)/nosql/doc/* $(tmp)/$(doc) && \
# rmdir $(tmp)/$(prefix)/nosql/doc
rmdir $(tmp)/$(prefix)/nosql
cd $(tmp)/$(doc) && mv ChangeLog changelog
# install -m 644 -p debian/nosql3.1 $(tmp)/$(man1)
# Install copyright files and documentation
cp -p debian/changelog $(tmp)/$(doc)/changelog.Debian
cp -p README* NEWS* $(tmp)/$(doc)
rm $(tmp)/$(doc)/INSTALL $(tmp)/$(doc)/COPYING
chmod 644 $(tmp)/$(doc)/build-doc
gzip -9f $(tmp)/$(doc)/*.ps $(tmp)/$(doc)/*.txt $(tmp)/$(doc)/*.sgml \
$(tmp)/$(doc)/changelog.Debian $(tmp)/$(doc)/changelog
# -gzip -9f $(tmp)/$(man1)/nosql3.1
cp debian/doc-base $(tmp)/usr/share/doc-base/$(package)
cp debian/copyright $(tmp)/$(doc)
# Pre- and postinst scripts-
cp -p debian/postinst debian/prerm -p $(tmp)/DEBIAN
chmod 755 $(tmp)/DEBIAN/postinst $(tmp)/DEBIAN/prerm
# Build package
dpkg-gencontrol -isp -p$(package) -P$(tmp)
chown -R root.root $(tmp)
chmod -R g-ws,u+w,a+rX $(tmp)
dpkg --build $(tmp) ..
# Below here is fairly generic really
binary: binary-arch binary-indep
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: build binary binary-arch binary-indep clean
# Local variables:
# mode: makefile
# End:
|