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

VERSION=9.1.0
PROGNAME="ELF Libraries"
DESC="\
Assorted ELF shared libraries                                         \n\
                                                                      \n\
This is a collection of shared libraries needed to run Linux code in  \n\
the ELF binary format. ELF (Executable and Linking Format) is the     \n\
standard Linux binary format.  These libraries are gathered from      \n\
packages outside of the A series, and are intended to give a fairly   \n\
complete set of runtime ELF libraries when added to the glibcso       \n\
package (also in the A series).  If you're doing a full installation, \n\
these libraries are redundant, but installing them doesn't hurt."

BUILD=1
MAINTAINER="Mark Post <mark.post@eds.com>"
SOURCE=N/A
PKGNAME=elflibs-$VERSION-s390-$BUILD

compile() {
   echo Nothing to compile for elflibs
}

install() {
   mkdir -p /package-elflibs/lib \
            /package-elflibs/usr/lib

   cd /lib
   cp -a libbz2.so.* libdb-3*.so* libdb1.so.* libdb2.so.* libdb.so.* \
         libgpm.so.* libncurses.so.* libtermcap.so.* \
      /package-elflibs/lib/

   # Pat doesn't have this symbolik link
   rm /package-elflibs/lib/libdb1.so.2

   cd /usr/lib
   cp -a libasound.so.* libcups.so.* libcupsimage.so.* libcurl.so.* libexpat.so.* \
         libfbm.so.* libform.so.* libfreetype.so.* libgcc_s.so.* libgdbm.so.* \
         libglib-2.0.so.* libgmodule-2.0.so.* libgmp*.so.* libgobject-2.0.so.* \
         libgthread-2.0.so.* libhistory.so.* libjpeg.so.* libmenu.so.* libmp.so.* libpanel.so.* \
         libpbm.so.* libpcre.so.* libpcreposix.so.* libpgm.so.* libpng*.so.* libpnm.so.* \
         libpopt.so.* libppm.so.* libreadline.so.* librle.so.* libslang.so.* \
         libtiff.so.* libz.so.* \
       /package-elflibs/usr/lib/

   ( cd /package-elflibs/
     tar -zxf $CWD/../../../slackware/l/db3-3.3.11-s390-1.tgz lib/
   )
}

attributes() {
   chown -R root.root $PKG/package-elflibs
   chmod -R 755 $PKG/package-elflibs
}

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

   cd $CTL
   cat $CWD/slack-desc > slack-desc

   sed -e 's%package-elflibs/%%g' doinst.sh > doinst.sh.new
   cat doinst.sh.new > doinst.sh
   rm doinst.sh.new
}

