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
p = minicom
tmp = debian/tmp
DIR:=$(shell pwd)
define checkdir
test -f src/minicom.c
endef
build:
# Builds the binary package.
$(checkdir)
( cd src && $(MAKE) )
touch build
# Architecture independant files.
binary-indep: build
$(checkdir)
# Make a binary package (.deb file)
binary-arch:
-rm -rf $(tmp)
install -d -o root -g root -m 755 $(tmp)
install -d -o root -g root -m 755 $(tmp)/DEBIAN
install -d -o root -g root -m 755 $(tmp)/etc
install -d -o root -g root -m 755 $(tmp)/usr/bin
install -d -o root -g root -m 755 $(tmp)/usr/X11R6/bin
install -d -o root -g root -m 755 $(tmp)/usr/X11R6/man/man1
install -d -o root -g root -m 755 $(tmp)/usr/man/man1
install -d -o root -g root -m 755 $(tmp)/usr/doc/$(p)
install -d -o root -g root -m 755 $(tmp)/usr/lib/menu
( cd src && make install R=$(DIR)/$(tmp) )
#
# Fix up "make install" of minicom.
#
-rm -f $(tmp)/usr/doc/minicom/*
mv $(tmp)/usr/bin/xminicom $(tmp)/usr/X11R6/bin
install -g root -m 644 debian/xminicom.1 $(tmp)/usr/X11R6/man/man1
gzip -9f $(tmp)/usr/man/man*/* $(tmp)/usr/X11R6/man/man*/*
#
install -g root -m 644 debian/changelog $(tmp)/usr/doc/$(p)/changelog.Debian
install -g root -m 644 -o root doc/ChangeLog $(tmp)/usr/doc/$(p)/changelog
install -g root -m 644 -o root terminfo/README $(tmp)/usr/doc/minicom/README.terminfo
install -g root -m 644 -o root terminfo/minicom $(tmp)/usr/doc/minicom/minicom.terminfo
-gzip -9f $(tmp)/usr/doc/minicom/*
install -g root -m 644 -o root Copyright $(tmp)/usr/doc/$(p)/copyright
install -g root -m 644 -o root doc/minirc.dfl $(tmp)/etc
install -g root -m 644 -o root debian/menu $(tmp)/usr/lib/menu/minicom
install -g root -m 644 -o root debian/conffiles $(tmp)/DEBIAN/conffiles
install -g root -m 755 -o root debian/preinst $(tmp)/DEBIAN/preinst
install -g root -m 755 -o root debian/postinst $(tmp)/DEBIAN/postinst
install -g root -m 755 -o root debian/postrm $(tmp)/DEBIAN/postrm
dpkg-shlibdeps src/minicom
dpkg-gencontrol
dpkg --build $(tmp) ..
rm -rf $(tmp)
clean: checkroot
-( cd src && $(MAKE) clobber )
rm -f build debian/files debian/substvars
rm -rf $(tmp)
find . \( -name '*~' -o -name '*.bak' -o -name '*.orig' \) -print0 | \
xargs -0r rm --
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|