#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "Select pkgs from multimedia(Tools and libraries for Multimedia)"   --checklist "Select packages to install from multimedia series. Use cursor up/down to select the package, mark(*) by space key. Push Enter to start install." 24 72 15 "FAudio" "FAudio is an XAudio reimplementation" "on" \
"PyOpenGL" "OpenGL for Python" "on" \
"Smooth" "Smooth sound theme" "on" \
"a52dec" "e_title" "on" \
"alsa_firmware" "ALSA firmwares" "on" \
"alsa_oss" "OSS compat-libs" "on" \
"alsa_plugins" "Plugins for ALSA" "on" \
"alsa_utils" "Utilities for ALSA" "on" \
"amf_headers" "stripped down copies of the AMD AMF headers" "on" \
"appstream_glib" "AppStream handling library via GObject" "on" \
"asunder" "asunder CD ripper" "on" \
"audacious" "audacious audio player" "on" \
"audacious_plugins" "Audacious plugins" "on" \
"audiofile" "audiofile" "on" \
"cdparanoia" "CD Ripper CDparanoia" "on" \
"dav1d" "AV1 decode library dav1d" "on" \
"faac" "Free Advanced Audio Codec" "on" \
"faad2" "Free Advanced Audio Decoder" "on" \
"fdk_aac" "Fraunhofer FDK AAC encoder" "on" \
"ffmpeg" "FFmpeg stream audio/video library" "on" \
"firefox" "e_title" "on" \
"flac" "FLAC, A Free Loseless Audio Codec" "on" \
"flac13" "compat. library for Flac-1.3" "on" \
"fluidsynth" "fluidsynth software synthesizer" "on" \
"freerdp" "A remote desktop protocol implementation" "on" \
"gstreamer" "GStreamer-0.10 main parts" "on" \
"intel_mediasdk" "Legacy API for Intel GPUs" "on" \
"jack2" "JACK audio connection Kit ver.2" "on" \
"lame" "MP3 Encoder LAME" "on" \
"libao" "Cross Platform Audio Output Library" "on" \
"libaom" "AOM AV1 codec library" "on" \
"libass" "libass, subtitle library" "on" \
"libbluray" "library for bluray disc" "on" \
"libbluray13" "libbluray version 1.3.x" "on" \
"libcanberra" "libcanberra" "on" \
"libcue" "libcue cue sheet handling library" "on" \
"libdca" "DTS audio decode library" "on" \
"libde265" "OSS impl. of h.265 codec" "on" \
"libdiscid" "e_title" "on" \
"libdv" "libdv:Quaser DV codec" "on" \
"libdvdcss" "DVD CSS Decode Library" "on" \
"libdvdnav" "DVD Navigation Library" "on" \
"libdvdread" "DVD-Video Reading Library" "on" \
"libebml" "C++ library for EBML files" "on" \
"libmad" "MPEG Audio Decoder Library" "on" \
"libmatroska" "c++ library for Matroska files" "on" \
"libmms" "libmms mms/mmsh handling library" "on" \
"libmpeg2" "MPEG-2 Decoder Library" "on" \
"libmusicbrainz" "MusicBrainz Client Library" "on" \
"libogg" "Ogg library for Ogg Vorbis" "on" \
"libopusenc" "library for opusenc/opusdec" "on" \
"libplacebo" "video rendering algorithms libplacebo" "on" \
"libquicktime" "e_title" "on" \
"libsamplerate" "libsamplerate" "on" \
"libsndfile" "libsndfile" "on" \
"libtheora" "libtheora" "on" \
"libvorbis" "libvorbis" "on" \
"libvpl" "Intel Video Processing Library" "on" \
"lollypop" "Lollypop music player" "on" \
"mpg123" "MP3 player mpg123" "on" \
"mplayer" "e_title" "on" \
"mpv" "mpv media player" "on" \
"mutagen" "Mutagen: Python Multimedia tagging library" "on" \
"nv_codec_headers" "Nvidia codecs APIs for FFmpeg" "on" \
"openal_soft" "e_title" "on" \
"opencv" "OpenCV Computer Vision library" "on" \
"opus" "e_title" "on" \
"opus_tools" "tools for Opus codec" "on" \
"opusfile" "opusfile and opusurl libraries" "on" \
"pavucontrol" "e_title" "on" \
"pipewire" "audio/video processing engine Pipewire " "on" \
"pulseaudio" "e_title" "on" \
"pylast" "Last.fm/Libre.fm interface" "on" \
"sbc" "e_title" "on" \
"sdl" "Simple DirectMedia Layer library" "on" \
"sdl2" "SDL library ver2" "on" \
"sdl2_image" "image file loading library for SDL2" "on" \
"sdl_image" "image file loading library for SDL1.2" "on" \
"smplayer" "Qt based MPlayer frontend" "on" \
"smplayer_skins" "e_title" "on" \
"smplayer_themes" "e_title" "on" \
"sound_theme_freedesktop" "FreeDesktop sound theme" "on" \
"soundtouch" "SoundTouch library" "on" \
"soxr" "SoX Resampler library" "on" \
"speex" "Speex audio codec" "on" \
"speexdsp" "Speex DSP library" "on" \
"taglib" "ID3 tag library" "on" \
"totem_pl_parser" "e_title" "on" \
"v4l_utils" "Linuxでビデオキャプチャー機能を利用するためのユーティリティ&" "on" \
"vidcutter" "simple video editor Vidcutter" "on" \
"vlc" "VLC media player" "on" \
"vorbis_tools" "ogg vorbis tool" "on" \
"vpl_gpu_rt" "Intel VPL/GPU runtime " "on" \
"wavpack" "wavpack audio codec" "on" \
"wireplumber" "Session/policy manager implementation for PipeWire" "on" \
"x264" "H.264/AVC encoder" "on" \
"x265" "x265 encoder library" "on" \
"xevd" "eXtra-fast Essential Video Decoder" "on" \
"xeve" "eXtra-fast Essential Video Encoder " "on" \
"xorriso" "XORRISO CD/DVD utility" "on" \
"xvidcore" "Xvid video codec" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in FAudio PyOpenGL Smooth a52dec alsa_firmware alsa_oss alsa_plugins alsa_utils amf_headers appstream_glib asunder audacious audacious_plugins audiofile cdparanoia dav1d faac faad2 fdk_aac ffmpeg firefox flac flac13 fluidsynth freerdp gstreamer intel_mediasdk jack2 lame libao libaom libass libbluray libbluray13 libcanberra libcue libdca libde265 libdiscid libdv libdvdcss libdvdnav libdvdread libebml libmad libmatroska libmms libmpeg2 libmusicbrainz libogg libopusenc libplacebo libquicktime libsamplerate libsndfile libtheora libvorbis libvpl lollypop mpg123 mplayer mpv mutagen nv_codec_headers openal_soft opencv opus opus_tools opusfile pavucontrol pipewire pulseaudio pylast sbc sdl sdl2 sdl2_image sdl_image smplayer smplayer_skins smplayer_themes sound_theme_freedesktop soundtouch soxr speex speexdsp taglib totem_pl_parser v4l_utils vidcutter vlc vorbis_tools vpl_gpu_rt wavpack wireplumber x264 x265 xevd xeve xorriso xvidcore  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in FAudio PyOpenGL Smooth a52dec alsa_firmware alsa_oss alsa_plugins alsa_utils amf_headers appstream_glib asunder audacious audacious_plugins audiofile cdparanoia dav1d faac faad2 fdk_aac ffmpeg firefox flac flac13 fluidsynth freerdp gstreamer intel_mediasdk jack2 lame libao libaom libass libbluray libbluray13 libcanberra libcue libdca libde265 libdiscid libdv libdvdcss libdvdnav libdvdread libebml libmad libmatroska libmms libmpeg2 libmusicbrainz libogg libopusenc libplacebo libquicktime libsamplerate libsndfile libtheora libvorbis libvpl lollypop mpg123 mplayer mpv mutagen nv_codec_headers openal_soft opencv opus opus_tools opusfile pavucontrol pipewire pulseaudio pylast sbc sdl sdl2 sdl2_image sdl_image smplayer smplayer_skins smplayer_themes sound_theme_freedesktop soundtouch soxr speex speexdsp taglib totem_pl_parser v4l_utils vidcutter vlc vorbis_tools vpl_gpu_rt wavpack wireplumber x264 x265 xevd xeve xorriso xvidcore ; 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

