File: rules

package info (click to toggle)
eql 1.2-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 144 kB
  • ctags: 13
  • sloc: ansic: 87; makefile: 36; sh: 15
file content (54 lines) | stat: -rwxr-xr-x 1,643 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
#!/usr/bin/make -f
#
# Copyright (C) 1998 SPI, Roberto Lumbreras <rover@debian.org>
# Copying: GPL

SHELL	=	/bin/bash

PACKAGE	=	$(shell perl -e 'print <> =~ /^(.*) \(.*\)/' debian/changelog)
PKG_VER	=	$(shell perl -e 'print <> =~ /\((.*)\)/' debian/changelog)
PKG_UPVER=	$(shell perl -e 'print <> =~ /\((.*)-[^-]*\)/' debian/changelog)

BINS	=	eql_enslave
#DOCS	=	eql-1.2.patch eql-driver.txt debian/eql-1.2.tar.gz.lsm
DOCS	=	eql-driver.txt

build:		stamp-build

stamp-build:
		gcc -Wall -Wstrict-prototypes -o eql_enslave eql_enslave.c
		touch stamp-build

binary:         binary-indep binary-arch

binary-indep:

binary-arch:    build checkroot
		rm -rf debian/tmp
		install -d -m0755 debian/tmp/{DEBIAN,usr/{sbin,share/{man/man8,doc/$(PACKAGE)}}}
		install -s -m0755 $(BINS) debian/tmp/usr/sbin/
		install -m0644 debian/eql_enslave.8 debian/tmp/usr/share/man/man8/
		install -m0644 debian/changelog debian/tmp/usr/share/doc/$(PACKAGE)/changelog.Debian
		install -m0644 $(DOCS) debian/tmp/usr/share/doc/$(PACKAGE)/
		gzip -9fr debian/tmp/usr/share/
		install -m0644 debian/copyright debian/tmp/usr/share/doc/$(PACKAGE)/
		install -m0755 debian/postinst debian/prerm debian/tmp/DEBIAN/

		dpkg-shlibdeps $(BINS)
		dpkg-gencontrol -isp
		chown -R root.root debian/tmp
		chmod -R go=rX debian/tmp
		dpkg --build debian/tmp ..

checkdir:
		@test -f debian/rules

checkroot:	checkdir
		@test 0 = `id -u` || { echo "Error: not super-user"; exit 1; }

clean:		checkdir
		rm -f stamp-build debian/files debian/substvars
		rm -f eql_enslave *.o *.a *~ core
		rm -rf debian/tmp

.PHONY: build binary binary-indep binary-arch checkdir checkroot clean