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

VERSION=0.2.3
PROGNAME="audiofile $VERSION"
DESC="\
audiofile (audio support library)                                      \n\
                                                                       \n\
Audiofile is a library to handle various audio file formats, and is    \n\
used by the esound daemon.  You can also use it to develop your own    \n\
audiofile applications."

BUILD=1
MAINTAINER="Mark Post <mark.post@eds.com>"
SOURCE=ftp://oss.sgi.com/projects/audiofile/download
PKGNAME=audiofile-$VERSION-s390-$BUILD
TAG=OPT

compile() {
   tar -zxvf $CWD/audiofile-$VERSION.tar.gz
   cd audiofile-$VERSION/
   chown -R root.root .

   ./configure --prefix=/usr \
               --build=s390-slackware-linux \
               --host=s390-slackware-linux \
               --target=s390-slackware-linux
   make
}

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

   mkdir -p /package-audiofile/usr/doc/audiofile-$VERSION
   cp -a COPYING TODO README ChangeLog docs/* \
      /package-audiofile/usr/doc/audiofile-$VERSION
}

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

   chown -R root.bin usr/bin/

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

