#!/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" \
"k3b" "CD/DVD burning app for KDE" "on" \
"kdeaccessibility" "KDE accessibility utilities" "on" \
"kdeaddons" "Plugins and scripts for some applications" "on" \
"kdeadmin" "KDE system administration utilities" "on" \
"kdeartwork" "Extra themes, sounds, wallpapers, and styles" "on" \
"kdebase" "The K Desktop Environment (base 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" \
"kdesdk" "KDE software development kit" "on" \
"kdetoys" "Toys for the KDE desktop" "on" \
"kdeutils" "Utilities for KDE" "on" \
"kdevelop" "KDE Application Development Environment" "on" \
"kdewebdev" "Quanta Plus web development environment" "on" \
"knemo" "A network monitor for KDE" "on" \
"koffice" "The KDE office productivity suite" "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 k3b kdeaccessibility kdeaddons kdeadmin kdeartwork kdebase kdebindings kdeedu kdegames kdegraphics kdelibs kdemultimedia kdenetwork kdepim kdesdk kdetoys kdeutils kdevelop kdewebdev knemo koffice  \ ; 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 k3b kdeaccessibility kdeaddons kdeadmin kdeartwork kdebase kdebindings kdeedu kdegames kdegraphics kdelibs kdemultimedia kdenetwork kdepim kdesdk kdetoys kdeutils kdevelop kdewebdev knemo koffice  \ ; 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
