IGNOREPATH=/etc:/home:/var:/dev:/boot:/root:/tmp:/usr/local:/bin:/sbin:/mnt:/usr/src
STRIPLIB=y
STRIPBIN=y

VERSION=0.98alpha14
PROGNAME="xcdroast $VERSION"
DESC="\
xcdroast (Graphical frontend for cdrtools)                             \n\
                                                                       \n\
X-CD-Roast is a graphical frontend for the command line cdrtools.      \n\
You can do anything X-CD-Roast does yourself using the command line    \n\
tools - but it's nicer and easier with the frontend.  The cdrtools     \n\
contain \"cdrecord\" (which does the actual writing of CDs),\"readcd\" \n\
(reads data tracks of CDs\"), \"mkisofs\" (masters CD images), and     \n\
\"cdda2wav\" (reads audio tracks).  Cdrecord, readcd and mkisofs are   \n\
maintained by Joerg Schilling, cdda2wav by Heiko Eissfeldt, and        \n\
X-CD-Roast by Thomas Niederreiter."

BUILD=1
MAINTAINER="Mark Post <mark.post@eds.com>"
SOURCE=ftp://ftp.gnu.org/pub/gnu/xcdroast
PKGNAME=xcdroast-$VERSION-s390-$BUILD
TAG=OPT

compile() {
   tar -yxvf $CWD/xcdroast-$VERSION.tar.bz2
   cd xcdroast-$VERSION/
   chown -R root.root .
   find . -perm 775 -exec chmod 755 {} \;
   find . -perm 700 -exec chmod 755 {} \;
   find . -perm 744 -exec chmod 755 {} \;
   find . -perm 664 -exec chmod 644 {} \;
   find . -perm 600 -exec chmod 644 {} \;

   ./configure --prefix=/usr --sysconfdir=/etc
   make
}

install() {
   make install DESTDIR=/package-xcdroast

   mkdir -p /package-xcdroast/usr/doc/xcdroast-$VERSION
   cp -a COPYING ChangeLog INSTALL README doc/* \
       /package-xcdroast/usr/doc/xcdroast-$VERSION

   ( cd /package-xcdroast/usr/man/man1
     rm -f *.gz
     gzip -9 *.1
   )
}

attributes() {
   chown -R root.bin $PKG/package-xcdroast/usr/bin/
}

special() {
   cd $PKG
   mv package-xcdroast/* ./
   rmdir package-xcdroast

   cd $CTL
   cat $CWD/slack-desc > slack-desc
   sed -e 's%package-xcdroast/%%g' doinst.sh > doinst.sh.new
   cat doinst.sh.new > doinst.sh
   rm doinst.sh.new
}

