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
|
#! /usr/bin/make -f
# Debian package information
package = gtoaster
docdir = /usr/share/doc/$(package)
tmpdir = $(shell pwd)/debian/tmp
# C compiler information
CC = gcc
CFLAGS = -g -O2
LDFLAGS = -s
build:
./configure --prefix=/usr/share --exec-prefix=/usr --with-gnome
make
touch build
.PHONY: clean
clean:
rm -f build
-make distclean
-rm -rf debian/tmp debian/{files,substvars}
.PHONY: binary
binary: binary-indep binary-arch
.PHONY: binary-indep
binary-indep:
@echo Close, but no sigar.
.PHONY: binary-arch
binary-arch: build
-rm -rf debian/tmp debian/{files,substvars}
install -d -m 755 -o root -g root debian/tmp/var/lib/gtoaster
# Install gtoaster
install -d -m 755 -o root -g root debian/tmp/usr/bin
install -s -m 755 -o root -g root gtoaster debian/tmp/usr/bin/
# Install the documentation
install -d -m 755 -o root -g root debian/tmp$(docdir)/html
install -p -m 644 -o root -g root Documentation/*html \
debian/tmp$(docdir)/html/
install -p -m 644 -o root -g root Documentation/*txt debian/tmp$(docdir)
install -p -m 644 -o root -g root Documentation/*sgml debian/tmp$(docdir)
install -p -m 644 -o root -g root README TODO debian/tmp$(docdir)
install -d -m 755 -o root -g root debian/tmp/usr/share/man/man1
ln -s ../man7/undocumented.7.gz debian/tmp/usr/share/man/man1/gtoaster.1.gz
# Install Debian-specific stuff
install -d -m 755 -o root -g root debian/tmp/usr/share/doc-base
install -p -m 644 -o root -g root debian/doc-base \
debian/tmp/usr/share/doc-base/$(package)
install -p -m 644 -o root -g root debian/changelog \
debian/tmp$(docdir)/changelog.Debian
# We expect an error here for the html-subdirectory
-gzip -9 debian/tmp$(docdir)/*
install -p -m 644 -o root -g root debian/copyright debian/tmp$(docdir)
install -d -o root -g root -m 755 $(tmpdir)/DEBIAN
install -p -o root -g root -m 755 debian/postinst $(tmpdir)/DEBIAN
install -p -o root -g root -m 755 debian/prerm $(tmpdir)/DEBIAN
# Build the packgae
dpkg-shlibdeps gtoaster
dpkg-gencontrol
dpkg --build debian/tmp ..
checkroot:
test root = "`whoami`"
|