#!/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 A (BASE LINUX SYSTEM)" \
--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 \
"aaa_base" "Basic filesystem, shell, and utils - REQUIRED" "on" \
"aaa_elflibs" "Various ELF libraries -- REQUIRED" "on" \
"acl" "POSIX Access Control List tools -- REQUIRED" "on" \
"acorn-fdisk" "Partition editor for Acorn/RISC OS machines" "on" \
"acpid" "ACPI Power Management daemon" "on" \
"apmd" "APM Power Management daemon" "on" \
"attr" "Tools for fs extended attributes -- REQUIRED" "on" \
"bash" "GNU bash shell - REQUIRED" "on" \
"bin" "Various system utilities - REQUIRED" "on" \
"bzip2"  "bzip2 compression utility" "on" \
"coreutils" "The core GNU command-line utilities - REQUIRED" "on" \
"cpio" "The GNU cpio backup/archiving utility" "on" \
"cups" "CUPS - printer spooling system" "on" \
"cxxlibs" "C++ shared libraries - REQUIRED" "on" \
"dcron" "Cron daemon - REQUIRED" "on" \
"devs" "Device files found in /dev - REQUIRED" "on" \
"e2fsprogs" "Utilities for ext2/ext3 filesystems - REQUIRED" "on" \
"elvis" "elvis text editor (vi clone) - REQUIRED" "on" \
"etc"  "System config files & utilities - REQUIRED" "on" \
"findutils" "GNU file finding utilities" "on" \
"floppy" "Utilities for using DOS floppies" "on" \
"gawk" "GNU awk pattern scanning language" "on" \
"genpower" "UPS monitoring daemon" "on" \
"gettext" "Programs used to internationalize scripts" "on" \
"getty-ps" "Getty_ps serial login support - OPTIONAL" "on" \
"glibc-solibs" "Runtime glibc support libraries" "on" \
"glibc-zoneinfo" "Configures your time zone" "on" \
"gpm" "Cut and paste text with your mouse" "on" \
"grep" "GNU grep searching tool - REQUIRED" "on" \
"gzip"  "GNU zip compression utility - REQUIRED" "on" \
"hdparm" "Get/Set hard drive parameters" "on" \
"hotplug" "Tools for hotplugging PCI/Cardbus/USB devices" "on" \
"infozip" "zip/unzip archive utilities" "on" \
"jfsutils" "Utilities for IBM's Journaled Filesystem" "on" \
"kbd" "Change keyboard and console mappings" "on" \
"kernel-modules_riscpc" "" "on" \
"kernel-modules_versatile" "" "on" \
"kernel_riscpc" "Linux for Acorn StrongARM RiscPCs" "on" \
"kernel_versatile" "" "on" \
"less" "A text pager utility - REQUIRED" "on" \
"logrotate" "System log rotation utility" "on" \
"minicom" "Serial transfer and modem comm package" "on" \
"mkinitrd" "Tool for building an initial ramdisk" "on" \
"module-init-tools" "Kernel module utilities -- REQUIRED" "on" \
"openssl-solibs" "OpenSSL shared libraries -- REQUIRED" "on" \
"pciutils" "Linux PCI utilities" "on" \
"pcmciautils" "PCMCIA card services for 2.6.x+ kernels" "on" \
"pkgtools" "Slackware package management tools - REQUIRED" "on" \
"procps" "Displays process info - REQUIRED" "on" \
"reiserfsprogs" "Tools for the ReiserFS journaling filesystem" "on" \
"sed" "GNU stream editor -- REQUIRED" "on" \
"shadow" "Shadow password suite -- REQUIRED" "on" \
"sharutils" "GNU shell archive utilities - REQUIRED" "on" \
"slocate" "Locates files on the system" "on" \
"smartmontools" "Hard drive monitoring utilities" "on" \
"sysfsutils" "Utilities for the sysfs filesystem" "on" \
"sysklogd" "Logs system and kernel messages" "on" \
"syslinux" "Loader for making Linux boot floppies" "on" \
"sysvinit" "System V-like INIT programs - REQUIRED" "on" \
"tar" "GNU tar archive utility -- REQUIRED" "on" \
"tcsh" "Extended C shell /bin/tcsh" "on" \
"udev" "System for managing /dev in 2.6 - RECOMMENDED" "on" \
"umsdos-progs" "Utilities needed by the UMSDOS filesystem" "on" \
"usbutils" "Linux USB utilities" "on" \
"utempter" "Library used for writing to utmp/wtmp" "on" \
"util-linux" "Util-linux utilities - REQUIRED" "on" \
"xfsprogs" "Utilities for SGI's XFS filesystem" "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 aaa_base aaa_elflibs acl acorn-fdisk acpid apmd attr bash bin bzip2 coreutils cpio cups cxxlibs dcron devs e2fsprogs elvis etc findutils floppy gawk genpower gettext getty-ps glibc-solibs glibc-zoneinfo gpm grep gzip hdparm hotplug infozip jfsutils kbd kernel-modules_riscpc kernel-modules_versatile kernel_riscpc kernel_versatile less logrotate minicom mkinitrd module-init-tools openssl-solibs pciutils pcmciautils pkgtools procps reiserfsprogs sed shadow sharutils slocate smartmontools sysfsutils sysklogd syslinux sysvinit tar tcsh udev umsdos-progs usbutils utempter util-linux xfsprogs ; do
    echo "$PKG: SKP" >> $TMP/SeTnewtag
  done
  exit
fi
cat /dev/null > $TMP/SeTnewtag
for PKG in aaa_base aaa_elflibs acl acorn-fdisk acpid apmd attr bash bin bzip2 coreutils cpio cups cxxlibs dcron devs e2fsprogs elvis etc findutils floppy gawk genpower gettext getty-ps glibc-solibs glibc-zoneinfo gpm grep gzip hdparm hotplug infozip jfsutils kbd kernel-modules_riscpc kernel-modules_versatile kernel_riscpc kernel_versatile less logrotate minicom mkinitrd module-init-tools openssl-solibs pciutils pcmciautils pkgtools procps reiserfsprogs sed shadow sharutils slocate smartmontools sysfsutils sysklogd syslinux sysvinit tar tcsh udev umsdos-progs usbutils utempter util-linux xfsprogs ; 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
