File: rules

package info (click to toggle)
fakeroot 0.0-17
  • links: PTS
  • area: main
  • in suites: slink
  • size: 160 kB
  • ctags: 189
  • sloc: ansic: 690; cpp: 543; makefile: 126; sh: 68
file content (97 lines) | stat: -rwxr-xr-x 3,007 bytes parent folder | download
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
#! /usr/bin/make -f
#   -*- mode: makefile; -*-
#
# Last updated: Sat Dec 17 10:52:20 EST 1994 by imurdock.
#
# To make the binary distribution package, the ``Debianized'' source package
# and the context diff to the original package, type `./debian.rules dist'.
# Make sure that `debian.rules' is executable before the final distribution
# is made.
#
# Invoke each target with `./debian.rules <target>'.  All targets should be
# invoked with the package root as the current directory.
#
# The `binary' target must be run as root, as it needs to install files with
# specific ownerships.  The `diff' target assumes that you have the original
# source package available, unpacked, in ../$(p)-$(v).orig, or that you have
# the previous revision of the ``Debianized'' source package and context diff
# in the parent directory.

CC = gcc

package = fakeroot
major=0
minor=0

arch = $(shell dpkg --print-architecture)

build: 
	make -C .
	#Now testing fakeroot:
	make -C test
	touch build


clean:	
	#Undoes the effect of `make -f debian.rules build'.
	#make distclean
	#rm -f docs/Makefile docs/latextut/Makefile
	rm -rf debian/{files,substvars,tmp,shlibs} build 
	make -C . clean

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:
	rm -rf debian/tmp
	install -d -g root -m 755 -o root debian/tmp/DEBIAN\
	  debian/tmp/usr/{bin,lib/libfakeroot,doc/$(package),man/man1}
	#
	install -s -g root -o root -m 755 \
	   fakeroot debian/tmp/usr/bin
	install -s -g root -o root -m 755 \
	   libfakeroot.so.$(major).$(minor)  debian/tmp/usr/lib/libfakeroot
	ln -s libfakeroot.so.$(major).$(minor) \
	   debian/tmp/usr/lib/libfakeroot/libfakeroot.so.$(major)
	strip --strip-unneeded debian/tmp/usr/lib/libfakeroot/libfakeroot.so.$(major).$(minor)
	install  -g root -o root -m 644 \
	   BUGS README debian/copyright \
	    debian/tmp/usr/doc/$(package)/
	install  -g root -o root -m 644 \
	   debian/changelog\
	    debian/tmp/usr/doc/$(package)/changelog.Debian
	install  -g root -o root -m 644 \
	   fakeroot.1 debian/tmp/usr/man/man1/
	gzip -9 debian/tmp/usr/man/man1/fakeroot.1 \
                debian/tmp/usr/doc/$(package)/*
	(echo -n "/usr/lib/libfakeroot/libfakeroot	0	" ; \
	 dpkg-shlibdeps -O simple | sed -e s/shlibs:Depends=// -e 's/ *([^()]*)$$//') > debian/shlibs
#ifneq ($(arch),alpha)
#	install -g root -o root -m 644 \
#	   debian/shlibs debian/tmp/DEBIAN
#else
#	install -g root -o root -m 644 \
#	   debian/shlibs.alpha debian/tmp/DEBIAN/shlibs
#endif
	install -g root -o root -m 644 \
	   debian/shlibs debian/tmp/DEBIAN
	#
	dpkg-shlibdeps ./fakeroot 
#	dpkg-shlibdeps ./fakeroot ./libfakeroot.so*
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	#/bin/bash #-c "ls debian/tmp"
	#bash -c "dpkg --build debian/tmp .."
	dpkg --build debian/tmp ..

binary:	 binary-indep binary-arch


checkroot:
	$(checkdir)
	test root = "`whoami`"