File: rules

package info (click to toggle)
colorize 0.3.1-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 20 kB
  • ctags: 2
  • sloc: makefile: 27
file content (46 lines) | stat: -rwxr-xr-x 1,414 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
#! /usr/bin/make -f
## Written by Gergely Nagy <algernon@debian.org>
## This is under GPL v2.

PACKAGE		:= colorize
PKGDIR		:= ${CURDIR}/debian/${PACKAGE}

build: ;

clean:
	test -e debian/control && test "x`whoami`" = "xroot"
	rm -rf ${PKGDIR} debian/files

binary-colorize:
	test -e debian/control && test "x`whoami`" = "xroot"
## Install stuff
	install -d ${PKGDIR}/usr/share/doc/${PACKAGE} \
		${PKGDIR}/DEBIAN ${PKGDIR}/usr/bin
# ..the changelogs..
	gzip -9fc debian/changelog >${PKGDIR}/usr/share/doc/${PACKAGE}/changelog.Debian.gz
# ..the copyright file..
	install -m 0644 debian/copyright ${PKGDIR}/usr/share/doc/${PACKAGE}
# ..README.Debian
	install -m 0644 debian/README.Debian ${PKGDIR}/usr/share/doc/${PACKAGE}
# ..the compatibility symlink
	ln -s ccze ${PKGDIR}/usr/bin/colorize
## Fix permissions
	find ${PKGDIR} -print0 2>/dev/null | xargs -0r chown \
						   --no-dereference 0.0
	find ${PKGDIR} ! -type l -print 0 2>/dev/null | xargs -0r \
		chmod go=rX,u+rw,a-s
## Generate DEBIAN/md5sums
	cd ${PKGDIR} >/dev/null ;\
	 find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
## Generate DEBIAN/control
	dpkg-gencontrol -isp -p${PACKAGE} -P${PKGDIR}
## Build the binary package
	dpkg --build ${PKGDIR} ..

binary-indep:
binary-arch: binary-colorize

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean build install binary-colorize
.SUFFIXES: