#!/bin/sh
#item   ####description                                      ###on off ###
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
  mkdir -p $TMP
fi
rm -rf $TMP/SeTnewtag
rm -rf $TMP/SeTpkgs
cat /dev/null > $TMP/SeTnewtag
dialog --title "SELECTING PACKAGES FROM SERIES L (Libraries)" \
       --checklist "Please select the packages you wish to install \
from series L. Use the \
UP/DOWN keys to scroll through the list, and the SPACE key to select \
the packages you wish to install. Recommended packages have \
already been selected for you, but you may unselect them if you wish. \
Keep in mind that many of these libraries are required by KDE, GNOME, \
or other parts of the system.  It's safest to install these packages \
if you aren't sure if you need them. \
Press ENTER when you are \
done." 22 74 9 \
"aalib" "ASCII Art library" "on" \
"audiofile" "SGI's Audio File sound library" "on" \
"freetype" "A free Font Engine library for TrueType fonts" "on" \
"gdbm" "The GNU gdbm database library" "on" \
"gdk-pixbuf" "Image library used by GTK+ and GNOME" "on" \
"glib" "Support library used by GTK+ and GNOME" "on" \
"glibc" "Libraries for developing ELF binaries" "on" \
"glibc-i18n" "Internationalization support for glibc" "off" \
"gmp" "A library for arithmetic" "on" \
"gtk+" "A graphical toolkit library" "on" \
"lesstif" "A Motif clone" "on" \
"libgr" "Various graphics libraries and tools" "on" \
"libjpeg" "JPEG image library and tools" "on" \
"libpng" "Portable Network Graphics library" "on" \
"libtermcap" "GNU terminal control library" "on" \
"libtiff" "Tag Image File format library" "on" \
"libungif" "GIF extraction library" "on" \
"libxml" "XML parser library v1" "on" \
"libxml2" "XML parser library v2" "on" \
"libxslt" "XML transformation library" "on" \
"mpeg_lib" "MPEG-1 video decoding library" "off" \
"ncurses" "CRT screen handling package" "on" \
"orbit" "CORBA ORB (object request broker)" "on" \
"pcre" "Perl-compatible regular expression library" "on" \
"readline" "Input library with editing" "on" \
"slang" "S-Lang interpreted language and library" "on" \
"svgalib" "Super-VGA Graphics Library" "on" \
"t1lib" "Library for handling Type 1 fonts" "on" \
"xaw3d" "A replacement for libXaw with a 3D look" "on" \
"zlib" "general purpose data compression library" "on" \
2> $TMP/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -rf $TMP/SeTpkgs
 > $TMP/SeTnewtag
 for pkg in aalib audiofile freetype gdbm gdk-pixbuf glib glibc glibc-i18n gmp gtk+ libjpeg lesstif libgr libpng libtiff libungif libxml libxml2 libxslt mpeg_lib ncurses orbit pcre readline slang svgalib libtermcap t1lib xaw3d zlib ; do
  echo "$pkg: SKP" >> $TMP/SeTnewtag
 done
 exit
fi
cat /dev/null > $TMP/SeTnewtag
for PACKAGE in aalib audiofile freetype gdbm gdk-pixbuf glib glibc glibc-i18n gmp gtk+ libjpeg lesstif libgr libpng libtiff libungif libxml libxml2 libxslt mpeg_lib ncurses orbit pcre readline slang svgalib libtermcap t1lib xaw3d zlib ; do
 if fgrep \"$PACKAGE\" $TMP/SeTpkgs 1> /dev/null 2> /dev/null ; then
  echo "$PACKAGE: ADD" >> $TMP/SeTnewtag
 else
  echo "$PACKAGE: SKP" >> $TMP/SeTnewtag
 fi
done
rm -f $TMP/SeTpkgs
