#!/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 AP (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." 22 70 11 \
"a2ps" "Any to .ps filter (required by APSfilter)" "on" \
"acct" "Process accounting utilities" "on" \
"amp" "A command-line MP3 player" "on" \
"ash" "A small /bin/sh type shell" "on" \
"at" "Schedule commands to execute at a later time" "on" \
"aumix" "Audio mixer for the console or X" "on" \
"bc" "GNU bc - arbitrary precision math language" "on" \
"bpe" "Binary Patch (file) Editor" "on" \
"cdparanoia" "" "on" \
"cdrdao" "Tool for burning audio CDRs" "on" \
"cdrtools" "CD-R/RW mastering/burning tools" "on" \
"diffstat" "Generate diff statistics" "on" \
"diffutils" "GNU diffutils - find file differences" "on" \
"dmapi" "Data Management API library for xfsdump" "on" \
"dvd+rw-tools" "" "on" \
"enscript" "A text to PostScript utility" "on" \
"espgs" "ESP Ghostscript PS/PDF interpreter" "on" \
"flac" "Free Lossless Audio Codec" "on" \
"gimp-print" "Additional printer drivers for gs and CUPS" "on" \
"gnu-gs-fonts" "Ghostscript fonts" "on" \
"groff" "GNU groff document formatting system" "on" \
"hpijs" "Hewlett-Packard inkjet drivers for Ghostscript" "on" \
"ispell" "The International version of ispell" "on" \
"jed" "JED programmer's editor" "on" \
"joe" "joe text editor" "on" \
"jove" "Jonathan's Own Version of Emacs text editor" "on" \
"ksh93" "KornShell language and interactive shell" "on" \
"linuxdoc-tools" "Utilities for DocBook/SGML documents" "on" \
"lm_sensors" "Hardware monitoring package" "on" \
"lsof" "A tool to list open files" "on" \
"lvm" "LVM (Logical Volume Manager)" "on" \
"madplay" "MPEG audio player" "on" \
"man" "Primary tool for reading online documentation" "on" \
"man-pages" "Online documentation (requires groff)" "on" \
"mc" "The Midnight Commander file manager" "on" \
"mdadm" "Utilities for managing MD (RAID) devices" "on" \
"most" "A pager, like 'more' or 'less'" "on" \
"mpg321" "A command-line MP3 player" "on" \
"mt-st" "mt ported from BSD - controls tape drive" "on" \
"mysql" "MySQL database server" "on" \
"normalize" "Normalize audio file volume" "on" \
"quota" "User disk quota utilities" "on" \
"raidtools" "MD (RAID) utilities" "on" \
"rexima" "Small console audio mixer" "on" \
"rpm" "RPM package tool (unsupported)" "on" \
"rzip" "A large file compression utility" "on" \
"sc" "The 'sc' spreadsheet" "on" \
"screen" "ANSI/vt100 virtual terminal emulator" "on" \
"sox" "Sound utilities" "on" \
"sudo" "Allow special users limited root access" "on" \
"sysstat" "System performance monitoring tools" "on" \
"texinfo" "GNU texinfo documentation system" "on" \
"vim" "Improved vi clone" "on" \
"vorbis-tools" "Ogg Vorbis encoder, player, and utilities" "on" \
"workbone" "a text-based audio CD player" "on" \
"xfsdump" "Backup/restore tools for the XFS filesystem" "on" \
"zsh" "Zsh - a custom *nix shell" "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
  rm -f $TMP/SeTpkgs
#  rm -f $TMP/SeTnewtag
  cat /dev/null > $TMP/SeTnewtag
  for PKG in a2ps acct amp ash at aumix bc bpe cdparanoia cdrdao cdrtools diffstat diffutils dmapi dvd+rw-tools enscript espgs flac gimp-print gnu-gs-fonts groff hpijs ispell jed joe jove ksh93 linuxdoc-tools lm_sensors lsof lvm madplay man man-pages mc mdadm most mpg321 mt-st mysql normalize quota raidtools rexima rpm rzip sc screen sox sudo sysstat texinfo vim vorbis-tools workbone xfsdump zsh ; do
    echo "$PKG: SKP" >> $TMP/SeTnewtag
  done
  exit
fi
cat /dev/null > $TMP/SeTnewtag
for PKG in a2ps acct amp ash at aumix bc bpe cdparanoia cdrdao cdrtools diffstat diffutils dmapi dvd+rw-tools enscript espgs flac gimp-print gnu-gs-fonts groff hpijs ispell jed joe jove ksh93 linuxdoc-tools lm_sensors lsof lvm madplay man man-pages mc mdadm most mpg321 mt-st mysql normalize quota raidtools rexima rpm rzip sc screen sox sudo sysstat texinfo vim vorbis-tools workbone xfsdump zsh ; do
  if grep \"$PKG\" $TMP/SeTpkgs 1> /dev/null 2> /dev/null ; then
    echo "$PKG: ADD" >> $TMP/SeTnewtag
  else
    echo "$PKG: SKP" >> $TMP/SeTnewtag
  fi
done
rm -f $TMP/SeTpkgs
