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
|
#! /bin/bash -euv
# Convenience variables.
package=qcam
home="`pwd`"
dest=debian/tmp
pkgdocdir=$dest/usr/doc/$package
# Make dir.
rm -rf $dest
install -d -m755 $dest
# Install binary.
install -d $dest/usr/bin
install -s probeqcam qcam make.darkmask sqcam $dest/usr/bin
install -d $dest/usr/X11R6/bin
install -s xqcam $dest/usr/X11R6/bin
# Install configuration files.
install -d -m755 $dest/etc
install -m644 qcam.conf $dest/etc/qcam.conf
# Install manpages.
install -d $dest/usr/X11R6/man/man1 $dest/usr/man/man1
install -m644 qcam.1 make.darkmask.1 sqcam.1 probeqcam.1 $dest/usr/man/man1
gzip -9v $dest/usr/man/man1/*
(cd $dest/usr/X11R6/man/man1; ln -s ../../../man/man1/qcam.1.gz xqcam.1.gz)
# Copy docs.
install -d -m755 $pkgdocdir
install -m644 BUGS BUGS.sqcam INFO README README.JPEG README.sqcam $pkgdocdir
install -m644 debian/changelog $pkgdocdir/changelog.Debian
install -m644 CHANGES $pkgdocdir/changelog
gzip -9v $pkgdocdir/*
# Copy copyright.
install -m644 debian/copyright $pkgdocdir/copyright
# Dependencies.
install -d -m755 $dest/DEBIAN
cp debian/conffiles $dest/DEBIAN
dpkg-shlibdeps qcam xqcam make.darkmask probeqcam sqcam
dpkg-gencontrol
# Set group, owner, and permissions.
chown -R root.root $dest
chmod -R go=rX $dest
# Make the package.
dpkg --build $dest ..
|