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

VERSION=2.8
PROGNAME="aumix $VERSION"
DESC="\
aumix (GTK+/ncurses audio mixer)                                       \n\
                                                                       \n\
This is a program for adjusting audio mixers from the command line or  \n\
scripts, or interactively at the console or a terminal with a          \n\
full-screen, ncurses-based interface or a GTK-based X interface."

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

compile() {
   tar -yxvf $CWD/aumix-$VERSION.tar.bz2
   cd aumix-$VERSION/
   zcat $CWD/aumix.alsa.diff.gz | patch -p1 --verbose --backup --suffix=.orig
   chown -R root.root .
   CFLAGS=-O2 \
   ./configure --prefix=/usr \
               --without-gtk1
   make
}

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

   mkdir -p /package-aumix/usr/doc/aumix-$VERSION
   cp -a ABOUT-NLS AUTHORS BUGS COPYING INSTALL NEWS README TODO \
      /package-aumix/usr/doc/aumix-$VERSION

   # Pat says
   # This is obsolete (besides being broken)
   rm -f /package-aumix/usr/bin/xaumix \
         /package-aumix/usr/man/man1/xaumix.1

   # Pat says
   # More fluff, doesn't deserve mainsteam placement
   mv /package-aumix/usr/bin/mute /package-aumix/usr/doc/aumix-$VERSION/mute.sh

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

attributes() {
   chown -R root.bin $PKG/package-aumix/usr/bin \
                     $PKG/package-aumix/usr/doc/aumix-$VERSION/mute.sh
   chmod 755 $PKG/package-aumix/usr/doc/aumix-$VERSION/mute.sh
}

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

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

