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

VERSION=1.2.10
PROGNAME="glib $VERSION"
DESC="\
glib (library of C routines)                                           \n\
                                                                       \n\
GLib is a library which includes support routines for C such as lists, \n\
trees, hashes, memory allocation, and many other things.               \n\
                                                                       \n\
GLib is required by nearly everything that uses GTK+."

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

compile() {
   tar -zxvf $CWD/glib-$VERSION.tar.gz
   cd glib-$VERSION/
   cp -vp /usr/share/libtool/config.* ./
   ./configure --prefix=/usr \
               --sysconfdir=/etc \
               s390-slackware-linux
   make CFLAGS="-O2 -Wall -D_REENTRANT"
}

install() {
   make CFLAGS="-O2 -Wall -D_REENTRANT" install DESTDIR=/package-glib

   mkdir -p /package-glib/usr/doc/glib-$VERSION
   cp -a AUTHORS COPYING INSTALL NEWS README /package-glib/usr/doc/glib-$VERSION

   ( cd /package-glib/usr/info
     rm -f *.gz
     gzip -9 *
   )

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

attributes() {
   chown -R root.bin $PKG/package-glib/usr/bin/
   chmod 755 $PKG/package-glib/usr/lib/libgmodule-1.2.so.0.0.10
}

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

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

