2
# debian.rules file for slack
3
# $Id: rules,v 1.3 2006/09/22 07:38:53 alan Exp $
4
# Copyright 2004 Alan Sundell <alan@sundell.net>
5
# Based on the debian.rules file for rsync.
6
# Copyright 1996 by Philip Hands.
7
# Copyright 2001 Colin Walters <walters@debian.org>
8
# Based on the sample debian.rules file - for GNU Hello (1.3).
9
# Copyright 1994,1995 by Ian Jackson.
10
# I hereby give you perpetual unlimited permission to copy,
11
# modify and relicense this file, provided that you do not remove
12
# my name from the file itself. (I assert my moral right of
13
# paternity under the Copyright, Designs and Patents Act 1988.)
18
INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
19
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
20
INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
21
INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
22
INSTALL_PRIV_DIR = $(INSTALL) -p -d -o root -g root -m 700
24
# backwards compatibility stuff, from dpkg-architecture manpage
25
DEB_BUILD_ARCH := $(shell dpkg --print-installation-architecture)
26
DEB_BUILD_GNU_CPU := $(patsubst hurd-%,%,$(DEB_BUILD_ARCH))
27
ifeq ($(filter-out hurd-%,$(DEB_BUILD_ARCH)),)
28
DEB_BUILD_GNU_SYSTEM := gnu
30
DEB_BUILD_GNU_SYSTEM := linux
32
DEB_BUILD_GNU_TYPE=$(DEB_BUILD_GNU_CPU)-$(DEB_BUILD_GNU_SYSTEM)
34
DEB_HOST_ARCH=$(DEB_BUILD_ARCH)
35
DEB_HOST_GNU_CPU=$(DEB_BUILD_GNU_CPU)
36
DEB_HOST_GNU_SYSTEM=$(DEB_BUILD_GNU_SYSTEM)
37
DEB_HOST_GNU_TYPE=$(DEB_BUILD_GNU_TYPE)
39
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
40
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
48
-rm -rf *~ debian/tmp debian/*~ debian/*.bak debian/files* debian/substvars
50
binary-indep: checkroot build
52
$(INSTALL_DIR) debian/tmp \
56
debian/tmp/usr/share/doc/slack \
57
debian/tmp/usr/lib/slack \
61
$(MAKE) install DESTDIR=`pwd`/debian/tmp
62
$(INSTALL_FILE) debian/changelog debian/tmp/usr/share/doc/slack/changelog.Debian
63
$(INSTALL_FILE) README ChangeLog TODO debian/tmp/usr/share/doc/slack/
64
gzip -9fr `find debian/tmp/usr/share/doc/ debian/tmp/usr/share/man/ -type f`
65
$(INSTALL_SCRIPT) debian/prerm debian/tmp/DEBIAN
66
(cd debian/tmp; find ./etc -type f | sed s,.,,) > debian/tmp/DEBIAN/conffiles
67
chown -R root.root debian/tmp
69
dpkg --build debian/tmp ..
71
binary-arch: checkroot clean build
74
# Below here is fairly generic really
76
binary: binary-indep binary-arch
82
@test 0 = `id -u` || { echo "Error: not super-user"; exit 1; }
84
.PHONY: binary binary-arch binary-indep clean checkroot checkdir