#!/bin/sh
#item   ####description                                      ###on off ###
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
  mkdir -p $TMP
fi
cat /dev/null > $TMP/SeTnewtag
dialog --backtitle "Slackware installer: package selection" --title "SERIES KDE" \
--checklist "Please select the packages you wish to install from this series. \
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. \
 \
Press ENTER when you are done." \
22 72 9 \
"amarok" "A media player for KDE" "on" \
"guidance-power-manager" "KDE frontend for HAL's power features" "on" \
"k3b" "CD/DVD burning app for KDE" "on" \
"kaudiocreator" "CD ripper and audio encoder" "on" \
"kdeaccessibility" "KDE accessibility utilities" "on" \
"kdeadmin" "KDE system administration utilities" "on" \
"kdeartwork" "Extra themes, sounds, wallpapers, and styles" "on" \
"kdebase" "The K Desktop Environment base package" "on" \
"kdebase-runtime" "The KDE base runtime support package" "on" \
"kdebase-workspace" "The KDE base workspace package" "on" \
"kdebindings" "Optional KDE library bindings" "on" \
"kdeedu" "KDE Edutainment programs" "on" \
"kdegames" "A KDE games collection" "on" \
"kdegraphics" "Graphic programs for KDE" "on" \
"kdelibs" "Libraries required for KDE" "on" \
"kdemultimedia" "Multimedia programs for KDE" "on" \
"kdenetwork" "Networking programs for KDE" "on" \
"kdepim" "Personal Information Management tools" "on" \
"kdepim-runtime" "KDE PIM runtime support package" "on" \
"kdepimlibs" "KDE Personal Information Management libraries" "on" \
"kdeplasma-addons" "Plasma addons for KDE" "on" \
"kdesdk" "KDE software development kit" "on" \
"kdetoys" "Toys for the KDE desktop" "on" \
"kdeutils" "Utilities for KDE" "on" \
"kdevelop" "KDE Application Development Environment" "on" \
"kdevplatform" "Libraries used by kdevelop" "on" \
"kdewebdev" "Quanta Plus web development environment" "on" \
"koffice" "The KDE office productivity suite" "on" \
"konq-plugins" "Plugins to extend Konqueror" "on" \
"kopete-cryptography" "Crypto support for Kopete Messenger" "on" \
"ktorrent" "BitTorrent program for KDE" "on" \
"oxygen-icons" "Oxygen icon theme" "on" \
"polkit-kde-1" "KDE polkit authenticator" "on" \
"polkit-qt-1" "Qt wrapper for the polkit API" "on" \
"skanlite" "KDE scanning program" "on" \
2> $TMP/SeTpkgs
# If the user pressed cancel, or something bad happened then we
# mark all packages as skipped and bail out.
if [ $? = 1 -o $? = 255 ]; then
   # Not in Slackware, but a nice addition for ARMedslack whilst
   # we're processing the package selection:
   dialog \
      --backtitle "Slackware installer: package selection" \
      --infobox "Marking all packages as skipped" 3 35
    rm -f $TMP/SeTpkgs
    # Empty, but not delete this file:
    > $TMP/SeTnewtag
  for PKG in \
amarok guidance-power-manager k3b kaudiocreator kdeaccessibility kdeadmin kdeartwork kdebase kdebase-runtime kdebase-workspace kdebindings kdeedu kdegames kdegraphics kdelibs kdemultimedia kdenetwork kdepim kdepim-runtime kdepimlibs kdeplasma-addons kdesdk kdetoys kdeutils kdevelop kdevplatform kdewebdev koffice konq-plugins kopete-cryptography ktorrent oxygen-icons polkit-kde-1 polkit-qt-1 skanlite  \ ; do
    echo "$PKG: SKP" >> $TMP/SeTnewtag
  done
  exit
fi
dialog \
  --backtitle "Slackware installer: package selection" \
  --infobox "Processing package selection" 3 33
cat /dev/null > $TMP/SeTnewtag
for PACKAGE in \
amarok guidance-power-manager k3b kaudiocreator kdeaccessibility kdeadmin kdeartwork kdebase kdebase-runtime kdebase-workspace kdebindings kdeedu kdegames kdegraphics kdelibs kdemultimedia kdenetwork kdepim kdepim-runtime kdepimlibs kdeplasma-addons kdesdk kdetoys kdeutils kdevelop kdevplatform kdewebdev koffice konq-plugins kopete-cryptography ktorrent oxygen-icons polkit-kde-1 polkit-qt-1 skanlite  \ ; 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
