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

VERSION=0.9.1
PROGNAME="epiphany-extensions $VERSION"
DESC="\
epiphany-extensions (add-ons for the Epiphany browser)                 \n\
                                                                       \n\
The epiphany-extensions package adds extra features (such as a popup   \n\
epiphany-extensions: blocker) to the Epiphany web browser."

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

compile() {
   tar -yxvf $CWD/epiphany-extensions-$VERSION.tar.bz2
   cd epiphany-extensions-$VERSION/
   chown -R root.root .
   find . -perm 666 -exec chmod 644 {} \;
   find . -perm 664 -exec chmod 644 {} \;
   find . -perm 600 -exec chmod 644 {} \;
   find . -perm 444 -exec chmod 644 {} \;
   find . -perm 400 -exec chmod 644 {} \;
   find . -perm 440 -exec chmod 644 {} \;
   find . -perm 777 -exec chmod 755 {} \;
   find . -perm 775 -exec chmod 755 {} \;
   find . -perm 511 -exec chmod 755 {} \;
   find . -perm 711 -exec chmod 755 {} \;
   find . -perm 555 -exec chmod 755 {} \;
   CFLAGS=-O2 \
   ./configure --prefix=/usr \
               --sysconfdir=/etc \
               --localstatedir=/var/lib \
               --enable-static=no \
               --with-extensions=all \
               --build=s390-slackware-linux \
               --host=s390-slackware-linux \
               --target=s390-slackware-linux
   make
}

install() {
   make install DESTDIR=/package-epiphany-extensions

   mkdir -p /package-epiphany-extensions/usr/doc/epiphany-extensions-$VERSION
   cp -a AUTHORS COPYING COPYING.README NEWS README TODO \
       /package-epiphany-extensions/usr/doc/epiphany-extensions-$VERSION
}

attributes() {
echo   chmod 666 $PKG/package-epiphany-extensions/usr/doc/epiphany-extensions-$VERSION/*
}

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

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

