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
|
#! /usr/bin/make -f
# Debian package information
package = xoj
# C compiler information
CC = gcc
#CC = i486-linuxlibc1-gcc
CFLAGS = -O2 -fomit-frame-pointer
LDFLAGS = -s
all build:
xmkmf
$(MAKE) CC="$(CC)" CDEBUGFLAGS="$(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)"
touch stamp-build
clean:
-test -f Makefile && $(MAKE) clean
rm -rf stamp-build Makefile debian/tmp debian/substvars \
debian/files debian/*~
binary: binary-indep binary-arch
binary-indep:
binary-arch: checkroot
# Makes a binary package.
test -f stamp-build || make $(MFLAGS) -f debian/rules build
-rm -rf debian/tmp debian/{files,substvars}
install -d debian/tmp/DEBIAN debian/tmp/usr/doc/$(package)
install -o root -g root -m 644 debian/copyright \
debian/tmp/usr/doc/$(package)/copyright
install -o root -g root -m 644 debian/changelog \
debian/tmp/usr/doc/$(package)/changelog.DEBIAN
install -o root -g root -m 644 README \
debian/tmp/usr/doc/$(package)/README
gzip -9 debian/tmp/usr/doc/$(package)/changelog.DEBIAN
gzip -9 debian/tmp/usr/doc/$(package)/README
install -d debian/tmp/usr/X11R6/{bin,man/man1}
install -o root -g root -m 755 xoj \
debian/tmp/usr/X11R6/bin/xoj
ln -s ../../../man/man7/undocumented.7.gz \
debian/tmp/usr/X11R6/man/man1/xoj.1x.gz
dpkg-shlibdeps -dDepends debian/tmp/usr/X11R6/bin/xoj
dpkg-gencontrol
dpkg --build debian/tmp ..
checkroot:
test root = "`whoami`"
|