File: rules

package info (click to toggle)
kernel-package 6.05
  • links: PTS
  • area: main
  • in suites: slink
  • size: 620 kB
  • ctags: 190
  • sloc: perl: 1,228; makefile: 703; sh: 39
file content (128 lines) | stat: -rwxr-xr-x 4,401 bytes parent folder | download | duplicates (2)
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
#! /usr/bin/make -f
############################ -*- Mode: Makefile -*- ###########################
## rules ---
## Author	    : Manoj Srivastava ( srivasta@pilgrim.umass.edu )
## Created On	    : Sat Apr 27 06:36:31 1996
## Created On Node  : melkor.pilgrim.umass.edu
## Last Modified By : Manoj Srivastava
## Last Modified On : Fri Feb 27 16:27:10 1998
## Last Machine Used: tiamat.datasync.com
## Update Count	    : 122
## Status	    : Unknown, Use with caution!
## HISTORY	    :
## Description	    :
##
###############################################################################

#    $Id: rules,v 1.11 1998/02/27 22:27:17 srivasta Exp $


# Please change the maintainer information, as well as the debian version
# below, (and maybe the priority as well, espescially if you are uploading
# an official package)

# The maintainer information.
maintainer := Manoj Srivastava
email := srivasta@debian.org

# Priority of this version (or urgency, as dchanges would call it)
priority := Low
#  Package specific stuff

# The name of the package (for example, `emacs').
package = kernel-package
version := $(shell perl -n0777e 'if ($$. == 1 && m/\(([\S]+)\)/o){print "$$1\n";}' debian/changelog)


FILES_TO_CLEAN = debian/files
STAMPS_TO_CLEAN =  stamp-binary
DIRS_TO_CLEAN  =

CONFLOC:=/etc/kernel-pkg.conf
LIBLOC:=/usr/lib/kernel-package
MODULE_LOC := /usr/src/modules

# Location of the source dir
SRCTOP := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
# where kernel-package files go to
DEBDIR := $(LIBLOC)
DEBDIR_NAME:= $(shell basename $(DEBDIR))

DOCDIR = debian/tmp/usr/doc/$(package)
MAN5DIR = debian/tmp/usr/man/man5
MAN8DIR = debian/tmp/usr/man/man8

# install commands
install_file=    install -p    -o root -g root -m 644
install_program= install -p    -o root -g root -m 755
make_directory=  install -p -d -o root -g root -m 755


all build:
# Builds the binary package.

clean:
	rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
	rm -f -r debian/tmp
	rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
                -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS

binary: binary-arch binary-indep

binary-arch: build
# builds the architecture dependent part

binary-indep: build stamp-binary

stamp-binary:
	@test root = "`whoami`" || (echo need root priviledges; exit 1)
	$(checkdir)
	rm -rf debian/tmp  debian/tmp.deb
	$(make_directory)  debian/tmp/DEBIAN
	$(make_directory)  debian/tmp/etc
	$(make_directory)  debian/tmp/usr/sbin
	$(make_directory)  debian/tmp/usr/lib/$(package)
	$(make_directory)  $(MAN5DIR)
	$(make_directory)  $(MAN8DIR)
	$(make_directory)  $(DOCDIR)
	$(install_file)    debian/conffiles debian/tmp/DEBIAN/conffiles
	$(install_program) debian/postinst debian/tmp/DEBIAN/postinst
	$(install_file)    debian/changelog $(DOCDIR)/changelog
	$(install_file)    README $(DOCDIR)/README
	$(install_file)    kernel/Flavours $(DOCDIR)/Flavours
	$(install_file)    Problems $(DOCDIR)/Problems
	$(install_file)    Multi-Arch $(DOCDIR)/Multi-Arch
	$(install_file)    Rationale $(DOCDIR)/Rationale
	gzip -9fqr         $(DOCDIR)
	$(install_file)    debian/copyright $(DOCDIR)/copyright
	$(install_file)    kernel-pkg.conf.5 $(MAN5DIR)/kernel-pkg.conf.5
	$(install_file)    make-kpkg.8  $(MAN8DIR)/make-kpkg.8
	$(install_file)    kernel-packageconfig.8  $(MAN8DIR)/
	gzip -9fqr         debian/tmp/usr/man
	$(install_file)    kernel-pkg.conf debian/tmp/etc/kernel-pkg.conf
	$(install_program) kernel-packageconfig \
		           debian/tmp/usr/sbin/kernel-packageconfig
	$(install_program) make-kpkg debian/tmp/usr/sbin/make-kpkg
	(cd kernel;        tar cf - * | \
           (cd             $(SRCTOP)/debian/tmp/usr/lib/$(package);\
                           tar xf -))
	$(install_file)    Rationale $(SRCTOP)/debian/tmp/usr/lib/$(package)/
	# Hack, tell the   rules file what version of kernel package it is
	sed -e             's/=K=V/$(version)/' kernel/rules > \
                              $(SRCTOP)/debian/tmp/usr/lib/$(package)/rules
	dpkg-gencontrol
	chown -R root.root debian/tmp
	dpkg --build       debian/tmp ..
	touch              stamp-binary

define checkdir
        test -f  make-kpkg -a -f debian/rules
endef

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false


.PHONY: binary binary-arch binary-indep clean