#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "select pkgs from xapps(current apps for X)" \
  --checklist "select packages from xapps series. \
You can move cursor with UP/DOWN key and push space \
key to select pkgs. After finish selecting, \
push Enter to start installation. " 24 72 15 \
"GConf" "" "on" \
"GraphicsMagick" "" "on" \
"Gtk" "" "on" \
"ImageMagick7" "" "on" \
"Imath" "Imath" "on" \
"ORBit2" "" "on" \
"SDL" "" "on" \
"aalib" "ASCII Art library" "on" \
"at_spi2_core" "" "on" \
"atk" "GLib Accessibility Toolkit" "off" \
"cairo" "Cairo, A 2D Graphics Library" "off" \
"dbus" "D-BUS, An IPC Library" "on" \
"dbus_glib" "D-Bus glib binding" "on" \
"dict" "" "on" \
"djvulibre" "OSS version of Djvu viewer" "on" \
"duktape" "duktape" "on" \
"eggx" "" "on" \
"emacs" "emacs and related tools" "off" \
"epdfview" "simple PDF viewer: epdfview" "on" \
"filezilla" "filezilla" "on" \
"firefox" "" "on" \
"gamin" "gamin : another file alternate monitor" "on" \
"gdk_pixbuf" "" "on" \
"gdk_pixbuf_xlib" "gdk_pixbuf_xlib" "on" \
"ghostscript" "ESP Ghostsciprt" "on" \
"gimp" "GIMP Image Manipulator" "on" \
"gnuplot" "gnuplot 4.0" "on" \
"gobject_introspection" "" "on" \
"gtk+_2" "GTK+ Toolkit Library 2.x" "off" \
"hexchat" "IRC chat program" "on" \
"hicolor_icon_theme" "fallback theme for icons" "on" \
"hunspell" "" "on" \
"icon_naming_utils" "icon naming utilities" "off" \
"jasper" "jasper library" "on" \
"lcms" "litteleCMS" "off" \
"libadwaita" "libadwaita" "on" \
"libcroco" "" "on" \
"libdbusmenu" "" "on" \
"libdex" "libdex" "on" \
"libexif" "libexif" "off" \
"libffi" "" "on" \
"libfilezilla" "libfilezilla" "on" \
"libgd2" "Graphics generation Library GD" "on" \
"libglade" "Glade Runtime Library" "off" \
"libmypaint" "libmypaint" "on" \
"libndp" "libndp" "off" \
"libpanel" "libpanel" "on" \
"librsvg" "library for svg" "on" \
"libsexy" "" "on" \
"libwebp" "" "on" \
"libwmf" "Library for Windows Meta File" "on" \
"m17n_db" "" "on" \
"m17n_lib" "" "on" \
"mozjs115" "" "on" \
"mupdf" "mupdf" "on" \
"netpbm" "" "on" \
"node" "node" "on" \
"nspr" "NSPR(NetScape Portable Runtime)library" "on" \
"nss" "NSS(Network Security Service)library" "on" \
"openexr" "OpenEXR: HDRI library" "on" \
"pango" "GTK+ I18N Text Rendering Library" "off" \
"pangox_compat" "" "on" \
"polkit" "" "off" \
"poppler" "popler: shared library for PDF" "on" \
"poppler_data" "poppler data" "on" \
"potrace" "" "on" \
"print" "printing tools" "on" \
"sane_backends" "sane-backends 1.0.17" "on" \
"shared_mime_info" "shared-mime-info" "off" \
"sylpheed" "lightweight and user-friendly e-mail client" "on" \
"sysprof" "sysprof" "on" \
"tango_icon_theme" "Tango Icon Theme" "off" \
"thunderbird" "" "on" \
"wxWidgets" "wxWdigets" "on" \
"xpenguins" "XPenguins" "on" \
"xplanet" "Planetary Body Renderer xplanet" "on" \
"xsane" "Xsane image scan utility" "on" \
"xscreensaver" "Screen Saver" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in GConf GraphicsMagick Gtk ImageMagick7 Imath ORBit2 SDL aalib at_spi2_core atk cairo dbus dbus_glib dict djvulibre duktape eggx emacs epdfview filezilla firefox gamin gdk_pixbuf gdk_pixbuf_xlib ghostscript gimp gnuplot gobject_introspection gtk+_2 hexchat hicolor_icon_theme hunspell icon_naming_utils jasper lcms libadwaita libcroco libdbusmenu libdex libexif libffi libfilezilla libgd2 libglade libmypaint libndp libpanel librsvg libsexy libwebp libwmf m17n_db m17n_lib mozjs115 mupdf netpbm node nspr nss openexr pango pangox_compat polkit poppler poppler_data potrace print sane_backends shared_mime_info sylpheed sysprof tango_icon_theme thunderbird wxWidgets xpenguins xplanet xsane xscreensaver  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in GConf GraphicsMagick Gtk ImageMagick7 Imath ORBit2 SDL aalib at_spi2_core atk cairo dbus dbus_glib dict djvulibre duktape eggx emacs epdfview filezilla firefox gamin gdk_pixbuf gdk_pixbuf_xlib ghostscript gimp gnuplot gobject_introspection gtk+_2 hexchat hicolor_icon_theme hunspell icon_naming_utils jasper lcms libadwaita libcroco libdbusmenu libdex libexif libffi libfilezilla libgd2 libglade libmypaint libndp libpanel librsvg libsexy libwebp libwmf m17n_db m17n_lib mozjs115 mupdf netpbm node nspr nss openexr pango pangox_compat polkit poppler poppler_data potrace print sane_backends shared_mime_info sylpheed sysprof tango_icon_theme thunderbird wxWidgets xpenguins xplanet xsane xscreensaver  ; do
    if grep "$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
