blob: 36aa847ff0cf359ef5eecdd3292ed2e3ca6f28bc (
plain)
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
|
#!/usr/bin/make -f
.PHONY: build clean binary-arch binary-indep binary default
pkg := latrace
pkgdir := debian/$(pkg)
docdir := $(pkgdir)/usr/share/doc/$(pkg)
checkdir = @test -e debian/control || ! echo wrong directory
checkuid = @test "`id -u`" -eq 0 || ! echo need root permissions
default:
build: debian/stamp-build
debian/stamp-build:
$(checkdir)
autoconf
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/latrace
make
touch $@
clean:
$(checkdir)
$(checkuid)
rm -f debian/stamp-*
test ! -f src/autoconf.make || make mrproper
rm -rf debian/latrace
rm -f debian/files debian/substvars
binary-indep:
binary-arch: debian/stamp-build
$(checkdir)
$(checkuid)
install -d $(pkgdir)/DEBIAN $(docdir)
make install ROOTDIR="$(CURDIR)/$(pkgdir)"
cd $(pkgdir) && strip --strip-unneeded -R .note -R .comment \
usr/bin/latrace usr/lib/latrace/libltaudit.so*
cp -p ChangeLog $(docdir)/changelog
cp -p README ReleaseNotes TODO debian/copyright $(docdir)
cp -p debian/changelog $(docdir)/changelog.Debian
cd $(pkgdir) && find etc -type f -printf "/%p\n" > DEBIAN/conffiles
gzip -9f $(pkgdir)/usr/share/man/man1/latrace.1
gzip -9f $(docdir)/changelog $(docdir)/changelog.Debian
dpkg-shlibdeps $(pkgdir)/usr/bin/latrace
dpkg-gencontrol -P$(pkgdir)
cd $(pkgdir) && find * -path DEBIAN -prune -o -type f -print0 | \
xargs -r0 md5sum > DEBIAN/md5sums
chown -R root:root $(pkgdir)
chmod -R u+w,go=rX $(pkgdir)
dpkg-deb -b $(pkgdir) ..
binary: binary-arch binary-indep
|