#!/bin/bash # # This script is public domain. # # ogg2deb VERSION=0.0.2 OGGFILENAME=ogg.gz if [ ! -f $OGGFILENAME ]; then echo ${0##*/}, version $VERSION echo ${0##*/}: Cannot open $OGGFILENAME exit 2 fi PKGDEBNAME=`grep ^Package $0 | cut -d : -f 2 | tr -d ' '` rm -fr $PKGDEBNAME mkdir -p $PKGDEBNAME/usr/share/gcin mkdir -p $PKGDEBNAME/DEBIAN tar zxf $OGGFILENAME -C $PKGDEBNAME/usr/share/gcin/ tail -n 9 $0 > $PKGDEBNAME/DEBIAN/control OGGVERSION=`grep ^Version $0 | cut -d : -f 2 | tr -d ' '` OGGDEBNAME=`echo $PKGDEBNAME $OGGVERSION all.deb | sed 's/ /_/g'` cd $PKGDEBNAME dpkg -b . ../$OGGDEBNAME exit Package: gcin-ogg Version: 0.0.1.20100516-1 Architecture: all Maintainer: root Depends: vorbis-tools Section: non-free/sound Priority: optional Description: gcin text-to-speech data Homepage: http://cle.linux.org.tw/gcin/download/