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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
#! /usr/bin/make -f
#
# Name.
package = uucp
tmp = debian/tmp
define checkdir
test -f uucico.c
endef
build: config.status
# Builds the binary package.
$(checkdir)
make bindir=/usr/bin \
sbindir=/usr/sbin \
newconfigdir=/etc/uucp \
oldconfigdir=/etc/uucp \
CFLAGS=-O2 LDFLAGS=-s
( cd contrib; make -f Makefile.uurt \
newconfigdir=/etc/uucp )
touch build
config.status:
# Configures the binary package.
./configure --prefix=/usr --exec-prefix=/usr
# Architecture independant files.
binary-indep:
$(checkdir)
# Make a binary package (.deb file)
binary-arch: build debian/uucp.info checkroot
rm -rf $(tmp)
install -d -g root -m 755 $(tmp)/DEBIAN
install -d -g root -m 755 $(tmp)/etc
install -d -g root -m 755 $(tmp)/etc/uucp
install -d -g root -m 755 $(tmp)/usr
install -d -g root -m 755 $(tmp)/usr/{lib,man,bin}
install -d -g uucp -m 750 -o uucp $(tmp)/usr/lib/uucp
install -d -g root -m 755 $(tmp)/usr/man/man{1,8}
install -d -g root -m 755 $(tmp)/var
install -d -g root -m 755 $(tmp)/var/log
install -d -g uucp -m 755 -o uucp $(tmp)/var/log/uucp
install -d -g root -m 755 $(tmp)/var/spool
install -d -g uucp -m 755 -o uucp $(tmp)/var/spool/uucp
install -d -g uucp -m 1777 -o uucp $(tmp)/var/spool/uucppublic
#
make install \
bindir=$(tmp)/usr/bin \
sbindir=$(tmp)/usr/sbin \
newconfigdir=$(tmp)/etc/uucp \
oldconfigdir=$(tmp)/etc/uucp \
prefix=$(tmp)/usr \
exec_prefix=$(tmp)/usr
#
install -m 755 -g root contrib/uurate $(tmp)/usr/sbin
install -m 644 -g root contrib/uurate.man $(tmp)/usr/man/man8/uurate.8
install -m 644 -g root debian/*.1 $(tmp)/usr/man/man1
gzip -9f $(tmp)/usr/man/*/*
#
mv $(tmp)/usr/sbin/{uuchk,uuconv} $(tmp)/usr/lib/uucp
install -m 755 -g root debian/uudemon.{day,hr} \
$(tmp)/usr/lib/uucp
install -m 755 -g root debian/uutraf.pl $(tmp)/usr/lib/uucp
install -m 755 -g root debian/uupoll $(tmp)/usr/sbin
#
# Set the correct ownership and permissions.
#
chown uucp:dialout $(tmp)/usr/sbin/uucico
chmod 6755 $(tmp)/usr/sbin/uucico
mv $(tmp)/usr/sbin/uucico $(tmp)/usr/lib/uucp
ln -s /usr/lib/uucp/uucico $(tmp)/usr/sbin/uucico
chmod 755 $(tmp)/usr/bin/*
chmod 4755 $(tmp)/usr/bin/{uustat,uux,uucp}
chmod 4755 $(tmp)/usr/sbin/uuxqt
chown root $(tmp)/usr/bin/{uuname,cu}
chown root $(tmp)/usr/lib/uucp/{uuchk,uuconv}
#
# Install the configuration program and files.
#
## install -g root -m 755 debian/uucpconfig $(tmp)/usr/sbin
#
install -g root -m 644 debian/etc.uucp/* $(tmp)/etc/uucp
chmod 640 $(tmp)/etc/uucp/call
chmod 640 $(tmp)/etc/uucp/passwd
chown -R uucp:uucp $(tmp)/etc/uucp
#
# Documentation section.
#
install -d -g root -m 755 $(tmp)/usr/doc/$(package)
install -d -g root -m 755 $(tmp)/usr/doc/$(package)/examples
install -d -g root -m 755 $(tmp)/usr/doc/$(package)/examples/taylor
install -d -g root -m 755 $(tmp)/usr/doc/$(package)/examples/hdb
#
#
install -g root -m 644 debian/sample.hdb/* \
$(tmp)/usr/doc/uucp/examples/hdb
install -g root -m 644 debian/etc.uucp/* \
$(tmp)/usr/doc/uucp/examples/taylor
chmod -R a-s,go=u-w $(tmp)/usr/doc/$(package)/examples
chown -R root:root $(tmp)/usr/doc/$(package)/examples
#
install -g root -m 644 debian/README $(tmp)/usr/doc/$(package)
install -g root -m 644 debian/changelog \
$(tmp)/usr/doc/$(package)/changelog.Debian
install -g root -m 644 ChangeLog \
$(tmp)/usr/doc/$(package)/changelog
-gzip -9f $(tmp)/usr/doc/$(package)/*
install -g root -m 644 debian/copyright \
$(tmp)/usr/doc/$(package)
#
# Install info files.
#
install -d -g root -m 755 $(tmp)/usr/info
install -g root -m 644 debian/$(package).info* $(tmp)/usr/info
gzip -9f $(tmp)/usr/info/$(package).info*
#
# Install Debian files and build package.
#
install -g root -m 644 debian/conffiles $(tmp)/DEBIAN/conffiles
install -g root -m 755 debian/preinst $(tmp)/DEBIAN/preinst
install -g root -m 755 debian/postinst $(tmp)/DEBIAN/postinst
install -g root -m 755 debian/prerm $(tmp)/DEBIAN/prerm
install -g root -m 755 debian/postrm $(tmp)/DEBIAN/postrm
#
find $(tmp) -name *.old -exec rm {} \; -print
#
dpkg-shlibdeps uucico
dpkg-gencontrol
dpkg --build $(tmp) ..
clean: checkroot
if [ -f Makefile ]; then make realclean; fi
rm -f contrib/uurate
rm -f build
rm -rf $(tmp)
rm -f debian/uucp.info*
find . -name '*.bak' -o -name '*~' | xargs -r rm -f --
debian/uucp.info: uucp.texi
# Build info files.
cd debian && makeinfo ../$(package).texi
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean checkroot
|