#!/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 "SELECTING PACKAGES FROM SERIES XAP (X APPLICATIONS)" \
--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." \
20 70 10 \
"MPlayer" "Media player" "on" \
"NetworkManager-openvpn" "OpenVPN Support for NetworkManager" "on" \
"audacious" "A media player of the XMMS lineage" "on" \
"audacious-plugins" "Plugins for Audacious to support media types" "on" \
"blackbox" "Minimalist and fast window manager" "on" \
"blueman" "Graphical Bluetooth manager" "on" \
"ddd" "X frontend for the GNU gdb debugger" "on" \
"easytag" "Tag editor for audio files" "on" \
"electricsheep" "A distributed screensaver program" "on" \
"ffmpegthumbnailer" "A lightweight video thumbnailer" "on" \
"fluxbox" "Window manager based on blackbox" "on" \
"freerdp" "Free Remote Desktop Protocol" "on" \
"fvwm" "FVWM window manager" "on" \
"geeqie" "A lightweight picture viewing program" "on" \
"gftp" "A multithreaded FTP client" "on" \
"gimp" "GNU Image Manipulation Program" "on" \
"gkrellm" "Graphical system monitor utility" "on" \
"gnuchess" "Chess playing programs" "on" \
"gnuplot" "Gnuplot function plotting utility" "on" \
"gparted" "A graphical partition manipulation program" "on" \
"gucharmap" "Unicode character map" "on" \
"gv" ".ps/.pdf viewer based on Ghostview" "on" \
"hexchat" "IRC client for X" "on" \
"libnma" "NetworkManager GUI client library" "on" \
"mozilla-firefox" "Mozilla Firefox web browser" "on" \
"mozilla-thunderbird" "Mozilla Thunderbird email client" "on" \
"mpv" "a command-line media player" "on" \
"network-manager-applet" "NetworkManager Applet" "on" \
"pan" "Pan newsreader (good for Reading News)" "on" \
"pavucontrol" "PulseAudio Volume Controller" "on" \
"pidgin" "GTK+ based messaging program" "on" \
"qalculate-gtk" "GTK calculator frontend" "on" \
"qalculate-qt" "Qt calculator frontend" "on" \
"rdesktop" "Remote Desktop Protocol client" "on" \
"rxvt-unicode" "Terminal emulator with Unicode support" "on" \
"sane" "Scanner Access Now Easy" "on" \
"seyon" "A complete telecommunications package" "on" \
"ssr" "Simple Screen Recorder" "on" \
"vim-gvim" "X/GTK+ GUI add-on for the VIM editor" "on" \
"windowmaker" "GNU window manager for X" "on" \
"x11-ssh-askpass" "X11-based SSH passphrase dialog" "on" \
"x3270" "x3270 - IBM host access tool" "on" \
"xaos" "Fast real-time fractal zoomer/viewer" "on" \
"xgames" "A collection of games for X" "on" \
"xine-lib" "Multimedia player libraries" "on" \
"xine-ui" "Multimedia player (user interface)" "on" \
"xlockmore" "A screen saver and locker for X" "on" \
"xmms" "An audio player similar to WinAmp" "on" \
"xpaint" "A color painting/image editing program" "on" \
"xpdf" "Portable Document Format (PDF) viewer" "on" \
"xsane" "X interface to Scanner Access Now Easy" "on" \
"xscreensaver" "A screen saver and locker for X" "on" \
"xsnow" "let it snow on your desktop" "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 Slackware ARM 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 \
MPlayer NetworkManager-openvpn audacious audacious-plugins blackbox blueman ddd easytag electricsheep ffmpegthumbnailer fluxbox freerdp fvwm geeqie gftp gimp gkrellm gnuchess gnuplot gparted gucharmap gv hexchat libnma mozilla-firefox mozilla-thunderbird mpv network-manager-applet pan pavucontrol pidgin qalculate-gtk qalculate-qt rdesktop rxvt-unicode sane seyon ssr vim-gvim windowmaker x11-ssh-askpass x3270 xaos xgames xine-lib xine-ui xlockmore xmms xpaint xpdf xsane xscreensaver xsnow  \ ; 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 \
MPlayer NetworkManager-openvpn audacious audacious-plugins blackbox blueman ddd easytag electricsheep ffmpegthumbnailer fluxbox freerdp fvwm geeqie gftp gimp gkrellm gnuchess gnuplot gparted gucharmap gv hexchat libnma mozilla-firefox mozilla-thunderbird mpv network-manager-applet pan pavucontrol pidgin qalculate-gtk qalculate-qt rdesktop rxvt-unicode sane seyon ssr vim-gvim windowmaker x11-ssh-askpass x3270 xaos xgames xine-lib xine-ui xlockmore xmms xpaint xpdf xsane xscreensaver xsnow  \ ; do
 if grep "\(^\| \)$PACKAGE\( \|$\)" $TMP/SeTpkgs > /dev/null 2>&1 ; then
    echo "$PACKAGE: ADD" >> $TMP/SeTnewtag
  else
    echo "$PACKAGE: SKP" >> $TMP/SeTnewtag
  fi
done
rm -f $TMP/SeTpkgs
