#!/bin/sh . admin/common.sh export_source_directory build_binaries DEB_REVISION=1 if [ -d deb ]; then rm -Rf deb fi mkdir -p \ deb/DEBIAN \ deb/usr/bin \ deb/usr/share/man/man1/ \ deb/usr/share/doc/uhub \ deb/etc/uhub \ || exit 1 find deb -type d | xargs chmod 755 # Copy binaries... cp ${PACKAGE}/${BINARY} deb/usr/bin strip deb/usr/bin/${BINARY} # Copy configuration files... cp ${PACKAGE}/doc/uhub.conf deb/etc/uhub cp ${PACKAGE}/doc/users.conf deb/etc/uhub echo "Welcome to uHub" > deb/etc/uhub/motd.txt # Copy other files cp ${PACKAGE}/README deb/usr/share/doc/uhub cp ${PACKAGE}/AUTHORS deb/usr/share/doc/uhub gzip -c --best < ${PACKAGE}/ChangeLog > deb/usr/share/doc/uhub/changelog.gz gzip -c --best < ${PACKAGE}/doc/uhub.1 > deb/usr/share/man/man1/uhub.1.gz cat > deb/usr/share/doc/uhub/copyright < uHub is free and open source software, licensed under the GNU General Public License version 3. For details, see /usr/share/common-licenses/GPL-3 EOF gzip -c --best > deb/usr/share/doc/uhub/changelog.Debian.gz < `date -R` EOF ### Write control files cd deb echo "/etc/uhub/uhub.conf" > DEBIAN/conffiles echo "/etc/uhub/users.conf" >> DEBIAN/conffiles echo "/etc/uhub/motd.txt" >> DEBIAN/conffiles md5sum `find usr -type f` > DEBIAN/md5sums INSTALL_SIZE=`du -s | cut -f 1` cat > DEBIAN/control < Installed-Size: ${INSTALL_SIZE} Depends: libc6 (>= 2.7-1), libevent1 (>= 1.3e-1) Section: net Priority: optional Description: a high performance hub for the ADC peer-to-peer network uHub is a high performance peer-to-peer hub for the ADC network. Its low memory footprint allows it to handle several thousand users on high-end servers, or a small private hub on embedded hardware. . Homepage: http://www.extatic.org/uhub/ EOF cd .. ### Create deb file fakeroot dpkg-deb --build deb mv deb.deb uhub_${VERSION}-${DEB_REVISION}_${HOST_MACHINE}.deb ### Check for errors lintian uhub_${VERSION}-${DEB_REVISION}_${HOST_MACHINE}.deb ### Cleanup rm -Rf deb rm -Rf ${PACKAGE}