#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "gstreamer(GStreamer media framework)シリーズの選択"   --checklist "gstreamerシリーズの中からインストールしたいパッケージを 選んでください．カーソルの上下キーで 対象を選択し，space キーでマーク(X)します． Enter キーでインストールを開始します．" 24 72 15 "avtp" "AV転送プロトコル(AVTP)用プラグイン" "on" \
"dssim" "非類似性検証ライブラリ" "on" \
"gst_devtools" "GStreamer用検証ツール" "on" \
"gst_editing_services" "GStreamer編集機能用ライブラリ" "on" \
"gst_libav" "GStreamer用libavプラグイン" "on" \
"gst_omx" "OpenMAX IL用GStreamerプラグイン" "on" \
"gst_plugins_bad" "GStreamer-0.10 Plugin BAD" "on" \
"gst_plugins_base" "GStreamer-0.10 Plugin用基盤" "on" \
"gst_plugins_good" "GStreamer-0.10 Plugins Good" "on" \
"gst_plugins_ugly" "GStreamer-0.10 plugin ugly" "on" \
"gst_python" "GStreamer-0.10用pythonバインディング" "on" \
"gst_rtsp_server" "GStreamer で RTSP サーバを構築するためのライブラリ" "on" \
"gstreamer" "GStreamer-0.10本体" "on" \
"libavtp" "AVTP(Audio Video Transport Protocol)用ライブラリ" "on" \
"libmicrodns" "mDNS用ライブラリ" "on" \
"libnice" "ICE準拠のライブラリ" "on" \
"openh264" "OpenH264ライブラリ" "on" \
"orc" "ORC: Optimized Inner Loop Runtime Compiler" "on" \
"tinyalsa" "TinyALSAライブラリ" "on" \
"xfce4_pulseaudio_plugin" "Xfce4 PulseAudio プラグイン" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in avtp dssim gst_devtools gst_editing_services gst_libav gst_omx gst_plugins_bad gst_plugins_base gst_plugins_good gst_plugins_ugly gst_python gst_rtsp_server gstreamer libavtp libmicrodns libnice openh264 orc tinyalsa xfce4_pulseaudio_plugin  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in avtp dssim gst_devtools gst_editing_services gst_libav gst_omx gst_plugins_bad gst_plugins_base gst_plugins_good gst_plugins_ugly gst_python gst_rtsp_server gstreamer libavtp libmicrodns libnice openh264 orc tinyalsa xfce4_pulseaudio_plugin ; 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

