summaryrefslogtreecommitdiffstats
path: root/abs/extra
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/extra
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/extra')
-rw-r--r--abs/extra/abs/ChangeLog41
-rw-r--r--abs/extra/abs/PKGBUILD33
-rw-r--r--abs/extra/abs/abs.install15
-rw-r--r--abs/extra/apache-ant/PKGBUILD41
-rw-r--r--abs/extra/apcupsd/PKGBUILD38
-rwxr-xr-xabs/extra/apcupsd/apcupsd44
-rw-r--r--abs/extra/apcupsd/apcupsd.conf325
-rw-r--r--abs/extra/apcupsd/run3
-rw-r--r--abs/extra/atomicparsley/PKGBUILD18
-rw-r--r--abs/extra/autofs/Changelog2
-rw-r--r--abs/extra/autofs/PKGBUILD54
-rw-r--r--abs/extra/autofs/auto.master6
-rw-r--r--abs/extra/autofs/auto.misc7
-rw-r--r--abs/extra/autofs/autofs43
-rw-r--r--abs/extra/autofs/autofs.conf.d4
-rw-r--r--abs/extra/autofs/autofs.install5
-rwxr-xr-xabs/extra/autofs/finish3
-rw-r--r--abs/extra/autofs/heimdal.patch34
-rwxr-xr-xabs/extra/autofs/run5
-rw-r--r--abs/extra/beautiful-soup/PKGBUILD19
-rw-r--r--abs/extra/bluez-firmware/PKGBUILD23
-rw-r--r--abs/extra/bluez-hcidump/PKGBUILD22
-rw-r--r--abs/extra/bluez-python/PKGBUILD17
-rw-r--r--abs/extra/bluez/PKGBUILD53
-rw-r--r--abs/extra/bluez/bluetooth.conf.d33
-rw-r--r--abs/extra/bluez/rc.bluetooth106
-rw-r--r--abs/extra/bmp/0.9.7-visualization.patch12
-rw-r--r--abs/extra/bmp/0.9.7.1-visualization.patch12
-rw-r--r--abs/extra/bmp/PKGBUILD25
-rw-r--r--abs/extra/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch108
-rw-r--r--abs/extra/boost/0001-date_time-gcc-4.3-fix.patch25
-rw-r--r--abs/extra/boost/PKGBUILD63
-rw-r--r--abs/extra/boost/serialization_gcc43.patch44
-rw-r--r--abs/extra/cabextract/PKGBUILD22
-rwxr-xr-xabs/extra/cddb-py/PKGBUILD20
-rw-r--r--abs/extra/community/athcool/PKGBUILD24
-rw-r--r--abs/extra/community/athcool/athcool35
-rw-r--r--abs/extra/community/athcool/athcool.install18
-rwxr-xr-xabs/extra/community/athcool/finish3
-rw-r--r--abs/extra/community/athcool/run2
-rw-r--r--abs/extra/community/cksfv/PKGBUILD21
-rw-r--r--abs/extra/community/codecs/PKGBUILD33
-rw-r--r--abs/extra/community/cpulimit/PKGBUILD20
-rw-r--r--abs/extra/community/cwiid-svn/PKGBUILD49
-rw-r--r--abs/extra/community/cwiid-svn/cwiid.install16
-rw-r--r--abs/extra/community/deluge/PKGBUILD25
-rw-r--r--abs/extra/community/desktop-file-utils/ChangeLog7
-rw-r--r--abs/extra/community/desktop-file-utils/PKGBUILD20
-rw-r--r--abs/extra/community/djmount/PKGBUILD25
-rw-r--r--abs/extra/community/djmount/djmount.confd2
-rwxr-xr-xabs/extra/community/djmount/djmount.rcd39
-rw-r--r--abs/extra/community/enca/PKGBUILD23
-rw-r--r--abs/extra/community/firefox-i18n/PKGBUILD87
-rw-r--r--abs/extra/community/firefox/PKGBUILD76
-rw-r--r--abs/extra/community/firefox/browser-app-makefile.patch11
-rw-r--r--abs/extra/community/firefox/browser-defaulturls.patch26
-rw-r--r--abs/extra/community/firefox/firefox-safe.desktop11
-rw-r--r--abs/extra/community/firefox/firefox-version.patch11
-rw-r--r--abs/extra/community/firefox/firefox.desktop83
-rw-r--r--abs/extra/community/firefox/firefox.install24
-rw-r--r--abs/extra/community/firefox/mozconfig35
-rw-r--r--abs/extra/community/firefox/mozilla-firefox-1.0-lang.patch12
-rw-r--r--abs/extra/community/flashplugin/PKGBUILD40
-rw-r--r--abs/extra/community/fluidsynth/PKGBUILD25
-rw-r--r--abs/extra/community/fluxconf/PKGBUILD24
-rw-r--r--abs/extra/community/foldingathome/PKGBUILD26
-rw-r--r--abs/extra/community/foldingathome/foldingathome.install47
-rw-r--r--abs/extra/community/foldingathome/run26
-rw-r--r--abs/extra/community/gnash-common/PKGBUILD40
-rw-r--r--abs/extra/community/gnash-gtk/PKGBUILD40
-rw-r--r--abs/extra/community/gstreamer0.10-base-plugins/PKGBUILD33
-rw-r--r--abs/extra/community/gstreamer0.10-base/PKGBUILD28
-rw-r--r--abs/extra/community/gstreamer0.10/PKGBUILD33
-rw-r--r--abs/extra/community/gstreamer0.10/bgo555631.patch88
-rw-r--r--abs/extra/community/gtkglext/PKGBUILD25
-rw-r--r--abs/extra/community/gtkglext/gtkglext-1.0.6-pangox.patch30
-rw-r--r--abs/extra/community/ircii/PKGBUILD16
-rw-r--r--abs/extra/community/jdk/PKGBUILD50
-rw-r--r--abs/extra/community/jdk/jdk.install14
-rw-r--r--abs/extra/community/jdk/jdk.profile3
-rw-r--r--abs/extra/community/jre/PKGBUILD58
-rw-r--r--abs/extra/community/jre/jre.install26
-rw-r--r--abs/extra/community/jre/jre.profile4
-rw-r--r--abs/extra/community/libdvbpsi/PKGBUILD25
-rw-r--r--abs/extra/community/libelf/PKGBUILD22
-rw-r--r--abs/extra/community/libmatroska/PKGBUILD21
-rw-r--r--abs/extra/community/libmodplug/PKGBUILD23
-rw-r--r--abs/extra/community/libmpcdec/PKGBUILD22
-rw-r--r--abs/extra/community/libnetfilter_queue/PKGBUILD21
-rw-r--r--abs/extra/community/libnfnetlink/PKGBUILD18
-rw-r--r--abs/extra/community/liboil/PKGBUILD25
-rw-r--r--abs/extra/community/libshout/PKGBUILD23
-rw-r--r--abs/extra/community/libstdc++5/PKGBUILD41
-rw-r--r--abs/extra/community/libstdc++5/gcc-3.4.3-no_multilib_amd64.patch11
-rw-r--r--abs/extra/community/libv4l/PKGBUILD19
-rw-r--r--abs/extra/community/lua/PKGBUILD30
-rw-r--r--abs/extra/community/lua/lua-5.1-cflags.diff13
-rw-r--r--abs/extra/community/lua/lua-5.1.3-official-patch1.diff12
-rw-r--r--abs/extra/community/lua/lua-5.1.3-official-patch2.diff11
-rw-r--r--abs/extra/community/lua/lua-5.1.3-official-patch3.diff21
-rw-r--r--abs/extra/community/lua/lua-5.1.3-official-patch4.diff18
-rw-r--r--abs/extra/community/lua/lua-arch.patch55
-rw-r--r--abs/extra/community/mmv/PKGBUILD35
-rw-r--r--abs/extra/community/mmv/mmv.install19
-rw-r--r--abs/extra/community/moblock/MoBlock-nfq.sh.patch53
-rwxr-xr-xabs/extra/community/moblock/PKGBUILD56
-rw-r--r--abs/extra/community/moblock/config30
-rwxr-xr-xabs/extra/community/moblock/moblock70
-rwxr-xr-xabs/extra/community/moblock/moblock-update174
-rw-r--r--abs/extra/community/moblock/moblock.install30
-rw-r--r--abs/extra/community/moblock/moblock.logrotate11
-rw-r--r--abs/extra/community/moblock/moblock_0.9_rc2.patch912
-rw-r--r--abs/extra/community/moblock/moblock_include.patch10
-rw-r--r--abs/extra/community/moblockcontrol/PKGBUILD42
-rw-r--r--abs/extra/community/moblockcontrol/moblock-control-update.sh3
-rw-r--r--abs/extra/community/moblockcontrol/moblock_control.patch11
-rw-r--r--abs/extra/community/moblockcontrol/moblockcontrol.install28
-rw-r--r--abs/extra/community/mobloquer/PKGBUILD26
-rw-r--r--abs/extra/community/motion-svn/PKGBUILD42
-rw-r--r--abs/extra/community/motion-svn/motion-svn.install11
-rw-r--r--abs/extra/community/motion-svn/rc.motion36
-rw-r--r--abs/extra/community/mozplugger/ChangeLog7
-rw-r--r--abs/extra/community/mozplugger/PKGBUILD26
-rw-r--r--abs/extra/community/mozplugger/mozplugger.install15
-rw-r--r--abs/extra/community/mpc/ChangeLog15
-rw-r--r--abs/extra/community/mpc/PKGBUILD26
-rw-r--r--abs/extra/community/mpd/PKGBUILD45
-rwxr-xr-xabs/extra/community/mpd/mpd42
-rw-r--r--abs/extra/community/mpd/mpd.install23
-rw-r--r--abs/extra/community/mythpywii/PKGBUILD18
-rw-r--r--abs/extra/community/mythtv-vdpau/2.6.28_dvb_api_version.diff22
-rw-r--r--abs/extra/community/mythtv-vdpau/PKGBUILD102
-rw-r--r--abs/extra/community/mythtv-vdpau/PKGBUILD.orig102
-rw-r--r--abs/extra/community/mythtv-vdpau/QUICKSTART.archlinux69
-rwxr-xr-xabs/extra/community/mythtv-vdpau/menu-xml/HOST_SETTINGS.xml87
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/is.xml3
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/library.xml.patch15
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/linhes.xml54
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/mainmenu.xml.patch39
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/mythbackup.xml20
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/mythrestore.xml20
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/optical_menu.xml.patch15
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/original/create_patch.sh5
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/setup.xml111
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/siriusmenu.xml419
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/util_menu.xml.patch17
-rw-r--r--abs/extra/community/mythtv-vdpau/menu-xml/xmmenu.xml574
-rw-r--r--abs/extra/community/mythtv-vdpau/mpegpspatch66
-rwxr-xr-xabs/extra/community/mythtv-vdpau/mythbackend38
-rw-r--r--abs/extra/community/mythtv-vdpau/mythbackend.lr9
-rw-r--r--abs/extra/community/mythtv-vdpau/mythfrontend.lr9
-rw-r--r--abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch125
-rw-r--r--abs/extra/community/mythtv-vdpau/myththemedmenu.h.patch25
-rw-r--r--abs/extra/community/mythtv-vdpau/mythtv.install61
-rw-r--r--abs/extra/community/mythtv-vdpau/pretty2
-rw-r--r--abs/extra/community/mythtv-vdpau/smolt_jump.patch9
-rw-r--r--abs/extra/community/ncdu/PKGBUILD19
-rw-r--r--abs/extra/community/nvclock/PKGBUILD27
-rw-r--r--abs/extra/community/nvclock/nvclock-0.8b4-buildfix.patch16
-rw-r--r--abs/extra/community/nvidia-beta/PKGBUILD44
-rw-r--r--abs/extra/community/nvidia-beta/nvidia.install22
-rw-r--r--abs/extra/community/nvidia-utils-beta/PKGBUILD80
-rw-r--r--abs/extra/community/nvidia-utils-beta/nvidia.install36
-rw-r--r--abs/extra/community/nvidia-utils-beta/supported-cards.txt272
-rw-r--r--abs/extra/community/nxtvepg.tar.gzbin0 -> 2018 bytes
-rw-r--r--abs/extra/community/nxtvepg/PKGBUILD45
-rw-r--r--abs/extra/community/nxtvepg/nxtvepg-icon-16.pngbin0 -> 193 bytes
-rw-r--r--abs/extra/community/nxtvepg/nxtvepg-icon-32.pngbin0 -> 267 bytes
-rw-r--r--abs/extra/community/nxtvepg/nxtvepg-icon-48.pngbin0 -> 333 bytes
-rw-r--r--abs/extra/community/nxtvepg/nxtvepg.desktop10
-rw-r--r--abs/extra/community/nxtvepg/tcl_85.patch13
-rwxr-xr-xabs/extra/community/nzbperl/PKGBUILD16
-rw-r--r--abs/extra/community/projectx/PKGBUILD45
-rw-r--r--abs/extra/community/projectx/projectx10
-rw-r--r--abs/extra/community/pyxdg/PKGBUILD18
-rw-r--r--abs/extra/community/screen/PKGBUILD41
-rw-r--r--abs/extra/community/screen/screen.install27
-rw-r--r--abs/extra/community/screen/screen.pam1
-rw-r--r--abs/extra/community/smplayer/ChangeLog62
-rw-r--r--abs/extra/community/smplayer/PKGBUILD30
-rw-r--r--abs/extra/community/torrentflux/PKGBUILD51
-rw-r--r--abs/extra/community/torrentflux/torrentflux.install60
-rw-r--r--abs/extra/community/transmission-cli/ChangeLog60
-rw-r--r--abs/extra/community/transmission-cli/PKGBUILD35
-rw-r--r--abs/extra/community/transmission-cli/transmission-cli.install9
-rw-r--r--abs/extra/community/transmission-cli/transmissiond37
-rw-r--r--abs/extra/community/transmission-cli/transmissiond.conf1
-rw-r--r--abs/extra/community/tre/PKGBUILD19
-rw-r--r--abs/extra/community/unrar/PKGBUILD23
-rw-r--r--abs/extra/community/unrar/unrar-3.5.2-optimalization-fix.patch12
-rw-r--r--abs/extra/community/uudeview/PKGBUILD30
-rw-r--r--abs/extra/community/vlc/PKGBUILD71
-rw-r--r--abs/extra/community/vsftpd/PKGBUILD52
-rw-r--r--abs/extra/community/vsftpd/run13
-rw-r--r--abs/extra/community/vsftpd/vsftpd.d40
-rw-r--r--abs/extra/community/vsftpd/vsftpd.install22
-rw-r--r--abs/extra/community/vsftpd/vsftpd.xinetd10
-rw-r--r--abs/extra/community/wiiuse/PKGBUILD26
-rw-r--r--abs/extra/community/wiiuse/wiiuse.install17
-rw-r--r--abs/extra/community/xbmc-svn/CHANGELOG110
-rw-r--r--abs/extra/community/xbmc-svn/Lircmap.xml233
-rw-r--r--abs/extra/community/xbmc-svn/PKGBUILD139
-rw-r--r--abs/extra/community/xbmc-svn/__changelog1
-rw-r--r--abs/extra/community/xbmc-svn/libcurl-not-in-lib64.patch13
-rw-r--r--abs/extra/community/xbmc-svn/xbmc-svn.install13
-rw-r--r--abs/extra/community/xbmc/ChangeLog64
-rw-r--r--abs/extra/community/xbmc/PKGBUILD118
-rw-r--r--abs/extra/community/xbmc/xbmc.install9
-rw-r--r--abs/extra/community/xine-lib-vdpau-svn/PKGBUILD47
-rw-r--r--abs/extra/community/zvbi/PKGBUILD21
-rw-r--r--abs/extra/conky/PKGBUILD29
-rw-r--r--abs/extra/crda/PKGBUILD50
-rw-r--r--abs/extra/crda/crda.conf.d4
-rwxr-xr-xabs/extra/crda/crda.rc26
-rw-r--r--abs/extra/cvs/PKGBUILD20
-rw-r--r--abs/extra/ddclient/ChangeLog22
-rw-r--r--abs/extra/ddclient/PKGBUILD35
-rw-r--r--abs/extra/ddclient/ddclient.conf.d2
-rw-r--r--abs/extra/ddclient/ddclient.install41
-rw-r--r--abs/extra/ddclient/ddclient.rc37
-rw-r--r--abs/extra/diffstat/PKGBUILD21
-rw-r--r--abs/extra/docbook-xml/PKGBUILD268
-rw-r--r--abs/extra/docbook-xml/docbook-xml.install46
-rw-r--r--abs/extra/docbook-xml/docbook.patch226
-rw-r--r--abs/extra/docbook-xsl/PKGBUILD37
-rw-r--r--abs/extra/docbook-xsl/docbook-xsl.install47
-rw-r--r--abs/extra/doxygen/PKGBUILD25
-rw-r--r--abs/extra/enchant/PKGBUILD21
-rw-r--r--abs/extra/ethtool/PKGBUILD22
-rw-r--r--abs/extra/evrouter/PKGBUILD18
-rw-r--r--abs/extra/exo/PKGBUILD29
-rw-r--r--abs/extra/exo/exo.install11
-rw-r--r--abs/extra/fakeroot/PKGBUILD28
-rw-r--r--abs/extra/fakeroot/fakeroot.install30
-rwxr-xr-xabs/extra/fceu/PKGBUILD24
-rw-r--r--abs/extra/fftw/PKGBUILD48
-rw-r--r--abs/extra/fftw/fftw.install22
-rw-r--r--abs/extra/frozen-bubble/PKGBUILD31
-rw-r--r--abs/extra/frozen-bubble/frozen-bubble.desktop9
-rw-r--r--abs/extra/fuppes-svn/PKGBUILD52
-rw-r--r--abs/extra/fuppes-svn/PKGBUILD.orig52
-rw-r--r--abs/extra/fuppes-svn/fuppes-r634-archlinux.patch93
-rw-r--r--abs/extra/fuppes-svn/fuppes.cfg216
-rw-r--r--abs/extra/fuppes-svn/fuppes.ch2
-rw-r--r--abs/extra/fuppes-svn/fuppes.diff25
-rw-r--r--abs/extra/fuppes-svn/fuppes.install20
-rw-r--r--abs/extra/fuppes-svn/fuppes.lr9
-rwxr-xr-xabs/extra/fuppes-svn/run2
-rw-r--r--abs/extra/gconf/01_xml-gettext-domain.patch299
-rw-r--r--abs/extra/gconf/05_from_vuntz_gconf2-pk-default-path.patch12
-rw-r--r--abs/extra/gconf/PKGBUILD49
-rwxr-xr-xabs/extra/gconf/gconf-merge-schema34
-rw-r--r--abs/extra/gconf/gconf-reload.patch20
-rw-r--r--abs/extra/gconf/gconf.install26
-rwxr-xr-xabs/extra/gconf/gconfpkg50
-rw-r--r--abs/extra/gconf/xml-gettext-domain.patch367
-rw-r--r--abs/extra/gd/PKGBUILD23
-rw-r--r--abs/extra/gdl/PKGBUILD23
-rw-r--r--abs/extra/glew/PKGBUILD23
-rw-r--r--abs/extra/gnome-desktop/PKGBUILD27
-rw-r--r--abs/extra/gnome-doc-utils/PKGBUILD22
-rw-r--r--abs/extra/gnome-keyring/PKGBUILD34
-rw-r--r--abs/extra/gnome-keyring/gnome-keyring.install19
-rw-r--r--abs/extra/gnome-keyring/gnome-keyring.service3
-rw-r--r--abs/extra/gnome-menus/PKGBUILD26
-rw-r--r--abs/extra/gnome-menus/menus.patch25
-rw-r--r--abs/extra/gnome-mime-data/PKGBUILD25
-rw-r--r--abs/extra/gnome-python-extras/PKGBUILD23
-rw-r--r--abs/extra/gnome-python-extras/gnome-python-extras-2.19.1-pkg-config.patch61
-rw-r--r--abs/extra/gnome-python-extras/gnome-python-extras-2.19.1-xulrunner.patch22
-rw-r--r--abs/extra/gnome-python/PKGBUILD24
-rw-r--r--abs/extra/gnome-screensaver/PKGBUILD47
-rw-r--r--abs/extra/gnome-screensaver/__changelog5
-rw-r--r--abs/extra/gnome-screensaver/bug564548.patch13
-rw-r--r--abs/extra/gnome-screensaver/gnome-screensaver.install32
-rw-r--r--abs/extra/gnome-screensaver/gnome-screensaver.pam3
-rw-r--r--abs/extra/gnome-screensaver/gscreensavers200
-rw-r--r--abs/extra/gnome-vfs/PKGBUILD39
-rw-r--r--abs/extra/gnome-vfs/gnome-vfs.install17
-rw-r--r--abs/extra/gnome-vfs/hal-show-volume-names.patch46
-rw-r--r--abs/extra/gnuplot/PKGBUILD34
-rw-r--r--abs/extra/gpac/ChangeLog9
-rwxr-xr-xabs/extra/gpac/PKGBUILD27
-rwxr-xr-xabs/extra/gpac/gpac-0.4.2-ffmpeg-errno.patch20
-rw-r--r--abs/extra/graphload/PKGBUILD16
-rwxr-xr-xabs/extra/graphload/graphload.sh17
-rw-r--r--abs/extra/gtk-doc/PKGBUILD23
-rw-r--r--abs/extra/gtk-doc/gtk-doc.install14
-rw-r--r--abs/extra/gtk-sharp-2/PKGBUILD28
-rw-r--r--abs/extra/gtkspell/PKGBUILD23
-rw-r--r--abs/extra/guile/PKGBUILD26
-rw-r--r--abs/extra/guile/guile.install27
-rw-r--r--abs/extra/gvim/PKGBUILD84
-rw-r--r--abs/extra/gvim/fetch_patches.sh61
-rw-r--r--abs/extra/gvim/gvim.desktop42
-rw-r--r--abs/extra/gvim/gvim.install24
-rw-r--r--abs/extra/hd2u/PKGBUILD21
-rw-r--r--abs/extra/hddtemp/ChangeLog14
-rw-r--r--abs/extra/hddtemp/PKGBUILD39
-rw-r--r--abs/extra/hddtemp/hddtemp39
-rw-r--r--abs/extra/hddtemp/hddtemp.confd2
-rwxr-xr-xabs/extra/hdhgrab/PKGBUILD19
-rw-r--r--abs/extra/hicolor-icon-theme/PKGBUILD19
-rw-r--r--abs/extra/hspell/PKGBUILD23
-rw-r--r--abs/extra/htop/ChangeLog8
-rw-r--r--abs/extra/htop/PKGBUILD28
-rw-r--r--abs/extra/htop/htop-treeview.patch12
-rw-r--r--abs/extra/hunspell/ChangeLog6
-rw-r--r--abs/extra/hunspell/PKGBUILD23
-rw-r--r--abs/extra/i2c-tools/Makefile.patch19
-rw-r--r--abs/extra/i2c-tools/PKGBUILD21
-rw-r--r--abs/extra/icon-naming-utils/PKGBUILD24
-rw-r--r--abs/extra/id3lib/PKGBUILD29
-rw-r--r--abs/extra/id3lib/id3lib-3.8.3-CVE-2007-4460.patch49
-rw-r--r--abs/extra/id3lib/id3lib-3.8.3-gcc-4.3.patch83
-rw-r--r--abs/extra/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff39
-rw-r--r--abs/extra/ifenslave/PKGBUILD20
-rw-r--r--abs/extra/ifenslave/bonding.conf.d12
-rw-r--r--abs/extra/inadyn/PKGBUILD18
-rw-r--r--abs/extra/inadyn/run4
-rw-r--r--abs/extra/irqbalance/Makefile.irqbalance13
-rw-r--r--abs/extra/irqbalance/PKGBUILD32
-rw-r--r--abs/extra/irqbalance/irqbalance.conf.d6
-rw-r--r--abs/extra/irqbalance/irqbalance.rc.d46
-rw-r--r--abs/extra/iso-codes/PKGBUILD19
-rw-r--r--abs/extra/iw/PKGBUILD20
-rw-r--r--abs/extra/jade/PKGBUILD31
-rw-r--r--abs/extra/joyutils/PKGBUILD31
-rw-r--r--abs/extra/ladspa/PKGBUILD25
-rw-r--r--abs/extra/ladspa/hardcode-path.patch28
-rw-r--r--abs/extra/lcdproc/PKGBUILD29
-rw-r--r--abs/extra/lcdproc/__changelog1
-rwxr-xr-xabs/extra/lcdproc/lcdd38
-rw-r--r--abs/extra/lcdproc/lcdproc-add-serdisplib1353
-rw-r--r--abs/extra/libbonobo/PKGBUILD30
-rw-r--r--abs/extra/libbonobo/bonobo-activation-config.xml14
-rw-r--r--abs/extra/libbonobo/libbonobo.install23
-rw-r--r--abs/extra/libbonoboui/PKGBUILD24
-rw-r--r--abs/extra/libcdio/PKGBUILD26
-rw-r--r--abs/extra/libdvdcss/PKGBUILD22
-rw-r--r--abs/extra/libdvdnav/PKGBUILD22
-rw-r--r--abs/extra/libebml/PKGBUILD23
-rw-r--r--abs/extra/libftdi/PKGBUILD19
-rw-r--r--abs/extra/libgda/Changelog2
-rw-r--r--abs/extra/libgda/PKGBUILD23
-rw-r--r--abs/extra/libgda/bdb43.patch18
-rw-r--r--abs/extra/libgda/libgda.install16
-rw-r--r--abs/extra/libgdiplus/PKGBUILD22
-rw-r--r--abs/extra/libgdiplus/system-cairo.patch67
-rw-r--r--abs/extra/libgksu/PKGBUILD29
-rw-r--r--abs/extra/libgksu/libgksu.install17
-rw-r--r--abs/extra/libglade/PKGBUILD28
-rw-r--r--abs/extra/libglade/glade.install25
-rw-r--r--abs/extra/libglade/libglade-2.0.1-nowarning.patch39
-rw-r--r--abs/extra/libgnome/PKGBUILD28
-rw-r--r--abs/extra/libgnome/libgnome.install17
-rw-r--r--abs/extra/libgnomecanvas/PKGBUILD22
-rw-r--r--abs/extra/libgnomekbd/PKGBUILD28
-rw-r--r--abs/extra/libgnomekbd/libgnomekbd.install17
-rw-r--r--abs/extra/libgnomeui/PKGBUILD24
-rw-r--r--abs/extra/libgtkhtml/PKGBUILD22
-rw-r--r--abs/extra/libgtop/PKGBUILD28
-rw-r--r--abs/extra/libgtop/libgtop.install13
-rw-r--r--abs/extra/libidl2/PKGBUILD27
-rw-r--r--abs/extra/libidl2/libidl2.install13
-rw-r--r--abs/extra/libmikmod/PKGBUILD22
-rw-r--r--abs/extra/libmms/PKGBUILD21
-rw-r--r--abs/extra/libmpcdec/PKGBUILD22
-rw-r--r--abs/extra/libmrss/PKGBUILD20
-rw-r--r--abs/extra/libnl/PKGBUILD21
-rw-r--r--abs/extra/libnl/ulong_max.patch11
-rw-r--r--abs/extra/libnotify/PKGBUILD22
-rw-r--r--abs/extra/libnxml/PKGBUILD22
-rw-r--r--abs/extra/libsamplerate/ChangeLog14
-rw-r--r--abs/extra/libsamplerate/PKGBUILD23
-rw-r--r--abs/extra/libxfce4util/PKGBUILD25
-rw-r--r--abs/extra/libxklavier/PKGBUILD24
-rw-r--r--abs/extra/libxp/PKGBUILD24
-rw-r--r--abs/extra/lm_sensors/PKGBUILD41
-rw-r--r--abs/extra/lm_sensors/fancontrol.rc34
-rw-r--r--abs/extra/lm_sensors/sensors-detect.patch61
-rw-r--r--abs/extra/lm_sensors/sensors.install12
-rw-r--r--abs/extra/lm_sensors/sensors.rc127
-rw-r--r--abs/extra/lynx/PKGBUILD23
-rw-r--r--abs/extra/make/PKGBUILD20
-rw-r--r--abs/extra/mc/PKGBUILD55
-rw-r--r--abs/extra/mc/mc-4.6.1-bash-all.patch33
-rw-r--r--abs/extra/mc/mc-4.6.1-find.patch155
-rw-r--r--abs/extra/mc/mc-4.6.1-invalid-mtime.patch30
-rw-r--r--abs/extra/mc/mc-4.6.1-largefile.patch194
-rw-r--r--abs/extra/mc/mc-4.6.1-nonblock.patch11
-rw-r--r--abs/extra/mdbtools/PKGBUILD24
-rw-r--r--abs/extra/mdbtools/gmdb2.desktop9
-rw-r--r--abs/extra/mediaserv/PKGBUILD28
-rw-r--r--abs/extra/mediaserv/finish8
-rw-r--r--abs/extra/mediaserv/linhes-mediaserv.tar.bz2bin0 -> 17186 bytes
-rw-r--r--abs/extra/mediaserv/mediaserv.install26
-rw-r--r--abs/extra/mediaserv/mediaserv.no_daemon.patch17
-rw-r--r--abs/extra/mediaserv/run8
-rwxr-xr-xabs/extra/mednafen/PKGBUILD21
-rw-r--r--abs/extra/mercurial/ChangeLog21
-rw-r--r--abs/extra/mercurial/PKGBUILD35
-rw-r--r--abs/extra/mingetty/PKGBUILD30
-rw-r--r--abs/extra/mingetty/mingetty-utf8.patch158
-rw-r--r--abs/extra/miro/ChangeLog34
-rw-r--r--abs/extra/miro/Changelog2
-rw-r--r--abs/extra/miro/Miro-xulrunner.patch64
-rw-r--r--abs/extra/miro/PKGBUILD32
-rw-r--r--abs/extra/miro/boost_1.36.0_fix.patch32
-rw-r--r--abs/extra/miro/miro-xine.patch12
-rw-r--r--abs/extra/miro/miro.exec.patch9
-rw-r--r--abs/extra/miro/miro.install54
-rw-r--r--abs/extra/miro/miro_python26.patch16
-rw-r--r--abs/extra/miro/missing-headers.patch33
-rw-r--r--abs/extra/mkvtoolnix/PKGBUILD22
-rw-r--r--abs/extra/mono/PKGBUILD47
-rw-r--r--abs/extra/mono/__changelog1
-rw-r--r--abs/extra/mono/bug434892.patch11
-rw-r--r--abs/extra/mono/mono.rc.d35
-rw-r--r--abs/extra/mozilla-common/PKGBUILD17
-rwxr-xr-xabs/extra/mozilla-common/mozilla-common.sh1
-rwxr-xr-xabs/extra/myt2xvid3/PKGBUILD18
-rw-r--r--abs/extra/myt2xvid3/archive.php159
-rwxr-xr-xabs/extra/myt2xvid3/myt2xvid3310
-rwxr-xr-xabs/extra/myt2xvid3/myt2xvid3-userjob.sh6
-rwxr-xr-xabs/extra/myt2xvid3/myt2xvid3.install38
-rwxr-xr-xabs/extra/myth2ipod/PKGBUILD19
-rwxr-xr-xabs/extra/myth2ipod/iPod.pm184
-rwxr-xr-xabs/extra/myth2ipod/m2iweb.php157
-rwxr-xr-xabs/extra/myth2ipod/myth2ipod310
-rwxr-xr-xabs/extra/myth2ipod/myth2ipod-userjob.sh6
-rwxr-xr-xabs/extra/myth2ipod/myth2ipod.install38
-rw-r--r--abs/extra/mythappletrailers/PKGBUILD30
-rw-r--r--abs/extra/mythappletrailers/appletrailer.xml722
-rw-r--r--abs/extra/mythappletrailers/fix_aple_url.sh3
-rwxr-xr-xabs/extra/mythappletrailers/loading.sh2
-rwxr-xr-xabs/extra/mythappletrailers/myth_trailers_grabber214
-rw-r--r--abs/extra/mythappletrailers/mythappletrailers.install37
-rwxr-xr-xabs/extra/mythappletrailers/trailers2
-rw-r--r--abs/extra/mythexport/PKGBUILD17
-rw-r--r--abs/extra/mythexport/mythexport.install10
-rw-r--r--abs/extra/mythfeed/PKGBUILD22
-rw-r--r--abs/extra/mythfeed/mythfeed.install37
-rw-r--r--abs/extra/mythnuv2mkv/PKGBUILD16
-rw-r--r--abs/extra/mythvodka/PKGBUILD36
-rwxr-xr-xabs/extra/mythvodka/hulu_grabber.sh16
-rw-r--r--abs/extra/mythvodka/mythvodka.diff3933
-rw-r--r--abs/extra/mythvodka/mythvodka.install47
-rw-r--r--abs/extra/neon/PKGBUILD22
-rw-r--r--abs/extra/nspr/PKGBUILD53
-rw-r--r--abs/extra/nspr/nspr.pc.in10
-rw-r--r--abs/extra/nss/PKGBUILD84
-rw-r--r--abs/extra/nss/nss-config.in145
-rw-r--r--abs/extra/nss/nss-nolocalsql.patch53
-rw-r--r--abs/extra/nss/nss.pc.in11
-rwxr-xr-xabs/extra/nvram-wake/PKGBUILD16
-rw-r--r--abs/extra/ocaml/PKGBUILD29
-rw-r--r--abs/extra/openjdk6/PKGBUILD155
-rw-r--r--abs/extra/openjdk6/aatext_by_default.diff35
-rw-r--r--abs/extra/openjdk6/fix_corba_cmds_path.diff33
-rw-r--r--abs/extra/openjdk6/fix_jdk_cmds_path.diff33
-rw-r--r--abs/extra/openjdk6/fontconfig-paths.diff43
-rw-r--r--abs/extra/openjdk6/gcjwebplugin_xulrunner.diff11
-rw-r--r--abs/extra/openjdk6/openjdk6.install12
-rw-r--r--abs/extra/openjdk6/openjdk6.profile4
-rw-r--r--abs/extra/opera/PKGBUILD40
-rw-r--r--abs/extra/opera/opera-qt4-theme.patch11
-rw-r--r--abs/extra/opera/opera.desktop91
-rw-r--r--abs/extra/opera/opera_logo48.pngbin0 -> 2468 bytes
-rw-r--r--abs/extra/orbit2/PKGBUILD22
-rw-r--r--abs/extra/oss/PKGBUILD225
-rw-r--r--abs/extra/oss/hg-fix-devc.diff397
-rw-r--r--abs/extra/oss/hg-latest-fixes.diff104
-rw-r--r--abs/extra/oss/oss.install38
-rw-r--r--abs/extra/oss/oss.rc32
-rw-r--r--abs/extra/oss/oss.rm-init-scripts.patch52
-rw-r--r--abs/extra/perl-yaml/PKGBUILD28
-rwxr-xr-xabs/extra/phpmyadmin/PKGBUILD18
-rw-r--r--abs/extra/pmount/PKGBUILD27
-rw-r--r--abs/extra/pmount/pmount-dbus-close.patch11
-rw-r--r--abs/extra/policykit-gnome/PKGBUILD32
-rw-r--r--abs/extra/policykit-gnome/policykit-gnome.install23
-rw-r--r--abs/extra/policykit/PKGBUILD43
-rw-r--r--abs/extra/policykit/entry-leak.patch37
-rw-r--r--abs/extra/policykit/pk-ck-api-change.patch83
-rw-r--r--abs/extra/policykit/policykit.install30
-rw-r--r--abs/extra/policykit/polkit-0.8-dbus-policy.patch12
-rw-r--r--abs/extra/policykit/polkit.pam7
-rw-r--r--abs/extra/postgresql-libs/PKGBUILD58
-rw-r--r--abs/extra/postgresql/PKGBUILD79
-rw-r--r--abs/extra/postgresql/build.patch11
-rwxr-xr-xabs/extra/postgresql/postgresql59
-rw-r--r--abs/extra/postgresql/postgresql.confd4
-rw-r--r--abs/extra/postgresql/postgresql.pam3
-rw-r--r--abs/extra/powertop/ChangeLog3
-rw-r--r--abs/extra/powertop/PKGBUILD20
-rw-r--r--abs/extra/printproto/PKGBUILD22
-rw-r--r--abs/extra/pycrypto/PKGBUILD19
-rw-r--r--abs/extra/pyopenssl/PKGBUILD15
-rw-r--r--abs/extra/pyorbit/PKGBUILD22
-rw-r--r--abs/extra/pyrex/ChangeLog5
-rw-r--r--abs/extra/pyrex/PKGBUILD21
-rw-r--r--abs/extra/python-m2crypto/PKGBUILD22
-rw-r--r--abs/extra/python-pybluez/PKGBUILD23
-rwxr-xr-xabs/extra/python-pymedia/PKGBUILD19
-rw-r--r--abs/extra/pyusb/PKGBUILD16
-rw-r--r--abs/extra/quilt/PKGBUILD22
-rw-r--r--abs/extra/rarian/PKGBUILD29
-rw-r--r--abs/extra/rarian/user-segfault.patch14
-rw-r--r--abs/extra/read-edid/PKGBUILD20
-rwxr-xr-xabs/extra/removecommercials/PKGBUILD11
-rwxr-xr-xabs/extra/removecommercials/removecommercials195
-rw-r--r--abs/extra/rhino/PKGBUILD18
-rw-r--r--abs/extra/romdb/PKGBUILD17
-rw-r--r--abs/extra/romdb/romdb.install18
-rw-r--r--abs/extra/rrd_stats/PKGBUILD20
-rw-r--r--abs/extra/rrd_stats/rrd_stats.install34
-rw-r--r--abs/extra/rrd_stats/rrd_stats.tgzbin0 -> 7454 bytes
-rw-r--r--abs/extra/rrd_stats/run_rrd.sh8
-rw-r--r--abs/extra/rrdtool/ChangeLog13
-rw-r--r--abs/extra/rrdtool/PKGBUILD29
-rw-r--r--abs/extra/rtmpdump/PKGBUILD19
-rw-r--r--abs/extra/ruby/PKGBUILD28
-rw-r--r--abs/extra/sample-media/PKGBUILD37
-rw-r--r--abs/extra/sample-media/audio/05-Hush.mp3bin0 -> 4946841 bytes
-rw-r--r--abs/extra/sample-media/images/115_1573.jpgbin0 -> 482585 bytes
-rw-r--r--abs/extra/sample-media/images/345-1217206791B81W.jpgbin0 -> 176991 bytes
-rw-r--r--abs/extra/sample-media/images/classic-menugraph.pngbin0 -> 144106 bytes
-rw-r--r--abs/extra/sample-media/images/dvr_menugraph.pngbin0 -> 207288 bytes
-rw-r--r--abs/extra/sample-media/images/menu_diagram_color.pngbin0 -> 193264 bytes
-rw-r--r--abs/extra/sample-media/rom/PACMAN.SMCbin0 -> 524800 bytes
-rw-r--r--abs/extra/sample-media/sample.install41
-rw-r--r--abs/extra/sample-media/video/TripThe1939.mpegbin0 -> 23128735 bytes
-rw-r--r--abs/extra/scanfw/PKGBUILD23
-rw-r--r--abs/extra/scanfw/scanfw-98d.beta.tar.gzbin0 -> 45883 bytes
-rw-r--r--abs/extra/scanfw/scanfw.install5
-rw-r--r--abs/extra/scte65scan/PKGBUILD23
-rw-r--r--abs/extra/sdl_gfx/PKGBUILD29
-rw-r--r--abs/extra/sdl_image/PKGBUILD27
-rw-r--r--abs/extra/sdl_image/SDL_image-IMG_lbm.patch28
-rw-r--r--abs/extra/sdl_image/SDL_image-buffer-overflow.patch13
-rw-r--r--abs/extra/sdl_mixer/PKGBUILD25
-rw-r--r--abs/extra/sdl_net/PKGBUILD22
-rw-r--r--abs/extra/sdl_pango/PKGBUILD24
-rw-r--r--abs/extra/sdl_pango/SDL_Pango-0.1.2-API-adds.patch116
-rw-r--r--abs/extra/sdl_perl/PKGBUILD32
-rw-r--r--abs/extra/sdl_sound/PKGBUILD25
-rw-r--r--abs/extra/sdl_sound/flac.patch126
-rw-r--r--abs/extra/sdl_ttf/PKGBUILD21
-rw-r--r--abs/extra/sdlmame/ChangeLog5
-rw-r--r--abs/extra/sdlmame/PKGBUILD65
-rw-r--r--abs/extra/sdlmame/extras.tar.gzbin0 -> 4093 bytes
-rw-r--r--abs/extra/sdlmame/sdlmame.install32
-rw-r--r--abs/extra/sdlmame/sdlmame.sh58
-rw-r--r--abs/extra/serdisplib/PKGBUILD22
-rw-r--r--abs/extra/shepherd/PKGBUILD16
-rw-r--r--abs/extra/slang/ChangeLog7
-rw-r--r--abs/extra/slang/PKGBUILD24
-rw-r--r--abs/extra/smartmontools/PKGBUILD27
-rw-r--r--abs/extra/smartmontools/smartd35
-rw-r--r--abs/extra/smpeg/PKGBUILD28
-rw-r--r--abs/extra/smpeg/smpeg-0.4.4-gcc41.patch41
-rw-r--r--abs/extra/snes9x/PKGBUILD42
-rw-r--r--abs/extra/snes9x/snes9x-fixes2.patch29
-rwxr-xr-xabs/extra/snes9x/snes9x.install13
-rw-r--r--abs/extra/speex/PKGBUILD25
-rw-r--r--abs/extra/spidermonkey/PKGBUILD27
-rw-r--r--abs/extra/spidermonkey/header.patch12
-rw-r--r--abs/extra/spidermonkey/spidermonkey-1.7-threadsafe.patch16
-rw-r--r--abs/extra/startup-notification/PKGBUILD19
-rw-r--r--abs/extra/strace/PKGBUILD21
-rw-r--r--abs/extra/strace/no_linux_socket_h.patch22
-rw-r--r--abs/extra/subversion/ChangeLog18
-rw-r--r--abs/extra/subversion/PKGBUILD90
-rw-r--r--abs/extra/subversion/subversion-neon.patch62
-rw-r--r--abs/extra/subversion/svn11
-rwxr-xr-xabs/extra/subversion/svnserve42
-rw-r--r--abs/extra/subversion/svnserve.conf7
-rw-r--r--abs/extra/swh-plugins/PKGBUILD28
-rw-r--r--abs/extra/swig/PKGBUILD23
-rw-r--r--abs/extra/sysstat/PKGBUILD35
-rw-r--r--abs/extra/sysstat/sysstat21
-rw-r--r--abs/extra/tablet-encode/PKGBUILD20
-rw-r--r--abs/extra/tango-icon-theme/PKGBUILD23
-rw-r--r--abs/extra/tatir/PKGBUILD21
-rw-r--r--abs/extra/tatir/tatir.install19
-rw-r--r--abs/extra/tatir/tatir.tar.bz2bin0 -> 4525 bytes
-rw-r--r--abs/extra/terminal/PKGBUILD30
-rw-r--r--abs/extra/terminal/terminal-dont-die-on-dbus-kill.patch10
-rw-r--r--abs/extra/terminal/terminal.install11
-rw-r--r--abs/extra/thunar/PKGBUILD30
-rw-r--r--abs/extra/thunar/__changelog1
-rw-r--r--abs/extra/thunar/thunar.install14
-rw-r--r--abs/extra/tightvnc/PKGBUILD35
-rw-r--r--abs/extra/tightvnc/tightvnc-fontpath-xcolors.patch21
-rw-r--r--abs/extra/tree/PKGBUILD22
-rw-r--r--abs/extra/ttf-ms-fonts/PKGBUILD27
-rw-r--r--abs/extra/ttf-ms-fonts/ttf-ms-fonts.install55
-rw-r--r--abs/extra/unison/PKGBUILD28
-rw-r--r--abs/extra/unison/ocaml-3.08-extnames.patch14
-rw-r--r--abs/extra/unison/unison.desktop13
-rw-r--r--abs/extra/unison/unison.install32
-rw-r--r--abs/extra/unixodbc/PKGBUILD24
-rw-r--r--abs/extra/v4l-dvb-dvico2/PKGBUILD24
-rw-r--r--abs/extra/v4l-dvb-dvico2/fix-jdelvare-i2c-i2c-constify-client-address-data.patch25
-rw-r--r--abs/extra/v4l-dvb-dvico2/v4l-dvb.install23
-rw-r--r--abs/extra/v4l-dvb-dvico2/xc-bluebird.patch896
-rw-r--r--abs/extra/vcdimager/PKGBUILD22
-rw-r--r--abs/extra/vcdimager/__changelog1
-rw-r--r--abs/extra/vcdimager/cdio.patch11
-rw-r--r--abs/extra/vim/PKGBUILD66
-rw-r--r--abs/extra/vim/__changelog3
-rw-r--r--abs/extra/vim/fetch_patches.sh61
-rw-r--r--abs/extra/vim/vim.install38
-rw-r--r--abs/extra/vorbis-tools/ChangeLog10
-rw-r--r--abs/extra/vorbis-tools/PKGBUILD25
-rw-r--r--abs/extra/vorbis-tools/curl.patch10
-rw-r--r--abs/extra/vorbis-tools/vorbis-tools-1.1.1-flac_gt_1.1.3_support.patch500
-rw-r--r--abs/extra/vte/PKGBUILD26
-rw-r--r--abs/extra/vte/vte-0.16.0-reaper-python-bindings.patch62
-rw-r--r--abs/extra/wavpack/PKGBUILD25
-rw-r--r--abs/extra/webmin/PKGBUILD222
-rw-r--r--abs/extra/webmin/run11
-rw-r--r--abs/extra/webmin/webmin-config.tar.bz2bin0 -> 3021 bytes
-rw-r--r--abs/extra/webmin/webmin-pacman.tar.bz2bin0 -> 924 bytes
-rw-r--r--abs/extra/webmin/webmin.install39
-rw-r--r--abs/extra/webmin/webmin.rc44
-rw-r--r--abs/extra/windowmaker/PKGBUILD31
-rw-r--r--abs/extra/windowmaker/windowmaker-gcc4.patch.tar.bz2bin0 -> 39677 bytes
-rw-r--r--abs/extra/wireshark/PKGBUILD26
-rw-r--r--abs/extra/wireshark/wireshark.desktop10
-rw-r--r--abs/extra/wireshark/wireshark.pngbin0 -> 18535 bytes
-rwxr-xr-xabs/extra/wol/PKGBUILD19
-rwxr-xr-xabs/extra/wol/wakeonlan.sh10
-rw-r--r--abs/extra/wxgtk/ChangeLog18
-rw-r--r--abs/extra/wxgtk/PKGBUILD32
-rw-r--r--abs/extra/wxgtk/__changelog1
-rw-r--r--abs/extra/x11vnc/PKGBUILD22
-rw-r--r--abs/extra/xalan-java/PKGBUILD21
-rw-r--r--abs/extra/xautomation/PKGBUILD18
-rw-r--r--abs/extra/xdg-utils/PKGBUILD19
-rw-r--r--abs/extra/xe/PKGBUILD21
-rw-r--r--abs/extra/xe/xe.install18
-rw-r--r--abs/extra/xerces2-java/PKGBUILD22
-rw-r--r--abs/extra/xfsdump/PKGBUILD25
-rw-r--r--abs/extra/xine-lib/ChangeLog43
-rw-r--r--abs/extra/xine-lib/PKGBUILD41
-rw-r--r--abs/extra/xine-lib/__changelog3
-rw-r--r--abs/extra/xine-lib/xine-header.patch11
-rw-r--r--abs/extra/xine-lib/xine-imagemagick.patch11
-rw-r--r--abs/extra/xine-lib/xine-lib-1.1.1-configure-no-mcpu-march.patch13
-rwxr-xr-xabs/extra/xine-lib/xine.install27
-rw-r--r--abs/extra/xine-ui/ChangeLog7
-rw-r--r--abs/extra/xine-ui/PKGBUILD30
-rw-r--r--abs/extra/xmbmon/Makefile.in.patch37
-rw-r--r--abs/extra/xmbmon/PKGBUILD20
-rw-r--r--abs/extra/xmlto/PKGBUILD24
-rw-r--r--abs/extra/xmms/PKGBUILD50
-rw-r--r--abs/extra/xmms/id3v2.patch3379
-rw-r--r--abs/extra/xmms/xmms-1.2.10-crossfade-0.3.9.patch101
-rw-r--r--abs/extra/xmms/xmms-fix.diff11
-rw-r--r--abs/extra/xmms/xmms-menu.patch35
-rw-r--r--abs/extra/xscreensaver/ChangeLog20
-rw-r--r--abs/extra/xscreensaver/LICENSE9
-rw-r--r--abs/extra/xscreensaver/PKGBUILD40
-rw-r--r--abs/extra/xscreensaver/__changelog3
-rw-r--r--abs/extra/xscreensaver/xscreensaver198
-rw-r--r--abs/extra/xscreensaver/xscreensaver.install30
-rw-r--r--abs/extra/xscreensaver/xscreensaver.pam1
-rw-r--r--abs/extra/xscreensaver/xscreensavers198
-rw-r--r--abs/extra/xulrunner/PKGBUILD43
-rw-r--r--abs/extra/xulrunner/mozconfig33
-rw-r--r--abs/extra/xulrunner/xulrunner.install11
-rw-r--r--abs/extra/zip/ChangeLog5
-rw-r--r--abs/extra/zip/PKGBUILD32
-rw-r--r--abs/extra/zip/zip-3.0-build.patch34
-rw-r--r--abs/extra/zip/zip-3.0-exec-stack.patch20
-rw-r--r--abs/extra/zip/zip-3.0-no-crypt.patch51
-rw-r--r--abs/extra/zip/zip-3.0-pic.patch12
679 files changed, 36300 insertions, 0 deletions
diff --git a/abs/extra/abs/ChangeLog b/abs/extra/abs/ChangeLog
new file mode 100644
index 0000000..03d6d88
--- /dev/null
+++ b/abs/extra/abs/ChangeLog
@@ -0,0 +1,41 @@
+2008-10-28 Allan McRae <allan@archlinux.org>
+
+ * 2.3-1
+ Upstream update
+ - add ability to download files using tarballs on pacman mirror
+
+2008-08-10 Allan McRae <allan@archlinux.org>
+
+ * 2.2-1
+ Upstream update
+ - adds ability to select which repos/packages
+ sync on commandline
+ - additional PKGBUILD and install script prototypes
+
+2008-04-19 Travis Willard <travis@archlinux.org>
+
+ * 2.1-1
+ Upstream update - re-adds support for community
+
+2008-04-19 Travis Willard <travis@archlinux.org>
+
+ * 2.0-4
+ Added install warning about /var/abs
+
+2008-04-15 Travis Willard <travis@archlinux.org>
+
+ * 2.0-3
+ Added install message
+ Moved abs.conf to /etc instead of /etc/abs
+
+2008-04-13 Travis Willard <travis@archlinux.org>
+
+ * 2.0-2
+ Moved rsyncd.conf.abs to /usr/share/abs
+ Made rsync server configurable
+
+2008-04-10 Travis Willard <travis@archlinux.org>
+
+ * 2.0-1
+ Added ChangeLog
+ New rsync-based release
diff --git a/abs/extra/abs/PKGBUILD b/abs/extra/abs/PKGBUILD
new file mode 100644
index 0000000..872fc59
--- /dev/null
+++ b/abs/extra/abs/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 17300 2008-10-28 04:37:22Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+pkgname=abs
+pkgver=2.3
+pkgrel=1
+pkgdesc="Utilities to download and work with the Arch Build System (ABS)"
+arch=('i686' 'x86_64')
+url="http://projects.archlinux.org/git/?p=abs.git"
+license=('GPL')
+depends=('bash' 'rsync')
+backup=(etc/abs.conf)
+install=abs.install
+source=(ftp://ftp.archlinux.org/other/abs/${pkgname}-${pkgver}.tar.gz)
+md5sums=('d6fd791aa487ba8bb5ff48c3ace20592')
+
+build() {
+ cd ${srcdir}/${pkgname}
+
+ make CONFDIR=/etc/ || return 1
+ make CONFDIR=/etc/ DESTDIR=${pkgdir} install || return 1
+
+ # Add readme file, and make base /var/abs path
+ install -dm0755 ${pkgdir}/var/abs/local/
+ install -Dm0644 ${srcdir}/abs/README ${pkgdir}/var/abs/README
+
+ # change ABS tags for x86_64 to correct values
+ if [ "$CARCH" = "x86_64" ]; then
+ sed -i "s|i686|x86_64|g" ${pkgdir}/etc/abs.conf
+ fi
+}
+
+# vim: set ts=2 sw=2 noet:
diff --git a/abs/extra/abs/abs.install b/abs/extra/abs/abs.install
new file mode 100644
index 0000000..1b19b4a
--- /dev/null
+++ b/abs/extra/abs/abs.install
@@ -0,0 +1,15 @@
+## arg 1: the new package version
+## arg 2: the old package version
+pre_upgrade() {
+ if [ "$(vercmp $2 2.0-1)" -lt 0 ]; then
+ echo "==> ABS now uses rsync, instead of cvsup, to synchronize your tree."
+ echo "==> Please note the new configuration in /etc/abs.conf"
+ fi
+
+ if [ "$(vercmp $2 2.0-4)" -lt 0 ]; then
+ echo "==> Warning: abs clears out the contents of /var/abs when syncing."
+ echo "==> Keep all local PKGBUILDs in /var/abs/local, or they will disappear"
+ fi
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/abs/extra/apache-ant/PKGBUILD b/abs/extra/apache-ant/PKGBUILD
new file mode 100644
index 0000000..663cc19
--- /dev/null
+++ b/abs/extra/apache-ant/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 24082 2009-01-12 21:42:39Z paul $
+# Contributor: Andrew Wright <andreww@photism.org>
+# Maintainer: Paul Mattal <paul@archlinux.org>
+
+pkgname=apache-ant
+pkgver=1.7.1
+pkgrel=1
+pkgdesc="Ant is a java-based build tool."
+arch=(i686 x86_64)
+license=('APACHE')
+url="http://ant.apache.org/"
+depends=('java-runtime')
+makedepends=('java-environment')
+noextract=('junit3.8.1.zip')
+source=(http://archive.apache.org/dist/ant/source/${pkgname}-${pkgver}-src.tar.bz2
+ http://heanet.dl.sourceforge.net/sourceforge/junit/junit3.8.1.zip)
+md5sums=('0d68db4a1ada5c91bcbf53cefd0c2fd7' '5110326e4b7f7497dfa60ede4b626751')
+
+build() {
+ cd ${startdir}/src || return 1
+ unzip junit3.8.1.zip || return 1
+
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ if [ -f /etc/profile.d/java-gcj-compat.sh ]; then
+ . /etc/profile.d/java-gcj-compat.sh
+ elif [ -f /etc/profile.d/jdk.sh ]; then
+ . /etc/profile.d/jre.sh
+ . /etc/profile.d/jdk.sh
+ fi
+
+ # we need the junit jar in the classpath to build ant
+ export CLASSPATH="${startdir}/src/junit3.8.1/junit.jar"
+
+ # build
+ mkdir dist || return 1
+ ./build.sh -Ddist.dir=dist/ dist || return 1
+
+ # install
+ export ANT_HOME="${startdir}/pkg/usr"
+ ./build.sh install-lite || return 1
+}
diff --git a/abs/extra/apcupsd/PKGBUILD b/abs/extra/apcupsd/PKGBUILD
new file mode 100644
index 0000000..9f66f5d
--- /dev/null
+++ b/abs/extra/apcupsd/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD,v 1.17 2009/01/19 10:34:32 sergej Exp $
+# Maintainer: Sergej Pupykin <sergej@aur.archlinux.org>
+# Maintainer: Todd Musall <tmusall@comcast.net>
+
+pkgname=apcupsd
+pkgver=3.14.5
+pkgrel=2
+pkgdesc="Apcupsd can be used for power mangement and controlling most of APC's UPS models on Unix and Windows machines."
+arch=(i686 x86_64)
+url="http://www.apcupsd.org"
+license=('GPL')
+depends=('gcc-libs' 'gd' 'gconf')
+makedepends=('pkgconfig')
+backup=(etc/apcupsd/apcupsd.conf etc/apcupsd/hosts.conf \
+ etc/apcupsd/multimon.conf)
+source=(http://switch.dl.sf.net/sourceforge/apcupsd/$pkgname-$pkgver.tar.gz \
+ apcupsd
+ apcupsd.conf
+ run)
+md5sums=('4ac73ec91d8ab56f3fac894e172567c4'
+ '5eae3c4d921eeb81798a0250fe3dd111'
+ '2f533aec32c9445510bb2127b453b175'
+ 'd4b8c755ecd30f57810f71a6d6435dd3')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --enable-cgi --enable-usb --enable-net \
+ --with-upstype=usb --with-upscable=usb \
+ --with-serial-dev=/dev/usb/hid/hiddev[0-9] \
+ --enable-pthreads --enable-gapcmon
+ make || return 1
+ make DESTDIR=$startdir/pkg install || return 1
+ install -D -m755 ../apcupsd $startdir/pkg/etc/rc.d/apcupsd && \
+ chmod 755 $startdir/pkg/sbin/*
+ cp ../apcupsd.conf $startdir/pkg/etc/apcupsd/
+ mkdir -p $startdir/pkg/etc/sv/apcupsd/supervise
+ install -D -m755 ../run $startdir/pkg/etc/sv/apcupsd
+}
diff --git a/abs/extra/apcupsd/apcupsd b/abs/extra/apcupsd/apcupsd
new file mode 100755
index 0000000..3cd5c9d
--- /dev/null
+++ b/abs/extra/apcupsd/apcupsd
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /sbin/apcupsd`
+case "$1" in
+ start)
+ stat_busy "Starting APCUPSD Daemon"
+ rm -f /etc/apcupsd/powerfail
+ rm -f /etc/nologin
+ [ -z "$PID" ] && /sbin/apcupsd -f /etc/apcupsd/apcupsd.conf
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ PID=`pidof -o %PPID /sbin/apcupsd`
+ echo $PID > /var/run/apcupsd.pid
+ add_daemon apcupsd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping APCUPSD Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm /var/run/apcupsd.pid
+ rm_daemon apcupsd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ status)
+ /sbin/apcaccess status
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+exit 0
diff --git a/abs/extra/apcupsd/apcupsd.conf b/abs/extra/apcupsd/apcupsd.conf
new file mode 100644
index 0000000..dd60889
--- /dev/null
+++ b/abs/extra/apcupsd/apcupsd.conf
@@ -0,0 +1,325 @@
+## apcupsd.conf v1.1 ##
+#
+# for apcupsd release 3.14.5 (10 January 2009) - unknown
+#
+# "apcupsd" POSIX config file
+
+#
+# ========= General configuration parameters ============
+#
+
+# UPSNAME xxx
+# Use this to give your UPS a name in log files and such. This
+# is particulary useful if you have multiple UPSes. This does not
+# set the EEPROM. It should be 8 characters or less.
+#UPSNAME
+
+# UPSCABLE <cable>
+# Defines the type of cable connecting the UPS to your computer.
+#
+# Possible generic choices for <cable> are:
+# simple, smart, ether, usb
+#
+# Or a specific cable model number may be used:
+# 940-0119A, 940-0127A, 940-0128A, 940-0020B,
+# 940-0020C, 940-0023A, 940-0024B, 940-0024C,
+# 940-1524C, 940-0024G, 940-0095A, 940-0095B,
+# 940-0095C, M-04-02-2000
+#
+UPSCABLE usb
+
+# To get apcupsd to work, in addition to defining the cable
+# above, you must also define a UPSTYPE, which corresponds to
+# the type of UPS you have (see the Description for more details).
+# You must also specify a DEVICE, sometimes referred to as a port.
+# For USB UPSes, please leave the DEVICE directive blank. For
+# other UPS types, you must specify an appropriate port or address.
+#
+# UPSTYPE DEVICE Description
+# apcsmart /dev/tty** Newer serial character device,
+# appropriate for SmartUPS models using
+# a serial cable (not USB).
+#
+# usb <BLANK> Most new UPSes are USB. A blank DEVICE
+# setting enables autodetection, which is
+# the best choice for most installations.
+#
+# net hostname:port Network link to a master apcupsd
+# through apcupsd's Network Information
+# Server. This is used if you don't have
+# a UPS directly connected to your computer.
+#
+# snmp hostname:port:vendor:community
+# SNMP Network link to an SNMP-enabled
+# UPS device. Vendor is the MIB used by
+# the UPS device: can be "APC", "APC_NOTRAP"
+# or "RFC" where APC is the powernet MIB,
+# "APC_NOTRAP" is powernet with SNMP trap
+# catching disabled, and RFC is the IETF's
+# rfc1628 UPS-MIB. You usually want "APC".
+# Port is usually 161. Community is usually
+# "private".
+#
+# dumb /dev/tty** Old serial character device for use
+# with simple-signaling UPSes.
+#
+# pcnet ipaddr:username:passphrase
+# PowerChute Network Shutdown protocol
+# which can be used as an alternative to SNMP
+# with AP9617 family of smart slot cards.
+# ipaddr is the IP address of the UPS mgmt
+# card. username and passphrase are the
+# credentials for which the card has been
+# configured.
+#
+UPSTYPE usb
+DEVICE /dev/usb/hid/hiddev[0-9]
+
+# POLLTIME <int>
+# Interval (in seconds) at which apcupsd polls the UPS for status. This
+# setting applies both to directly-attached UPSes (UPSTYPE apcsmart, usb,
+# dumb) and networked UPSes (UPSTYPE net, snmp). Lowering this setting
+# will improve apcupsd's responsiveness to certain events at the cost of
+# higher CPU utilization. The default of 60 is appropriate for most
+# situations.
+#POLLTIME 60
+
+# LOCKFILE <path to lockfile>
+# Path for device lock file. Not used on Win32.
+LOCKFILE /var/lock
+
+# SCRIPTDIR <path to script directory>
+# Directory in which apccontrol and event scripts are located.
+SCRIPTDIR /etc/apcupsd
+
+# PWRFAILDIR <path to powerfail directory>
+# Directory in which to write the powerfail flag file. This file
+# is created when apcupsd initiates a system shutdown and is
+# checked in the OS halt scripts to determine if a killpower
+# (turning off UPS output power) is required.
+PWRFAILDIR /etc/apcupsd
+
+# NOLOGINDIR <path to nologin directory>
+# Directory in which to write the nologin file. The existence
+# of this flag file tells the OS to disallow new logins.
+NOLOGINDIR /etc
+
+
+#
+# ======== Configuration parameters used during power failures ==========
+#
+
+# The ONBATTERYDELAY is the time in seconds from when a power failure
+# is detected until we react to it with an onbattery event.
+#
+# This means that, apccontrol will be called with the powerout argument
+# immediately when a power failure is detected. However, the
+# onbattery argument is passed to apccontrol only after the
+# ONBATTERYDELAY time. If you don't want to be annoyed by short
+# powerfailures, make sure that apccontrol powerout does nothing
+# i.e. comment out the wall.
+ONBATTERYDELAY 6
+
+#
+# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
+# the first that occurs will cause the initation of a shutdown.
+#
+
+# If during a power failure, the remaining battery percentage
+# (as reported by the UPS) is below or equal to BATTERYLEVEL,
+# apcupsd will initiate a system shutdown.
+BATTERYLEVEL 5
+
+# If during a power failure, the remaining runtime in minutes
+# (as calculated internally by the UPS) is below or equal to MINUTES,
+# apcupsd, will initiate a system shutdown.
+MINUTES 3
+
+# If during a power failure, the UPS has run on batteries for TIMEOUT
+# many seconds or longer, apcupsd will initiate a system shutdown.
+# A value of 0 disables this timer.
+#
+# Note, if you have a Smart UPS, you will most likely want to disable
+# this timer by setting it to zero. That way, you UPS will continue
+# on batteries until either the % charge remaing drops to or below BATTERYLEVEL,
+# or the remaining battery runtime drops to or below MINUTES. Of course,
+# if you are testing, setting this to 60 causes a quick system shutdown
+# if you pull the power plug.
+# If you have an older dumb UPS, you will want to set this to less than
+# the time you know you can run on batteries.
+TIMEOUT 0
+
+# Time in seconds between annoying users to signoff prior to
+# system shutdown. 0 disables.
+ANNOY 300
+
+# Initial delay after power failure before warning users to get
+# off the system.
+ANNOYDELAY 60
+
+# The condition which determines when users are prevented from
+# logging in during a power failure.
+# NOLOGON <string> [ disable | timeout | percent | minutes | always ]
+NOLOGON disable
+
+# If KILLDELAY is non-zero, apcupsd will continue running after a
+# shutdown has been requested, and after the specified time in
+# seconds attempt to kill the power. This is for use on systems
+# where apcupsd cannot regain control after a shutdown.
+# KILLDELAY <seconds> 0 disables
+KILLDELAY 0
+
+#
+# ==== Configuration statements for Network Information Server ====
+#
+
+# NETSERVER [ on | off ] on enables, off disables the network
+# information server. If netstatus is on, a network information
+# server process will be started for serving the STATUS and
+# EVENT data over the network (used by CGI programs).
+NETSERVER on
+
+# NISIP <dotted notation ip address>
+# IP address on which NIS server will listen for incoming connections.
+# This is useful if your server is multi-homed (has more than one
+# network interface and IP address). Default value is 0.0.0.0 which
+# means any incoming request will be serviced. Alternatively, you can
+# configure this setting to any specific IP address of your server and
+# NIS will listen for connections only on that interface. Use the
+# loopback address (127.0.0.1) to accept connections only from the
+# local machine.
+NISIP 0.0.0.0
+
+# NISPORT <port> default is 3551 as registered with the IANA
+# port to use for sending STATUS and EVENTS data over the network.
+# It is not used unless NETSERVER is on. If you change this port,
+# you will need to change the corresponding value in the cgi directory
+# and rebuild the cgi programs.
+NISPORT 3551
+
+# If you want the last few EVENTS to be available over the network
+# by the network information server, you must define an EVENTSFILE.
+EVENTSFILE /var/log/apcupsd.events
+
+# EVENTSFILEMAX <kilobytes>
+# By default, the size of the EVENTSFILE will be not be allowed to exceed
+# 10 kilobytes. When the file grows beyond this limit, older EVENTS will
+# be removed from the beginning of the file (first in first out). The
+# parameter EVENTSFILEMAX can be set to a different kilobyte value, or set
+# to zero to allow the EVENTSFILE to grow without limit.
+EVENTSFILEMAX 10
+
+#
+# ========== Configuration statements used if sharing =============
+# a UPS with more than one machine
+
+#
+# Remaining items are for ShareUPS (APC expansion card) ONLY
+#
+
+# UPSCLASS [ standalone | shareslave | sharemaster ]
+# Normally standalone unless you share an UPS using an APC ShareUPS
+# card.
+UPSCLASS standalone
+
+# UPSMODE [ disable | share ]
+# Normally disable unless you share an UPS using an APC ShareUPS card.
+UPSMODE disable
+
+#
+# ===== Configuration statements to control apcupsd system logging ========
+#
+
+# Time interval in seconds between writing the STATUS file; 0 disables
+STATTIME 300
+
+# Location of STATUS file (written to only if STATTIME is non-zero)
+STATFILE /var/log/apcupsd.status
+
+# LOGSTATS [ on | off ] on enables, off disables
+# Note! This generates a lot of output, so if
+# you turn this on, be sure that the
+# file defined in syslog.conf for LOG_NOTICE is a named pipe.
+# You probably do not want this on.
+LOGSTATS off
+
+# Time interval in seconds between writing the DATA records to
+# the log file. 0 disables.
+DATATIME 0
+
+# FACILITY defines the logging facility (class) for logging to syslog.
+# If not specified, it defaults to "daemon". This is useful
+# if you want to separate the data logged by apcupsd from other
+# programs.
+#FACILITY DAEMON
+
+#
+# ========== Configuration statements used in updating the UPS EPROM =========
+#
+
+#
+# These statements are used only by apctest when choosing "Set EEPROM with conf
+# file values" from the EEPROM menu. THESE STATEMENTS HAVE NO EFFECT ON APCUPSD.
+#
+
+# UPS name, max 8 characters
+#UPSNAME UPS_IDEN
+
+# Battery date - 8 characters
+#BATTDATE mm/dd/yy
+
+# Sensitivity to line voltage quality (H cause faster transfer to batteries)
+# SENSITIVITY H M L (default = H)
+#SENSITIVITY H
+
+# UPS delay after power return (seconds)
+# WAKEUP 000 060 180 300 (default = 0)
+#WAKEUP 60
+
+# UPS Grace period after request to power off (seconds)
+# SLEEP 020 180 300 600 (default = 20)
+#SLEEP 180
+
+# Low line voltage causing transfer to batteries
+# The permitted values depend on your model as defined by last letter
+# of FIRMWARE or APCMODEL. Some representative values are:
+# D 106 103 100 097
+# M 177 172 168 182
+# A 092 090 088 086
+# I 208 204 200 196 (default = 0 => not valid)
+#LOTRANSFER 208
+
+# High line voltage causing transfer to batteries
+# The permitted values depend on your model as defined by last letter
+# of FIRMWARE or APCMODEL. Some representative values are:
+# D 127 130 133 136
+# M 229 234 239 224
+# A 108 110 112 114
+# I 253 257 261 265 (default = 0 => not valid)
+#HITRANSFER 253
+
+# Battery charge needed to restore power
+# RETURNCHARGE 00 15 50 90 (default = 15)
+#RETURNCHARGE 15
+
+# Alarm delay
+# 0 = zero delay after pwr fail, T = power fail + 30 sec, L = low battery, N = never
+# BEEPSTATE 0 T L N (default = 0)
+#BEEPSTATE T
+
+# Low battery warning delay in minutes
+# LOWBATT 02 05 07 10 (default = 02)
+#LOWBATT 2
+
+# UPS Output voltage when running on batteries
+# The permitted values depend on your model as defined by last letter
+# of FIRMWARE or APCMODEL. Some representative values are:
+# D 115
+# M 208
+# A 100
+# I 230 240 220 225 (default = 0 => not valid)
+#OUTPUTVOLTS 230
+
+# Self test interval in hours 336=2 weeks, 168=1 week, ON=at power on
+# SELFTEST 336 168 ON OFF (default = 336)
+#SELFTEST 336
diff --git a/abs/extra/apcupsd/run b/abs/extra/apcupsd/run
new file mode 100644
index 0000000..a9dfa3d
--- /dev/null
+++ b/abs/extra/apcupsd/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf >/dev/null 2>/dev/null
diff --git a/abs/extra/atomicparsley/PKGBUILD b/abs/extra/atomicparsley/PKGBUILD
new file mode 100644
index 0000000..4108fa9
--- /dev/null
+++ b/abs/extra/atomicparsley/PKGBUILD
@@ -0,0 +1,18 @@
+# Contributor: Baptiste Daroussin <baptiste.daroussin@gmail.com>
+pkgname=atomicparsley
+pkgver=0.9.0
+pkgrel=2
+pkgdesc="command line program for reading, parsing and setting iTunes-style metadata in MPEG4 files"
+arch=(i686 x86_64)
+url="http://atomicparsley.sourceforge.net/"
+license=('GPL')
+source=(http://ftp.knoppmyth.net/R6/sources/$pkgname/AtomicParsley-source-$pkgver.tar.bz2)
+md5sums=('dfe6700089ca20c87f7f5293dee5df6c')
+
+build() {
+ cd $startdir/src/
+ unzip AtomicParsley-source-$pkgver
+ cd $startdir/src/AtomicParsley-source-$pkgver
+ ./build
+ install -D -m 755 AtomicParsley $startdir/pkg/usr/bin/AtomicParsley
+}
diff --git a/abs/extra/autofs/Changelog b/abs/extra/autofs/Changelog
new file mode 100644
index 0000000..f25555e
--- /dev/null
+++ b/abs/extra/autofs/Changelog
@@ -0,0 +1,2 @@
+5.0.4-5 4/29/09
+Cecil - Added run and finish files for runit.
diff --git a/abs/extra/autofs/PKGBUILD b/abs/extra/autofs/PKGBUILD
new file mode 100644
index 0000000..7524ae4
--- /dev/null
+++ b/abs/extra/autofs/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 36638 2009-04-26 19:00:46Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Dale Blount <dale@archlinux.org>
+# Contributor: Manolis Tzanidakis
+
+pkgname=autofs
+pkgver=5.0.4
+pkgrel=5
+pkgdesc="A kernel-based automounter for Linux."
+arch=('i686' 'x86_64')
+url="http://wiki.autofs.net/FrontPage"
+license=('GPL2')
+depends=('libldap' 'libxml2' 'heimdal')
+backup=(etc/autofs/auto.master etc/autofs/auto.misc etc/conf.d/autofs)
+install=autofs.install
+source=("http://www.kernel.org/pub/linux/daemons/${pkgname}/v5/${pkgname}-${pkgver}.tar.bz2"
+ 'autofs' 'autofs.conf.d' 'auto.master' 'auto.misc'
+ 'heimdal.patch' 'run' 'finish')
+md5sums=('2646dde61edd08dd952255558c733c08'
+ 'b4984b3161f50cba3d189b0ec594d014'
+ '47f597c870410055e0fdb66103daf928'
+ 'a6cefb591e77b31b79dbb7243646c96b'
+ 'd8a15ec9186c5c0b36e5cea1e2739e8a'
+ '1ee4825e26ad72bfe86acec3d3da5d2a'
+ '74d3b5b6c4421275448084472cfa691a'
+ '43410e98ecb224cde73ce32be5a6aa14')
+
+build() {
+ export MAKEFLAGS="-j1"
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ sed -i "s:SUBDIRS = lib daemon modules man samples:SUBDIRS = lib daemon modules man:" Makefile.rules
+ patch -Np1 -i ${srcdir}/heimdal.patch
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/autofs \
+ --with-mapdir=/etc/autofs \
+ --without-hesiod
+ make || return 1
+ make INSTALLROOT=${pkgdir} install
+
+ local conf_file
+ for conf_file in auto.{master,misc}; do
+ install -D -m 644 ${srcdir}/$conf_file ${pkgdir}/etc/autofs/$conf_file
+ done
+
+ sed -i "s:/etc:/etc/autofs:g" ${pkgdir}/usr/share/man/man5/auto.master.5
+ install -D -m 755 ${srcdir}/autofs ${pkgdir}/etc/rc.d/autofs
+ install -D -m 644 ${srcdir}/autofs.conf.d ${pkgdir}/etc/conf.d/autofs
+ mkdir -p ${pkgdir}/etc/sv/autofs/supervise
+ install -D -m 744 ${srcdir}/run ${pkgdir}/etc/sv/autofs
+ install -D -m 744 ${srcdir}/finish ${pkgdir}/etc/sv/autofs
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/abs/extra/autofs/auto.master b/abs/extra/autofs/auto.master
new file mode 100644
index 0000000..be4ea73
--- /dev/null
+++ b/abs/extra/autofs/auto.master
@@ -0,0 +1,6 @@
+# Sample auto.master file
+# Format of this file:
+# mountpoint map options
+# For details of the format look at autofs(5).
+
+#/media /etc/autofs/auto.media
diff --git a/abs/extra/autofs/auto.misc b/abs/extra/autofs/auto.misc
new file mode 100644
index 0000000..5691566
--- /dev/null
+++ b/abs/extra/autofs/auto.misc
@@ -0,0 +1,7 @@
+# This is an automounter map and it has the following format
+# key [ -mount-options-separated-by-comma ] location
+# Details may be found in the autofs(5) manpage
+
+cdrom -fstype=iso9660,ro,nodev,nosuid :/dev/cdrom
+floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl
+usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sda1
diff --git a/abs/extra/autofs/autofs b/abs/extra/autofs/autofs
new file mode 100644
index 0000000..59ea4f5
--- /dev/null
+++ b/abs/extra/autofs/autofs
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# source application-specific settings
+[ -f /etc/conf.d/autofs ] && . /etc/conf.d/autofs
+
+if [ ! -z "$TIMEOUT" ]; then
+ daemonoptions="--timeout=$TIMEOUT $daemonoptions"
+fi
+
+PID=`cat /var/run/autofs-running 2> /dev/null`
+case "$1" in
+ start)
+ stat_busy "Starting Automounter"
+ [ -z "$PID" ] && /usr/sbin/automount $daemonoptions &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon autofs
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Automounter"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon autofs
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/autofs/autofs.conf.d b/abs/extra/autofs/autofs.conf.d
new file mode 100644
index 0000000..bc82491
--- /dev/null
+++ b/abs/extra/autofs/autofs.conf.d
@@ -0,0 +1,4 @@
+#localoptions='rsize=8192,wsize=8192'
+
+# e.g. --timeout=60
+daemonoptions=''
diff --git a/abs/extra/autofs/autofs.install b/abs/extra/autofs/autofs.install
new file mode 100644
index 0000000..61120bb
--- /dev/null
+++ b/abs/extra/autofs/autofs.install
@@ -0,0 +1,5 @@
+post_install(){
+ echo "########################################################"
+ echo "In autofs5 --ghost option isn't valid. In order to start"
+ echo "autofs you must remove it from your /etc/conf.d/autofs. "
+}
diff --git a/abs/extra/autofs/finish b/abs/extra/autofs/finish
new file mode 100755
index 0000000..26f9d19
--- /dev/null
+++ b/abs/extra/autofs/finish
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+sv down autofs
diff --git a/abs/extra/autofs/heimdal.patch b/abs/extra/autofs/heimdal.patch
new file mode 100644
index 0000000..c49b1fd
--- /dev/null
+++ b/abs/extra/autofs/heimdal.patch
@@ -0,0 +1,34 @@
+--- autofs-5.0.4/modules/cyrus-sasl.c~ 2009-01-11 17:18:55.000000000 +0100
++++ autofs-5.0.4/modules/cyrus-sasl.c 2009-01-11 17:18:55.000000000 +0100
+@@ -66,6 +66,15 @@
+ #endif
+ #endif
+
++/**
++ * The type of a principal is different for MIT Krb5 and Heimdal.
++ * These macros are provided by Heimdal, and introduced here for MIT.
++ */
++#ifndef krb5_realm_length
++#define krb5_realm_length(r) ((r).length)
++#define krb5_realm_data(r) ((r).data)
++#endif
++
+ /*
+ * Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME
+ * environment variable so that the library knows where to find it.
+@@ -451,11 +460,11 @@
+
+ /* setup a principal for the ticket granting service */
+ ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ strlen(KRB5_TGS_NAME), KRB5_TGS_NAME,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ 0);
+ if (ret) {
+ error(logopt,
diff --git a/abs/extra/autofs/run b/abs/extra/autofs/run
new file mode 100755
index 0000000..b35a4ea
--- /dev/null
+++ b/abs/extra/autofs/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 2>&1
+set -e # barf if modprobe fails
+/sbin/modprobe autofs4
+exec /etc/rc.d/autofs start
diff --git a/abs/extra/beautiful-soup/PKGBUILD b/abs/extra/beautiful-soup/PKGBUILD
new file mode 100644
index 0000000..082700c
--- /dev/null
+++ b/abs/extra/beautiful-soup/PKGBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Douglas Soares de Andrade <dsa@aur.archlinux.org>
+# Contributor: phrakture < aaron m griffin * gmail::com >
+# Contributor: tardo <tardo@nagi-fanboi.net>
+
+pkgname=beautiful-soup
+pkgver=3.1.0.1
+pkgrel=1
+pkgdesc="A Python HTML/XML parser designed for quick turnaround projects like screen-scraping"
+arch=('i686' 'x86_64')
+url="http://www.crummy.com/software/BeautifulSoup/index.html"
+license=('PSF')
+depends=('python')
+source=(http://www.crummy.com/software/BeautifulSoup/download/BeautifulSoup-$pkgver.tar.gz)
+
+build() {
+ cd $startdir/src/BeautifulSoup-$pkgver
+ python setup.py install --root=$startdir/pkg
+}
+md5sums=('bcffef3eda6e06e6d1e18c06a9db8a24')
diff --git a/abs/extra/bluez-firmware/PKGBUILD b/abs/extra/bluez-firmware/PKGBUILD
new file mode 100644
index 0000000..64466c1
--- /dev/null
+++ b/abs/extra/bluez-firmware/PKGBUILD
@@ -0,0 +1,23 @@
+# Maintainer: Geoffroy Carrier <geoffroy@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Stefano Zamprogno <stefano.zamprogno@gmail.com>
+
+pkgname=bluez-firmware
+pkgver=1.2
+pkgrel=4
+pkgdesc="Firmware for Broadcom BCM203x Blutonium devices"
+url="http://www.bluez.org/"
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=()
+source=("http://bluez.sf.net/download/$pkgname-$pkgver.tar.gz")
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --libdir=/lib || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums=('1cc3cefad872e937e05de5a0a2b390dd')
diff --git a/abs/extra/bluez-hcidump/PKGBUILD b/abs/extra/bluez-hcidump/PKGBUILD
new file mode 100644
index 0000000..25e0fdf
--- /dev/null
+++ b/abs/extra/bluez-hcidump/PKGBUILD
@@ -0,0 +1,22 @@
+# Maintainer: Geoffroy carrier <geoffroy@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Joerie de Gram <j.de.gram@gmail.com>
+
+pkgname=bluez-hcidump
+pkgver=1.42
+pkgrel=1
+pkgdesc="Bluetooth HCI package analyzer"
+url="http://www.bluez.org/"
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('bluez>=4.18')
+source=(http://bluez.sf.net/download/$pkgname-$pkgver.tar.gz)
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --mandir=/usr/share/man || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums=('5704737aaf72104eeaf77335218a1827')
diff --git a/abs/extra/bluez-python/PKGBUILD b/abs/extra/bluez-python/PKGBUILD
new file mode 100644
index 0000000..fcf2639
--- /dev/null
+++ b/abs/extra/bluez-python/PKGBUILD
@@ -0,0 +1,17 @@
+# Contributor: Li Dongyang<Jerry87905@gmail.com>
+
+pkgname=bluez-python
+pkgver=0.1.4
+pkgrel=1
+pkgdesc="A BlueZ python binding on top of dbus-python"
+arch=(i686 x86_64)
+url="http://code.google.com/p/bluez-python"
+license=('LGPL')
+depends=('bluez>=4.30' 'dbus-python')
+source=(http://bluez-python.googlecode.com/files/${pkgname}-${pkgver}.tar.gz)
+md5sums=('013f283d3c32765e67c89ebf7f5470ea')
+
+build() {
+ cd $startdir/src/$pkgname
+ python setup.py install --root=$startdir/pkg
+}
diff --git a/abs/extra/bluez/PKGBUILD b/abs/extra/bluez/PKGBUILD
new file mode 100644
index 0000000..9e8f13b
--- /dev/null
+++ b/abs/extra/bluez/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Geoffroy Carrier <geoffroy@archlinux.org>
+pkgname=bluez
+pkgver=4.30
+pkgrel=1
+pkgdesc="Libraries and tools for the Bluetooth protocol stack"
+url="http://www.bluez.org/"
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('dbus-core' 'glib2')
+makedepends=('gstreamer0.10-base' 'alsa-lib' 'libusb')
+optdepends=('gstreamer0.10-base' 'alsa-lib' 'libusb')
+conflicts=('bluez-libs' 'bluez-utils')
+provides=('bluez-libs' 'bluez-utils')
+replaces=('bluez-libs' 'bluez-utils')
+backup=(etc/bluetooth/{main,rfcomm,audio,network,input}.conf
+ etc/conf.d/bluetooth)
+source=("http://www.kernel.org/pub/linux/bluetooth/$pkgname-$pkgver.tar.bz2"
+ 'bluetooth.conf.d'
+ 'rc.bluetooth')
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/lib \
+ --mandir=/usr/share/man \
+ --enable-gstreamer \
+ --enable-alsa \
+ --enable-usb \
+ --enable-netlink \
+ --enable-tools \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --enable-dfutool \
+ --enable-hidd \
+ --enable-pand \
+ --enable-dund \
+ --enable-cups \
+ --enable-manpages \
+ --enable-configfiles \
+ --enable-pcmciarules || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -D -m644 "$srcdir/$pkgname-$pkgver/network/network.conf" "$pkgdir/etc/bluetooth/" || return 1
+ install -D -m644 "$srcdir/$pkgname-$pkgver/input/input.conf" "$pkgdir/etc/bluetooth/" || return 1
+ install -D -m644 "$srcdir/$pkgname-$pkgver/audio/audio.conf" "$pkgdir/etc/bluetooth/" || return 1
+ install -D -m755 "$srcdir/rc.bluetooth" "$pkgdir/etc/rc.d/bluetooth" || return 1
+ install -D -m644 "$srcdir/bluetooth.conf.d" "$pkgdir/etc/conf.d/bluetooth" || return 1
+}
+md5sums=('5c37fb99c03f40269b9245eec3e7b7f4'
+ 'd12be5b494525bb1ba6eac5c3983dd3e'
+ '03d4f2463b1b580e8d2ada3767140685')
diff --git a/abs/extra/bluez/bluetooth.conf.d b/abs/extra/bluez/bluetooth.conf.d
new file mode 100644
index 0000000..8f25ef4
--- /dev/null
+++ b/abs/extra/bluez/bluetooth.conf.d
@@ -0,0 +1,33 @@
+# Bluetooth configuraton file
+
+# Bluetooth services (allowed values are "true" and "false")
+
+# Run the bluetoothd daemon (default: true)
+#DAEMON_ENABLE="false"
+
+# Run hid2hci (default: false)
+#HID2HCI_ENABLE="true"
+
+# Run the sdp daemon (default: false)
+# If this is disabled, hcid's internal sdp daemon will be used
+#SDPD_ENABLE="true"
+
+# Run the bluetooth HID daemon (default: false)
+#HIDD_ENABLE="true"
+
+# Activate rfcomm ports (default: false)
+#RFCOMM_ENABLE="true"
+
+# Run bluetooth dial-up networking daemon (default: false)
+#DUND_ENABLE="true"
+
+# Run bluetooth PAN daemon (default: false)
+#PAND_ENABLE="true"
+
+# rfcomm configuration file (default: /etc/bluetooth/rfcomm.conf)
+#RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
+
+# Options for hidd, dund and pand (default: none)
+#HIDD_OPTIONS=""
+#DUND_OPTIONS=""
+#PAND_OPTIONS=""
diff --git a/abs/extra/bluez/rc.bluetooth b/abs/extra/bluez/rc.bluetooth
new file mode 100644
index 0000000..38b6216
--- /dev/null
+++ b/abs/extra/bluez/rc.bluetooth
@@ -0,0 +1,106 @@
+#!/bin/sh
+#
+# Start/stop the Bluetooth daemons
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+DAEMON_NAME="bluetoothd"
+HID2HCI_NAME="hid2hci"
+HIDD_NAME="hidd"
+RFCOMM_NAME="rfcomm"
+PAND_NAME="pand"
+DUND_NAME="dund"
+
+DAEMON_EXEC="/usr/sbin/bluetoothd"
+HID2HCI_EXEC="/usr/sbin/hid2hci"
+HIDD_EXEC="/usr/bin/hidd"
+RFCOMM_EXEC="/usr/bin/rfcomm"
+PAND_EXEC="/usr/bin/pand"
+DUND_EXEC="/usr/bin/dund"
+
+DAEMON_ENABLE="true"
+HID2HCI_ENABLE="false"
+HIDD_ENABLE="false"
+RFCOMM_ENABLE="false"
+DUND_ENABLE="false"
+PAND_ENABLE="false"
+
+RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
+
+HIDD_OPTIONS=""
+DUND_OPTIONS=""
+PAND_OPTIONS=""
+
+[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth
+
+case "$1" in
+ start)
+ stat_busy "Starting bluetooth subsystem:"
+ if [ "$DAEMON_ENABLE" = "true" -a -x "$DAEMON_EXEC" ] ; then
+ stat_append " $DAEMON_NAME"
+ $DAEMON_EXEC
+ fi
+ if [ "$HID2HCI_ENABLE" = "true" -a -x "$HID2HCI_EXEC" ] ; then
+ stat_append " $HID2HCI_NAME"
+ $HID2HCI_EXEC --tohci > /dev/null 2>&1 || true
+ fi
+ if [ "$SDPD_ENABLE" = "true" -a -x "$SDPD_EXEC" ] ; then
+ stat_append " $SDPD_NAME"
+ $SDPD_EXEC
+ fi
+ if [ "$HIDD_ENABLE" = "true" -a -x "$HIDD_EXEC" ]; then
+ stat_append " $HIDD_NAME"
+ $HIDD_EXEC $HIDD_OPTIONS --server
+ fi
+ if [ "$RFCOMM_ENABLE" = "true" -a -x "$RFCOMM_EXEC" -a -f "$RFCOMM_CONFIG" ]; then
+ stat_append " $RFCOMM_NAME"
+ $RFCOMM_EXEC -f $RFCOMM_CONFIG bind all
+ fi
+ if [ "$DUND_ENABLE" = "true" -a -x "$DUND_EXEC" -a -n "$DUND_OPTIONS" ]; then
+ stat_append " $DUND_NAME"
+ $DUND_EXEC $DUND_OPTIONS
+ fi
+ if [ "$PAND_ENABLE" = "true" -a -x "$PAND_EXEC" -a -n "$PAND_OPTIONS" ]; then
+ stat_append " $PAND_NAME"
+ $PAND_EXEC $PAND_OPTIONS
+ fi
+ add_daemon bluetooth
+ stat_done
+ ;;
+ stop)
+ stat_busy "Stopping bluetooth subsystem:"
+
+ stat_append " $PAND_NAME"
+ killall $PAND_NAME >/dev/null 2>&1
+
+ stat_append " $DUND_NAME"
+ killall $DUND_NAME >/dev/null 2>&1
+
+ if [ -x "$RFCOMM_EXEC" ]; then
+ stat_append " $RFCOMM_NAME"
+ $RFCOMM_EXEC release all >/dev/null 2>&1
+ fi
+
+ stat_append " $HIDD_NAME"
+ killall $HIDD_NAME >/dev/null 2>&1
+
+ stat_append " $SDPD_NAME"
+ killall $SDPD_NAME >/dev/null 2>&1
+
+ stat_append " $DAEMON_NAME"
+ killall $DAEMON_NAME >/dev/null 2>&1
+
+ rm_daemon bluetooth
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/bmp/0.9.7-visualization.patch b/abs/extra/bmp/0.9.7-visualization.patch
new file mode 100644
index 0000000..ac03323
--- /dev/null
+++ b/abs/extra/bmp/0.9.7-visualization.patch
@@ -0,0 +1,12 @@
+--- beep/vis.c 2004-12-04 10:04:29.000000000 +0100
++++ beep/vis.c 2005-02-17 12:02:25.391044008 +0100
+@@ -223,7 +223,8 @@ vis_draw(Widget * w)
+ /* FIXME: The check "shouldn't" be neccessary? */
+ /* if (GTK_IS_WINDOW(vis->vs_window)) { */
+ GDK_THREADS_ENTER();
+- gdk_draw_indexed_image(vis->vs_window, vis->vs_widget.gc,
++ if (GDK_IS_DRAWABLE(vis->vs_window))
++ gdk_draw_indexed_image(vis->vs_window, vis->vs_widget.gc,
+ vis->vs_widget.x, vis->vs_widget.y,
+ vis->vs_widget.width, vis->vs_widget.height,
+ GDK_RGB_DITHER_NORMAL, (guchar *) rgb_data,
diff --git a/abs/extra/bmp/0.9.7.1-visualization.patch b/abs/extra/bmp/0.9.7.1-visualization.patch
new file mode 100644
index 0000000..ac03323
--- /dev/null
+++ b/abs/extra/bmp/0.9.7.1-visualization.patch
@@ -0,0 +1,12 @@
+--- beep/vis.c 2004-12-04 10:04:29.000000000 +0100
++++ beep/vis.c 2005-02-17 12:02:25.391044008 +0100
+@@ -223,7 +223,8 @@ vis_draw(Widget * w)
+ /* FIXME: The check "shouldn't" be neccessary? */
+ /* if (GTK_IS_WINDOW(vis->vs_window)) { */
+ GDK_THREADS_ENTER();
+- gdk_draw_indexed_image(vis->vs_window, vis->vs_widget.gc,
++ if (GDK_IS_DRAWABLE(vis->vs_window))
++ gdk_draw_indexed_image(vis->vs_window, vis->vs_widget.gc,
+ vis->vs_widget.x, vis->vs_widget.y,
+ vis->vs_widget.width, vis->vs_widget.height,
+ GDK_RGB_DITHER_NORMAL, (guchar *) rgb_data,
diff --git a/abs/extra/bmp/PKGBUILD b/abs/extra/bmp/PKGBUILD
new file mode 100644
index 0000000..ffcc1bf
--- /dev/null
+++ b/abs/extra/bmp/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 9914 2008-08-21 00:36:16Z eric $
+# Maintainer: Kevin Piche <kevin@archlinux.org>
+# Contributor: Ben <contrasutra@myrealbox.com>
+
+pkgname=bmp
+pkgver=0.9.7.1
+pkgrel=4
+pkgdesc="gtk2 port of xmms"
+arch=(i686 x86_64)
+url="http://bmp.beep-media-player.org/"
+depends=('esd' 'id3lib' 'libglade' 'libsm' 'libvorbis' 'unzip')
+source=(http://voxel.dl.sourceforge.net/sourceforge/beepmp/bmp-$pkgver.tar.gz $pkgver-visualization.patch bmp-${pkgver}-crossfade-0.3.9.patch)
+md5sums=('c25d5a8d49cc5851d13d525a20023c4c' 'fa1bdf5a8d03e8539a6bed5caa471176'\
+ '42ad4109ddb66024d4c6d1f3e572ab86')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ patch -p0 -i ../${pkgver}-visualization.patch
+ patch -p1 -i ../${pkgname}-${pkgver}-crossfade-0.3.9.patch
+ ./configure --prefix=/usr
+ /usr/bin/make || return 1
+ /usr/bin/make DESTDIR=$startdir/pkg install
+ find $startdir/pkg -name '*.la' -exec rm {} \;
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/abs/extra/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch b/abs/extra/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch
new file mode 100644
index 0000000..4c1e46d
--- /dev/null
+++ b/abs/extra/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch
@@ -0,0 +1,108 @@
+Patch taken from xmms-crossfade 3.10 tarball. Required for crossfade to
+work. http://www.eisenlohr.org/xmms-crossfade/
+
+diff -ur bmp-0.9.7.1/beep/mainwin.c bmp-0.9.7.1.patched/beep/mainwin.c
+--- bmp-0.9.7.1/beep/mainwin.c 2005-05-09 10:45:39.000000000 +0200
++++ bmp-0.9.7.1.patched/beep/mainwin.c 2005-11-25 00:03:59.000000000 +0100
+@@ -655,9 +655,11 @@
+ mainwin_set_shade(!cfg.player_shaded);
+ }
+
++gboolean is_quitting = FALSE;
+ void
+ mainwin_quit_cb(void)
+ {
++ is_quitting = TRUE;
+ gtk_widget_hide(equalizerwin);
+ gtk_widget_hide(playlistwin);
+ gtk_widget_hide(mainwin);
+@@ -1318,7 +1320,7 @@
+ change_song(guint pos)
+ {
+ if (bmp_playback_get_playing())
+- bmp_playback_stop();
++ bmp_playback_stop_for_restart();
+
+ playlist_set_position(pos);
+ bmp_playback_initiate();
+diff -ur bmp-0.9.7.1/beep/playback.c bmp-0.9.7.1.patched/beep/playback.c
+--- bmp-0.9.7.1/beep/playback.c 2005-01-26 06:56:15.000000000 +0100
++++ bmp-0.9.7.1.patched/beep/playback.c 2005-11-25 00:03:59.000000000 +0100
+@@ -89,7 +89,7 @@
+ return;
+
+ if (bmp_playback_get_playing())
+- bmp_playback_stop();
++ bmp_playback_stop_for_restart();
+
+ vis_clear_data(mainwin_vis);
+ vis_clear_data(playlistwin_vis);
+@@ -135,6 +135,15 @@
+ get_current_input_plugin()->pause(ip_data.paused);
+ }
+
++gboolean input_stopped_for_restart = FALSE;
++void
++bmp_playback_stop_for_restart(void)
++{
++ input_stopped_for_restart = TRUE;
++ bmp_playback_stop();
++ input_stopped_for_restart = FALSE;
++}
++
+ void
+ bmp_playback_stop(void)
+ {
+diff -ur bmp-0.9.7.1/beep/playback.h bmp-0.9.7.1.patched/beep/playback.h
+--- bmp-0.9.7.1/beep/playback.h 2004-12-04 10:04:26.000000000 +0100
++++ bmp-0.9.7.1.patched/beep/playback.h 2005-11-25 00:03:59.000000000 +0100
+@@ -26,6 +26,7 @@
+ void bmp_playback_initiate(void);
+ void bmp_playback_pause(void);
+ void bmp_playback_stop(void);
++void bmp_playback_stop_for_restart(void);
+ gboolean bmp_playback_play_file(const gchar * filename);
+ gboolean bmp_playback_get_playing(void);
+ gboolean bmp_playback_get_paused(void);
+diff -ur bmp-0.9.7.1/beep/playlist.c bmp-0.9.7.1.patched/beep/playlist.c
+--- bmp-0.9.7.1/beep/playlist.c 2005-08-11 09:25:51.000000000 +0200
++++ bmp-0.9.7.1.patched/beep/playlist.c 2005-11-25 00:03:59.000000000 +0100
+@@ -817,7 +817,7 @@
+ if (bmp_playback_get_playing()) {
+ /* We need to stop before changing playlist_position */
+ PLAYLIST_UNLOCK();
+- bmp_playback_stop();
++ bmp_playback_stop_for_restart();
+ PLAYLIST_LOCK();
+ restart_playing = TRUE;
+ }
+@@ -868,7 +868,7 @@
+ if (bmp_playback_get_playing()) {
+ /* We need to stop before changing playlist_position */
+ PLAYLIST_UNLOCK();
+- bmp_playback_stop();
++ bmp_playback_stop_for_restart();
+ PLAYLIST_LOCK();
+ restart_playing = TRUE;
+ }
+@@ -1018,7 +1018,7 @@
+ if (bmp_playback_get_playing()) {
+ /* We need to stop before changing playlist_position */
+ PLAYLIST_UNLOCK();
+- bmp_playback_stop();
++ bmp_playback_stop_for_restart();
+ PLAYLIST_LOCK();
+ restart_playing = TRUE;
+ }
+@@ -1047,7 +1047,10 @@
+ {
+ GList *plist_pos_list;
+
+- bmp_playback_stop();
++ if (cfg.repeat)
++ bmp_playback_stop_for_restart();
++ else
++ bmp_playback_stop();
+
+ PLAYLIST_LOCK();
+ plist_pos_list = find_playlist_position_list();
diff --git a/abs/extra/boost/0001-date_time-gcc-4.3-fix.patch b/abs/extra/boost/0001-date_time-gcc-4.3-fix.patch
new file mode 100644
index 0000000..9f7e016
--- /dev/null
+++ b/abs/extra/boost/0001-date_time-gcc-4.3-fix.patch
@@ -0,0 +1,25 @@
+From 88f7023cc36d82133cfa0e705531a9d73feb4686 Mon Sep 17 00:00:00 2001
+From: Tim Blechmann <tim@klingt.org>
+Date: Sat, 2 Feb 2008 17:22:58 +0100
+Subject: [PATCH] date_time: gcc-4.3 fix
+
+---
+ boost/date_time/tz_db_base.hpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/boost/date_time/tz_db_base.hpp b/boost/date_time/tz_db_base.hpp
+index b9c0a8a..03f748e 100644
+--- a/boost/date_time/tz_db_base.hpp
++++ b/boost/date_time/tz_db_base.hpp
+@@ -158,7 +158,7 @@ namespace boost {
+ typedef typename time_zone_type::base_type time_zone_base_type;
+ typedef typename time_zone_type::time_duration_type time_duration_type;
+ typedef time_zone_names_base<char_type> time_zone_names;
+- typedef dst_adjustment_offsets<time_duration_type> dst_adjustment_offsets;
++ typedef boost::date_time::dst_adjustment_offsets<time_duration_type> dst_adjustment_offsets;
+ typedef std::basic_string<char_type> string_type;
+
+ //! Constructs an empty database
+--
+1.5.3.8
+
diff --git a/abs/extra/boost/PKGBUILD b/abs/extra/boost/PKGBUILD
new file mode 100644
index 0000000..1fcfd98
--- /dev/null
+++ b/abs/extra/boost/PKGBUILD
@@ -0,0 +1,63 @@
+# $Id: PKGBUILD 24200 2009-01-15 01:41:45Z douglas $
+# Maintainer: kevin <kevin@archlinux.org>
+# TU: Kritoke <kritoke@gamebox.net>
+# Contributor: Luca Roccia <little_rock@users.sourceforge.net>
+
+pkgname=boost
+pkgver=1.37.0
+_boostver=1_37_0
+pkgrel=1
+pkgdesc="Boost provides free peer-reviewed portable C++ source libraries."
+arch=(i686 x86_64)
+url="http://www.boost.org/"
+depends=('python>=2.5' 'bzip2' 'zlib')
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}_${_boostver}.tar.gz 0001-date_time-gcc-4.3-fix.patch)
+license=('custom')
+
+build() {
+ cd ${srcdir}/${pkgname}_${_boostver}
+ export CFLAGS="${CFLAGS} -fno-strict-aliasing"
+ #patch -Np1 -i ${srcdir}/0001-date_time-gcc-4.3-fix.patch || return 1
+
+ # build bjam
+ cd ${srcdir}/${pkgname}_${_boostver}/tools/jam/src
+ ./build.sh cc || return 1
+
+ _bindir="bin.linuxx86"
+ [ "${CARCH}" = "x86_64" ] && _bindir="bin.linuxx86_64"
+
+ install -m755 -d ${pkgdir}/usr/bin
+ install -m755 ${_bindir}/bjam ${pkgdir}/usr/bin/bjam || return 1
+
+ # build bcp
+ cd ${srcdir}/${pkgname}_${_boostver}/tools/bcp
+ ../jam/src/${_bindir}/bjam || return 1
+ install -m755 ${srcdir}/${pkgname}_${_boostver}/dist/bin/bcp \
+ ${pkgdir}/usr/bin/bcp || return 1
+
+ # build libs
+ cd ${srcdir}/${pkgname}_${_boostver}
+ # default "debug release <runtime-link>static/dynamic <threading>single/multi"
+ # --layout=system removes the -gcc suffix from libraries and installs
+ # includes in /usr/include/boost.
+ ./tools/jam/src/${_bindir}/bjam \
+ release debug-symbols=off threading=single,multi \
+ runtime-link=shared link=shared,static \
+ --prefix=${pkgdir}/usr \
+ -sPYTHON_ROOT=/usr \
+ -sPYTHON_VERSION=2.5 \
+ -sTOOLS=gcc \
+ --layout=system \
+ install || return 1
+
+ # build pyste
+ cd ${srcdir}/${pkgname}_${_boostver}/libs/python/pyste/install
+ python setup.py install --root=${pkgdir} || return 1
+
+ # license
+ install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname}
+ install -m644 ${srcdir}/${pkgname}_${_boostver}/LICENSE_1_0.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
+}
+md5sums=('c38b88bb4ebc6d0d9193f432842273d2'
+ 'd7f821056540ef08eb1d5ebd5ed017f1')
diff --git a/abs/extra/boost/serialization_gcc43.patch b/abs/extra/boost/serialization_gcc43.patch
new file mode 100644
index 0000000..13dbf5d
--- /dev/null
+++ b/abs/extra/boost/serialization_gcc43.patch
@@ -0,0 +1,44 @@
+Index: /home/maik/workspace/boost/boost/archive/polymorphic_iarchive.hpp
+===================================================================
+--- /home/maik/workspace/boost/boost/archive/polymorphic_iarchive.hpp (Revision 43953)
++++ /home/maik/workspace/boost/boost/archive/polymorphic_iarchive.hpp (Arbeitskopie)
+@@ -17,6 +17,7 @@
+ // See http://www.boost.org for updates, documentation, and revision history.
+
+ #include <cstddef> // std::size_t
++#include <climits> // ULONG_MAX
+ #include <boost/config.hpp>
+
+ #if defined(BOOST_NO_STDC_NAMESPACE)
+@@ -38,6 +39,9 @@
+ // i.e. that its not a synonym for (unsigned) long
+ // if there is no 64 bit int or if its the same as a long
+ // we shouldn't define separate functions for int64 data types.
++#ifndef ULONG_MAX
++# error "ULONG_MAX is not defined"
++#endif
+ #if defined(BOOST_NO_INT64_T) \
+ || (ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615u) // 2**64 - 1
+ # define BOOST_NO_INTRINSIC_INT64_T
+Index: /home/maik/workspace/boost/boost/archive/polymorphic_oarchive.hpp
+===================================================================
+--- /home/maik/workspace/boost/boost/archive/polymorphic_oarchive.hpp (Revision 43953)
++++ /home/maik/workspace/boost/boost/archive/polymorphic_oarchive.hpp (Arbeitskopie)
+@@ -18,6 +18,7 @@
+
+ #include <cstddef> // size_t
+ #include <string>
++#include <climits> // ULONG_MAX
+
+ #include <boost/config.hpp>
+ #if defined(BOOST_NO_STDC_NAMESPACE)
+@@ -37,6 +38,9 @@
+ // i.e. that its not a synonym for (unsigned) long
+ // if there is no 64 bit int or if its the same as a long
+ // we shouldn't define separate functions for int64 data types.
++#ifndef ULONG_MAX
++# error "ULONG_MAX is not defined"
++#endif
+ #if defined(BOOST_NO_INT64_T) \
+ || (ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615u) // 2**64 - 1
+ # define BOOST_NO_INTRINSIC_INT64_T
diff --git a/abs/extra/cabextract/PKGBUILD b/abs/extra/cabextract/PKGBUILD
new file mode 100644
index 0000000..2b8eb10
--- /dev/null
+++ b/abs/extra/cabextract/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: dale <dale@archlinux.org>
+pkgname=cabextract
+pkgver=1.2
+pkgrel=1
+pkgdesc="A program to extract Microsoft cabinet (.CAB) files."
+license=(GPL)
+arch=(i686 x86_64)
+depends=(glibc)
+conflicts=()
+backup=()
+install=
+url="http://www.kyz.uklinux.net/cabextract.php"
+source=(http://www.cabextract.org.uk/$pkgname-$pkgver.tar.gz)
+md5sums=('dc421a690648b503265c82ade84e143e')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+}
diff --git a/abs/extra/cddb-py/PKGBUILD b/abs/extra/cddb-py/PKGBUILD
new file mode 100755
index 0000000..6852446
--- /dev/null
+++ b/abs/extra/cddb-py/PKGBUILD
@@ -0,0 +1,20 @@
+pkgname=cddb-py
+pkgver=1.4
+pkgrel=1
+pkgdesc="CDDB-Server access from Python. Differs from pycddb"
+url="http://cddb-py.sourceforge.net"
+license=""
+depends=(python)
+makedepends=()
+conflicts=()
+replaces=()
+backup=()
+install=
+arch='i686'
+source=("http://easynews.dl.sourceforge.net/sourceforge/cddb-py/CDDB-$pkgver.tar.gz")
+md5sums=('254698082bafe3030d07d88fb7e13fe2')
+
+build() {
+ cd $startdir/src/CDDB-$pkgver
+ python setup.py install --root=$startdir/pkg/
+ }
diff --git a/abs/extra/community/athcool/PKGBUILD b/abs/extra/community/athcool/PKGBUILD
new file mode 100644
index 0000000..c5a3290
--- /dev/null
+++ b/abs/extra/community/athcool/PKGBUILD
@@ -0,0 +1,24 @@
+pkgname=athcool
+pkgver=0.3.12
+pkgrel=3
+pkgdesc="Small utility allowing to enable powersaving mode on AMD Duron/Athlon/Athlon XP processors."
+url="http://members.jcom.home.ne.jp/jacobi/linux/softwares.html"
+depends=(pciutils)
+license="GPL"
+install=athcool.install
+arch=(i686)
+source=(http://members.jcom.home.ne.jp/jacobi/linux/files/$pkgname-$pkgver.tar.gz
+athcool run finish)
+md5sums=('f2e0f4fbd04f5e1f09aa60a3ecb24645'
+ 'bbf32484cec6431568ccf51c2516f9e7'
+ 'b9cf31ac580c1665d50d70e405d276bc')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ /bin/install -D -m0755 ../athcool $startdir/pkg/etc/rc.d/athcool
+ mkdir -p $pkgdir/etc/sv/athcool/supervise
+ install -D -m0755 ../run $pkgdir/etc/sv/athcool
+ install -D -m0755 ../finish $pkgdir/etc/sv/athcool
+}
diff --git a/abs/extra/community/athcool/athcool b/abs/extra/community/athcool/athcool
new file mode 100644
index 0000000..f49bd40
--- /dev/null
+++ b/abs/extra/community/athcool/athcool
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+ATHCOOL=/usr/sbin/athcool
+
+case "$1" in
+ start)
+ stat_busy "Enabling Athcool"
+ $ATHCOOL on > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Disabling Athcool"
+ $ATHCOOL off > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ /bin/sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/community/athcool/athcool.install b/abs/extra/community/athcool/athcool.install
new file mode 100644
index 0000000..8896da2
--- /dev/null
+++ b/abs/extra/community/athcool/athcool.install
@@ -0,0 +1,18 @@
+# arg 1: the new package version
+post_install() {
+ add_service.sh athcool
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ remove_service.sh athcool
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/athcool/finish b/abs/extra/community/athcool/finish
new file mode 100755
index 0000000..cae6b1b
--- /dev/null
+++ b/abs/extra/community/athcool/finish
@@ -0,0 +1,3 @@
+#!/bin/bash
+exec 2>&1
+sv down athcool
diff --git a/abs/extra/community/athcool/run b/abs/extra/community/athcool/run
new file mode 100644
index 0000000..b43936c
--- /dev/null
+++ b/abs/extra/community/athcool/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/sbin/athcool on 2>&1
diff --git a/abs/extra/community/cksfv/PKGBUILD b/abs/extra/community/cksfv/PKGBUILD
new file mode 100644
index 0000000..b82aa60
--- /dev/null
+++ b/abs/extra/community/cksfv/PKGBUILD
@@ -0,0 +1,21 @@
+# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
+# Contributor: Wijnand Modderman <wijanand+aur@archlinux.nl>
+
+pkgname=cksfv
+pkgver=1.3.12
+pkgrel=1
+pkgdesc="SFV (Simple File Verification) Checker"
+arch=('i686' 'x86_64')
+url="http://zakalwe.virtuaalipalvelin.net/~shd/foss/cksfv/"
+license=('GPL')
+depends=('glibc')
+source=(http://zakalwe.virtuaalipalvelin.net/~shd/foss/cksfv/files/$pkgname-$pkgver.tar.bz2)
+md5sums=('1d277da8bafaec9ddadb92ece4999590')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --package-prefix=$startdir/pkg
+ make || return 1
+ make install
+ chmod 644 $startdir/pkg/usr/share/man/man1/$pkgname.1
+}
diff --git a/abs/extra/community/codecs/PKGBUILD b/abs/extra/community/codecs/PKGBUILD
new file mode 100644
index 0000000..8cf80be
--- /dev/null
+++ b/abs/extra/community/codecs/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 27228 2009-02-17 05:58:02Z thayer $
+# Contributor: Thomas Baechler <thomas@archlinux.org>
+# Maintainer: Thayer Williams <thayer@archlinux.org>
+
+pkgname=codecs
+pkgver=20071007
+pkgrel=3
+pkgdesc="Non-linux native codec pack. (Win32, Real9, QuickTime)"
+arch=('i686' 'x86_64')
+license=('unknown')
+# The codec packages are different
+# only the 32 bit package needs legacy libstdc++
+[ "$CARCH" = "i686" ] && depends=('libstdc++5')
+[ "$CARCH" = "x86_64" ] && depends=('gcc-libs')
+options=('!strip')
+url="http://www.mplayerhq.hu/design7/dload.html"
+
+md5sums=('4ea9c2dbd0945c83af1a8d0dd363993c')
+_arch=""
+if [ "${CARCH}" = "x86_64" ]; then
+ _arch="-amd64"
+ md5sums=('8e1ceeec51469f5baac65e56fac709e8')
+fi
+source=(http://www.mplayerhq.hu/MPlayer/releases/codecs/essential${_arch}-${pkgver}.tar.bz2)
+
+build() {
+ mkdir -p ${pkgdir}/usr/lib/codecs
+ cd ${pkgdir}/usr/lib
+ ln -s codecs win32
+ install -m755 ${srcdir}/essential${_arch}-${pkgver}/* ${pkgdir}/usr/lib/codecs
+ rm ${pkgdir}/usr/lib/codecs/README
+}
+
diff --git a/abs/extra/community/cpulimit/PKGBUILD b/abs/extra/community/cpulimit/PKGBUILD
new file mode 100644
index 0000000..28a3b55
--- /dev/null
+++ b/abs/extra/community/cpulimit/PKGBUILD
@@ -0,0 +1,20 @@
+# $Id: PKGBUILD,v 1.6 2009/02/09 18:02:27 abhidg Exp $
+# Maintainer: Sergej Pupykin <sergej@aur.archlinux.org>
+# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
+
+pkgname=cpulimit
+pkgver=1.1
+pkgrel=1
+pkgdesc="Limit cpu usage in %. Actualy sends SIGSTOP/SIGCONT"
+arch=('i686' 'x86_64')
+url="http://cpulimit.sourceforge.net/"
+license=("GPL")
+source=("http://downloads.sourceforge.net/sourceforge/cpulimit/cpulimit-$pkgver.tar.gz")
+md5sums=('f4ff6d4bfaef1258e8f5cd2041e2e2a3')
+
+build () {
+ cd $startdir/src/$pkgname-$pkgver
+ make
+ install -D -m0755 cpulimit $startdir/pkg/usr/bin/cpulimit
+}
+
diff --git a/abs/extra/community/cwiid-svn/PKGBUILD b/abs/extra/community/cwiid-svn/PKGBUILD
new file mode 100644
index 0000000..eba6523
--- /dev/null
+++ b/abs/extra/community/cwiid-svn/PKGBUILD
@@ -0,0 +1,49 @@
+#Contributor:Andrea Tarocchi <valdar@email.it>
+pkgname=cwiid-svn
+#pkgver=`date +%Y%m%d`
+pkgver=184
+pkgrel=3
+pkgdesc="Cwiid-svn is the bleeding edge version of a wiimote's driver and utility tools"
+arch=(i686 x86_64)
+url="http://abstrakraft.org/cwiid/"
+license=('GPL')
+
+depends=('gawk' 'bluez-libs' 'gtk2')
+makedepends=('subversion')
+conflicts=('cwiid')
+provides=('cwiid')
+install=('cwiid.install')
+source=()
+md5sums=('b3966beecae0de200c90523af8f3bf0e')
+
+_svntrunk=http://abstrakraft.org/cwiid/svn/trunk/
+_svnmod=cwiid
+
+build() {
+ cd $startdir/src
+
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ #svn co $_svntrunk --config-dir ./ $_svnmod
+
+ msg "SVN checkout done or server timeout"
+ msg "Starting make..."
+
+ cp -r $_svnmod $_svnmod-build
+ cd $_svnmod-build
+
+ autoreconf
+
+ ./configure --prefix=/usr --disable-ldconfig --sysconfdir=/etc
+ make
+
+ install -d $startdir/pkg/usr/bin
+ install -d $startdir/pkg/etc
+ install -d $startdir/pkg/usr/lib
+ install -d $startdir/pkg/usr/include
+
+ make prefix=$startdir/pkg/usr sysconfdir=$startdir/pkg/etc install
+
+ install -D -m644 ./wminput/README $pkgdir/usr/share/doc/cwiid-svn/wminput
+
+ rm -rf $startdir/src/$_svnmod-build
+}
diff --git a/abs/extra/community/cwiid-svn/cwiid.install b/abs/extra/community/cwiid-svn/cwiid.install
new file mode 100644
index 0000000..6f3dccc
--- /dev/null
+++ b/abs/extra/community/cwiid-svn/cwiid.install
@@ -0,0 +1,16 @@
+# arg 1: the new package version
+post_install() {
+echo -e "Note:"
+echo -e "\033[1;31m==> In order to use wminput you have to load the uinput kernel module:\033[0m"
+echo -e "\033[1;31m==> modprobe uinput (as root)\033[0m"
+echo -e "\033[1;31m==> and you have to assign correct right acces to /dev/uinput\033[0m"
+echo -e "\033[1;31m==> PLEASE READ /usr/share/doc/cwiid-svn/wminput\033[0m"
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/deluge/PKGBUILD b/abs/extra/community/deluge/PKGBUILD
new file mode 100644
index 0000000..6a1a971
--- /dev/null
+++ b/abs/extra/community/deluge/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 26558 2009-02-09 16:10:09Z hugo $
+# Maintainer: Hugo Doria <hugo@archlinux.org>
+
+pkgname=deluge
+pkgver=1.1.2
+pkgrel=1
+pkgdesc="A bittorrent client written with python and pygtk"
+arch=('i686' 'x86_64')
+url="http://deluge-torrent.org/"
+license=('GPL3')
+depends=('pygtk' 'boost>=1.37.0' 'pyxdg' 'dbus-python' 'librsvg' 'setuptools')
+makedepends=('subversion' 'intltool')
+options=('!emptydirs')
+source=(http://download.deluge-torrent.org/source/${pkgver}/${pkgname}-${pkgver}.tar.gz)
+md5sums=('c9d56e266e5cb3024f2dbd72c952e182')
+
+build() {
+
+ cd ${srcdir}/${pkgname}-${pkgver}/
+ python setup.py build
+ python setup.py install --prefix=/usr --root=${pkgdir}
+
+ install -D -m644 deluge/data/pixmaps/deluge.svg ${pkgdir}/usr/share/pixmaps/deluge.svg
+}
+
diff --git a/abs/extra/community/desktop-file-utils/ChangeLog b/abs/extra/community/desktop-file-utils/ChangeLog
new file mode 100644
index 0000000..8941e48
--- /dev/null
+++ b/abs/extra/community/desktop-file-utils/ChangeLog
@@ -0,0 +1,7 @@
+2008-07-22 Alexander Fehr <pizzapunk gmail com>
+
+ * desktop-file-utils-0.15-1:
+ New upstream release.
+ New maintainer.
+ Changed url.
+ Added ChangeLog.
diff --git a/abs/extra/community/desktop-file-utils/PKGBUILD b/abs/extra/community/desktop-file-utils/PKGBUILD
new file mode 100644
index 0000000..aa92c33
--- /dev/null
+++ b/abs/extra/community/desktop-file-utils/PKGBUILD
@@ -0,0 +1,20 @@
+# $Id: PKGBUILD 6468 2008-07-24 13:00:42Z alexanderf $
+# Maintainer: Alexander Fehr <pizzapunk gmail com>
+
+pkgname=desktop-file-utils
+pkgver=0.15
+pkgrel=1
+pkgdesc="Command line utilities for working with desktop entries"
+arch=('i686' 'x86_64')
+url="http://www.freedesktop.org/wiki/Software/desktop-file-utils"
+license=('GPL')
+depends=('glib2')
+source=(http://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-$pkgver.tar.gz)
+md5sums=('2fe8ebe222fc33cd4a959415495b7eed')
+
+build() {
+ cd "$srcdir/desktop-file-utils-$pkgver"
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+}
diff --git a/abs/extra/community/djmount/PKGBUILD b/abs/extra/community/djmount/PKGBUILD
new file mode 100644
index 0000000..a3648dc
--- /dev/null
+++ b/abs/extra/community/djmount/PKGBUILD
@@ -0,0 +1,25 @@
+# Contributor: Michele Schäuble <mschaeuble@swissonline.ch>
+
+pkgname=djmount
+pkgver=0.71
+pkgrel=1
+pkgdesc="A UPnP AV client that mounts media server contents as a filesystem."
+arch=('i686')
+url="http://djmount.sourceforge.net/"
+license=('GPL')
+depends=('fuse')
+source=(http://voxel.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz \
+ djmount.rcd djmount.confd)
+md5sums=('c922753e706c194bf82a8b6ca77e6a9a' \
+ 'f473b5150df385447f2f58049bfb6199' \
+ '21de4c947c17e8558f1007a20757f254')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+
+ install -D -m755 $startdir/src/djmount.rcd $startdir/pkg/etc/rc.d/djmount
+ install -D -m644 $startdir/src/djmount.confd $startdir/pkg/etc/conf.d/djmount
+}
diff --git a/abs/extra/community/djmount/djmount.confd b/abs/extra/community/djmount/djmount.confd
new file mode 100644
index 0000000..079100e
--- /dev/null
+++ b/abs/extra/community/djmount/djmount.confd
@@ -0,0 +1,2 @@
+OPTIONS="-o ro,allow_other"
+MOUNTPOINT="/media/upnp"
diff --git a/abs/extra/community/djmount/djmount.rcd b/abs/extra/community/djmount/djmount.rcd
new file mode 100755
index 0000000..84899dd
--- /dev/null
+++ b/abs/extra/community/djmount/djmount.rcd
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+ . /etc/rc.conf
+ . /etc/rc.d/functions
+
+# source application-specific settings
+[ -f /etc/conf.d/djmount ] && . /etc/conf.d/djmount
+
+ case "$1" in
+
+ start)
+ stat_busy "Starting djmount"
+ /usr/bin/djmount $OPTIONS $MOUNTPOINT &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ add_daemon djmount
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping djmount"
+ fusermount -u $MOUNTPOINT
+ kill -9 `pidof /usr/bin/djmount` &>/dev/null
+ rm_daemon djmount
+ stat_done
+ ;;
+
+ restart)
+ stat_busy "Restarting djmount ..."
+ $0 stop
+ $0 start
+ stat_done
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ esac
diff --git a/abs/extra/community/enca/PKGBUILD b/abs/extra/community/enca/PKGBUILD
new file mode 100644
index 0000000..1bbd7db
--- /dev/null
+++ b/abs/extra/community/enca/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD,v 1.7 2009/02/27 12:40:33 sergej Exp $
+# Maintainer: Sergej Pupykin <sergej@aur.archlinux.org>
+# Contributor: Filip Dvorak <fila@pruda.com>
+
+pkgname=enca
+pkgver=1.9
+pkgrel=4
+pkgdesc="Charset analyser and converter"
+arch=(i686 x86_64)
+url="http://trific.ath.cx/software/enca"
+options=('!libtool')
+license=("GPL")
+depends=()
+source=(http://archlinux-stuff.googlecode.com/files/enca-$pkgver.tar.bz2)
+md5sums=('b3581e28d68d452286fb0bfe58bed3b3')
+
+build() {
+ cd $startdir/src/enca-$pkgver
+ ./configure --prefix=/usr --libexecdir=/usr/lib/enca
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
+
diff --git a/abs/extra/community/firefox-i18n/PKGBUILD b/abs/extra/community/firefox-i18n/PKGBUILD
new file mode 100644
index 0000000..7f65aa7
--- /dev/null
+++ b/abs/extra/community/firefox-i18n/PKGBUILD
@@ -0,0 +1,87 @@
+# $Id: PKGBUILD 36428 2009-04-22 11:57:51Z pierre $
+# Maintainer: Thomas Baechler <thomas@archlinux.org>
+# Contributor: Jaroslaw Swierczynski <swiergot@juvepoland.com>
+# Contributor: Michal Hybner <dta081@gmail.com>
+pkgname=firefox-i18n
+pkgver=3.0.9
+pkgrel=1
+_languages=af,ar,be,bg,bn-IN,ca,cs,cy,da,de,el,en-GB,eo,es-AR,es-ES,et,eu,fi,fr,fy-NL,ga-IE,gl,gu-IN,he,hi-IN,hu,id,is,it,ja,ka,kn,ko,ku,lt,lv,mk,mn,mr,nb-NO,nl,nn-NO,oc,pa-IN,pl,pt-BR,pt-PT,ro,ru,si,sk,sl,sq,sr,sv-SE,te,th,tr,uk,zh-CN,zh-TW
+pkgdesc="Language packs for Firefox"
+arch=(i686 x86_64)
+license=('MPL')
+url="http://www.mozilla.com/"
+depends=("firefox>=${pkgver}")
+eval conflicts=(mozilla-firefox-i18n mozilla-firefox-{${_languages}} firefox-{${_languages}})
+makedepends=('unzip')
+eval source=(ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/linux-i686/xpi/{${_languages}}.xpi)
+md5sums=('da750827ddf1aaa6c3b09fbb7ca4ebfc'
+ '3beb35aeb195552627394b7769f09c5e'
+ 'cc25e1dfe322e163edd453b54b18ed6c'
+ '3a24f88aed1ec222739909467d45c36f'
+ '458dc3b51d94dfb92180b6513da33768'
+ '6100761f50681a27ecee4b9d43968090'
+ '33f8922cf3f574ddfc40e350e09e1ee8'
+ '1aac80931215e85a9434821318322840'
+ '0fdce63787e71ade32f4150555db446c'
+ 'c40760c6b6ec0a5d43d708d175af71e0'
+ '8a861ec0bc928f7d2babb9c9fdac7afa'
+ 'b5318a854916e712a79f7d3022c82d58'
+ '5d82688be741219e4a2e884c27674d06'
+ '3b786beb412062770cf921b7dfc7c412'
+ '4c4913ba9e21903bc979ff2883256cdb'
+ '2fab4572520a5062d69815bfcde647b5'
+ 'd42995bda0f79edb8115f995e1ecf44f'
+ '7438e9461d20a65c13514ee340db4369'
+ '7be481c1595300ec83ca0632a0e5fd8f'
+ '6784c85f27219f04daecc2151a3ffa3a'
+ '479d5ab78dee9aa3b23ca14e39721034'
+ 'e98a62f1c4096fb471f8d858d01d044f'
+ '59fbe6d0584b5c6c0adff7d16ef8ea51'
+ 'f62a1d67104514da3aad97481e16e81e'
+ '0e43c81c9bd55c5feedcdcab2fb9c4df'
+ 'd2e1c28de1be2474ff42c54727cd8c07'
+ 'c78d170dca0d767c8d9bc31954cd2324'
+ 'dafc51a775d512e3b34601c2a2291f76'
+ '76e95f638d7499fe36e5db2aa4446fc1'
+ '2a12e9ed49515a3e4210224d37f325ca'
+ 'b904d86f667768c7554f7ac1630e2fc7'
+ '466ee82c40244cb0f3308798ae3ef1df'
+ '8e3ab0ac7127b9e651fa8150803d59fa'
+ '6e817a315663b926c4bcee48ef025195'
+ '67cb1f812b5e1ad2cd58d77e34e5e154'
+ 'bc22bb46828c4a929c1e2ec41b090c97'
+ 'ee4d58656343e0f0ee54e066d7e72451'
+ '9b2ac04cffc153a752b4ff6e000b2a29'
+ '329283f9e7a7aaa8a8e5f5ae7e62660d'
+ '13c5186b51ab3c5374620adf8e5c3576'
+ 'a2b1f79253729735ad2e59568144f1b4'
+ 'ccb9763952394717a8b5ec3dec877706'
+ 'e508856e25040ffb87e023de94dca70b'
+ '322eaad0dd48a464187000ea0be5362a'
+ '3632809f34b423ad3ba31077682bbf26'
+ 'fa15ae8bb4927d416abd3f1661dd4af9'
+ '5b8d7b418c477060a78f334d2928702d'
+ '3d5f4b14ae257ed03096757d6a05b217'
+ '4ad2c7aca6a890078f511bf4224e5347'
+ '18754e6cb9cee7b408702bd35cadeb0d'
+ '892701fea3cc09c4350f19ed5c9900ac'
+ '0a939cce9bbff751da5a1e006a26093f'
+ '1e3aeeb18c2958d81ee6eb4801aa9faa'
+ 'cb29c96ac0dd5ece19e78653e74da48a'
+ '9517325ea18e01007787b5e3210c776c'
+ 'c61320979392169249da20a48f81d2a8'
+ 'a2765b25542e7e4d43279f098ea97e72'
+ 'cc42c2b4151c5c41543507d5a4eb699d'
+ '195bb042493f8dc4bda09a66c8a2f49e'
+ 'fe36d87eb352e46459b3c2cc01c4dc2f'
+ '2b73195d3c12fb8ebfd39f30267d3e64')
+
+build() {
+ cd ${startdir}/src
+ for lang in $(echo "${_languages}" | sed 's|,| |g'); do
+ unzip -o ${lang}.xpi
+ sed -i "s|jar:chrome/${lang}.jar|jar:${lang}.jar|" chrome.manifest || return 1
+ install -D -m 644 chrome/${lang}.jar ${pkgdir}/usr/lib/firefox-3.0/chrome/${lang}.jar || return 1
+ install -D -m 644 chrome.manifest ${pkgdir}/usr/lib/firefox-3.0/chrome/${lang}.manifest || return 1
+ done
+}
diff --git a/abs/extra/community/firefox/PKGBUILD b/abs/extra/community/firefox/PKGBUILD
new file mode 100644
index 0000000..191c913
--- /dev/null
+++ b/abs/extra/community/firefox/PKGBUILD
@@ -0,0 +1,76 @@
+# $Id: PKGBUILD 46468 2009-07-18 13:24:45Z jgc $
+# Contributor: Jakub Schmidtke <sjakub@gmail.com>
+
+pkgname=firefox
+pkgver=3.5.1
+pkgrel=3
+_xulver=1.9.1.1
+pkgdesc="Standalone web browser from mozilla.org"
+arch=(i686 x86_64)
+license=('MPL' 'GPL' 'LGPL')
+depends=("xulrunner>=${_xulver}" 'desktop-file-utils' "nspr>=4.8")
+makedepends=('zip' 'pkgconfig' 'diffutils' 'libgnomeui>=2.24.1' 'python')
+replaces=('firefox3')
+install=firefox.install
+url="http://www.mozilla.org/projects/firefox"
+source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}-source.tar.bz2
+ mozconfig
+ firefox.desktop
+ firefox-safe.desktop
+ mozilla-firefox-1.0-lang.patch
+ browser-defaulturls.patch
+ firefox-version.patch
+ browser-app-makefile.patch
+ http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz)
+md5sums=('18169e189785d680827d4fce94524449'
+ '3c928b11918d22377eba01de34debc19'
+ '68cf02788491c6e846729b2f2913bf79'
+ '5e68cabfcf3c021806b326f664ac505e'
+ 'bd5db57c23c72a02a489592644f18995'
+ '346d74ec560e7bbf453c02ff21f4b868'
+ '1dd9a10df0b9e4cf332eadc326d78e07'
+ '165c43a5b03a0bf7ad2e7210b0d8c82c'
+ '6306980e40a3266b4b6c173bfcfdc946')
+
+build() {
+ cd "${srcdir}/mozilla-1.9.1"
+ patch -Np1 -i "${srcdir}/mozilla-firefox-1.0-lang.patch" || return 1
+ patch -Np0 -i "${srcdir}/browser-defaulturls.patch" || return 1
+ patch -Np1 -i "${srcdir}/firefox-version.patch" || return 1
+
+ cp "${srcdir}/mozconfig" .mozconfig
+ unset CFLAGS
+ unset CXXFLAGS
+
+ export LDFLAGS="-Wl,-rpath,/usr/lib/firefox-3.5"
+
+ make -j1 -f client.mk configure MOZ_MAKE_FLAGS="${MAKEFLAGS}" || return 1
+ cd browser/app
+ patch -p2 < "${srcdir}/browser-app-makefile.patch" || return 1
+ cd ../..
+ make -j1 -f client.mk build MOZ_MAKE_FLAGS="${MAKEFLAGS}" || return 1
+ make -j1 DESTDIR="${pkgdir}" install || return 1
+
+ rm -f ${pkgdir}/usr/lib/firefox-3.5/libjemalloc.so
+
+ install -m755 -d ${pkgdir}/usr/share/applications
+ install -m755 -d ${pkgdir}/usr/share/pixmaps
+ install -m644 ${srcdir}/mozilla-1.9.1/browser/branding/unofficial/default48.png ${pkgdir}/usr/share/pixmaps/firefox.png || return 1
+ install -m644 ${srcdir}/firefox.desktop ${pkgdir}/usr/share/applications/ || return 1
+ install -m644 ${srcdir}/firefox-safe.desktop ${pkgdir}/usr/share/applications/ || return 1
+
+ # Install the flash player plugin.
+
+ mkdir -p ${pkgdir}/usr/lib/firefox-3.5/plugins
+ install -m755 ${srcdir}/libflashplayer.so ${pkgdir}/usr/lib/firefox-3.5/plugins || return 1
+
+ # This is to stop firefox from crashing when the flashplayer (youtube) is
+ # set to full screen. To test if it is still necessary with updates to
+ # this package, run /usr/bin/firefox.bin without setting the LD_PRELOAD var.
+
+ mv ${pkgdir}/usr/bin/firefox ${pkgdir}/usr/bin/firefox.bin
+ echo "#!/bin/bash
+export LD_PRELOAD=/usr/lib/libGL.so.1
+/usr/bin/firefox.bin" > ${pkgdir}/usr/bin/firefox
+ chmod 755 ${pkgdir}/usr/bin/firefox
+}
diff --git a/abs/extra/community/firefox/browser-app-makefile.patch b/abs/extra/community/firefox/browser-app-makefile.patch
new file mode 100644
index 0000000..9a02c40
--- /dev/null
+++ b/abs/extra/community/firefox/browser-app-makefile.patch
@@ -0,0 +1,11 @@
+--- browser/app/Makefile 2009-07-27 22:41:13.000000000 +0930
++++ browser-new/app/Makefile 2009-07-27 22:42:51.000000000 +0930
+@@ -279,7 +279,7 @@
+
+ ifneq (,$(filter-out OS2 WINNT WINCE,$(OS_ARCH)))
+
+-$(MOZ_APP_NAME):: $(topsrcdir)/build/unix/mozilla.in $(GLOBAL_DEPS)
++$(MOZ_APP_NAME): $(topsrcdir)/build/unix/mozilla.in $(GLOBAL_DEPS)
+ cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \
+ -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@
+ chmod +x $@
diff --git a/abs/extra/community/firefox/browser-defaulturls.patch b/abs/extra/community/firefox/browser-defaulturls.patch
new file mode 100644
index 0000000..42a2e1d
--- /dev/null
+++ b/abs/extra/community/firefox/browser-defaulturls.patch
@@ -0,0 +1,26 @@
+--- browser/branding/unofficial/locales/browserconfig.properties~ 2009-06-13 17:04:42.000000000 +0200
++++ browser/branding/unofficial/locales/browserconfig.properties 2009-06-13 17:05:28.000000000 +0200
+@@ -1,3 +1,3 @@
+ # Do NOT localize or otherwise change these values
+-browser.startup.homepage=http://www.mozilla.org/projects/shiretoko/
++browser.startup.homepage=http://www.google.com/firefox
+
+--- browser/branding/unofficial/pref/firefox-branding.js~ 2009-06-13 16:57:53.000000000 +0200
++++ browser/branding/unofficial/pref/firefox-branding.js 2009-06-13 16:59:17.000000000 +0200
+@@ -1,5 +1,5 @@
+-pref("startup.homepage_override_url","http://www.mozilla.org/projects/%APP%/%VERSION%/whatsnew/");
+-pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERSION%/firstrun/");
++pref("startup.homepage_override_url","http://www.mozilla.com/%APP%/%VERSION%/whatsnew/");
++pref("startup.homepage_welcome_url","http://www.mozilla.com/%APP%/%VERSION%/firstrun/");
+ // The time interval between checks for a new version (in seconds)
+ // nightly=8 hours, official=24 hours
+ pref("app.update.interval", 28800);
+@@ -11,7 +11,7 @@
+ pref("app.update.url.details", "http://www.mozilla.org/projects/%APP%/");
+
+ // Release notes URL
+-pref("app.releaseNotesURL", "http://www.mozilla.org/projects/%APP%/%VERSION%/releasenotes/");
++pref("app.releaseNotesURL", "http://www.mozilla.com/%APP%/%VERSION%/releasenotes/");
+
+ // Search codes belong only in builds with official branding
+ pref("browser.search.param.yahoo-fr", "");
diff --git a/abs/extra/community/firefox/firefox-safe.desktop b/abs/extra/community/firefox/firefox-safe.desktop
new file mode 100644
index 0000000..afb4cdb
--- /dev/null
+++ b/abs/extra/community/firefox/firefox-safe.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=firefox -safe-mode %u
+Icon=firefox
+Type=Application
+Terminal=false
+MultipleArgs=false
+Name=Firefox - Safe Mode
+GenericName=Web Browser - Safe Mode
+StartupNotify=false
+Categories=Application;Network;
diff --git a/abs/extra/community/firefox/firefox-version.patch b/abs/extra/community/firefox/firefox-version.patch
new file mode 100644
index 0000000..b0a4552
--- /dev/null
+++ b/abs/extra/community/firefox/firefox-version.patch
@@ -0,0 +1,11 @@
+--- mozilla-1.9.1/browser/installer/Makefile.in.ver 2009-07-18 13:32:35.000000000 +0200
++++ mozilla-1.9.1/browser/installer/Makefile.in 2009-07-18 13:33:12.000000000 +0200
+@@ -43,6 +43,8 @@
+
+ include $(DEPTH)/config/autoconf.mk
+
++MOZ_APP_VERSION="3.5"
++
+ NO_PKG_FILES = \
+ $(MOZ_APP_NAME)-config \
+ $(MOZ_APP_NAME)-bin.elf \
diff --git a/abs/extra/community/firefox/firefox.desktop b/abs/extra/community/firefox/firefox.desktop
new file mode 100644
index 0000000..2a4b678
--- /dev/null
+++ b/abs/extra/community/firefox/firefox.desktop
@@ -0,0 +1,83 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=firefox %u
+Icon=firefox
+Type=Application
+Terminal=false
+MultipleArgs=false
+Name=Firefox
+Name[bn]=ফায়ারফকà§à¦¸3
+Name[eo]=Fajrovulpo3
+Name[fi]=Firefox3
+Name[pa]=ਫਾਇਰਫੋਕਸ3
+Name[tg]=Рӯбоҳи оташин3
+GenericName=Web Browser
+GenericName[af]=Web Blaaier
+GenericName[ar]=متصÙØ­ ويب
+GenericName[az]=Veb Səyyahı
+GenericName[bg]=Браузър
+GenericName[bn]=ওয়েব বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°
+GenericName[br]=Furcher ar Gwiad
+GenericName[bs]=WWW Preglednik
+GenericName[ca]=Fullejador web
+GenericName[cs]=WWW prohlížeÄ
+GenericName[cy]=Porydd Gwe
+GenericName[da]=Browser
+GenericName[de]=Web-Browser
+GenericName[el]=ΠεÏιηγητής ΙστοÏ
+GenericName[eo]=TTT-legilo
+GenericName[es]=Navegador web
+GenericName[et]=Veebilehitseja
+GenericName[eu]=Web arakatzailea
+GenericName[fa]=مرورگر وب
+GenericName[fi]=WWW-selain
+GenericName[fo]=Alnótsfar
+GenericName[fr]=Navigateur web
+GenericName[gl]=Navegador Web
+GenericName[he]=דפדפן ×ינטרנט
+GenericName[hi]=वेब बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤°
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[is]=Vafri
+GenericName[it]=Browser Web
+GenericName[ja]=ウェブブラウザ
+GenericName[ko]=웹 브ë¼ìš°ì €
+GenericName[lo]=ເວັບບຣາວເຊີ
+GenericName[lt]=Žiniatinklio naršyklė
+GenericName[lv]=Web PÄrlÅ«ks
+GenericName[mk]=ПрелиÑтувач на Интернет
+GenericName[mn]=Веб-Хөтөч
+GenericName[nb]=Nettleser
+GenericName[nds]=Nettkieker
+GenericName[nl]=Webbrowser
+GenericName[nn]=Nettlesar
+GenericName[nso]=Seinyakisi sa Web
+GenericName[pa]=ਵੈਬ à¨à¨²à¨•à¨¾à¨°à¨¾
+GenericName[pl]=PrzeglÄ…darka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator de web
+GenericName[ru]=Веб-браузер
+GenericName[se]=Fierpmádatlogan
+GenericName[sk]=Webový prehliadaÄ
+GenericName[sl]=Spletni brskalnik
+GenericName[sr]=Веб претраживач
+GenericName[sr@Latn]=Veb pretraživaÄ
+GenericName[ss]=Ibrawuza yeWeb
+GenericName[sv]=Webbläsare
+GenericName[ta]=வலை உலாவி
+GenericName[tg]=ТафÑиргари вÑб
+GenericName[th]=เว็บบราวเซอร์
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Ðавігатор Тенет
+GenericName[uz]=Веб-браузер
+GenericName[ven]=Buronza ya Webu
+GenericName[vi]=Trình duyệt Web
+GenericName[wa]=Betchteu waibe
+GenericName[xh]=Umkhangeli zincwadi we Web
+GenericName[zh_CN]=网页æµè§ˆå™¨
+GenericName[zh_TW]=網é ç€è¦½å™¨
+GenericName[zu]=Umcingi we-Web
+MimeType=text/html
+StartupNotify=true
+Categories=Application;Network;
diff --git a/abs/extra/community/firefox/firefox.install b/abs/extra/community/firefox/firefox.install
new file mode 100644
index 0000000..cd50dec
--- /dev/null
+++ b/abs/extra/community/firefox/firefox.install
@@ -0,0 +1,24 @@
+post_install() {
+ update-desktop-database -q
+
+ # For LinHES: check for a fluxbox keys file that doesnt have a mapping
+ # for Alt-w and map it to firefox.
+
+ if [ -e /home/mythtv/.fluxbox/keys ]
+ then
+ if ! grep -q "Mod1 w" /home/mythtv/.fluxbox/keys
+ then
+ echo Adding fluxbox key for firefox.
+ echo "Mod1 w :ExecCommand firefox" >> /home/mythtv/.fluxbox/keys
+ fi
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ update-desktop-database -q
+}
+
diff --git a/abs/extra/community/firefox/mozconfig b/abs/extra/community/firefox/mozconfig
new file mode 100644
index 0000000..030317d
--- /dev/null
+++ b/abs/extra/community/firefox/mozconfig
@@ -0,0 +1,35 @@
+. $topsrcdir/browser/config/mozconfig
+
+ac_add_options --prefix=/usr
+ac_add_options --libdir=/usr/lib
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-zlib
+ac_add_options --with-system-png
+ac_add_options --with-pthreads
+ac_add_options --disable-tests
+ac_add_options --disable-debug
+ac_add_options --enable-optimize
+ac_add_options --disable-installer
+ac_add_options --enable-xinerama
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --disable-xprint
+ac_add_options --enable-strip
+ac_add_options --enable-pango
+ac_add_options --enable-system-cairo
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --enable-startup-notification
+ac_add_options --enable-libxul
+ac_add_options --disable-crashreporter
+ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-1.9.1.1
+ac_add_options --enable-safe-browsing
+ac_add_options --with-branding=browser/branding/unofficial
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+export USE_SHORT_LIBNAME=1
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
+mk_add_options USE_SHORT_LIBNAME=1
diff --git a/abs/extra/community/firefox/mozilla-firefox-1.0-lang.patch b/abs/extra/community/firefox/mozilla-firefox-1.0-lang.patch
new file mode 100644
index 0000000..f0f7325
--- /dev/null
+++ b/abs/extra/community/firefox/mozilla-firefox-1.0-lang.patch
@@ -0,0 +1,12 @@
+--- mozilla/browser/app/profile/firefox.js.lang 2005-01-13 15:32:03.509282726 +0100
++++ mozilla/browser/app/profile/firefox.js 2005-01-13 15:33:40.220914789 +0100
+@@ -253,6 +253,9 @@
+ pref("font.language.group", "chrome://global/locale/intl.properties");
+ pref("intl.menuitems.alwaysappendaccesskeys","chrome://global/locale/intl.properties");
+
++// Use LANG environment variable to choose locale
++pref("intl.locale.matchOS", true);
++
+ // 0=lines, 1=pages, 2=history , 3=text size
+ pref("mousewheel.withcontrolkey.action",3);
+ pref("mousewheel.withshiftkey.action",2);
diff --git a/abs/extra/community/flashplugin/PKGBUILD b/abs/extra/community/flashplugin/PKGBUILD
new file mode 100644
index 0000000..1e68f40
--- /dev/null
+++ b/abs/extra/community/flashplugin/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 21951 2008-12-18 13:25:19Z thomas $
+
+pkgname=flashplugin
+_licensefile='Reader_Player_WWEULA-Combined-20060724_1430.pdf'
+if [ "${CARCH}" = 'i686' ]; then
+ pkgver=10.0.15.3
+ pkgrel=1
+ source=('http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz'
+ "http://www.adobe.com/products/eulas/pdfs/${_licensefile}")
+ md5sums=('afab0b40b0ae11445e2e90a4a9224a8a'
+ '844cea6c9afc13d9e27f28ce1a6e20f3')
+elif [ "${CARCH}" = 'x86_64' ]; then
+ pkgver=10.0.d21.1
+ pkgrel=1
+ source=("http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-${pkgver}.linux-x86_64.so.tar.gz"
+ "http://www.adobe.com/products/eulas/pdfs/${_licensefile}")
+ md5sums=('c165af9d4e324bfaf6d1cfbdbe959fbb'
+ '844cea6c9afc13d9e27f28ce1a6e20f3')
+else
+ error Unknown architecture.
+ exit 1
+fi
+pkgdesc='Adobe Flash Player'
+url='http://www.adobe.com/go/getflash'
+arch=('i686' 'x86_64')
+depends=('mozilla-common' 'libxt' 'gtk2' 'nss' 'curl')
+replaces=('flashplugin-beta')
+provides=('flashplayer')
+license=('custom')
+
+build() {
+ install -d -m755 ${pkgdir}/usr/lib/mozilla/plugins/ || return 1
+ if [ "${CARCH}" = 'i686' ]; then
+ install -m755 ${srcdir}/install_flash_player_10_linux/libflashplayer.so ${pkgdir}/usr/lib/mozilla/plugins/ || return 1
+ elif [ "${CARCH}" = 'x86_64' ]; then
+ install -m755 ${srcdir}/libflashplayer.so ${pkgdir}/usr/lib/mozilla/plugins/ || return 1
+ fi
+ install -d -m755 ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
+ install -m644 "${_licensefile}" ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
+}
diff --git a/abs/extra/community/fluidsynth/PKGBUILD b/abs/extra/community/fluidsynth/PKGBUILD
new file mode 100644
index 0000000..f3606cb
--- /dev/null
+++ b/abs/extra/community/fluidsynth/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: damir <damir@archlinux.org>
+
+pkgname=fluidsynth
+pkgver=1.0.8
+origver=1.0.8
+pkgrel=1
+pkgdesc="FluidSynth is a real-time software synthesizer based on the SoundFont 2 specifications."
+arch=("i686" "x86_64")
+url="http://www.fluidsynth.org/"
+depends=('jack-audio-connection-kit' 'ladspa')
+options=('!libtool')
+license=('LGPL')
+source=("http://savannah.nongnu.org/download/fluid/$pkgname-$pkgver.tar.gz")
+md5sums=('e2abfd2e69fd8b28d965df968d7d44ee')
+
+
+build() {
+ cd $startdir/src/$pkgname-$origver
+ ./configure --prefix=/usr \
+ --enable-ladspa
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+}
+
diff --git a/abs/extra/community/fluxconf/PKGBUILD b/abs/extra/community/fluxconf/PKGBUILD
new file mode 100644
index 0000000..9d9220f
--- /dev/null
+++ b/abs/extra/community/fluxconf/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# Contributor: Jochem Kossen <j.kossen@home.nl>
+
+pkgname=fluxconf
+pkgver=0.9.9
+pkgrel=1
+pkgdesc="Configuration utility for the Fluxbox windowmanager"
+arch=(i686 x86_64)
+depends=('gtk2')
+source=(http://devaux.fabien.free.fr/flux/$pkgname-$pkgver.tar.gz)
+url="http://devaux.fabien.free.fr/flux/"
+md5sums=('ac37b12410daa06128f8eb29163a741d')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ /usr/bin/make || return 1
+ /usr/bin/make prefix=$startdir/pkg/usr install
+ cd $startdir/pkg/usr/bin
+ /bin/ln -sf $pkgname fluxbare
+ /bin/ln -sf $pkgname fluxkeys
+ /bin/ln -sf $pkgname fluxmenu
+}
diff --git a/abs/extra/community/foldingathome/PKGBUILD b/abs/extra/community/foldingathome/PKGBUILD
new file mode 100644
index 0000000..bb93407
--- /dev/null
+++ b/abs/extra/community/foldingathome/PKGBUILD
@@ -0,0 +1,26 @@
+# Contributor: Jason Taylor <jftaylor21@gmail.com>
+# Contributor: seratne
+# Contributor: Nick B <Shirakawasuna at gmail _dot_com>
+
+pkgname=foldingathome
+pkgver=6.02
+pkgrel=6
+pkgdesc="Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases."
+arch=('i686')
+url="http://folding.stanford.edu/"
+license=('custom')
+depends=('bash')
+backup=('etc/conf.d/foldingathome')
+install=foldingathome.install
+source=(http://www.stanford.edu/group/pandegroup/folding/release/FAH$pkgver-Linux.tgz
+ run)
+md5sums=('112b3d66909050f1bb990993a1464cb9'
+ '61eb4617e7363d586a05dde980ad1c14')
+
+build() {
+ cd $startdir/src/
+
+ # At this stage, the mpiexec is not included because it requires x86_64.
+ install -D -c -m755 fah6 $startdir/pkg/usr/bin/fah6 || return 1
+ install -D -m755 run $startdir/pkg/etc/sv/fah/run
+}
diff --git a/abs/extra/community/foldingathome/foldingathome.install b/abs/extra/community/foldingathome/foldingathome.install
new file mode 100644
index 0000000..20e48d1
--- /dev/null
+++ b/abs/extra/community/foldingathome/foldingathome.install
@@ -0,0 +1,47 @@
+post_install() {
+ # Check for an R5.5 fah installation.
+ r5_fah_dir=/myth/folding@home
+ r6_fah_dir=/myth/foldingathome/$(hostname)
+ if [ -d "$r5_fah_dir" ] ; then
+ if [ -d "$r6_fah_dir" ] ; then
+ cat << 'EOM'
+ --> You have an R5.5 and an R6 folding directory at the same time!
+ --> you should manually delete the R5.5 directory:
+ --> $r5_fah_dir
+ --> The directroy used on R6 will be:
+ --> $r6_fah_dir
+EOM
+ else
+ mkdir -p /myth/foldingathome
+ mv $r5_fah_dir $r6_fah_dir
+ fi
+ else
+ if [ ! -d "$r6_fah_dir" ] ; then
+ mkdir -p $r6_fah_dir
+ cat > $r6_fah_dir/client.cfg << 'EOM'
+[settings]
+username=LinHES
+team=50975
+passkey=
+asknet=no
+bigpackets=normal
+machineid=1
+
+[http]
+active=no
+host=localhost
+port=8080
+EOM
+ fi
+ fi
+ rm -fr $r6_fah_dir/index.html
+ ln -s $r6_fah_dir/MyFolding.html $r6_fah_dir/index.html
+ ln -s $r6_fah_dir /data/srv/httpd/htdocs/foldingathome
+ /sbin/add_service.sh fah
+}
+
+pre_remove() {
+ sv stop fah
+ /sbin/remove_service.sh fah
+}
+
diff --git a/abs/extra/community/foldingathome/run b/abs/extra/community/foldingathome/run
new file mode 100644
index 0000000..ede51f2
--- /dev/null
+++ b/abs/extra/community/foldingathome/run
@@ -0,0 +1,26 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting folding@home"
+
+FOLDING_DIR=/myth/foldingathome/$(hostname)
+
+if [ -d $FOLDING_DIR ] ; then
+ cd $FOLDING_DIR
+ # Ensure that the client configuration file has the same details as /etc/systemconfig
+
+ source /etc/systemconfig
+
+ if [ -n "$foldingusername" ] ; then
+ sed -i 's/username=.*$/username='$foldingusername'/g' $FOLDING_DIR/client.cfg
+ fi
+
+ if [ -n "$foldingworksize" ] ; then
+ sed -i 's/bigpackets=.*$/bigpackets='$foldingworksize'/g' $FOLDING_DIR/client.cfg
+ fi
+
+ # No need to direct output to a log file becase a log file
+ # will automatically be placed in $FOLDING_DIR
+ exec /usr/bin/fah6 -verbosity 9 &> /dev/null < /dev/null
+fi
diff --git a/abs/extra/community/gnash-common/PKGBUILD b/abs/extra/community/gnash-common/PKGBUILD
new file mode 100644
index 0000000..107afb8
--- /dev/null
+++ b/abs/extra/community/gnash-common/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 17544 2008-10-30 22:40:52Z pierre $
+
+pkgname=gnash-common
+pkgver=0.8.4
+pkgrel=1
+pkgdesc='A GNU Flash movie player'
+arch=('i686' 'x86_64')
+url='http://www.gnu.org/software/gnash/'
+license=('GPL3')
+depends=('curl' 'giflib' 'boost' 'libldap' 'gstreamer0.10-base' 'sdl' 'libgl'
+ 'libjpeg' 'libpng' 'mesa')
+makedepends=('pkgconfig')
+source=("http://ftp.gnu.org/gnu/gnash/${pkgver}/gnash-${pkgver}.tar.bz2")
+options=('!libtool' '!emptydirs' '!docs')
+provides=('gnash')
+replaces=('gnash')
+md5sums=('b47a7ed4b7c66b8c2ebacc2286ef0d4b')
+
+build() {
+ cd $srcdir/gnash-$pkgver
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-plugins \
+ --disable-menus \
+ --enable-gui=sdl \
+ --enable-renderer=ogl \
+ --enable-z \
+ --enable-jpeg \
+ --enable-libpng \
+ --enable-gif \
+ --enable-fontconfig \
+ --enable-Xft \
+ --enable-expat \
+ --enable-gstreamer \
+ --enable-media=gst || return 1
+
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+}
diff --git a/abs/extra/community/gnash-gtk/PKGBUILD b/abs/extra/community/gnash-gtk/PKGBUILD
new file mode 100644
index 0000000..45ba804
--- /dev/null
+++ b/abs/extra/community/gnash-gtk/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 17609 2008-10-31 06:16:21Z pierre $
+
+pkgname=gnash-gtk
+pkgver=0.8.4
+pkgrel=1
+pkgdesc='A GNU Flash movie player (gtk)'
+arch=('i686' 'x86_64')
+url='http://www.gnu.org/software/gnash/'
+license=("GPL3")
+depends=("gnash-common=$pkgver" 'gtk2' 'gtkglext')
+makedepends=('pkgconfig')
+source=("http://ftp.gnu.org/gnu/gnash/${pkgver}/gnash-${pkgver}.tar.bz2")
+options=('!libtool' '!emptydirs' '!docs')
+md5sums=('b47a7ed4b7c66b8c2ebacc2286ef0d4b')
+
+build() {
+ cd $srcdir/gnash-$pkgver
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-gui=gtk \
+ --with-plugins-install=system \
+ --with-npapi-plugindir=/usr/lib/mozilla/plugins \
+ --enable-renderer=ogl \
+ --enable-z \
+ --enable-jpeg \
+ --enable-libpng \
+ --enable-gif \
+ --enable-fontconfig \
+ --enable-Xft \
+ --enable-expat \
+ --enable-gstreamer \
+ --enable-media=gst || return 1
+
+ make || return 1
+ make DESTDIR=$pkgdir install install-plugin || return 1
+ rm -rf $pkgdir/usr/{lib/gnash,share}
+ rm -f $pkgdir/usr/bin/{gnash,gprocessor,dumpshm,soldumper,flvdumper}
+ rm -rf $pkgdir/etc
+}
diff --git a/abs/extra/community/gstreamer0.10-base-plugins/PKGBUILD b/abs/extra/community/gstreamer0.10-base-plugins/PKGBUILD
new file mode 100644
index 0000000..5678e9d
--- /dev/null
+++ b/abs/extra/community/gstreamer0.10-base-plugins/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 14436 2008-10-06 17:41:07Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gstreamer0.10-base-plugins
+pkgver=0.10.21
+pkgrel=1
+pkgdesc="GStreamer Multimedia Framework Base Plugins (gst-plugins-base)"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+depends=('gstreamer0.10-base>=0.10.21' 'gnome-vfs>=2.24.0' 'alsa-lib>=1.0.17a' 'cdparanoia>=10.2' 'libvisual' 'libvorbis>=1.2.0' 'libtheora')
+makedepends=('pkgconfig')
+replaces=('gstreamer0.10-alsa' 'gstreamer0.10-theora' 'gstreamer0.10-libvisual' 'gstreamer0.10-pango' 'gstreamer0.10-cdparanoia' 'gstreamer0.10-vorbis' 'gstreamer0.10-gnomevfs' 'gstreamer0.10-ogg')
+conflicts=('gstreamer0.10-alsa' 'gstreamer0.10-theora' 'gstreamer0.10-libvisual' 'gstreamer0.10-pango' 'gstreamer0.10-cdparanoia' 'gstreamer0.10-vorbis' 'gstreamer0.10-gnomevfs' 'gstreamer0.10-ogg')
+provides=("gstreamer0.10-alsa=${pkgver}" "gstreamer0.10-theora=${pkgver}" "gstreamer0.10-libvisual=${pkgver}" "gstreamer0.10-pango=${pkgver}" "gstreamer0.10-cdparanoia=${pkgver}" "gstreamer0.10-vorbis=${pkgver}" "gstreamer0.10-gnomevfs=${pkgver}" "gstreamer0.10-ogg=${pkgver}" "gst-plugins-base=${pkgver}")
+options=(!libtool)
+url="http://gstreamer.freedesktop.org/"
+groups=('gstreamer0.10-plugins')
+_relname=gst-plugins-base
+source=(${url}/src/${_relname}/${_relname}-${pkgver}.tar.bz2)
+md5sums=('0e0cd485311502ad1c0c028148e3186a')
+
+build() {
+ cd "${srcdir}/${_relname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --disable-static --enable-experimental \
+ --disable-docs-build --disable-plugin-docs \
+ --with-package-name="GStreamer Base Plugins (Archlinux)" \
+ --with-package-origin="http://www.archlinux.org/" || return 1
+
+ make || return 1
+ cd ext || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/community/gstreamer0.10-base/PKGBUILD b/abs/extra/community/gstreamer0.10-base/PKGBUILD
new file mode 100644
index 0000000..b1b065d
--- /dev/null
+++ b/abs/extra/community/gstreamer0.10-base/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 14433 2008-10-06 17:33:22Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gstreamer0.10-base
+pkgver=0.10.21
+pkgrel=1
+pkgdesc="GStreamer Multimedia Framework Base plugin libraries"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+depends=('gstreamer0.10>=0.10.21' 'liboil>=0.3.15' 'libsm' 'libxv')
+makedepends=('pkgconfig')
+options=(!libtool)
+url="http://gstreamer.freedesktop.org/"
+_relname=gst-plugins-base
+source=(${url}/src/${_relname}/${_relname}-${pkgver}.tar.bz2)
+md5sums=('0e0cd485311502ad1c0c028148e3186a')
+
+build() {
+ cd ${startdir}/src/${_relname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --disable-static --enable-experimental --disable-external \
+ --disable-docs-build --disable-plugin-docs \
+ --with-package-name="GStreamer Base Plugins (Archlinux)" \
+ --with-package-origin="http://www.archlinux.org/" || return 1
+
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/community/gstreamer0.10/PKGBUILD b/abs/extra/community/gstreamer0.10/PKGBUILD
new file mode 100644
index 0000000..52934e2
--- /dev/null
+++ b/abs/extra/community/gstreamer0.10/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 18833 2008-11-09 14:51:01Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gstreamer0.10
+pkgver=0.10.21
+pkgrel=2
+pkgdesc="GStreamer Multimedia Framework"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://gstreamer.freedesktop.org/"
+depends=('libxml2>=2.6.32' 'glib2>=2.18.1')
+makedepends=('perlxml' 'pkgconfig' 'gtk-doc')
+options=('!libtool')
+source=(${url}/src/gstreamer/gstreamer-${pkgver}.tar.bz2
+ bgo555631.patch)
+md5sums=('7bad90af3fd81a1535363cf85359125c'
+ '71eb301845184638e6556dacd1ca7d55')
+
+build() {
+ cd "${srcdir}/gstreamer-${pkgver}"
+ patch -Np0 -i "${srcdir}/bgo555631.patch" || return 1
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc --localstatedir=/var \
+ --disable-docs-build || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+ cd "${pkgdir}/usr/bin"
+
+ #Remove unversioned gst-* binaries to get rid of conflicts
+ for bins in `ls *-0.10`; do
+ rm -f ${bins/-0.10/}
+ done
+}
diff --git a/abs/extra/community/gstreamer0.10/bgo555631.patch b/abs/extra/community/gstreamer0.10/bgo555631.patch
new file mode 100644
index 0000000..b9a18f4
--- /dev/null
+++ b/abs/extra/community/gstreamer0.10/bgo555631.patch
@@ -0,0 +1,88 @@
+--- libs/gst/base/gstbasetransform.c 2008/10/20 13:29:06 1.126
++++ libs/gst/base/gstbasetransform.c 2008/10/21 16:30:41 1.127
+@@ -251,7 +251,7 @@
+ /* upstream caps and size suggestions */
+ GstCaps *sink_suggest;
+ guint size_suggest;
+- gint suggest_pending;
++ gboolean suggest_pending;
+
+ gboolean reconfigure;
+ };
+@@ -1224,7 +1224,7 @@
+ gst_caps_unref (priv->sink_suggest);
+ priv->sink_suggest = gst_caps_ref (othercaps);
+ priv->size_suggest = size_suggest;
+- g_atomic_int_set (&trans->priv->suggest_pending, 1);
++ trans->priv->suggest_pending = TRUE;
+ GST_OBJECT_UNLOCK (trans->sinkpad);
+ }
+ gst_caps_unref (othercaps);
+@@ -1366,7 +1366,7 @@
+ GstBaseTransform *trans;
+ GstBaseTransformPrivate *priv;
+ GstFlowReturn res;
+- gboolean proxy, suggest;
++ gboolean proxy, suggest, same_caps;
+ GstCaps *sink_suggest;
+ guint size_suggest;
+
+@@ -1384,8 +1384,12 @@
+
+ /* we remember our previous alloc request to quickly see if we can proxy or
+ * not. We skip this check if we have a pending suggestion. */
+- if (g_atomic_int_get (&priv->suggest_pending) == 0 && caps &&
+- gst_caps_is_equal (priv->sink_alloc, caps)) {
++ GST_OBJECT_LOCK (pad);
++ same_caps = !priv->suggest_pending && caps &&
++ gst_caps_is_equal (priv->sink_alloc, caps);
++ GST_OBJECT_UNLOCK (pad);
++
++ if (same_caps) {
+ /* we have seen this before, see below if we need to proxy */
+ GST_DEBUG_OBJECT (trans, "have old caps");
+ sink_suggest = caps;
+@@ -1414,7 +1418,7 @@
+ size_suggest = size;
+ suggest = FALSE;
+ }
+- g_atomic_int_set (&priv->suggest_pending, 0);
++ priv->suggest_pending = FALSE;
+ GST_OBJECT_UNLOCK (pad);
+
+ /* check if we actually handle this format on the sinkpad */
+@@ -1462,7 +1466,10 @@
+ }
+ }
+ /* remember the new caps */
++ GST_OBJECT_LOCK (pad);
+ gst_caps_replace (&priv->sink_alloc, sink_suggest);
++ GST_OBJECT_UNLOCK (pad);
++
+ proxy = priv->proxy_alloc;
+ GST_DEBUG_OBJECT (trans, "doing default alloc, proxy %d", proxy);
+
+@@ -1487,11 +1494,13 @@
+ if (!gst_caps_is_equal (newcaps, caps)) {
+ GST_DEBUG_OBJECT (trans, "caps are new");
+ /* we have new caps, see if we can proxy downstream */
+- if (gst_pad_peer_accept_caps (trans->sinkpad, newcaps)) {
++ if (gst_pad_peer_accept_caps (pad, newcaps)) {
+ /* peer accepts the caps, return a buffer in this format */
+ GST_DEBUG_OBJECT (trans, "peer accepted new caps");
+ /* remember the format */
++ GST_OBJECT_LOCK (pad);
+ gst_caps_replace (&priv->sink_alloc, newcaps);
++ GST_OBJECT_UNLOCK (pad);
+ } else {
+ GST_DEBUG_OBJECT (trans, "peer did not accept new caps");
+ /* peer does not accept the caps, free the buffer we received and
+@@ -2306,7 +2315,7 @@
+ caps = gst_caps_copy (caps);
+ trans->priv->sink_suggest = caps;
+ trans->priv->size_suggest = size;
+- g_atomic_int_set (&trans->priv->suggest_pending, 1);
++ trans->priv->suggest_pending = TRUE;
+ GST_DEBUG_OBJECT (trans, "new suggest %" GST_PTR_FORMAT, caps);
+ GST_OBJECT_UNLOCK (trans->sinkpad);
+ }
diff --git a/abs/extra/community/gtkglext/PKGBUILD b/abs/extra/community/gtkglext/PKGBUILD
new file mode 100644
index 0000000..a310af6
--- /dev/null
+++ b/abs/extra/community/gtkglext/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 9958 2008-08-21 02:56:50Z eric $
+# Maintainer: damir <damir@archlinux.org>
+# Contributor: Ben <ben@benmazer.net>
+
+pkgname=gtkglext
+pkgver=1.2.0
+pkgrel=1
+pkgdesc="opengl extensions for gtk2"
+arch=('i686' 'x86_64')
+url="http://gtkglext.sourceforge.net/"
+depends=('gtk2' 'pango')
+makedepends=('gcc>=4.0.3')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/sourceforge/gtkglext/$pkgname-$pkgver.tar.bz2") # $pkgname-$pkgver-pangox.patch)
+md5sums=('ed7ba24ce06a8630c07f2d0ee5f04ab4')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ # fix "undefined reference to `pango_x_font*" trouble
+ #cat $startdir/src/$pkgname-$pkgver-pangox.patch | patch -p1 || return 1
+ autoconf --force
+ ./configure --prefix=/usr
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+}
diff --git a/abs/extra/community/gtkglext/gtkglext-1.0.6-pangox.patch b/abs/extra/community/gtkglext/gtkglext-1.0.6-pangox.patch
new file mode 100644
index 0000000..8cd589e
--- /dev/null
+++ b/abs/extra/community/gtkglext/gtkglext-1.0.6-pangox.patch
@@ -0,0 +1,30 @@
+--- gtkglext-1.0.6/configure.in 2005-09-10 16:45:06.000000000 +0200
++++ gtkglext-1.0.6.az/configure.in 2005-09-10 16:46:01.000000000 +0200
+@@ -59,6 +59,10 @@
+ m4_define([pango_pkg], [pango])
+ m4_define([pango_required_version], [1.0.0])
+
++# Pangox
++m4_define([pangox_pkg], [pangox])
++m4_define([pangox_required_version], [1.0.0])
++
+ # PangoFT2
+ m4_define([pangoft2_pkg], [pangoft2])
+ m4_define([pangoft2_required_version], [1.0.0])
+@@ -345,6 +349,7 @@
+ gtk_pkg >= gtk_required_version \
+ gdk_pkg >= gdk_required_version \
+ pango_pkg >= pango_required_version \
++pangox_pkg >= pango_required_version \
+ gmodule_pkg >= gmodule_required_version \
+ ])
+
+@@ -789,7 +794,7 @@
+ # CFLAGS and LIBS
+ ##################################################
+
+-GDKGLEXT_PACKAGES="gdk_pkg pango_pkg gmodule_pkg"
++GDKGLEXT_PACKAGES="gdk_pkg pango_pkg pangox_pkg gmodule_pkg"
+ GDKGLEXT_EXTRA_CFLAGS="$GL_CFLAGS $GDKGLEXT_WIN_CFLAGS"
+ GDKGLEXT_EXTRA_LIBS="$GL_LIBS $GDKGLEXT_WIN_LIBS"
+ GDKGLEXT_DEP_CFLAGS="$GDKGLEXT_EXTRA_CFLAGS `$PKG_CONFIG --cflags $GDKGLEXT_PACKAGES`"
diff --git a/abs/extra/community/ircii/PKGBUILD b/abs/extra/community/ircii/PKGBUILD
new file mode 100644
index 0000000..2eb8ad6
--- /dev/null
+++ b/abs/extra/community/ircii/PKGBUILD
@@ -0,0 +1,16 @@
+# Contributor: Mateusz Herych <heniekk@gmail.com>
+pkgname=ircii
+pkgver=20060725
+pkgrel=1
+pkgdesc="IRC Client"
+arch=('i686')
+url="http://www.eterna.com.au/ircii/"
+license=('BSD')
+source=(ftp://ircii.warped.com/pub/ircII/ircii-$pkgver.tar.bz2)
+md5sums=('280ae54367627591c1c43c765eb9d59b')
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make install DESTDIR=$startdir/pkg || return 1
+}
diff --git a/abs/extra/community/jdk/PKGBUILD b/abs/extra/community/jdk/PKGBUILD
new file mode 100644
index 0000000..31924ce
--- /dev/null
+++ b/abs/extra/community/jdk/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
+# Previous Maintainer: Jason Chu <jason@archlinux.org>
+pkgname=jdk
+pkgver=6u12
+pkgrel=1
+pkgdesc="Sun's Java Development Kit"
+arch=(i686 x86_64)
+ [ "${CARCH}" = "i686" ] && ARCH=i586
+ [ "${CARCH}" = "x86_64" ] && ARCH=amd64
+url="http://java.sun.com"
+depends=('glibc' 'jre')
+install="jdk.install"
+source=(http://download.java.net/dlj/binaries/jdk-${pkgver}-dlj-linux-${ARCH}.bin
+ https://jdk-distros.dev.java.net/source/browse/*checkout*/jdk-distros/trunk/utils/construct.sh
+ jdk.profile)
+[ "$CARCH" = "i686" ] && md5sums=('560a51cfeecc4918d01ca29abc858d52'
+ '94065b612df0046d9ae758943f9f6a75'
+ '1e937a8bbca36330f730fc17663e3625')
+[ "$CARCH" = "x86_64" ] && md5sums=('0f687b6dbfe54e117bb0d9e090fda20b'
+ '94065b612df0046d9ae758943f9f6a75'
+ '1e937a8bbca36330f730fc17663e3625')
+replaces=('j2sdk')
+conflicts=('java-environment' 'j2sdk')
+provides=('java-environment' 'j2sdk')
+license=('custom')
+
+build() {
+ cd ${startdir}/src
+
+ mkdir unbundle-jdk
+ cd unbundle-jdk
+
+ sh ../jdk-${pkgver}-dlj-linux-${ARCH}.bin --accept-license
+
+ cd ..
+
+ sh construct.sh unbundle-jdk linux-jdk linux-jre
+
+ rm -rf linux-jdk/jre
+
+ mkdir -p ${startdir}/pkg/opt
+ mv linux-jdk ${startdir}/pkg/opt/java
+
+ install -D -m755 ${startdir}/src/${pkgname}.profile ${startdir}/pkg/etc/profile.d/${pkgname}.sh
+
+ mkdir -p $startdir/pkg/usr/share/licenses/jdk
+ cp $startdir/pkg/opt/java/COPYRIGHT $startdir/pkg/usr/share/licenses/jdk
+ cp $startdir/pkg/opt/java/LICENSE $startdir/pkg/usr/share/licenses/jdk
+ cp $startdir/pkg/opt/java/THIRDPARTYLICENSEREADME.txt $startdir/pkg/usr/share/licenses/jdk
+}
diff --git a/abs/extra/community/jdk/jdk.install b/abs/extra/community/jdk/jdk.install
new file mode 100644
index 0000000..6fb8be5
--- /dev/null
+++ b/abs/extra/community/jdk/jdk.install
@@ -0,0 +1,14 @@
+post_upgrade() {
+ post_install $1
+}
+
+post_install() {
+ echo "The jdk package is licensed software."
+ echo "You MUST read and agree to the license stored in"
+ echo "/opt/java/LICENSE before using it."
+
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/jdk/jdk.profile b/abs/extra/community/jdk/jdk.profile
new file mode 100644
index 0000000..b39d49c
--- /dev/null
+++ b/abs/extra/community/jdk/jdk.profile
@@ -0,0 +1,3 @@
+export J2SDKDIR=/opt/java
+export PATH=$PATH:/opt/java/bin
+export JAVA_HOME=/opt/java
diff --git a/abs/extra/community/jre/PKGBUILD b/abs/extra/community/jre/PKGBUILD
new file mode 100644
index 0000000..cd9a932
--- /dev/null
+++ b/abs/extra/community/jre/PKGBUILD
@@ -0,0 +1,58 @@
+# $Id: PKGBUILD,v 1.6 2009/06/01 19:10:05 wonder Exp $
+# Maintainer: Jason Chu <jason@archlinux.org>
+
+pkgname=jre
+pkgver=6u14
+pkgrel=1
+pkgdesc="Sun's java runtime environment"
+arch=('i686' 'x86_64')
+ [ "$CARCH" = "i686" ] && _arch=i586
+ [ "$CARCH" = "x86_64" ] && _arch=amd64
+url="http://java.sun.com"
+depends=('glibc' 'libxtst')
+install="jre.install"
+source=(http://download.java.net/dlj/binaries/jdk-$pkgver-dlj-linux-$_arch.bin
+ https://jdk-distros.dev.java.net/source/browse/*checkout*/jdk-distros/trunk/utils/construct.sh
+ jre.profile)
+[ "$CARCH" = "i686" ] && md5sums=('299c445e4b14bfbb2a05323734d89c0c'
+ '94065b612df0046d9ae758943f9f6a75'
+ '50b4f5ac4129097461d246645d73a622')
+[ "$CARCH" = "x86_64" ] && md5sums=('6e866db04748296fc34ed83a92420403'
+ '94065b612df0046d9ae758943f9f6a75'
+ '50b4f5ac4129097461d246645d73a622')
+
+
+replaces=('j2re')
+conflicts=('j2re' 'java-runtime')
+provides=('j2re' 'java-runtime=6')
+license=('custom')
+
+build() {
+ cd $startdir/src
+
+ mkdir unbundle-jdk
+ cd unbundle-jdk
+
+ sh ../jdk-$pkgver-dlj-linux-$_arch.bin --accept-license
+
+ cd ..
+
+ sh construct.sh unbundle-jdk linux-jdk linux-jre
+
+ mkdir -p $startdir/pkg/opt/java
+ mv linux-jdk/jre $startdir/pkg/opt/java
+
+ install -D -m755 $startdir/src/${pkgname}.profile $startdir/pkg/etc/profile.d/${pkgname}.sh
+
+ mkdir -p $startdir/pkg/usr/lib/mozilla/plugins
+
+ if [ "$CARCH" = "i686" ]; then
+ ln -s /opt/java/jre/lib/i386/libnpjp2.so $startdir/pkg/usr/lib/mozilla/plugins
+ else ln -s /opt/java/jre/lib/amd64/libnpjp2.so $startdir/pkg/usr/lib/mozilla/plugins
+ fi
+
+ mkdir -p $startdir/pkg/usr/share/licenses/jre
+ cp $startdir/pkg/opt/java/jre/COPYRIGHT $startdir/pkg/usr/share/licenses/jre
+ cp $startdir/pkg/opt/java/jre/LICENSE $startdir/pkg/usr/share/licenses/jre
+ cp $startdir/pkg/opt/java/jre/THIRDPARTYLICENSEREADME.txt $startdir/pkg/usr/share/licenses/jre
+}
diff --git a/abs/extra/community/jre/jre.install b/abs/extra/community/jre/jre.install
new file mode 100644
index 0000000..4e557a7
--- /dev/null
+++ b/abs/extra/community/jre/jre.install
@@ -0,0 +1,26 @@
+post_upgrade() {
+ post_install $1
+}
+
+post_install() {
+ echo "The jre package is licensed software."
+ echo "You MUST read and agree to the license stored in"
+ echo "/opt/java/jre/LICENSE before using it."
+ if [ -f /etc/mailcap ] ; then
+ sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap
+ fi
+ echo 'application/x-java-jnlp-file;/opt/java/jre/bin/javaws %s' >>/etc/mailcap
+}
+
+post_remove() {
+ mailcap=$(grep -v 'application/x-java-jnlp-file' /etc/mailcap)
+ if [ "$mailcap" != "" ] ; then
+ sed -e '/application\/x-java-jnlp-file/d' -i /etc/mailcap
+ else
+ rm /etc/mailcap
+ fi
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/jre/jre.profile b/abs/extra/community/jre/jre.profile
new file mode 100644
index 0000000..af3e373
--- /dev/null
+++ b/abs/extra/community/jre/jre.profile
@@ -0,0 +1,4 @@
+export PATH=$PATH:/opt/java/jre/bin
+if [ ! -f /etc/profile.d/jdk.sh ]; then
+ export JAVA_HOME=/opt/java/jre
+fi
diff --git a/abs/extra/community/libdvbpsi/PKGBUILD b/abs/extra/community/libdvbpsi/PKGBUILD
new file mode 100644
index 0000000..5b261a2
--- /dev/null
+++ b/abs/extra/community/libdvbpsi/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 14016 2008-10-01 07:44:22Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Gilles CHAUVIN <gcnweb@gmail.com>
+
+pkgname=libdvbpsi
+pkgver=0.1.6
+pkgrel=3
+pkgdesc="MPEG TS and DVB PSI tables library (needed by vlc for streaming)"
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('glibc')
+options=('!libtool')
+replaces=('libdvbpsi4' 'libdvbpsi5')
+conflicts=('libdvbpsi4' 'libdvbpsi5')
+url="http://developers.videolan.org/libdvbpsi/"
+source=(http://download.videolan.org/pub/libdvbpsi/0.1.6/libdvbpsi5-$pkgver.tar.bz2)
+md5sums=('bd2d9861be3311e1e03c91cd9345f542')
+
+build()
+{
+ cd $startdir/src/libdvbpsi5-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+}
diff --git a/abs/extra/community/libelf/PKGBUILD b/abs/extra/community/libelf/PKGBUILD
new file mode 100644
index 0000000..0cf517b
--- /dev/null
+++ b/abs/extra/community/libelf/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 20525 2008-12-05 13:31:11Z jgc $
+# Maintainer: arjan <arjan@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=libelf
+pkgver=0.8.10
+pkgrel=3
+pkgdesc="libelf is a free ELF object file access library"
+arch=(i686 x86_64)
+license=('GPL')
+source=(http://www.mr511.de/software/${pkgname}-${pkgver}.tar.gz)
+url="http://directory.fsf.org/libs/misc/libelf.html"
+depends=('glibc')
+md5sums=('9db4d36c283d9790d8fa7df1f4d7b4d9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-shared \
+ --enable-gnu-names --enable-compat || return 1
+ make || return 1
+ make prefix="${pkgdir}/usr" install || return 1
+}
diff --git a/abs/extra/community/libmatroska/PKGBUILD b/abs/extra/community/libmatroska/PKGBUILD
new file mode 100644
index 0000000..0011c13
--- /dev/null
+++ b/abs/extra/community/libmatroska/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: damir <damir@archlinux.org>
+# Contributor 03/08/04 <lefungus@altern.org>
+
+pkgname=libmatroska
+pkgver=0.8.1
+pkgrel=1
+pkgdesc="Matroska library"
+arch=(i686 x86_64)
+url="http://dl.matroska.org/downloads/libmatroska/"
+depends=('libebml>=0.7.6')
+#source=(http://www.bunkus.org/videotools/mkvtoolnix/sources/$pkgname-$pkgver.tar.bz2)
+source=($url/$pkgname-$pkgver.tar.bz2)
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver/make/linux
+ make sharedlib || return 1
+ make prefix=$startdir/pkg/usr install
+}
+
+md5sums=('20cf624ace0c58a54c7752eebfbc0b19')
diff --git a/abs/extra/community/libmodplug/PKGBUILD b/abs/extra/community/libmodplug/PKGBUILD
new file mode 100644
index 0000000..12c67db
--- /dev/null
+++ b/abs/extra/community/libmodplug/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Patrick Leslie Polzer <leslie.polzer@gmx.net>
+
+pkgname=libmodplug
+pkgver=0.8.4
+pkgrel=1
+pkgdesc="A MOD playing library"
+arch=(i686 x86_64)
+url="http://modplug-xmms.sourceforge.net/"
+license=('GPL')
+depends=(gcc-libs)
+source=(http://downloads.sf.net/sourceforge/modplug-xmms/libmodplug-${pkgver}.tar.gz)
+md5sums=('091bd1168a524a4f36fc61f95209e7e4')
+options=('!libtool')
+
+build() {
+ cd ${startdir}/src/libmodplug-${pkgver}
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
+
diff --git a/abs/extra/community/libmpcdec/PKGBUILD b/abs/extra/community/libmpcdec/PKGBUILD
new file mode 100644
index 0000000..feeaf8b
--- /dev/null
+++ b/abs/extra/community/libmpcdec/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libmpcdec
+pkgver=1.2.6
+pkgrel=1
+pkgdesc="Musepack decoding library"
+arch=(i686 x86_64)
+license=('custom')
+depends=('glibc')
+options=('!libtool')
+source=(http://files.musepack.net/source/${pkgname}-${pkgver}.tar.bz2)
+url="http://musepack.net/"
+md5sums=('7f7a060e83b4278acf4b77d7a7b9d2c0')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --disable-static
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+ install -Dm644 COPYING ${startdir}/pkg/usr/share/licenses/${pkgname}/COPYING
+}
diff --git a/abs/extra/community/libnetfilter_queue/PKGBUILD b/abs/extra/community/libnetfilter_queue/PKGBUILD
new file mode 100644
index 0000000..986c916
--- /dev/null
+++ b/abs/extra/community/libnetfilter_queue/PKGBUILD
@@ -0,0 +1,21 @@
+# Contributor: Kevin Edmonds <edmondskevin@hotmail.com>
+# Maintainer: Filip Wojciechowski, filip at loka dot pl
+pkgname=libnetfilter_queue
+pkgver=0.0.16
+pkgrel=1
+pkgdesc="userspace library providing an API to packets that have been queued by the kernel packet filter"
+arch=('i686' 'x86_64')
+url="http://www.netfilter.org/projects/libnetfilter_queue/index.html"
+license=('GPL')
+depends=(libnfnetlink)
+makedepends=(pkgconfig)
+options=('!libtool')
+source=(http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2)
+md5sums=('b36664e6cd39edbfe46b416a86118add')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/community/libnfnetlink/PKGBUILD b/abs/extra/community/libnfnetlink/PKGBUILD
new file mode 100644
index 0000000..2e0242e
--- /dev/null
+++ b/abs/extra/community/libnfnetlink/PKGBUILD
@@ -0,0 +1,18 @@
+pkgname=libnfnetlink
+pkgver=0.0.40
+pkgrel=1
+pkgdesc="low-level library for netfilter related kernel/userspace communication"
+depends=(glibc)
+url="http://www.netfilter.org/projects/libnfnetlink/index.html"
+license=('GPL')
+arch=('i686' 'x86_64')
+options=('!libtool')
+source=(http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2)
+md5sums=('3fe19dc4b05ba7e7e6216123097c2819')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/community/liboil/PKGBUILD b/abs/extra/community/liboil/PKGBUILD
new file mode 100644
index 0000000..23230f5
--- /dev/null
+++ b/abs/extra/community/liboil/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 14430 2008-10-06 17:28:40Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=liboil
+pkgver=0.3.15
+pkgrel=1
+pkgdesc="Library of simple functions that are optimized for various CPUs."
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://liboil.freedesktop.org/"
+depends=('glibc')
+makedepends=('glib2' 'pkgconfig' 'docbook-xsl')
+options=('!libtool' '!makeflags')
+source=(${url}/download/${pkgname}-${pkgver}.tar.gz)
+md5sums=('11dd39b1ca13ce2e0618d4df8303f137')
+
+build() {
+ unset CFLAGS
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+ install -m755 -d "${pkgdir}/usr/share/licenses/liboil"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/liboil/"
+}
diff --git a/abs/extra/community/libshout/PKGBUILD b/abs/extra/community/libshout/PKGBUILD
new file mode 100644
index 0000000..b23c88e
--- /dev/null
+++ b/abs/extra/community/libshout/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 19191 2008-11-17 11:43:24Z jgc $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: arjan <arjan@archlinux.org>
+# Contributor: Jason Chu <jchu@xentac.net>
+
+pkgname=libshout
+pkgver=2.2.2
+pkgrel=2
+pkgdesc="Library for accessing a shoutcast/icecast server"
+arch=('i686' 'x86_64')
+depends=('libvorbis' 'libtheora' 'speex')
+url="http://www.icecast.org/"
+options=('!libtool' 'force')
+license=('LGPL2')
+source=(http://downloads.xiph.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+md5sums=('4f75fc9901c724b712c371c9a1e782d3')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var || return 1
+ make LDFLAGS+=-lspeex || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/community/libstdc++5/PKGBUILD b/abs/extra/community/libstdc++5/PKGBUILD
new file mode 100644
index 0000000..00bee17
--- /dev/null
+++ b/abs/extra/community/libstdc++5/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libstdc++5
+pkgver=3.3.6
+pkgrel=2
+pkgdesc="GNU Standard C++ library version 3"
+arch=(i686 x86_64)
+url="http://gcc.gnu.org"
+depends=('gcc-libs')
+makedepends=('binutils' 'gcc')
+options=(!libtool)
+source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 gcc-3.4.3-no_multilib_amd64.patch)
+md5sums=(18c52e6fb8966b7700665dca289d077f 6b3d00b8d079805be1b895f7f6ce47a0 \
+ 088e0807e677010cafe4e590e8711be1)
+
+build(){
+ export MAKEFLAGS="-j1"
+ export CFLAGS=$(echo $CFLAGS | sed 's|-mtune=generic||')
+ export CXXFLAGS=$(echo $CXXFLAGS | sed 's|-mtune=generic||')
+ cd ${startdir}/src/gcc-${pkgver}
+
+ if [ "$CARCH" = "x86_64" ]; then
+ patch -Np0 -i ../gcc-3.4.3-no_multilib_amd64.patch || return 1
+ fi
+
+ # No fixincludes
+ sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+ mkdir ../gcc-build
+ cd ../gcc-build
+ ../gcc-${pkgver}/configure --prefix=/usr --enable-shared \
+ --enable-languages=c++ --enable-threads=posix --enable-__cxa_atexit \
+ --disable-multilib --libdir=/usr/lib
+ make all-target-libstdc++-v3 BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || return 1
+ make DESTDIR=${startdir}/pkg install-target-libstdc++-v3 || return 1
+
+ # Remove includefiles and libs provided by gcc
+ rm -rf ${startdir}/pkg/usr/{include,share/locale}
+ rm -f ${startdir}/pkg/usr/lib/*.a
+ rm -f ${startdir}/pkg/usr/lib/libstdc++.so
+}
diff --git a/abs/extra/community/libstdc++5/gcc-3.4.3-no_multilib_amd64.patch b/abs/extra/community/libstdc++5/gcc-3.4.3-no_multilib_amd64.patch
new file mode 100644
index 0000000..dce10d4
--- /dev/null
+++ b/abs/extra/community/libstdc++5/gcc-3.4.3-no_multilib_amd64.patch
@@ -0,0 +1,11 @@
+--- gcc/config/i386/t-linux64.orig 2003-06-28 00:19:59.000000000 +0000
++++ gcc/config/i386/t-linux64 2003-06-28 00:20:07.000000000 +0000
+@@ -6,7 +6,7 @@
+
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 ../lib
++MULTILIB_OSDIRNAMES = . ../lib
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
diff --git a/abs/extra/community/libv4l/PKGBUILD b/abs/extra/community/libv4l/PKGBUILD
new file mode 100644
index 0000000..3afcf6c
--- /dev/null
+++ b/abs/extra/community/libv4l/PKGBUILD
@@ -0,0 +1,19 @@
+# $Id: PKGBUILD 28297 2009-02-28 18:20:12Z thomas $
+# Maintainer: Thomas Baechler <thomas@archlinux.org>
+pkgname=libv4l
+pkgver=0.5.8
+pkgrel=1
+pkgdesc="Userspace library for Video 4 Linux (1 and 2)"
+arch=('i686' 'x86_64')
+url="http://hansdegoede.livejournal.com/3636.html"
+license=('LGPL')
+depends=('glibc')
+source=(http://people.atrpms.net/~hdegoede/$pkgname-$pkgver.tar.gz)
+md5sums=('4f8ae9c743b215c8ac0e553eaa01e980')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make || return 1
+ make install PREFIX="/usr" DESTDIR="$pkgdir/"
+}
diff --git a/abs/extra/community/lua/PKGBUILD b/abs/extra/community/lua/PKGBUILD
new file mode 100644
index 0000000..ff0b435
--- /dev/null
+++ b/abs/extra/community/lua/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 10401 2008-08-29 00:31:46Z allan $
+# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
+
+pkgname=lua
+pkgver=5.1.4
+pkgrel=3
+pkgdesc="A powerful light-weight programming language designed for extending applications."
+arch=(i686 x86_64)
+url="http://www.lua.org/"
+depends=('readline' 'ncurses')
+license=(MIT)
+options=('!makeflags')
+source=($url/ftp/$pkgname-$pkgver.tar.gz $pkgname-arch.patch 'lua-5.1-cflags.diff')
+md5sums=('d0870f2de55d59c1c8419f36e8fac150'
+ '1bd1164a19abf9165e231ba0d8a0bbc7'
+ '249582bf1fd861ccf492d2c35a9fe732')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ patch -p1 -i $startdir/src/$pkgname-arch.patch || return 1
+
+ [ "$CARCH" == "x86_64" ] && patch -Np1 -i ../lua-5.1-cflags.diff
+ [ "$CARCH" == "x86_64" ] && export CFLAGS="$CFLAGS -fPIC"
+ make INSTALL_DATA="cp -d" TO_LIB="liblua.a liblua.so liblua.so.5.1" LUA_SO=liblua.so INSTALL_TOP=$startdir/pkg/usr INSTALL_MAN=$startdir/pkg/usr/share/man/man1 \
+ linux install || return 1
+ install -D -m 644 etc/lua.pc $startdir/pkg/usr/lib/pkgconfig/lua.pc
+ install -D -m644 COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/COPYRIGHT
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/abs/extra/community/lua/lua-5.1-cflags.diff b/abs/extra/community/lua/lua-5.1-cflags.diff
new file mode 100644
index 0000000..db658ae
--- /dev/null
+++ b/abs/extra/community/lua/lua-5.1-cflags.diff
@@ -0,0 +1,13 @@
+diff -Naur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile
+--- lua-5.1.orig/src/Makefile 2006-02-16 16:45:09.000000000 +0100
++++ lua-5.1/src/Makefile 2006-03-01 14:55:29.000000000 +0100
+@@ -8,7 +8,8 @@
+ PLAT= none
+
+ CC= gcc
+-CFLAGS= -O2 -Wall $(MYCFLAGS)
++CFLAGS ?= -O2 -Wall
++CFLAGS += $(MYCFLAGS)
+ AR= ar rcu
+ RANLIB= ranlib
+ RM= rm -f
diff --git a/abs/extra/community/lua/lua-5.1.3-official-patch1.diff b/abs/extra/community/lua/lua-5.1.3-official-patch1.diff
new file mode 100644
index 0000000..dec8fba
--- /dev/null
+++ b/abs/extra/community/lua/lua-5.1.3-official-patch1.diff
@@ -0,0 +1,12 @@
+--- src/lbaselib.c
++++ src/lbaselib.c
+443c443,444
+< ** functions to consume unlimited stack space.
+---
+> ** functions to consume unlimited stack space. (must be smaller than
+> ** -LUA_REGISTRYINDEX)
+445,446c446
+< #define LUAI_MCS_AUX ((int)(INT_MAX / (4*sizeof(LUA_NUMBER))))
+< #define LUAI_MAXCSTACK (LUAI_MCS_AUX > SHRT_MAX ? SHRT_MAX : LUAI_MCS_AUX)
+---
+> #define LUAI_MAXCSTACK 8000
diff --git a/abs/extra/community/lua/lua-5.1.3-official-patch2.diff b/abs/extra/community/lua/lua-5.1.3-official-patch2.diff
new file mode 100644
index 0000000..05ac244
--- /dev/null
+++ b/abs/extra/community/lua/lua-5.1.3-official-patch2.diff
@@ -0,0 +1,11 @@
+--- src/lbaselib.c (old)
++++ src/lbaselib.c (new)
+@@ -526,7 +526,7 @@
+ status = lua_resume(co, narg);
+ if (status == 0 || status == LUA_YIELD) {
+ int nres = lua_gettop(co);
+- if (!lua_checkstack(L, nres))
++ if (!lua_checkstack(L, nres + 1))
+ luaL_error(L, "too many results to resume");
+ lua_xmove(co, L, nres); /* move yielded values */
+ return nres;
diff --git a/abs/extra/community/lua/lua-5.1.3-official-patch3.diff b/abs/extra/community/lua/lua-5.1.3-official-patch3.diff
new file mode 100644
index 0000000..8126ff5
--- /dev/null
+++ b/abs/extra/community/lua/lua-5.1.3-official-patch3.diff
@@ -0,0 +1,21 @@
+--- src/lapi.c (old)
++++ src/lapi.c (new)
+@@ -93,15 +93,14 @@
+
+
+ LUA_API int lua_checkstack (lua_State *L, int size) {
+- int res;
++ int res = 1;
+ lua_lock(L);
+- if ((L->top - L->base + size) > LUAI_MAXCSTACK)
++ if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK)
+ res = 0; /* stack overflow */
+- else {
++ else if (size > 0) {
+ luaD_checkstack(L, size);
+ if (L->ci->top < L->top + size)
+ L->ci->top = L->top + size;
+- res = 1;
+ }
+ lua_unlock(L);
+ return res;
diff --git a/abs/extra/community/lua/lua-5.1.3-official-patch4.diff b/abs/extra/community/lua/lua-5.1.3-official-patch4.diff
new file mode 100644
index 0000000..1d03f37
--- /dev/null
+++ b/abs/extra/community/lua/lua-5.1.3-official-patch4.diff
@@ -0,0 +1,18 @@
+--- src/lbaselib.c (old)
++++ src/lbaselib.c (new)
+@@ -344,10 +344,12 @@
+ luaL_checktype(L, 1, LUA_TTABLE);
+ i = luaL_optint(L, 2, 1);
+ e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1));
++ if (i > e) return 0; /* empty range */
+ n = e - i + 1; /* number of elements */
+- if (n <= 0) return 0; /* empty range */
+- luaL_checkstack(L, n, "table too big to unpack");
+- for (; i<=e; i++) /* push arg[i...e] */
++ if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arith. overflow */
++ return luaL_error(L, "too many results to unpack");
++ lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */
++ while (i++ < e) /* push arg[i + 1...e] */
+ lua_rawgeti(L, 1, i);
+ return n;
+ }
diff --git a/abs/extra/community/lua/lua-arch.patch b/abs/extra/community/lua/lua-arch.patch
new file mode 100644
index 0000000..7d6d331
--- /dev/null
+++ b/abs/extra/community/lua/lua-arch.patch
@@ -0,0 +1,55 @@
+diff -ur lua-5.1.orig/etc/lua.pc lua-5.1/etc/lua.pc
+--- lua-5.1.orig/etc/lua.pc 2006-03-21 11:51:53.000000000 +0100
++++ lua-5.1/etc/lua.pc 2006-03-21 11:52:05.000000000 +0100
+@@ -6,7 +6,7 @@
+ V= 5.1
+
+ # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
+-prefix= /usr/local
++prefix= /usr
+ INSTALL_BIN= ${prefix}/bin
+ INSTALL_INC= ${prefix}/include
+ INSTALL_LIB= ${prefix}/lib
+diff -ur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile
+--- lua-5.1.orig/src/Makefile 2006-03-21 11:51:53.000000000 +0100
++++ lua-5.1/src/Makefile 2006-03-21 11:52:09.000000000 +0100
+@@ -23,6 +23,7 @@
+ PLATS= aix ansi bsd generic linux macosx mingw posix solaris
+
+ LUA_A= liblua.a
++LUA_SO= liblua.so
+ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
+ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
+ lundump.o lvm.o lzio.o
+@@ -36,7 +37,7 @@
+ LUAC_O= luac.o print.o
+
+ ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
+-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
+ ALL_A= $(LUA_A)
+
+ default: $(PLAT)
+@@ -51,6 +52,10 @@
+ $(AR) $@ $?
+ $(RANLIB) $@
+
++$(LUA_SO): $(CORE_O) $(LIB_O)
++ $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS)
++ ln -s $@.5.1 $@
++
+ $(LUA_T): $(LUA_O) $(LUA_A)
+ $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+
+diff -ur lua-5.1.orig/src/luaconf.h lua-5.1/src/luaconf.h
+--- lua-5.1.orig/src/luaconf.h 2006-03-21 11:51:53.000000000 +0100
++++ lua-5.1/src/luaconf.h 2006-03-21 11:52:05.000000000 +0100
+@@ -82,7 +82,7 @@
+ ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
+
+ #else
+-#define LUA_ROOT "/usr/local/"
++#define LUA_ROOT "/usr/"
+ #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
+ #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+ #define LUA_PATH_DEFAULT \
diff --git a/abs/extra/community/mmv/PKGBUILD b/abs/extra/community/mmv/PKGBUILD
new file mode 100644
index 0000000..0ccec1b
--- /dev/null
+++ b/abs/extra/community/mmv/PKGBUILD
@@ -0,0 +1,35 @@
+# Contributor: blue_lizard lizard@blue.dyn-o-saur.com
+
+pkgname=mmv
+pkgver=1.01b.orig
+pkgrel=1
+pkgdesc="multiple move files"
+depends=('glibc' 'sed')
+conflicts=()
+backup=()
+source=(http://ftp.de.debian.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz http://ftp.de.debian.org/debian/pool/main/m/mmv/mmv_1.01b-14.diff.gz)
+md5sums=('1b2135ab2f17bdfa9e08debbb3c46ad8' 'a69eff7501e63c0bd1fcd231bf6949f1')
+url="http://linux.maruhn.com/sec/mmv.html"
+license="GPL"
+install=$pkgname.install
+arch=('i686')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ patch -p1 < ../mmv_1.01b-14.diff
+ cat Makefile | sed -e "s/LDFLAGS.\s=-s -N/LDFLAGS =-s/g" > /tmp/Makefile
+ mv /tmp/Makefile ./
+ make || return 1
+ mkdir -p $startdir/pkg/usr/bin
+ mkdir -p $startdir/pkg/usr/man/man1
+ make DESTDIR=$startdir/pkg install
+ chmod 644 $startdir/pkg/usr/man/man1/mmv.1
+ cd $startdir/pkg/usr/bin
+ ln -s mmv mcp
+ ln -s mmv mad
+ ln -s mmv mln
+ cd $startdir/pkg/usr/man/man1/
+ ln -s mmv.1 mcp.1
+ ln -s mmv.1 mad.1
+ ln -s mmv.1 mln.1
+}
diff --git a/abs/extra/community/mmv/mmv.install b/abs/extra/community/mmv/mmv.install
new file mode 100644
index 0000000..9b23e48
--- /dev/null
+++ b/abs/extra/community/mmv/mmv.install
@@ -0,0 +1,19 @@
+# arg 1: the new package version
+post_install() {
+ echo ">>>"
+ echo ">>>"
+ echo ">>>"
+ echo ">>> many thanks to the debian people who provide the sources"
+ echo ">>>"
+}
+
+# arg 1: the old package version
+post_remove() {
+ echo ">>>"
+ echo ">>>"
+ echo ">>>"
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/moblock/MoBlock-nfq.sh.patch b/abs/extra/community/moblock/MoBlock-nfq.sh.patch
new file mode 100644
index 0000000..15e742f
--- /dev/null
+++ b/abs/extra/community/moblock/MoBlock-nfq.sh.patch
@@ -0,0 +1,53 @@
+--- MoBlock-0.8/MoBlock-nfq.sh.orig 2008-11-30 03:44:02.000000000 -0500
++++ MoBlock-0.8/MoBlock-nfq.sh 2008-12-01 18:56:15.000000000 -0500
+@@ -3,14 +3,10 @@
+ # MoBlock.sh - MoBlock start script
+ # ---------------------------------
+
+-ACTIVATE_CHAINS=1
+-WHITE_TCP_IN=""
+-WHITE_UDP_IN=""
+-WHITE_TCP_OUT=""
+-WHITE_UDP_OUT=""
+-WHITE_TCP_FORWARD=""
+-WHITE_UDP_FORWARD=""
++# Some configuration options have been moved to an external conf file
++# This should make maintenance and upgrading easier
+
++. /etc/moblock/config
+
+ PIDF=/var/run/moblock.pid
+
+@@ -78,6 +74,17 @@
+ iptables -I MOBLOCK_FW -p udp --dport $PORT -j ACCEPT
+ done
+
++# For added IP whitelisting support
++
++for IP in $WHITE_IP_OUT; do
++ iptables -I MOBLOCK_OUT -p all -m iprange --dst-range $IP -j ACCEPT
++done
++for IP in $WHITE_IP_IN; do
++ iptables -I MOBLOCK_IN -p all -m iprange --dst-range $IP -j ACCEPT
++done
++for IP in $WHITE_IP_FW; do
++ iptables -I MOBLOCK_FW -p all -m iprange --dst-range $IP -j ACCEPT
++done
+
+ # Loopback traffic fix
+
+@@ -85,7 +92,8 @@
+ iptables -I OUTPUT -p all -o lo -j ACCEPT
+
+ # Here you can change block list and log files
+-./moblock -p /etc/guarding.p2p ./moblock.log
++#./moblock -p /etc/guarding.p2p ./moblock.log
++/usr/bin/moblock -p /etc/moblock/banned.list /var/log/moblock.log >/dev/null 2>&1
+
+ # On exit delete the rules we added
+
+@@ -108,3 +116,4 @@
+ if [ -f $PIDF ]; then
+ rm $PIDF;
+ fi
++
diff --git a/abs/extra/community/moblock/PKGBUILD b/abs/extra/community/moblock/PKGBUILD
new file mode 100755
index 0000000..f6c7e51
--- /dev/null
+++ b/abs/extra/community/moblock/PKGBUILD
@@ -0,0 +1,56 @@
+# Contributor: Kevin Edmonds <edmondskevin@hotmail.com>
+# Maintainer: Filip Wojciechowski, filip at loka dot pl
+
+pkgname=moblock
+pkgver=0.9rc2
+pkgrel=8
+pkgdesc="Console application that blocks connections from/to hosts listed in a file in peerguardian format"
+arch=('i686' 'x86_64')
+url="http://moblock.berlios.de/"
+license=('GPL')
+depends=(libnetfilter_queue iptables)
+backup=(etc/moblock/config)
+install=moblock.install
+source=(http://download.berlios.de/moblock/MoBlock-0.8-i586.tar.bz2 \
+ moblock_0.9_rc2.patch \
+ MoBlock-nfq.sh.patch \
+ moblock_include.patch \
+ config \
+ moblock-update \
+ moblock \
+ moblock.logrotate)
+md5sums=('199967adb48b153be90db10fe21325c5'
+ 'e4e33c515677fa53eaca4616591d4e44'
+ '1193adccce219d31a7c0540807a4a8e8'
+ 'b23b5214965df59632de5cec317ddbde'
+ '840bb52a99529305e49212a69c9ced8a'
+ '49a16feb221d4d912cc7200313517f7b'
+ '1bdc949fcff0ce751a5096e489061513'
+ 'a8285fd3e68043cd8d21993d3dbbf9d4')
+
+build() {
+ cd $startdir/src/MoBlock-0.8
+
+ # patch to update moblock to the latest cvs version
+ patch -Np1 -i ../moblock_0.9_rc2.patch || return 1
+ # add IP whitelisting and move configs to a separate conf file
+ patch -Np1 -i ../MoBlock-nfq.sh.patch || return 1
+ # necessary to make moblock build with recent kernels
+ patch -Np1 -i ../moblock_include.patch || return 1
+
+ # change the CFLAGS for both i686 and x84_64 builds
+ sed -i "s#-Wall -O.*-ffast-math#$CFLAGS#g" Makefile
+
+ # build
+ make || return 1
+
+ #move the files
+ install -D -m 755 ./MoBlock-nfq.sh $startdir/pkg/usr/bin/moblock-nfq || return 1
+ install -D -m 744 ./moblock $startdir/pkg/usr/bin/moblock || return 1
+ install -D -m 755 ../moblock-update $startdir/pkg/usr/bin/moblock-update || return 1
+ install -D -m 744 ../moblock $startdir/pkg/etc/rc.d/moblock || return 1
+ install -D -m 644 ../config $startdir/pkg/etc/moblock/config || return 1
+ install -D -m 644 ../moblock.logrotate $startdir/pkg/etc/logrotate.d/moblock || return 1
+}
+
+
diff --git a/abs/extra/community/moblock/config b/abs/extra/community/moblock/config
new file mode 100644
index 0000000..7d7c287
--- /dev/null
+++ b/abs/extra/community/moblock/config
@@ -0,0 +1,30 @@
+# Original MoBlock configuration options from MoBlock-nfq.sh file
+ACTIVATE_CHAINS=1
+WHITE_TCP_IN=""
+WHITE_UDP_IN=""
+WHITE_TCP_OUT="" # Add "http https" here to prevent moblock from blocking webpages
+WHITE_UDP_OUT=""
+WHITE_TCP_FORWARD=""
+WHITE_UDP_FORWARD=""
+
+# Added IP whitelisting support
+WHITE_IP_IN=""
+WHITE_IP_OUT=""
+WHITE_IP_FW=""
+
+# Individual lists can be disabled by prefixing them with '!'
+# Bluetack blacklists (http://www.bluetack.co.uk)
+BLUETACK=(level1 level2 !level3 !edu ads-trackers-and-bad-pr0n bogon spyware spider Microsoft !proxy hijacked templist !rangetest dshield)
+
+# blocklist.org lists (currently doesn't work)
+#BLOCKLIST=(p2p gov spy ads edu)
+
+# backup lists (might be outdated)
+#PHOENIXLABS=(!p2b.p2b edu.txt spider.txt spyware.txt level1.txt !level2.txt !level3.txt)
+
+# Change to 'yes' if you want to backup up the old list before writing
+# a new one. Only one backup copy will be kept.
+BACKUP_OLD_LIST="no"
+
+# Options passed to wget
+WGET_OPTS="-q"
diff --git a/abs/extra/community/moblock/moblock b/abs/extra/community/moblock/moblock
new file mode 100755
index 0000000..d88bd2e
--- /dev/null
+++ b/abs/extra/community/moblock/moblock
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting MoBlock"
+ if [ ! -f /var/run/moblock.pid ]
+ then
+ /usr/bin/moblock-nfq &
+ if [ $? -gt 0 ]
+ then
+ stat_fail
+ else
+ add_daemon moblock
+ stat_done
+ fi
+ else
+ stat_fail
+ fi
+ ;;
+ update)
+ stat_busy "Updating MoBlock block list..."
+ error=0
+ /usr/bin/moblock-update || error=1
+ stat_busy "Updating MoBlock block list"
+ if [ $error -eq 1 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ ;;
+ stats)
+ stat_busy "Logging stats to /var/log/MoBlock.stats"
+ PID=`cat /var/run/moblock.pid 2>/dev/null`
+ if [ ! -z "$PID" ]; then
+ /bin/kill -USR2 $PID
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping MoBlock"
+ PID=`cat /var/run/moblock.pid 2>/dev/null`
+ if [ ! -z "$PID" ]; then
+ /bin/kill $PID
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon moblock
+ stat_done
+ fi
+ else
+ stat_fail
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|update|stats}"
+esac
diff --git a/abs/extra/community/moblock/moblock-update b/abs/extra/community/moblock/moblock-update
new file mode 100755
index 0000000..aae861d
--- /dev/null
+++ b/abs/extra/community/moblock/moblock-update
@@ -0,0 +1,174 @@
+#!/bin/bash
+
+. /etc/moblock/config
+
+CONF_DIR=/etc/moblock
+TEMP_DIR=$(/usr/bin/mktemp -t -d moblock-updateXXXXXXXX)
+LIST_FILE=banned.list
+
+USECOLOR="no"
+. /etc/rc.d/functions
+PREFIX_REG=" >"
+PREFIX_HL="::"
+
+function extract()
+{
+ /usr/bin/find $TEMP_DIR -type f -name '*.gz' -o -name '*.zip' |\
+ while read N
+ do
+ case "$N" in
+ *.zip) /usr/bin/unzip -oqq "$N" 2>/dev/null
+ if [ $? -gt 0 ]; then
+ rm -f "$N"
+ return 1
+ else
+ rm -f "$N"
+ fi
+ ;;
+ *.gz) /bin/gunzip -f "$N" 2>/dev/null
+ if [ $? -gt 0 ]; then
+ rm -f "$N"
+ return 1
+ fi
+ ;;
+ *) continue
+ ;;
+ esac
+ done
+ return 0
+}
+
+cd $TEMP_DIR
+
+printf "${C_SEPARATOR} ------------------------------\n"
+printhl "Downloading and extracting files:\n"
+
+# Bluetack lists (with fallback)
+for i in ${BLUETACK[@]}
+do
+ if [ $(echo $i | /bin/grep '^[^\!]' | /usr/bin/wc -l) -eq 1 ]; then
+ stat_busy "BLUETACK '${i}'... "
+ /usr/bin/wget ${WGET_OPTS} "http://www.bluetack.co.uk/config/${i}.gz" && extract
+ if [ $? -gt 0 ] || [ ! -f ${i} ]; then
+ stat_fail
+ bfile=$i
+ if [ "$bfile" = "ads-trackers-and-bad-pr0n" ]; then
+ bfile="ads"
+ elif [ "$bfile" = "Microsoft" ];then
+ bfile="microsoft"
+ fi
+ stat_busy "[!!] BLUETACK '${i}' (fallback link)... "
+ /usr/bin/wget ${WGET_OPTS} "http://list.iblocklist.com/?list=bt_${bfile%%-*}" -O "${i}.gz" && extract
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ else
+ stat_done
+ fi
+ fi
+done
+
+# Blocklist lists
+for i in ${BLOCKLIST[@]}
+do
+ if [ $(echo $i | /bin/grep '^[^\!]' | /usr/bin/wc -l) -eq 1 ]; then
+ stat_busy "BLOCKLIST '${i}'... "
+ /usr/bin/wget ${WGET_OPTS} "blocklist.org/${i}.p2b.gz" && extract
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ fi
+done
+
+# Old phoenixlabs.org lists
+for i in ${PHOENIXLABS[@]}
+do
+ if [ $(echo $i | /bin/grep '^[^\!]' | /usr/bin/wc -l) -eq 1 ]; then
+ stat_busy "PHOENIXLABS '${i}'... "
+ /usr/bin/wget ${WGET_OPTS} "fox.phoenixlabs.org/${i}" && extract
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ fi
+done
+
+if [ $(/bin/cat "$TEMP_DIR"/* | /usr/bin/wc -l) -eq 0 ]; then
+ printf "\n"
+ printhl "ERROR: No files were downloaded"
+ printf "${C_SEPARATOR} ------------------------------\n"
+ exit 1
+fi
+
+# Check files
+printsep
+printhl "Checking integrity of downloaded files:\n"
+
+/usr/bin/find -type f | while read N
+do
+ stat_busy "File '$(echo $N | /bin/awk -F/ '{print $NF}')'... "
+ scan1=$(/bin/cat "$N" | /usr/bin/wc -l)
+ scan2=$(/bin/egrep -o ":[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*-[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" "$N" | /usr/bin/wc -l)
+ if [ $scan1 -eq $scan2 ]; then
+ stat_done
+ else
+ if [ $scan2 -gt 0 ]; then
+ if [ $scan1 -gt $scan2 ]; then
+ stat_append "$(($scan1-$scan2)) of $scan1 entries failed validation; keeping the file"
+ stat_done
+ fi
+ else
+ stat_fail
+ stat_busy "[!!] Removing corrupted file... "
+ rm "$N" 2>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ stat_done
+ fi
+ fi
+ fi
+done
+
+printsep
+printhl "Saving the list:\n"
+
+# Make backup
+if [ "$BACKUP_OLD_LIST" = "yes" ] && [ -f "$CONF_DIR"/"$LIST_FILE" ]; then
+ stat_busy "Backing up old list to '$CONF_DIR/$LIST_FILE.gz'... "
+ /bin/gzip -f "$CONF_DIR"/"$LIST_FILE" 2>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+fi
+
+# Save the list
+stat_busy "Saving new list to '$CONF_DIR/$LIST_FILE'... "
+/bin/cat "$TEMP_DIR"/* > "$CONF_DIR"/"$LIST_FILE" 2>&1
+if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+else
+ stat_done
+ printf "\n"
+ printhl "Saved `cat "$CONF_DIR"/"$LIST_FILE" | wc -l` ranges"
+ printf "${C_SEPARATOR} ------------------------------\n"
+fi
+
+rm -rf "$TEMP_DIR"
+
+# Restart MoBlock
+if [ -f /var/run/moblock.pid ]; then
+ /bin/kill -HUP `cat /var/run/moblock.pid` >/dev/null 2>&1
+fi
+
+exit 0
+
diff --git a/abs/extra/community/moblock/moblock.install b/abs/extra/community/moblock/moblock.install
new file mode 100644
index 0000000..c7715e7
--- /dev/null
+++ b/abs/extra/community/moblock/moblock.install
@@ -0,0 +1,30 @@
+post_install() {
+ #clean up after an old hack
+ if [ -h /usr/lib/libnfnetlink.so.1 ]; then
+ rm /usr/lib/libnfnetlink.so.1
+ fi
+ echo ""
+ echo ">>> moblock-update script no longer uses /var/spool/moblock"
+ echo ">>> as a temporary directory. You can safely delete it."
+ echo ""
+ if [ ! -d /var/spool/moblock/used ]
+ then
+ mkdir -p /var/spool/moblock/used
+ fi
+}
+
+post_upgrade() {
+ #clean up after an old hack
+ if [ -h /usr/lib/libnfnetlink.so.1 ]; then
+ rm /usr/lib/libnfnetlink.so.1
+ fi
+ if [ ! -d /var/spool/moblock/used ]
+ then
+ mkdir -p /var/spool/moblock/used
+ fi
+}
+
+op=$1
+shift
+$op $*
+
diff --git a/abs/extra/community/moblock/moblock.logrotate b/abs/extra/community/moblock/moblock.logrotate
new file mode 100644
index 0000000..6ed64bb
--- /dev/null
+++ b/abs/extra/community/moblock/moblock.logrotate
@@ -0,0 +1,11 @@
+"/var/log/moblock.log" /var/log/MoBlock.stats {
+ daily
+ missingok
+ notifempty
+ sharedscripts
+ postrotate
+ /usr/bin/test -f /var/run/moblock.pid && /bin/kill -HUP `cat /var/run/moblock.pid 2>/dev/null` 2>/dev/null || exit 0
+ endscript
+ compress
+}
+
diff --git a/abs/extra/community/moblock/moblock_0.9_rc2.patch b/abs/extra/community/moblock/moblock_0.9_rc2.patch
new file mode 100644
index 0000000..69994ff
--- /dev/null
+++ b/abs/extra/community/moblock/moblock_0.9_rc2.patch
@@ -0,0 +1,912 @@
+diff -Naur MoBlock-0.8_orig/Changelog MoBlock-0.8/Changelog
+--- MoBlock-0.8_orig/Changelog 2006-03-22 12:44:31.000000000 -0500
++++ MoBlock-0.8/Changelog 2008-02-10 11:56:08.000000000 -0500
+@@ -4,6 +4,23 @@
+
+ ---
+
++0.9: - fix for kernel 2.6.23
++ - support for MARKing packets instead of DROPping or
++ ACCEPTing
++ - example start script that REJECTs packets instead of
++ DROPping.
++ - Integrated a patch from David Walluck for proper loading
++ of p2b files (version 2)
++ - command line options for logging to syslog, stdout
++ and log timestamping
++ - fixed loading pg1 lists with comments (lines starting
++ with '#')
++ - fixed a bug in ranges merge
++ - applied patch 2223 by badfish99: "IPs logged with bytes
++ reversed on big-endian m/c"
++
++---
++
+ 0.8: - support for NFQUEUE-ing from iptables FORWARD chain (thx to
+ hyakki for suggestions and testing!)
+ - included patches from Maximilian Mehnert to support log file
+diff -Naur MoBlock-0.8_orig/Makefile MoBlock-0.8/Makefile
+--- MoBlock-0.8_orig/Makefile 2006-03-22 12:44:31.000000000 -0500
++++ MoBlock-0.8/Makefile 2007-11-22 08:10:44.000000000 -0500
+@@ -1,4 +1,3 @@
+-
+ # To use the old-soon-to-be-deprecated libipq interface
+ # uncomment the following line and comment the NFQUEUE one,
+ # then comment the gcc line with netfilter_queue and
+@@ -7,7 +6,7 @@
+ #QUEUE_LIB=LIBIPQ
+ QUEUE_LIB=NFQUEUE
+
+-CFLAGS=-Wall -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math \
++CFLAGS=-Wall -O3 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math \
+ -D_GNU_SOURCE -D$(QUEUE_LIB) -L/usr/include/libipq
+ CC=gcc
+
+diff -Naur MoBlock-0.8_orig/MoBlock-nfq-reject.sh MoBlock-0.8/MoBlock-nfq-reject.sh
+--- MoBlock-0.8_orig/MoBlock-nfq-reject.sh 1969-12-31 19:00:00.000000000 -0500
++++ MoBlock-0.8/MoBlock-nfq-reject.sh 2007-11-22 08:10:44.000000000 -0500
+@@ -0,0 +1,104 @@
++#!/bin/sh
++#
++# MoBlock.sh - MoBlock start script
++# ---------------------------------
++
++ACTIVATE_CHAINS=1
++WHITE_TCP_IN=""
++WHITE_UDP_IN=""
++WHITE_TCP_OUT=""
++WHITE_UDP_OUT=""
++WHITE_TCP_FORWARD=""
++WHITE_UDP_FORWARD=""
++REJECT_MARK="10"
++
++PIDF=/var/run/moblock.pid
++
++FNAME=`basename $0 .sh`
++MODE=`echo $FNAME|awk -F- '{print $2}'`
++
++if [ -f $PIDF ]; then
++ PID=`cat $PIDF`
++ if [ `ps -p $PID|wc -l` -gt 1 ]; then
++ echo "$0: $PIDF exists and processs seems to be running. Exiting."
++ exit 1;
++ fi;
++fi;
++
++if [ $MODE == "ipq" ]; then
++ modprobe ip_queue
++ TARGET="QUEUE"
++elif [ $MODE == "nfq" ]; then
++ modprobe ipt_NFQUEUE
++ TARGET="NFQUEUE"
++fi;
++
++modprobe ipt_state
++
++# Filter all traffic, edit for your needs
++
++iptables -N MOBLOCK_IN
++iptables -N MOBLOCK_OUT
++iptables -N MOBLOCK_FW
++
++if [ $ACTIVATE_CHAINS -eq 1 ]; then
++ iptables -I INPUT -p all -m state --state NEW -j MOBLOCK_IN
++ iptables -I OUTPUT -p all -m state --state NEW -j MOBLOCK_OUT
++ iptables -I FORWARD -p all -m state --state NEW -j MOBLOCK_FW
++fi;
++
++
++iptables -I MOBLOCK_IN -p all -j $TARGET
++
++iptables -I MOBLOCK_OUT -p all -j $TARGET
++
++iptables -I MOBLOCK_FW -p all -j $TARGET
++
++for PORT in $WHITE_TCP_OUT; do
++ iptables -I MOBLOCK_OUT -p tcp --dport $PORT -j ACCEPT
++done
++for PORT in $WHITE_UDP_OUT; do
++ iptables -I MOBLOCK_OUT -p udp --dport $PORT -j ACCEPT
++done
++
++for PORT in $WHITE_TCP_IN; do
++ iptables -I MOBLOCK_IN -p tcp --dport $PORT -j ACCEPT
++done
++for PORT in $WHITE_UDP_IN; do
++ iptables -I MOBLOCK_IN -p udp --dport $PORT -j ACCEPT
++done
++
++for PORT in $WHITE_TCP_FORWARD; do
++ iptables -I MOBLOCK_FW -p tcp --dport $PORT -j ACCEPT
++done
++for PORT in $WHITE_UDP_FORWARD; do
++ iptables -I MOBLOCK_FW -p udp --dport $PORT -j ACCEPT
++done
++
++iptables -I OUTPUT -p all -m state --state NEW -m mark --mark $REJECT_MARK -j REJECT
++iptables -I FORWARD -p all -m state --state NEW -m mark --mark $REJECT_MARK -j REJECT
++
++# Here you can change block list and log files
++./moblock -d /etc/ipfilter.dat -t -s -r $REJECT_MARK ./moblock.log
++
++# On exit delete the rules we added
++
++if [ $ACTIVATE_CHAINS -eq 1 ]; then
++ iptables -D INPUT -p all -m state --state NEW -j MOBLOCK_IN
++ iptables -D OUTPUT -p all -m state --state NEW -j MOBLOCK_OUT
++ iptables -D FORWARD -p all -m state --state NEW -j MOBLOCK_FW
++fi;
++
++iptables -D OUTPUT -p all -m state --state NEW -m mark --mark $REJECT_MARK -j REJECT
++iptables -D FORWARD -p all -m state --state NEW -m mark --mark $REJECT_MARK -j REJECT
++
++iptables -F MOBLOCK_IN
++iptables -X MOBLOCK_IN
++iptables -F MOBLOCK_OUT
++iptables -X MOBLOCK_OUT
++iptables -F MOBLOCK_FW
++iptables -X MOBLOCK_FW
++
++if [ -f $PIDF ]; then
++ rm $PIDF;
++fi
+diff -Naur MoBlock-0.8_orig/MoBlock.c MoBlock-0.8/MoBlock.c
+--- MoBlock-0.8_orig/MoBlock.c 2006-03-22 12:44:31.000000000 -0500
++++ MoBlock-0.8/MoBlock.c 2008-02-10 11:56:08.000000000 -0500
+@@ -35,6 +35,8 @@
+ #include <linux/netfilter_ipv4.h>
+ #include <signal.h>
+ #include <regex.h>
++#include <time.h>
++#include <syslog.h>
+
+ // in Makefile define LIBIPQ to use soon-to-be-deprecated ip_queue,
+ // NFQUEUE for ipt_NFQUEUE (from kernel 2.6.14)
+@@ -46,7 +48,7 @@
+ #include <libnetfilter_queue/libnetfilter_queue.h>
+ #endif
+
+-#define MB_VERSION "0.8"
++#define MB_VERSION "0.9rc2"
+
+ #define BUFSIZE 2048
+ #define PAYLOADSIZE 21
+@@ -58,6 +60,9 @@
+ #define SRC_ADDR(payload) (*(in_addr_t *)((payload)+12))
+ #define DST_ADDR(payload) (*(in_addr_t *)((payload)+16))
+
++#define likely(x) __builtin_expect((x),1)
++#define unlikely(x) __builtin_expect((x),0)
++
+ // rbt datatypes/functions
+
+ typedef enum {
+@@ -96,7 +101,8 @@
+ char filename[100];
+ } blocklist_info;
+
+-int merged_ranges=0, skipped_ranges=0;
++u_int32_t merged_ranges=0, skipped_ranges=0, accept_mark=0, reject_mark=0;
++u_int8_t log2syslog=0, log2file=0, log2stdout=0, timestamp=0;
+
+ #ifdef LIBIPQ
+ static void die(struct ipq_handle *h)
+@@ -112,11 +118,13 @@
+ static char buf[2][ sizeof("aaa.bbb.ccc.ddd") ];
+ static short int index=0;
+
++ ip = ntohl(ip);
++
+ sprintf(buf[index],"%d.%d.%d.%d",
+- (ip) & 0xff,
+- (ip >> 8) & 0xff,
++ (ip >> 24) & 0xff,
+ (ip >> 16) & 0xff,
+- (ip >> 24) & 0xff);
++ (ip >> 8) & 0xff,
++ (ip) & 0xff);
+
+ if (index) {
+ index=0;
+@@ -134,10 +142,38 @@
+ fflush(stdout);
+ }
+
++void log_action(char *msg)
++{
++ char timestr[30];
++ time_t tv;
++
++ if (timestamp) {
++ tv = time(NULL);
++ strncpy(timestr, ctime(&tv), 19);
++ timestr[19] = '\0';
++ strcat(timestr, "| ");
++ }
++ else strcpy(timestr, "");
++
++ if (log2syslog) {
++ syslog(LOG_INFO, msg);
++ }
++
++ if (log2file) {
++ fprintf(logfile,"%s%s",timestr,msg);
++ fflush(logfile);
++ }
++
++ if (log2stdout) {
++ fprintf(stdout,"%s%s",timestr,msg);
++ }
++}
++
+ inline void ranged_insert(char *name,char *ipmin,char *ipmax)
+ {
+ recType tmprec;
+ int ret;
++ char msgbuf[255];
+
+ if ( strlen(name) > (BNAME_LEN-1) ) {
+ strncpy(tmprec.blockname, name, BNAME_LEN);
+@@ -149,10 +185,11 @@
+ if ( (ret=insert(ntohl(inet_addr(ipmin)),&tmprec)) != STATUS_OK )
+ switch(ret) {
+ case STATUS_MEM_EXHAUSTED:
+- fprintf(logfile,"Error inserting range, MEM_EXHAUSTED.\n");
++ log_action("Error inserting range, MEM_EXHAUSTED.\n");
+ break;
+ case STATUS_DUPLICATE_KEY:
+- fprintf(logfile,"Duplicated range ( %s )\n",name);
++ sprintf(msgbuf,"Duplicated range ( %s )\n",name);
++ log_action(msgbuf);
+ break;
+ case STATUS_MERGED:
+ merged_ranges++;
+@@ -161,8 +198,9 @@
+ skipped_ranges++;
+ break;
+ default:
+- fprintf(logfile,"Unexpected return value from ranged_insert()!\n");
+- fprintf(logfile,"Return value was: %d\n",ret);
++ log_action("Unexpected return value from ranged_insert()!\n");
++ sprintf(msgbuf,"Return value was: %d\n",ret);
++ log_action(msgbuf);
+ break;
+ }
+ }
+@@ -177,15 +215,19 @@
+ regex_t regmain;
+ regmatch_t matches[4];
+ int i;
++ char msgbuf[255];
+
+ regcomp(&regmain, "^(.*)[:]([0-9.]*)[-]([0-9.]*)$", REG_EXTENDED);
+
+ fp=fopen(filename,"r");
+ if ( fp == NULL ) {
+- fprintf(logfile,"Error opening %s, aborting...\n", filename);
++ sprintf(msgbuf,"Error opening %s, aborting...\n", filename);
++ log_action(msgbuf);
+ exit(-1);
+ }
+ while ( (count=getline(&line,&len,fp)) != -1 ) {
++ if ( line[0] == '#' ) //comment line, skip
++ continue;
+ for(i=count-1; i>=0; i--) {
+ if ((line[i] == '\r') || (line[i] == '\n') || (line[i] == ' ')) {
+ line[i] = 0;
+@@ -207,36 +249,78 @@
+ line+matches[3].rm_so);
+ ntot++;
+ } else {
+- fprintf(logfile,"Short guarding.p2p line %s, skipping it...\n", line);
++ sprintf(msgbuf,"Short guarding.p2p line %s, skipping it...\n", line);
++ log_action(msgbuf);
+ }
+ }
+ if (line)
+ free(line);
+ fclose(fp);
+- fprintf(logfile,"Ranges loaded: %d\n",ntot);
+- printf("* Ranges loaded: %d\n",ntot);
++ sprintf(msgbuf, "* Ranges loaded: %d\n", ntot);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
+ }
+
+-void loadlist_pg2(char *filename) // experimental, no check for list sanity
++void loadlist_pg2(char *filename) // supports only v2 files
+ {
+ FILE *fp;
+- int i,retval,ntot=0;
+- char name[100],ipmin[16]; // hope we don't have a list with longer names...
++ int i, j, c, retval=0, ntot=0;
++ char name[100],ipmin[16], msgbuf[255]; // hope we don't have a list with longer names...
+ uint32_t start_ip, end_ip;
+ struct in_addr startaddr,endaddr;
++ size_t s;
+
+ fp=fopen(filename,"r");
+ if ( fp == NULL ) {
+- fprintf(logfile,"Error opening %s, aborting...\n", filename);
++ sprintf(msgbuf, "Error opening %s, aborting...\n", filename);
++ log_action(msgbuf);
+ exit(-1);
+ }
+
+- fgetc(fp); // skip first 4 bytes, don't know what they are
+- fgetc(fp);
+- fgetc(fp);
+- retval=fgetc(fp);
++ for (j=0; j<4; j++) {
++ c=fgetc(fp);
++ if ( c != 0xff ) {
++ sprintf(msgbuf,"Byte %d: 0x%x != 0xff, aborting...\n", j+1, c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++ }
++
++ c=fgetc(fp);
++ if ( c != 'P' ) {
++ sprintf(msgbuf,"Byte 5: %c != P, aborting...\n", c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++
++ c=fgetc(fp);
++ if ( c != '2' ) {
++ sprintf(msgbuf,"Byte 6: %c != 2, aborting...\n", c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
+
+- while ( retval != EOF ) {
++ c=fgetc(fp);
++ if ( c != 'B' ) {
++ sprintf(msgbuf,"Byte 7: %c != B, aborting...\n", c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++
++ c=fgetc(fp);
++ if ( c != 0x02 ) {
++ sprintf(msgbuf,"Byte 8: version: %d != 2, aborting...\n", c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++
++ do {
+ i=0;
+ do {
+ name[i]=fgetc(fp);
+@@ -244,9 +328,22 @@
+ } while ( name[i-1] != 0x00 && name[i-1] != EOF);
+ if ( name[i-1] != EOF ) {
+ name[i-1]='\0';
+- fread(&start_ip,4,1,fp);
+- fread(&end_ip,4,1,fp);
+- startaddr.s_addr=start_ip;
++ s=fread(&start_ip,4,1,fp);
++ if ( s != 1 ) {
++ sprintf(msgbuf,"Failed to read start IP: %d != 1, aborting...\n", (int)s);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++ s=fread(&end_ip,4,1,fp);
++ if ( s != 1 ) {
++ sprintf(msgbuf,"Failed to read end IP: %d != 1, aborting...\n", (int)s);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++
++ startaddr.s_addr=start_ip;
+ endaddr.s_addr=end_ip;
+ strcpy(ipmin,inet_ntoa(startaddr));
+ ranged_insert(name,ipmin,inet_ntoa(endaddr));
+@@ -255,22 +352,25 @@
+ else {
+ retval=EOF;
+ }
+- }
++ } while ( retval != EOF );
+ fclose(fp);
+- fprintf(logfile,"Ranges loaded: %d\n",ntot);
+- printf("* Ranges loaded: %d\n",ntot);
++ sprintf(msgbuf, "* Ranges loaded: %d\n",ntot);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
+ }
+
+ void loadlist_dat(char *filename)
+ {
+ FILE *fp;
+ int ntot=0;
+- char readbuf[200], *name, start_ip[16], end_ip[16];
++ char readbuf[200], *name, start_ip[16], end_ip[16], msgbuf[255];
+ unsigned short ip1_0, ip1_1, ip1_2, ip1_3, ip2_0, ip2_1, ip2_2, ip2_3;
+
+ fp=fopen(filename,"r");
+ if ( fp == NULL ) {
+- fprintf(logfile,"Error opening %s, aborting...\n", filename);
++ sprintf(msgbuf,"Error opening %s, aborting...\n", filename);
++ log_action(msgbuf);
+ exit(-1);
+ }
+
+@@ -286,38 +386,45 @@
+ ntot++;
+ }
+ fclose(fp);
+- fprintf(logfile,"Ranges loaded: %d\n",ntot);
+- printf("* Ranges loaded: %d\n",ntot);
++ sprintf(msgbuf, "* Ranges loaded: %d\n", ntot);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
+ }
+
+ void reopen_logfile(void)
+ {
++ char msgbuf[255];
++
+ if (logfile != NULL) {
+ fclose(logfile);
+ logfile=NULL;
+ }
+ logfile=fopen(logfile_name,"a");
+ if (logfile == NULL) {
+- fprintf(stderr, "Unable to open logfile %s\n", logfile_name);
++ sprintf(msgbuf, "Unable to open logfile %s\n", logfile_name);
++ log_action(msgbuf);
+ exit(-1);
+ }
+- fprintf(logfile, "Reopening logfile.\n");
++ log_action("Reopening logfile.\n");
+ }
+
+ void my_sahandler(int sig)
+ {
++ char msgbuf[255];
++
+ switch( sig ) {
+ case SIGUSR1:
+- fprintf(logfile,"Got SIGUSR1! Dumping stats...\n");
++ log_action("Got SIGUSR1! Dumping stats...\n");
+ ll_show(logfile);
+ reopen_logfile();
+ break;
+ case SIGUSR2:
+- fprintf(logfile,"Got SIGUSR2! Dumping stats to /var/log/MoBlock.stats\n");
++ log_action("Got SIGUSR2! Dumping stats to /var/log/MoBlock.stats\n");
+ ll_log();
+ break;
+ case SIGHUP:
+- fprintf(logfile,"\nGot SIGHUP! Dumping and resetting stats, reloading blocklist\n\n");
++ log_action("Got SIGHUP! Dumping and resetting stats, reloading blocklist\n");
+ ll_log();
+ ll_clear(); // clear stats list
+ destroy_tree(); // clear loaded ranges
+@@ -332,17 +439,18 @@
+ loadlist_pg2(blocklist_info.filename);
+ break;
+ default:
+- fprintf(logfile,"Unknown blocklist type while reloading list, contact the developer!\n");
++ log_action("Unknown blocklist type while reloading list, contact the developer!\n");
+ break;
+ }
+ reopen_logfile();
+ break;
+ case SIGTERM:
+- fprintf(logfile,"Got SIGTERM! Dumping stats and exiting.\n");
++ log_action("Got SIGTERM! Dumping stats and exiting.\n");
+ ll_log();
+ exit(0);
+ default:
+- fprintf(logfile,"Received signal = %d but not handled\n",sig);
++ sprintf(msgbuf,"Received signal = %d but not handled\n",sig);
++ log_action(msgbuf);
+ break;
+ }
+ }
+@@ -378,7 +486,7 @@
+ {
+ int id=0, status=0;
+ struct nfqnl_msg_packet_hdr *ph;
+- char *payload;
++ char *payload, msgbuf[255];
+ recType tmprec;
+
+ ph = nfq_get_msg_packet_hdr(nfa);
+@@ -389,34 +497,78 @@
+ switch (ph->hook) {
+ case NF_IP_LOCAL_IN:
+ if ( find(ntohl(SRC_ADDR(payload)),&tmprec) == STATUS_OK ) {
++ // we drop the packet instead of rejecting
++ // we don't want the other host to know we are alive
+ status=nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
+- fprintf(logfile,"Blocked IN: %s,hits: %d,SRC: %s\n",tmprec.blockname,tmprec.hits,ip2str(SRC_ADDR(payload)));
+- } else status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ sprintf(msgbuf,"Blocked IN: %s,hits: %d,SRC: %s\n",tmprec.blockname,tmprec.hits,ip2str(SRC_ADDR(payload)));
++ log_action(msgbuf);
++ }
++ else if ( unlikely(accept_mark) ) {
++ // we set the user-defined accept_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, accept_mark, 0, NULL);
++ }
++ else {
++ // no accept_mark, just NF_ACCEPT the packet
++ status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ }
+ break;
+ case NF_IP_LOCAL_OUT:
+ if ( find(ntohl(DST_ADDR(payload)),&tmprec) == STATUS_OK ) {
+- status=nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
+- fprintf(logfile,"Blocked OUT: %s,hits: %d,DST: %s\n",tmprec.blockname,tmprec.hits,ip2str(DST_ADDR(payload)));
+- } else status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ if ( likely(reject_mark) ) {
++ // we set the user-defined reject_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, reject_mark, 0, NULL);
++ }
++ else {
++ status = nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
++ }
++ sprintf(msgbuf,"Blocked OUT: %s,hits: %d,DST: %s\n",tmprec.blockname,tmprec.hits,ip2str(DST_ADDR(payload)));
++ log_action(msgbuf);
++ }
++ else if ( unlikely(accept_mark) ) {
++ // we set the user-defined accept_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, accept_mark, 0, NULL);
++ }
++ else {
++ // no accept_mark, just NF_ACCEPT the packet
++ status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ }
+ break;
+ case NF_IP_FORWARD:
+ if ( find2(ntohl(SRC_ADDR(payload)), ntohl(DST_ADDR(payload)), &tmprec) == STATUS_OK ) {
+- status=nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
+- fprintf(logfile,"Blocked FWD: %s,hits: %d,SRC: %s, DST: %s\n",
++ if ( likely(reject_mark) ) {
++ // we set the user-defined reject_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, reject_mark, 0, NULL);
++ }
++ else {
++ status = nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
++ }
++ sprintf(msgbuf,"Blocked FWD: %s,hits: %d,SRC: %s, DST: %s\n",
+ tmprec.blockname, tmprec.hits, ip2str(SRC_ADDR(payload)), ip2str(DST_ADDR(payload)));
+- fflush(logfile);
+- } else status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ log_action(msgbuf);
++ }
++ else if ( unlikely(accept_mark) ) {
++ // we set the user-defined accept_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, accept_mark, 0, NULL);
++ }
++ else {
++ // no accept_mark, just NF_ACCEPT the packet
++ status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ }
+ break;
+ default:
+- fprintf(logfile,"Not NF_LOCAL_IN/OUT/FORWARD packet!\n");
++ log_action("Not NF_LOCAL_IN/OUT/FORWARD packet!\n");
+ break;
+ }
+ }
+ else {
+- fprintf(logfile,"NFQUEUE: can't get msg packet header.\n");
++ log_action("NFQUEUE: can't get msg packet header.\n");
+ return(1); // from nfqueue source: 0 = ok, >0 = soft error, <0 hard error
+ }
+- fflush(logfile);
+ return(0);
+ }
+ #endif
+@@ -492,46 +644,48 @@
+ struct nfq_q_handle *qh;
+ struct nfnl_handle *nh;
+ int fd,rv;
+- char buf[BUFSIZE];
++ char buf[BUFSIZE], msgbuf[255];
+
+ h = nfq_open();
+ if (!h) {
+- fprintf(logfile, "Error during nfq_open()\n");
++ log_action("Error during nfq_open()\n");
+ exit(-1);
+ }
+
+ if (nfq_unbind_pf(h, AF_INET) < 0) {
+- fprintf(logfile, "error during nfq_unbind_pf()\n");
+- exit(-1);
++ log_action("error during nfq_unbind_pf()\n");
++ //exit(-1);
+ }
+
+ if (nfq_bind_pf(h, AF_INET) < 0) {
+- fprintf(logfile, "Error during nfq_bind_pf()\n");
++ log_action("Error during nfq_bind_pf()\n");
+ exit(-1);
+ }
+
+- fprintf(logfile,"NFQUEUE: binding to queue '%hd'\n", queuenum);
++ sprintf(msgbuf,"NFQUEUE: binding to queue '%hd'\n", queuenum);
++ log_action(msgbuf);
+ qh = nfq_create_queue(h, queuenum, &nfqueue_cb, NULL);
+ if (!qh) {
+- fprintf(logfile, "error during nfq_create_queue()\n");
++ log_action("error during nfq_create_queue()\n");
+ exit(-1);
+ }
+
+ if (nfq_set_mode(qh, NFQNL_COPY_PACKET, PAYLOADSIZE) < 0) {
+- fprintf(logfile, "can't set packet_copy mode\n");
++ log_action("can't set packet_copy mode\n");
+ exit(-1);
+ }
+
+ nh = nfq_nfnlh(h);
+ fd = nfnl_fd(nh);
+
+- while ((rv = recv(fd, buf, sizeof(buf), 0)) && rv >= 0) {
++ while ((rv = recv(fd, buf, sizeof(buf), 0)) >= 0) {
+ nfq_handle_packet(h, buf, rv);
+ }
+
+- printf("NFQUEUE: unbinding from queue 0\n");
++ log_action("NFQUEUE: unbinding from queue 0\n");
+ nfq_destroy_queue(qh);
+ nfq_close(h);
++ nfq_unbind_pf(h, AF_INET);
+ return(0);
+ #endif
+
+@@ -540,11 +694,16 @@
+ void print_options(void)
+ {
+ printf("\nMoBlock %s by Morpheus",MB_VERSION);
+- printf("\nSyntax: MoBlock -dnp <blocklist> [-b] [-q 0-65535] <logfile>\n\n");
++ printf("\nSyntax: MoBlock -dnp <blocklist> [-q 0-65535] <logfile>\n\n");
+ printf("\t-d\tblocklist is an ipfilter.dat file\n");
+ printf("\t-n\tblocklist is a peerguardian 2.x file (.p2b)\n");
+ printf("\t-p\tblocklist is a peerguardian file (.p2p)\n");
+ printf("\t-q\t0-65535 NFQUEUE number (as specified in --queue-num with iptables)\n");
++ printf("\t-r MARK\tmark packet with MARK instead of DROP\n");
++ printf("\t-a MARK\tmark packet with MARK instead of ACCEPT\n");
++ printf("\t-l\tlog to stdout\n");
++ printf("\t-s\tlog to syslog\n");
++ printf("\t-t\tlog timestamping\n\n");
+ }
+
+ void on_quit()
+@@ -556,6 +715,7 @@
+ {
+ int ret=0;
+ unsigned short int queuenum=0;
++ char msgbuf[255];
+
+ if (argc < 3) {
+ print_options();
+@@ -591,10 +751,11 @@
+ }
+ logfile_name=malloc(strlen(argv[argc-1])+1);
+ strcpy(logfile_name,argv[argc-1]);
++ log2file = 1;
+ printf("* Logging to %s\n",logfile_name);
+
+ while (1) { //scan command line options
+- ret=getopt(argc, argv, "d:n:p:q:");
++ ret=getopt(argc, argv, "d:n:p:q:a:r:stl");
+ if ( ret == -1 ) break;
+
+ switch (ret) {
+@@ -619,6 +780,28 @@
+ case 'q':
+ queuenum=(unsigned short int)atoi(optarg);
+ break;
++ case 'r':
++ reject_mark=(u_int32_t)atoi(optarg);
++ printf("* DROP MARK: %d\n", reject_mark);
++ reject_mark=htonl(reject_mark);
++ break;
++ case 'a':
++ accept_mark=(u_int32_t)atoi(optarg);
++ printf("* ACCEPT MARK: %d\n", accept_mark);
++ accept_mark=htonl(accept_mark);
++ break;
++ case 's':
++ log2syslog = 1;
++ printf("* Logging to syslog\n");
++ break;
++ case 't':
++ timestamp = 1;
++ printf("* Log timestamp enabled\n");
++ break;
++ case 'l':
++ log2stdout = 1;
++ printf("* Log to stdout enabled\n");
++ break;
+ case '?': // unknown option
+ print_options();
+ exit(-1);
+@@ -626,10 +809,14 @@
+ }
+ }
+
+- printf("* Merged ranges: %d\n", merged_ranges);
+- fprintf(logfile, "Merged ranges: %d\n", merged_ranges);
+- printf("* Skipped useless ranges: %d\n", skipped_ranges);
+- fprintf(logfile,"Skipped useless ranges: %d\n", skipped_ranges);
++ sprintf(msgbuf, "* Merged ranges: %d\n", merged_ranges);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
++ sprintf(msgbuf,"* Skipped useless ranges: %d\n", skipped_ranges);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
+ fflush(NULL);
+
+ netlink_loop(queuenum);
+diff -Naur MoBlock-0.8_orig/README MoBlock-0.8/README
+--- MoBlock-0.8_orig/README 2006-03-22 12:44:31.000000000 -0500
++++ MoBlock-0.8/README 2007-11-22 08:10:44.000000000 -0500
+@@ -1,5 +1,5 @@
+
+-MoBlock README v0.8
++MoBlock README v0.9
+ http://moblock.berlios.de
+
+ .Introduction.
+@@ -47,6 +47,22 @@
+ ip_conntrack 40044 1 ipt_state
+ iptable_filter 2176 1
+ ip_tables 17600 3 ipt_NFQUEUE,ipt_state,iptable_filter
++
++ ...and these with kernel 2.6.23 using NFQUEUE interface:
++
++ nfnetlink_queue 9344 1
++ nfnetlink 4568 2 nfnetlink_queue
++ ipt_REJECT 3520 2
++ xt_mark 1600 2
++ nf_conntrack_ipv4 12424 5
++ iptable_filter 2308 1
++ ip_tables 10328 1 iptable_filter
++ xt_state 1984 5
++ nf_conntrack 48356 2 nf_conntrack_ipv4,xt_state
++ xt_NFQUEUE 1664 3
++ x_tables 11396 5 ipt_REJECT,xt_mark,ip_tables,xt_state,xt_NFQUEUE
++
++ (notice that ipt_NFQUEUE has changed to xt_NFQUEUE, same thing for other modules too)
+
+ 2) A valid guarding.p2p/ipfilter.dat/p2p.p2b host file in /etc ( /etc/guarding.p2p ).
+ MoBlock tries to skip malformed or duplicate ranges but
+@@ -140,8 +156,18 @@
+ To specify a NFQUEUE queue number:
+
+ ./moblock -p /etc/guarding.p2p -q 5 MoBlock.log
++
++ From version 0.9 MoBlock supports MARKing packets and RETURN them to
++ iptables, there's an example start script (MoBlock-nfq-reject.sh) that
++ uses this feature to REJECT packet instead of dropping them. It can help
++ in complex firewall configuration where you need more control of packets
++ flow after MoBlock inspection.
++ See the mentioned start script for reference, you can set the MARK value
++ for packets that MoBlock would drop (ip in list) with the "-r" command line
++ option and for packets that MoBlock would accept (ip not in list) with
++ the "-a" command line option.
+
+- To stop it:
++ To stop MoBlock:
+
+ kill -TERM <MoBlockPid>
+
+@@ -149,7 +175,7 @@
+ To obtain stats about blocked ranges while it's running:
+
+ kill -USR1 <MoBlockPid> # write stats to logfile
+- kill -USR2 <MoBlockPid> # write stats to /var/log/MoBlock.stats
++ kill -USR2 <MoBlockPid> # write stats to /var/log/MoBlock.stats
+
+ ** NEW: to reload the blocklist while MoBlock is running send to it the
+ HUP signal:
+@@ -168,7 +194,10 @@
+ took some code and ideas from his FTwall
+ - Andrew de Quincey (adq at lidskialf dot net) for regular expressions
+ and command line args patch
+-- Maximilian Mehnert (clessing at freenet dot de) for logfile rotation
++- clessing at freenet dot de for logfile rotation
+ patches, pid file creation, start script, fixes/files for debian packaging
++- David Walluck, patch for proper loading of p2b files
++- jre, for continuing clessing work on debian packaging and many other
++ contributions
+
+-Last Updated: 20/Mar/2006
++Last Updated: 15/Oct/2007
+diff -Naur MoBlock-0.8_orig/rbt.c MoBlock-0.8/rbt.c
+--- MoBlock-0.8_orig/rbt.c 2006-03-22 12:44:31.000000000 -0500
++++ MoBlock-0.8/rbt.c 2008-02-10 11:56:08.000000000 -0500
+@@ -19,7 +19,7 @@
+ #include <stdarg.h>
+ #include <time.h>
+
+-#define RBT_VERSION 0.8
++#define RBT_VERSION 0.9
+ #define BNAME_LEN 80
+
+ /* implementation dependend declarations */
+@@ -421,7 +421,7 @@
+
+ statusEnum insert(keyType key, recType *rec) {
+ nodeType *current, *parent, *x;
+- keyType tmpkey;
++ //keyType tmpkey;
+ recType tmprec;
+ int ret;
+
+@@ -433,6 +433,23 @@
+ current = root;
+ parent = 0;
+ while (current != NIL) {
++ if (compEQ2(current->key, key, rec->ipmax)) { // current node key is inside new range to be inserted
++ strcpy(tmprec.blockname, rec->blockname); // block name from new range
++ if (compLT(current->rec.ipmax, rec->ipmax))
++ tmprec.ipmax = rec->ipmax;
++ else tmprec.ipmax = current->rec.ipmax;
++ tmprec.hits = 0;
++ //printf("deleting node :%lu\n", current->key);
++ ret=delete(current->key);
++ if ( ret != STATUS_OK )
++ return(ret);
++ ret=insert(key, &tmprec);
++ if ( ret == STATUS_OK ) {
++ printf("new merge\n");
++ return(STATUS_MERGED);
++ }
++ else return(ret);
++ }
+ if (compEQ(key, current->key)) {
+ if ( rec->ipmax > current->rec.ipmax ) {
+ current->rec.ipmax=rec->ipmax;
+@@ -458,7 +475,7 @@
+ }
+ }
+ //check if higher ip (ipmax) is already in a range
+- if (compEQ2(rec->ipmax,current->key,current->rec.ipmax)) {
++ /*if (compEQ2(rec->ipmax,current->key,current->rec.ipmax)) {
+ fprintf(logfile,"higher ip in range\n");
+ tmpkey=key;
+ strcpy(tmprec.blockname,current->rec.blockname);
+@@ -470,7 +487,7 @@
+ if ( ret == STATUS_OK )
+ return(STATUS_MERGED);
+ else return(ret);
+- }
++ }*/
+ parent = current;
+ current = compLT(key, current->key) ?
+ current->left : current->right;
+@@ -495,7 +512,7 @@
+ } else {
+ root = x;
+ }
+-
++ //printf("new node, key: %lu, parent: %lu\n", x->key, parent ? parent->key : 0);
+ insertFixup(x);
+ lastFind = NULL;
+
diff --git a/abs/extra/community/moblock/moblock_include.patch b/abs/extra/community/moblock/moblock_include.patch
new file mode 100644
index 0000000..644e824
--- /dev/null
+++ b/abs/extra/community/moblock/moblock_include.patch
@@ -0,0 +1,10 @@
+--- MoBlock-0.8/MoBlock.c.orig 2008-08-15 14:41:49.000000000 -0400
++++ MoBlock-0.8/MoBlock.c 2008-08-15 14:43:45.000000000 -0400
+@@ -32,6 +32,7 @@
+ #include <netinet/udp.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+ #include <linux/netfilter_ipv4.h>
+ #include <signal.h>
+ #include <regex.h>
diff --git a/abs/extra/community/moblockcontrol/PKGBUILD b/abs/extra/community/moblockcontrol/PKGBUILD
new file mode 100644
index 0000000..5a912e2
--- /dev/null
+++ b/abs/extra/community/moblockcontrol/PKGBUILD
@@ -0,0 +1,42 @@
+# Contributor: marinz <marinz@email.it>
+
+pkgname=moblockcontrol
+pkgver=1.0
+pkgrel=10
+pkgdesc="moblock-control"
+arch=('i686' 'x86_64')
+url="http://moblock-deb.sourceforge.net/"
+license=('GPL')
+groups=()
+depends=('moblock')
+makedepends=()
+install=moblockcontrol.install
+source=(http://download.sourceforge.net/moblock-deb/moblock-control-1.0.tar.gz \
+ moblock_control.patch moblock-control-update.sh)
+md5sums=('1399e5465028e116e941cd1e01f6f7fc'
+ 'dc269c6c47bc423b9093919d52e97d63')
+backup=('etc/moblock/moblock.conf' 'etc/moblock/blocklists.list')
+
+build() {
+
+ cd $startdir/src/moblock-control-1.0
+
+ patch -Np1 -i ../moblock_control.patch || return 1
+
+ install -d ${pkgdir}/usr/bin ${pkgdir}/etc/moblock ${pkgdir}/etc/default ${pkgdir}/var/spool/moblock/user ${pkgdir}/lib/lsb ${pkgdir}/var/log
+ install -m 755 moblock-control ${pkgdir}/usr/bin/moblock-control
+ install -m 755 blocklists.list ${pkgdir}/etc/moblock/blocklists.list
+ install -m 755 moblock.conf ${pkgdir}/etc/moblock/moblock.conf
+ install -m 755 moblock.default ${pkgdir}/etc/default/moblock
+ install -m 755 init-functions ${pkgdir}/lib/lsb/init-functions
+ install -m 755 iptables-custom-insert.sh ${pkgdir}/etc/iptables-custom-insert.sh
+ install -m 755 iptables-custom-remove.sh ${pkgdir}/etc/iptables-custom-remove.sh
+
+ touch ${pkgdir}/var/log/moblock-control.log
+ touch ${pkgdir}/etc/moblock/guarding.p2p
+
+ cd $startdir/src
+ install -m 755 moblock-control-update.sh ${pkgdir}/usr/bin/moblock-control-update.sh
+ sed -i "s/config\/templist.gz/config\/badpeers.gz/" $startdir/pkg/etc/moblock/blocklists.list
+}
+
diff --git a/abs/extra/community/moblockcontrol/moblock-control-update.sh b/abs/extra/community/moblockcontrol/moblock-control-update.sh
new file mode 100644
index 0000000..8da564d
--- /dev/null
+++ b/abs/extra/community/moblockcontrol/moblock-control-update.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+. /etc/profile
+/usr/bin/moblock-control update
diff --git a/abs/extra/community/moblockcontrol/moblock_control.patch b/abs/extra/community/moblockcontrol/moblock_control.patch
new file mode 100644
index 0000000..db6bbf9
--- /dev/null
+++ b/abs/extra/community/moblockcontrol/moblock_control.patch
@@ -0,0 +1,11 @@
+--- moblockcontrol/moblock-control_2 2008-09-25 23:22:39.000000000 +0200
++++ moblockcontrol/moblock-control 2008-12-28 09:33:51.000000000 +0100
+@@ -954,7 +954,7 @@
+ else
+ # The options Moblock is started with
+ # The same like above, but with a "&" to start moblock in the background
+- DAEMON_OPTS="-$BLOCKLIST_FORMAT $BLOCKLIST $NFQUEUE_NUMBER_OPT $LOG_SYSLOG_OPT $LOG_TIMESTAMP_OPT -r $REJECT_MARK -a $ACCEPT_MARK $DAEMON_LOG &"
++ DAEMON_OPTS="-$BLOCKLIST_FORMAT $BLOCKLIST $NFQUEUE_NUMBER_OPT $LOG_SYSLOG_OPT $DAEMON_LOG & "
+ # Start MoBlock
+ start_daemon -p $PIDFILE $DAEMON $DAEMON_OPTS # The init-functions provided with moblock-control depend on this syntax!
+ fi
diff --git a/abs/extra/community/moblockcontrol/moblockcontrol.install b/abs/extra/community/moblockcontrol/moblockcontrol.install
new file mode 100644
index 0000000..439a3ee
--- /dev/null
+++ b/abs/extra/community/moblockcontrol/moblockcontrol.install
@@ -0,0 +1,28 @@
+post_install() {
+ if [ ! -d /var/spool/moblock/used ]
+ then
+ mkdir -p /var/spool/moblock/used
+ fi
+
+ if [ ! -e /etc/cron.daily/moblock-control-update.sh ]
+ then
+ ln -s /usr/bin/moblock-control-update.sh /etc/cron.daily/moblock-control-update.sh
+ fi
+}
+
+post_upgrade() {
+ if [ ! -d /var/spool/moblock/used ]
+ then
+ mkdir -p /var/spool/moblock/used
+ fi
+
+ if [ ! -e /etc/cron.daily/moblock-control-update.sh ]
+ then
+ ln -s /usr/bin/moblock-control-update.sh /etc/cron.daily/moblock-control-update.sh
+ fi
+}
+
+op=$1
+shift
+$op $*
+
diff --git a/abs/extra/community/mobloquer/PKGBUILD b/abs/extra/community/mobloquer/PKGBUILD
new file mode 100644
index 0000000..eecdb4a
--- /dev/null
+++ b/abs/extra/community/mobloquer/PKGBUILD
@@ -0,0 +1,26 @@
+# Contributor: marinz <marinz@email.it>
+
+pkgname=mobloquer
+pkgver=0.5
+pkgrel=5
+pkgdesc="A graphical front end for moblock"
+arch=('i686' 'x86_64')
+url="http://mobloquer.foutrelis.com/"
+license=('GPL')
+depends=('qt' 'moblockcontrol')
+source=(http://download.sourceforge.net/mobloquer/$pkgname-$pkgver.tar.gz)
+md5sums=('2adb03d170fa0e9a7ffcc9dac8d71bf5')
+
+build() {
+
+ cd $startdir/src/$pkgname
+
+ qmake
+ make || return 1
+
+ install -d ${pkgdir}/usr/share/applications ${pkgdir}/usr/bin
+ install -m 755 -p $startdir/src/mobloquer/images/mobloquer.png $startdir/pkg/usr/share/pixmaps/
+ install -m 644 -p $startdir/src/mobloquer/other/Mobloquer.desktop $startdir/pkg/usr/share/applications/
+ install -m 755 -p $startdir/src/mobloquer/mobloquer $startdir/pkg/usr/bin/mobloquer
+}
+
diff --git a/abs/extra/community/motion-svn/PKGBUILD b/abs/extra/community/motion-svn/PKGBUILD
new file mode 100644
index 0000000..dcbd162
--- /dev/null
+++ b/abs/extra/community/motion-svn/PKGBUILD
@@ -0,0 +1,42 @@
+# Contributor: Demind <demind@gmail.com>
+pkgname=motion-svn
+pkgver=1
+pkgrel=1
+pkgdesc="Motion is a software motion detector. It grabs images from video4linux devices and/or from webcams."
+arch=('i686' 'x86_64')
+url="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome"
+license=('GPL2')
+depends=('zlib' 'libjpeg')
+makedepends=('subversion')
+provides=('motion')
+conflicts=('motion')
+install="motion-svn.install"
+source=('rc.motion')
+md5sums=('fc09828564850824f8549d258053e0b6')
+
+_svntrunk=http://www.lavrsen.dk/svn/motion/trunk/
+_svnmod=motion
+
+build() {
+ cd $startdir/src
+
+ msg "Retrieving sources"
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+
+ [ -d ./$_svnmod-build ] && rm -fr ./$_svnmod-build
+ cp -r ./$_svnmod ./$_svnmod-build
+ cd ./$_svnmod-build
+
+ msg "SVN checkout done or server timeout"
+ msg "Starting build"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc
+
+ make || return 1
+ make DESTDIR=$startdir/pkg/ install || return 1
+ install -D -m755 $startdir/src/rc.motion $startdir/pkg/etc/rc.d/motion
+ rm -rf $startdir/src/$_svnmod-build
+}
+
diff --git a/abs/extra/community/motion-svn/motion-svn.install b/abs/extra/community/motion-svn/motion-svn.install
new file mode 100644
index 0000000..f88a2fc
--- /dev/null
+++ b/abs/extra/community/motion-svn/motion-svn.install
@@ -0,0 +1,11 @@
+# arg 1: the new package version
+post_install() {
+ echo ""
+ echo ">>> An example configuration has been saved to /etc/motion-dispatch.conf"
+}
+
+op=$1
+shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
+
+# vim:set ts=2 et:
diff --git a/abs/extra/community/motion-svn/rc.motion b/abs/extra/community/motion-svn/rc.motion
new file mode 100644
index 0000000..7dd027c
--- /dev/null
+++ b/abs/extra/community/motion-svn/rc.motion
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/motion`
+case "$1" in
+ start)
+ stat_busy "Starting Motion"
+ [ -z "$PID" ] && /usr/bin/motion
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon motion
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Motion"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon motion
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/community/mozplugger/ChangeLog b/abs/extra/community/mozplugger/ChangeLog
new file mode 100644
index 0000000..048d061
--- /dev/null
+++ b/abs/extra/community/mozplugger/ChangeLog
@@ -0,0 +1,7 @@
+2008-12-07 Allan McRae <allan@archlinux.org>
+ * mozplugger 1.12.0-1
+ * upstream update
+
+2008-01-14 JJDaNiMoTh <jjdanimoth.aur@gmail.com>
+ * Version bump to 1.10.1
+ * Added mozplugger.install
diff --git a/abs/extra/community/mozplugger/PKGBUILD b/abs/extra/community/mozplugger/PKGBUILD
new file mode 100644
index 0000000..b2fdbcd
--- /dev/null
+++ b/abs/extra/community/mozplugger/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD,v 1.14 2008/12/07 05:27:24 allan Exp $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Todd Musall <tmusall@comcast.net>
+
+pkgname=mozplugger
+pkgver=1.12.0
+pkgrel=1
+pkgdesc="A Mozilla & Firefox multimedia plugin."
+arch=('i686' 'x86_64')
+url="http://mozplugger.mozdev.org"
+license="GPL"
+depends=('libx11')
+backup=(etc/mozpluggerrc)
+source=(http://$pkgname.mozdev.org/files/$pkgname-$pkgver.tar.gz)
+md5sums=('6d4dd7b1c577f625c9d664532389d6db')
+install=$pkgname.install
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make linux || return 1
+ install -Dm755 mozplugger.so $pkgdir/usr/lib/mozilla/plugins/mozplugger.so
+ install -Dm644 mozpluggerrc $pkgdir/etc/mozpluggerrc
+ install -Dm755 mozplugger-helper $pkgdir/usr/bin/mozplugger-helper
+ install -Dm755 mozplugger-controller $pkgdir/usr/bin/mozplugger-controller
+ install -Dm644 mozplugger.7 $pkgdir/usr/share/man/man7/mozplugger.7
+}
diff --git a/abs/extra/community/mozplugger/mozplugger.install b/abs/extra/community/mozplugger/mozplugger.install
new file mode 100644
index 0000000..1a08b9d
--- /dev/null
+++ b/abs/extra/community/mozplugger/mozplugger.install
@@ -0,0 +1,15 @@
+post_install() {
+ echo -en "
+==> You may need to delete your local $HOME/.mozilla/firefox/pluginreg.dat
+==> file for mozplugger to be enabled correctly after you update it.
+==> (It will get regenerated).
+==> To add more helpers, edit /etc/mozpluggerrc.
+==> The window name can be obtained using the utility xprop(1x).
+==> Type "xprop WM_CLASS" and click on a window.\n"
+}
+
+post_upgrade() {
+ post_install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/abs/extra/community/mpc/ChangeLog b/abs/extra/community/mpc/ChangeLog
new file mode 100644
index 0000000..b645e19
--- /dev/null
+++ b/abs/extra/community/mpc/ChangeLog
@@ -0,0 +1,15 @@
+2009-03-11 Alexander Fehr <pizzapunk gmail com>
+
+ * mpc-0.15-1:
+ New upstream release.
+ Changed license to GPL2.
+
+2008-12-22 Alexander Fehr <pizzapunk gmail com>
+
+ * mpc-0.14-1:
+ New upstream release.
+ New maintainer.
+ Changed url.
+ Added !emptydirs option.
+ Changed download location to downloads.sourceforge.net.
+ Added ChangeLog.
diff --git a/abs/extra/community/mpc/PKGBUILD b/abs/extra/community/mpc/PKGBUILD
new file mode 100644
index 0000000..345a2d6
--- /dev/null
+++ b/abs/extra/community/mpc/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 33671 2009-04-04 15:49:53Z alexanderf $
+# Maintainer: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Link Dupont <link@subpop.net>
+
+pkgname=mpc
+pkgver=0.15
+pkgrel=1
+pkgdesc="Minimalist command line interface to MPD"
+arch=('i686' 'x86_64')
+url="http://mpd.wikia.com/wiki/Client:Mpc"
+license=('GPL2')
+depends=('glibc')
+options=('!emptydirs')
+source=(http://downloads.sourceforge.net/musicpd/mpc-$pkgver.tar.bz2)
+md5sums=('48897aeb3a7ee5c64f30e56789f105a8')
+
+build() {
+ cd "$srcdir/mpc-$pkgver"
+
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+
+ # Install bash completion file
+ install -D -m644 doc/mpc-bashrc "$pkgdir/etc/bash_completion.d/mpc" || return 1
+}
diff --git a/abs/extra/community/mpd/PKGBUILD b/abs/extra/community/mpd/PKGBUILD
new file mode 100644
index 0000000..75a79ee
--- /dev/null
+++ b/abs/extra/community/mpd/PKGBUILD
@@ -0,0 +1,45 @@
+# $Id: PKGBUILD 27462 2009-02-22 02:31:36Z eric $
+# Maintainer: Damir Perisa <damir.perisa@bluewin.ch>
+# Contributor: Ben <ben@benmazer.net>
+
+pkgname=mpd
+pkgver=0.15.3
+pkgrel=1
+pkgdesc="Music daemon that plays MP3, FLAC, and Ogg Vorbis files"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://musicpd.org"
+depends=('libid3tag' 'libmad' 'flac>=1.1.3' 'audiofile' 'faad2>=2.6' 'libmikmod'
+ 'alsa-lib' 'libshout' 'libmpcdec>=1.2.5' 'libsamplerate' 'libao' 'ffmpeg'
+ 'wavpack' 'glib2' 'curl')
+install=mpd.install
+source=(http://downloads.sourceforge.net/musicpd/${pkgname}-${pkgver}.tar.gz
+ 'mpd')
+md5sums=('43e854e7f46ac87bb1f1a7247ae4b902'
+ 'b1fd15de359db08e4b9ae4b199640f0e')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-jack \
+ --enable-ao --enable-mod \
+ --with-zeroconf=no
+ make || return 1
+ make DESTDIR=${pkgdir} install
+
+ # set ours dirs in mpd.conf file
+ sed -i 's|music_directory.*$|#music_directory "path_to_your_music_collection"|1' doc/mpdconf.example
+ sed -i 's|playlist_directory.*$|playlist_directory "/var/lib/mpd/playlists"|1' doc/mpdconf.example
+ sed -i 's|db_file.*$|db_file "/var/lib/mpd/mpd.db"|1' doc/mpdconf.example
+ sed -i 's|log_file.*$|log_file "/var/log/mpd/mpd.log"|1' doc/mpdconf.example
+ sed -i 's|error_file.*$|error_file "/var/log/mpd/mpd.error"|1' doc/mpdconf.example
+ sed -i 's|#pid_file.*$|pid_file "/var/run/mpd/mpd.pid"|1' doc/mpdconf.example
+ sed -i 's|#state_file.*$|state_file "/var/lib/mpd/mpdstate"|1' doc/mpdconf.example
+ sed -i 's|#user.*$|user "mpd"|1' doc/mpdconf.example
+
+ install -Dm644 doc/mpdconf.example ${pkgdir}/etc/mpd.conf.example || return 1
+
+ install -D ${srcdir}/mpd ${pkgdir}/etc/rc.d/mpd || return 1
+ install -d ${pkgdir}/var/lib/mpd/playlists ${pkgdir}/var/log/mpd ${pkgdir}/var/run/mpd
+}
diff --git a/abs/extra/community/mpd/mpd b/abs/extra/community/mpd/mpd
new file mode 100755
index 0000000..76ec1c0
--- /dev/null
+++ b/abs/extra/community/mpd/mpd
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting Music Player Daemon"
+ /usr/bin/mpd /etc/mpd.conf &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon mpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Music Player Daemon"
+ /usr/bin/mpd --kill /etc/mpd.conf &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mpd
+ stat_done
+ fi
+ ;;
+ create-db)
+ stat_busy "Creating mpd's database ..."
+ logpath="/var/log/mpd/mpd.db-creation"
+ /usr/bin/mpd --create-db /etc/mpd.conf > $logpath \
+ && stat_busy "Output written to $logpath"
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|create-db}"
+esac
+exit 0
diff --git a/abs/extra/community/mpd/mpd.install b/abs/extra/community/mpd/mpd.install
new file mode 100644
index 0000000..e44c9be
--- /dev/null
+++ b/abs/extra/community/mpd/mpd.install
@@ -0,0 +1,23 @@
+# arg 1: the new package version
+post_install() {
+ echo "==> mpd: Create a config under /etc/mpd.conf before using MPD (Example: /etc/mpd.conf.example)"
+ groupadd -g 45 mpd &>/dev/null
+ useradd -u 45 -g mpd -d /var/lib/mpd -s /bin/true mpd &>/dev/null
+ gpasswd -a mpd audio &>/dev/null
+ chown mpd:mpd -R /var/{lib,log,run}/mpd
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if [ "$(vercmp $2 0.12)" -lt 0 ]; then
+ echo "==> mpd: upgrade from 0.11 -> 0.12: configuration file syntax changed, "
+ echo "==> mpd: make sure to update your configuration file! example conf: /etc/mpd.conf.example"
+ fi
+ chown mpd:mpd -R /var/{lib,log,run}/mpd
+}
+
+# arg 1: the old package version
+pre_remove() {
+ userdel mpd &>/dev/null
+}
diff --git a/abs/extra/community/mythpywii/PKGBUILD b/abs/extra/community/mythpywii/PKGBUILD
new file mode 100644
index 0000000..4b57c77
--- /dev/null
+++ b/abs/extra/community/mythpywii/PKGBUILD
@@ -0,0 +1,18 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=mythpywii
+pkgver=1
+pkgrel=1
+pkgdesc="Control MythTV using Wiimote."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.benjiegillam.com/"
+depends=('bluez' 'python-pybluez' 'cwiid-svn')
+#install=mythpywii.install
+source=(http://www.benjiegillam.com/code/myth_py_wii.py)
+
+build() {
+ mkdir -p $startdir/pkg/usr/bin
+ install -D -m 755 myth_py_wii.py $startdir/pkg/usr/bin
+}
diff --git a/abs/extra/community/mythtv-vdpau/2.6.28_dvb_api_version.diff b/abs/extra/community/mythtv-vdpau/2.6.28_dvb_api_version.diff
new file mode 100644
index 0000000..0116023
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/2.6.28_dvb_api_version.diff
@@ -0,0 +1,22 @@
+Index: libs/libmythtv/dvbtypes.h
+===================================================================
+--- libs/libmythtv/dvbtypes.h (revision 19792)
++++ libs/libmythtv/dvbtypes.h (working copy)
+@@ -19,7 +19,7 @@
+ #include <linux/dvb/frontend.h>
+ #include <linux/dvb/dmx.h>
+
+-#if (DVB_API_VERSION != 3)
++#if (DVB_API_VERSION != 3 && DVB_API_VERSION != 5)
+ # error "DVB driver includes with API version 3 not found!"
+ #endif
+
+@@ -27,7 +27,7 @@
+ # define DVB_API_VERSION_MINOR 0
+ #endif
+
+-#if (DVB_API_VERSION >= 3 && DVB_API_VERSION_MINOR >= 1)
++#if ((DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || DVB_API_VERSION == 5)
+ # define USE_ATSC
+ #else
+ #warning DVB API version < 3.1
diff --git a/abs/extra/community/mythtv-vdpau/PKGBUILD b/abs/extra/community/mythtv-vdpau/PKGBUILD
new file mode 100644
index 0000000..9c293e2
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/PKGBUILD
@@ -0,0 +1,102 @@
+pkgname=mythtv-vdpau
+pkgver=0.21
+pkgrel=23
+pkgdesc="A Homebrew PVR project"
+arch=('i686' 'x86_64')
+depends=('bash' 'mysql-clients>=5.0' 'qt3' 'lame' 'lirc-utils' 'ffmpeg' \
+ 'libxvmc' 'libavc1394' 'libdc1394' 'libiec61883' 'nvidia>=180.29' \
+ 'perl-net-upnp')
+backup=(etc/mythtv/mythbackend.conf etc/mythtv/mysql.txt usr/share/mythtv/is.xml usr/share/mythtv/media_settings.xml)
+source=(ftp://ftp.knoppmyth.net/R6/sources/mythtv-${pkgver}-fixes.tar.bz2 \
+ mythbackend myththemedmenu.cpp.patch myththemedmenu.h.patch \
+ smolt_jump.patch pretty \
+ http://www.avenard.org/files/media/vdpau/mythtv-fixes-glvdpau20549.patch.gz mpegpspatch mythbackend.lr mythfrontend.lr)
+
+#md5sums=('e316ed18d7ac837cf8c4af54b1478793' '7ef6de58240e7aad389a0b13d91b1cf6'\
+# 'a0ecb7f476cb71c0c1ac90d349fc7695')
+conflicts=('mythtv')
+provides=('mythtv'=${pkgver})
+license=('GPL2')
+makedepends=(libgl subversion 'nvidia-utils>=180.29' python perl)
+groups=('pvr')
+options=(!strip)
+url="http://www.mythtv.org/"
+install=mythtv.install
+
+build() {
+ cd $startdir/src/mythtv-${pkgver} || return 1
+ svn update
+
+#apply patches
+ patch -p0 < ../myththemedmenu.cpp.patch
+ patch -p0 < ../myththemedmenu.h.patch
+# patch -p0 < ../pop_be_restart.h.patch
+# patch -p0 < ../pop_be_restart.cpp.patch
+ patch -p0 < ../smolt_jump.patch
+# patch -p0 < ../2.6.28_dvb_api_version.diff
+ patch -p1 < ../mythtv-fixes-glvdpau20549.patch
+ cd libs/libavformat
+ patch -p0 < $startdir/src/mpegpspatch
+ cd -
+
+ . /etc/profile.d/qt3.sh
+
+ # use QT3 qmake
+ export PATH=$QTDIR/bin:$PATH
+ [ "$CARCH" = "i686" ] && ARCH="i686"
+ [ "$CARCH" = "x86_64" ] && ARCH="x86-64"
+
+ ./configure --prefix=/usr --cpu=${ARCH} --enable-mmx --enable-audio-oss \
+ --enable-audio-alsa --enable-dvb --enable-lirc --enable-joystick-menu \
+ --enable-firewire --enable-v4l --enable-ivtv --enable-dvb \
+ --dvb-path=/usr/include --enable-xvmc --disable-ffmpeg \
+ --enable-xvmc-pro --enable-xvmc-vld --enable-opengl-vsync \
+ --disable-audio-jack --disable-audio-arts --disable-directfb \
+ --enable-vdpau --enable-opengl-video --compile-type=debug || return 1
+
+ # build
+ #needs the subversion program
+ pkgversubversion=`svnversion`
+ echo $pkgversubversion
+ sed -i -e "s/\`(svnversion \$\${SVNTREEDIR} 2>\/dev\/null) || echo Unknown\`/$pkgversubversion/" version.pro
+
+
+# qmake mythtv.pro || return 1
+# make qmake || return 1
+ make || return 1
+
+ # basic install
+ make INSTALL_ROOT=$startdir/pkg install || return 1
+
+ # install db schema
+ install -m0644 database/mc.sql $startdir/pkg/usr/share/mythtv/ \
+ || return 1
+ install -D -m0755 ../mythbackend $startdir/pkg/etc/rc.d/mythbackend \
+ || return 1
+ cp -r docs $startdir/pkg/usr/share/mythtv/ || return 1
+ # cp ../QUICKSTART.archlinux $startdir/pkg/usr/share/mythtv/ \
+# || return 1
+
+ # install contrib
+ mkdir -p $startdir/pkg/usr/share/mythtv/contrib || return 1
+ install -m0755 contrib/* $startdir/pkg/usr/share/mythtv/contrib
+
+ # set suid on mythfrontend
+ #chmod a+s $startdir/pkg/usr/bin/mythfrontend
+
+#Patch the xml LinHES style
+ cp -r $startdir/menu-xml/*.xml $startdir/pkg/usr/share/mythtv
+ cd $startdir/pkg/usr/share/mythtv
+ patch -p0 < $startdir/menu-xml/mainmenu.xml.patch
+ patch -p0 < $startdir/menu-xml/optical_menu.xml.patch
+ patch -p0 < $startdir/menu-xml/library.xml.patch
+ patch -p0 < $startdir/menu-xml/util_menu.xml.patch
+
+#Make log dir
+ mkdir -p $startdir/pkg/var/log/mythtv
+ chown 1000.1000 $startdir/pkg/var/log/mythtv
+ mkdir -p $startdir/pkg/etc/cron.hourly
+ install -m0755 $startdir/src/pretty $startdir/pkg/etc/cron.hourly/
+ mkdir -p $startdir/pkg/etc/logrotate.d
+ cp $startdir/src/*.lr $startdir/pkg/etc/logrotate.d
+}
diff --git a/abs/extra/community/mythtv-vdpau/PKGBUILD.orig b/abs/extra/community/mythtv-vdpau/PKGBUILD.orig
new file mode 100644
index 0000000..9299fa1
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/PKGBUILD.orig
@@ -0,0 +1,102 @@
+pkgname=mythtv-vdpau
+pkgver=0.21
+pkgrel=19
+pkgdesc="A Homebrew PVR project"
+arch=('i686' 'x86_64')
+depends=('bash' 'mysql-clients>=5.0' 'qt3' 'lame' 'lirc-utils' 'ffmpeg' \
+ 'libxvmc' 'libavc1394' 'libdc1394' 'libiec61883' 'nvidia>=180.29' \
+ 'perl-net-upnp')
+backup=(etc/mythtv/mythbackend.conf etc/mythtv/mysql.txt usr/share/mythtv/is.xml usr/share/mythtv/media_settings.xml)
+source=(ftp://ftp.knoppmyth.net/R6/sources/mythtv-${pkgver}-fixes.tar.bz2 \
+ mythbackend myththemedmenu.cpp.patch myththemedmenu.h.patch \
+ smolt_jump.patch pretty \
+ http://www.avenard.org/files/media/vdpau/mythtv-fixes-glvdpau20462.patch.gz mpegpspatch mythbackend.lr mythfrontend.lr)
+
+#md5sums=('e316ed18d7ac837cf8c4af54b1478793' '7ef6de58240e7aad389a0b13d91b1cf6'\
+# 'a0ecb7f476cb71c0c1ac90d349fc7695')
+conflicts=('mythtv')
+provides=('mythtv'=${pkgver})
+license=('GPL2')
+makedepends=(libgl subversion 'nvidia-utils>=180.29' python perl)
+groups=('pvr')
+url="http://www.mythtv.org/"
+install=mythtv.install
+
+build() {
+ cd $startdir/src/mythtv-${pkgver} || return 1
+ svn update
+
+#apply patches
+ patch -p0 < ../myththemedmenu.cpp.patch
+ patch -p0 < ../myththemedmenu.h.patch
+# patch -p0 < ../pop_be_restart.h.patch
+# patch -p0 < ../pop_be_restart.cpp.patch
+ patch -p0 < ../smolt_jump.patch
+# patch -p0 < ../2.6.28_dvb_api_version.diff
+ patch -p1 < ../mythtv-fixes-glvdpau20462.patch
+ cd libs/libavformat
+ patch -p0 < $startdir/src/mpegpspatch
+ cd -
+
+ . /etc/profile.d/qt3.sh
+
+ # use QT3 qmake
+ export PATH=$QTDIR/bin:$PATH
+ [ "$CARCH" = "i686" ] && ARCH="i686"
+ [ "$CARCH" = "x86_64" ] && ARCH="x86-64"
+
+ ./configure --prefix=/usr --cpu=${ARCH} --enable-mmx --enable-audio-oss \
+ --enable-audio-alsa --enable-dvb --enable-lirc --enable-joystick-menu \
+ --disable-firewire --enable-v4l --enable-ivtv --enable-dvb \
+ --dvb-path=/usr/include --enable-xvmc --disable-ffmpeg \
+ --enable-xvmc-pro --enable-xvmc-vld --enable-opengl-vsync \
+ --disable-audio-jack --disable-audio-arts --disable-directfb \
+ --enable-vdpau --enable-opengl-video --enable-ffmpeg-pthreads \
+ --enable-glx-procaddrarb || return 1
+
+ # build
+ #needs the subversion program
+ pkgversubversion=`svnversion`
+ echo $pkgversubversion
+ sed -i -e "s/\`(svnversion \$\${SVNTREEDIR} 2>\/dev\/null) || echo Unknown\`/$pkgversubversion/" version.pro
+
+
+# qmake mythtv.pro || return 1
+# make qmake || return 1
+ make || return 1
+
+ # basic install
+ make INSTALL_ROOT=$startdir/pkg install || return 1
+
+ # install db schema
+ install -m0644 database/mc.sql $startdir/pkg/usr/share/mythtv/ \
+ || return 1
+ install -D -m0755 ../mythbackend $startdir/pkg/etc/rc.d/mythbackend \
+ || return 1
+ cp -r docs $startdir/pkg/usr/share/mythtv/ || return 1
+ # cp ../QUICKSTART.archlinux $startdir/pkg/usr/share/mythtv/ \
+# || return 1
+
+ # install contrib
+ mkdir -p $startdir/pkg/usr/share/mythtv/contrib || return 1
+ install -m0755 contrib/* $startdir/pkg/usr/share/mythtv/contrib
+
+ # set suid on mythfrontend
+ #chmod a+s $startdir/pkg/usr/bin/mythfrontend
+
+#Patch the xml LinHES style
+ cp -r $startdir/menu-xml/*.xml $startdir/pkg/usr/share/mythtv
+ cd $startdir/pkg/usr/share/mythtv
+ patch -p0 < $startdir/menu-xml/mainmenu.xml.patch
+ patch -p0 < $startdir/menu-xml/optical_menu.xml.patch
+ patch -p0 < $startdir/menu-xml/library.xml.patch
+ patch -p0 < $startdir/menu-xml/util_menu.xml.patch
+
+#Make log dir
+ mkdir -p $startdir/pkg/var/log/mythtv
+ chown 1000.1000 $startdir/pkg/var/log/mythtv
+ mkdir -p $startdir/pkg/etc/cron.hourly
+ install -m0755 $startdir/src/pretty $startdir/pkg/etc/cron.hourly/
+ mkdir -p $startdir/pkg/etc/logrotate.d
+ cp $startdir/src/*.lr $startdir/pkg/etc/logrotate.d
+}
diff --git a/abs/extra/community/mythtv-vdpau/QUICKSTART.archlinux b/abs/extra/community/mythtv-vdpau/QUICKSTART.archlinux
new file mode 100644
index 0000000..310705c
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/QUICKSTART.archlinux
@@ -0,0 +1,69 @@
+MythTV QUICKSTART
+=================
+This Arch Linux package provides a generic MythTV installation. It
+requires extensive user configuration. This is a skeletal document, and
+more extensive information is available in /usr/share/mythtv/docs.
+
+MythTV is split into a backend and a frontend. The backend records
+television programming, keeps up with scheduling, does commercial
+flagging, transcoding, and other such jobs. The frontend provides a
+pretty GUI which allows playback and edition of the recorded programs.
+It also provides a means to schedule recordings. There are a number of
+plugins available for MythTV, and most of the official ones are
+available as Arch packages. There are two configurations; the backend
+and frontend can be on the same machine, or on two different machines on
+the same network.
+
+Backend Configuration
+---------------------
+MythTV keeps the majority of its settings and program information in a
+mysql database. Before running the backend configuration program, it is
+necessary to initialize the datase. Make sure mysql is running properly.
+
+# mysql < /usr/share/mythtv/mc.sql
+
+If your frontend is going to be remote, you must allow other computers
+on your network to have access to your database. Substitute 192.168.1.%
+with whatever IP range you use. If you have a root mysql password (as
+you should), leave the -p in the mysql command line. Otherwise remove
+the switch.
+
+# mysql -u root -p
+ mysql> connect mythconverg;
+ mysql> grant all on mythconverg.* to mythtv@"192.168.1.%" identified by "mythtv";
+ mysql> flush privileges;
+ mysql> quit
+
+In order to configure the MythTV backend, you will need to run the
+mythtv-setup program. Note that this requires X. If your backend is
+headless, considering using vnc as a quick and dirty "fix".
+
+# mythtv-setup
+
+Go through all the menus. You will need to know information like your
+capture card device (/dev/v4l/video[0-9]) and your program information
+acquisition method. United States users will most likely subscribe to
+Zap2it Labs' DataDirect service. It requires that users take a survey
+every three months in order to continue service. This isn't as hard as
+it sounds.
+
+It is necessary to update the database with all the current TV listings.
+Run the mythfilldatabase program to grab the listings using whatever
+method you specified in mythtv-setup.
+
+# mythfilldatabase
+
+Run mythbackend from the command line to make sure everything starts ok.
+
+# mythbackend
+
+If so, you may kill the task with "ctrl-c" on your keyboard, and add the
+backend to /etc/rc.conf. In the DAEMONS line, just add "mythbackend" to
+the list.
+
+In the future, you will need to run mythfilldatabase regularly. I allow
+my frontend computer to do this, as it runs continuously, and it is an
+option within MythTV. Otherwise, you can set up a cron job, or move
+mythfilldatabasecron to /etc/cron.daily
+
+cp /usr/share/mythtv/mythfilldatabasecron /etc/cron.daily
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/HOST_SETTINGS.xml b/abs/extra/community/mythtv-vdpau/menu-xml/HOST_SETTINGS.xml
new file mode 100755
index 0000000..f257920
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/HOST_SETTINGS.xml
@@ -0,0 +1,87 @@
+<mythmenu name="HOST_SETTINGS">
+
+ <button>
+ <type>MV_NETWORK_SETUP_MENU</type>
+ <text>Network Settings</text>
+ <action>EXEC mythinstall -s network </action>
+ </button>
+
+ <button>
+ <type>MV_SYSTEM_SETUP_MENU</type>
+ <text>System type</text>
+ <action>EXEC mythinstall -s hostype </action>
+ </button>
+
+ <button>
+ <type>MV_MISC_SETUP_MENU</type>
+ <text>Misc Settings</text>
+ <action>EXEC mythinstall -s misc </action>
+ </button>
+
+ <button>
+ <type>MV_SOFTWARE_MENU</type>
+ <text>Software</text>
+ <action>EXEC mythinstall -s plugins </action>
+ </button>
+
+ <button>
+ <type>MV_SHUTDOWN_SETUP_MENU</type>
+ <text>Shutdown settings</text>
+ <action>EXEC mythinstall -s sleep </action>
+ </button>
+
+
+<button>
+ <type>MV_ADVANCED_X_SETUP_MENU</type>
+ <text>Display</text>
+ <action>EXEC mythinstall -s advancedX</action>
+</button>
+
+<button>
+ <type>MV_ADVANCED_SETUP_MENU</type>
+ <text>Advanced settings</text>
+ <action>EXEC mythinstall -s advanced</action>
+</button>
+
+
+<button>
+ <type>MV_AUDIO_SETUP_MENU</type>
+ <text>Audio settings</text>
+ <action>EXEC mythinstall -s sound </action>
+</button>
+
+
+<button>
+ <type>MV_ACCESS_SETUP_MENU</type>
+ <text>Access</text>
+ <action>EXEC mythinstall -s accesscontrol </action>
+</button>
+
+<button>
+ <type>MV_USER_SETUP_MENU</type>
+ <text>Password </text>
+ <action>EXEC mythinstall -s user </action>
+</button>
+
+<button>
+ <type>MV_WEBACCESS_SETUP_MENU</type>
+ <text>Web security</text>
+ <action>EXEC mythinstall -s webuser </action>
+</button>
+
+
+
+
+ <!--
+ <button>
+ <type>SETUP_MENU</type>
+ <text>Settings profile manager</text>
+ <action>EXEC mythinstall -t </action>
+
+ </button>
+ -->
+
+
+
+
+</mythmenu>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/is.xml b/abs/extra/community/mythtv-vdpau/menu-xml/is.xml
new file mode 100644
index 0000000..88b7e6b
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/is.xml
@@ -0,0 +1,3 @@
+<mythmenu name="Internet Steams">
+
+</mythmenu>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/library.xml.patch b/abs/extra/community/mythtv-vdpau/menu-xml/library.xml.patch
new file mode 100644
index 0000000..efc8623
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/library.xml.patch
@@ -0,0 +1,15 @@
+--- library.xml.orig 2009-02-09 04:30:04.000000000 +0000
++++ library.xml 2009-02-09 04:31:50.000000000 +0000
+@@ -119,10 +119,9 @@
+
+ <button>
+ <type>STREAM</type>
+- <text>Play Online Streams</text>
++ <text>Online Streams</text>
+ <text lang="HE">נגן מדיה מכוונת</text>
+- <action>PLUGIN mythstream</action>
+- <depends>mythstream</depends>
++ <action>MENU is.xml</action>
+ </button>
+
+ <button>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/linhes.xml b/abs/extra/community/mythtv-vdpau/menu-xml/linhes.xml
new file mode 100644
index 0000000..8bc929f
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/linhes.xml
@@ -0,0 +1,54 @@
+<mythmenu name="LinHES">
+
+ <button>
+ <type>SETUP_GENERAL</type>
+ <text>MythTV Configuration</text>
+ <text lang="IT">Impostazioni</text>
+ <text lang="ES">Configuración</text>
+ <text lang="CA">Configurar</text>
+ <text lang="FR">paramètres</text>
+ <text lang="DE">Zubehör / Konfiguration</text>
+ <text lang="DK">Tilbehør/Indstillinger</text>
+ <text lang="IS">Uppsetning</text>
+ <text lang="NL">Configuratie</text>
+ <text lang="PT">Utensílios</text>
+ <text lang="SV">Verktyg / Inställningar</text>
+ <text lang="JA">設定</text>
+ <text lang="FI">Oheis/Asetukset</text>
+ <text lang="ZH_TW">工具/設定</text>
+ <text lang="SI">Nastavitve</text>
+ <text lang="ET">Utiliidid / sätted</text>
+ <text lang="NB">Verktøy/Oppsett</text>
+ <text lang="CZ">Pomůcky</text>
+ <text lang="RU">Утилиты / ÐаÑтройки</text>
+ <text lang="AR">تضبيطات</text>
+ <text lang="PL">Narzędzia / ustawienia</text>
+ <text lang="HE">×¢×–×¨×™× / הגדרות</text>
+ <alttext lang="DE">Verschiedenes</alttext>
+ <alttext lang="SV">Inställningar</alttext>
+ <alttext lang="ET">Sätted</alttext>
+ <alttext lang="RU">ÐаÑтройки</alttext>
+ <alttext lang="AR">تضبيطات</alttext>
+ <action>MENU util_menu.xml</action>
+ </button>
+
+ <button>
+ <type>LINHES_SETUP</type>
+ <text>LinHES Configuration</text>
+ <action>MENU HOST_SETTINGS.xml</action>
+ </button>
+
+ <button>
+ <type>BACKUP</type>
+ <text>Backup LinHES</text>
+ <action>MENU mythbackup.xml</action>
+ </button>
+
+ <button>
+ <type>RESTORE</type>
+ <text>Restore LinHES</text>
+ <action>MENU mythrestore.xml</action>
+ </button>
+
+</mythmenu>
+
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/mainmenu.xml.patch b/abs/extra/community/mythtv-vdpau/menu-xml/mainmenu.xml.patch
new file mode 100644
index 0000000..a299325
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/mainmenu.xml.patch
@@ -0,0 +1,39 @@
+--- mainmenu.xml.orig 2009-01-09 02:45:07.000000000 +0000
++++ mainmenu.xml 2009-01-22 08:04:28.000000000 +0000
+@@ -158,34 +158,8 @@
+
+ <button>
+ <type>MENU_UTILITIES_SETUP</type>
+- <text>Utilities / Setup</text>
+- <text lang="IT">Impostazioni</text>
+- <text lang="ES">Configuración</text>
+- <text lang="CA">Configurar</text>
+- <text lang="FR">paramètres</text>
+- <text lang="DE">Zubehör / Konfiguration</text>
+- <text lang="DK">Tilbehør/Indstillinger</text>
+- <text lang="IS">Uppsetning</text>
+- <text lang="NL">Configuratie</text>
+- <text lang="PT">Utensílios</text>
+- <text lang="SV">Verktyg / Inställningar</text>
+- <text lang="JA">設定</text>
+- <text lang="FI">Oheis/Asetukset</text>
+- <text lang="ZH_TW">工具/設定</text>
+- <text lang="SI">Nastavitve</text>
+- <text lang="ET">Utiliidid / sätted</text>
+- <text lang="NB">Verktøy/Oppsett</text>
+- <text lang="CZ">Pomůcky</text>
+- <text lang="RU">Утилиты / ÐаÑтройки</text>
+- <text lang="AR">تضبيطات</text>
+- <text lang="PL">Narzędzia / ustawienia</text>
+- <text lang="HE">×¢×–×¨×™× / הגדרות</text>
+- <alttext lang="DE">Verschiedenes</alttext>
+- <alttext lang="SV">Inställningar</alttext>
+- <alttext lang="ET">Sätted</alttext>
+- <alttext lang="RU">ÐаÑтройки</alttext>
+- <alttext lang="AR">تضبيطات</alttext>
+- <action>MENU util_menu.xml</action>
++ <text>Service Menu</text>
++ <action>MENU linhes.xml</action>
+ </button>
+
+ <!-- <button>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/mythbackup.xml b/abs/extra/community/mythtv-vdpau/menu-xml/mythbackup.xml
new file mode 100644
index 0000000..656860d
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/mythbackup.xml
@@ -0,0 +1,20 @@
+<mythmenu name="LinHES">
+
+ <button>
+ <type>BACKUP</type>
+ <text>Do you wish to backup?</text>
+ <action>NONE</action>
+ </button>
+
+ <button>
+ <type>BACKUP</type>
+ <text>Yes</text>
+ <action>EXEC sudo /usr/LH/bin/mythbackup</action>
+ </button>
+
+ <button>
+ <type>BACKUP</type>
+ <text>No</text>
+ <action>MENU linhes.xml</action>
+ </button>
+</mythmenu>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/mythrestore.xml b/abs/extra/community/mythtv-vdpau/menu-xml/mythrestore.xml
new file mode 100644
index 0000000..05cb0a7
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/mythrestore.xml
@@ -0,0 +1,20 @@
+<mythmenu name="LinHES">
+
+ <button>
+ <type>RESTORE</type>
+ <text>Do you wish to restore?</text>
+ <action>NONE</action>
+ </button>
+
+ <button>
+ <type>RESTORE</type>
+ <text>Yes</text>
+ <action>EXEC sudo /usr/LH/bin/mythrestore</action>
+ </button>
+
+ <button>
+ <type>BACKUP</type>
+ <text>No</text>
+ <action>MENU linhes.xml</action>
+ </button>
+</mythmenu>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/optical_menu.xml.patch b/abs/extra/community/mythtv-vdpau/menu-xml/optical_menu.xml.patch
new file mode 100644
index 0000000..d1cb70c
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/optical_menu.xml.patch
@@ -0,0 +1,15 @@
+--- optical_menu.xml.orig 2008-10-02 22:46:30.000000000 +0000
++++ optical_menu.xml 2008-07-02 04:05:15.000000000 +0000
+@@ -129,6 +129,12 @@
+ </button>
+
+ <button>
++ <type>DVD_RIP</type>
++ <text>Import video files from DVD</text>
++ <action>EXEC /usr/LH/bin/importfiles.sh</action>
++ </button>
++
++ <button>
+ <type>EJECT</type>
+ <text>Eject media</text>
+ <text lang="IT">Espelli Media</text>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/original/create_patch.sh b/abs/extra/community/mythtv-vdpau/menu-xml/original/create_patch.sh
new file mode 100644
index 0000000..34d8b8c
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/original/create_patch.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+for i in *.xml
+do
+ diff -u $i.orig $i > ../$i.patch
+done
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/setup.xml b/abs/extra/community/mythtv-vdpau/menu-xml/setup.xml
new file mode 100644
index 0000000..f56bb6f
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/setup.xml
@@ -0,0 +1,111 @@
+<mythmenu name="MAIN">
+
+ <button>
+ <type>SETUP_GENERAL</type>
+ <text>1. General</text>
+ <text lang="IT">1. Generale</text>
+ <text lang="PT">1. Geral</text>
+ <text lang="SV">1. Generellt</text>
+ <text lang="JA">1. 一般</text>
+ <text lang="DE">1. Allgemeines</text>
+ <text lang="FI">1. Yleiset</text>
+ <text lang="FR">1. Général</text>
+ <text lang="SI">1. Splošno</text>
+ <text lang="ET">1. Ãœldine</text>
+ <text lang="NB">1 Generelt</text>
+ <text lang="DK">1. Generelt</text>
+ <text lang="ES">1. General</text>
+ <text lang="CZ">1. Obecný</text>
+ <text lang="RU">1. Общие</text>
+ <action>GENERAL</action>
+ </button>
+
+ <button>
+ <type>SETUP_CAPTURE_CARDS</type>
+ <text>2. Capture cards</text>
+ <text lang="IT">2. Schede di Acquisizione</text>
+ <text lang="PT">2. Placas de Captura</text>
+ <text lang="SV">2. TV-kort</text>
+ <text lang="JA">2. キャプãƒãƒ£ã‚«ãƒ¼ãƒ‰</text>
+ <text lang="DE">2. TV-Karten</text>
+ <text lang="FI">2. TV-kortit</text>
+ <text lang="FR">2. Cartes d'acquisition</text>
+ <text lang="SI">2. Kartice za zajem</text>
+ <text lang="ET">2. TV-kaardid</text>
+ <text lang="NB">2 TV-kort</text>
+ <text lang="DK">2. TV-kort</text>
+ <text lang="ES">2. Capturadoras</text>
+ <text lang="CZ">2. Zachytávací karty</text>
+ <text lang="RU">2. Карты захвата</text>
+ <action>CAPTURE CARDS</action>
+ </button>
+
+ <button>
+ <type>SETUP_VIDEO_SOURCES</type>
+ <text>3. Video sources</text>
+ <text lang="IT">3. Fonte Video</text>
+ <text lang="PT">3. Fontes de Vídeo</text>
+ <text lang="SV">3. Videokällor</text>
+ <text lang="JA">3. ビデオソース</text>
+ <text lang="DE">3. Videoquellen</text>
+ <text lang="FI">3. Kuvanlähteet</text>
+ <text lang="FR">3. Sources vidéo</text>
+ <text lang="SI">3. Video viri</text>
+ <text lang="ET">3. Videosisendid</text>
+ <text lang="NB">3 Videokilder</text>
+ <text lang="DK">3. Videokilder</text>
+ <text lang="ES">3. Fuentes de Vídeo</text>
+ <text lang="CZ">3. Zdroje obrazu</text>
+ <text lang="RU">3. Видео иÑточники</text>
+ <action>VIDEO SOURCES</action>
+ </button>
+
+ <button>
+ <type>SETUP_INPUT_CONNECTIONS</type>
+ <text>4. Input connections</text>
+ <text lang="IT">4. Connessioni di Ingresso</text>
+ <text lang="PT">4. Ligações de Entrada</text>
+ <text lang="SV">4. Anslutningar</text>
+ <text lang="JA">4. 入力ã¨ã‚½ãƒ¼ã‚¹ã®æŽ¥ç¶š</text>
+ <text lang="DE">4. Verknüpfungen</text>
+ <text lang="FI">4. Sisääntuloasetukset</text>
+ <text lang="FR">4. Entrées Vidéos</text>
+ <text lang="SI">4. Vhodne povezave</text>
+ <text lang="ET">4. Sisendite ühendused</text>
+ <text lang="NB">4 Inndata</text>
+ <text lang="DK">4. Indgange</text>
+ <text lang="ES">4. Conexiones</text>
+ <text lang="CZ">4. Připojení vstupů</text>
+ <text lang="RU">4. Соединение входов</text>
+ <action>CARD INPUTS</action>
+ </button>
+
+ <button>
+ <type>SETUP_CHANNEL_EDITOR</type>
+ <text>5. Channel Editor</text>
+ <text lang="IT">5. Modifica Canali</text>
+ <text lang="SV">5. Kanaleditor</text>
+ <text lang="JA">5. ãƒãƒ£ãƒ³ãƒãƒ«è¨­å®š</text>
+ <text lang="DE">5. Sender bearbeiten</text>
+ <text lang="FI">5. Kanavanviritys</text>
+ <text lang="FR">5. Editeur de chaînes</text>
+ <text lang="SI">5. Urejanje kanalov</text>
+ <text lang="ET">5. Kanaliredaktor</text>
+ <text lang="NB">5 Kanalredigerer</text>
+ <text lang="DK">5. Kanal opsætning</text>
+ <text lang="ES">5. Editor Canales</text>
+ <text lang="CZ">5. Editor kanálů</text>
+ <text lang="RU">5. Редактор каналов</text>
+ <action>CHANNEL EDITOR</action>
+ </button>
+
+ <button>
+ <type>SETUP_STORAGE_GROUPS</type>
+ <text>6. Storage Directories</text>
+ <text lang="IT">6. Cartelle</text>
+ <text lang="FI">Tallennusryhmät</text>
+ <text lang="SV">Lagringsgrupper</text>
+ <action>STORAGE GROUPS</action>
+ </button>
+
+</mythmenu>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/siriusmenu.xml b/abs/extra/community/mythtv-vdpau/menu-xml/siriusmenu.xml
new file mode 100644
index 0000000..e317b36
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/siriusmenu.xml
@@ -0,0 +1,419 @@
+<mythmenu name="SIRIUS">
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Hits 1</text>
+ <action>EXEC /usr/bin/cliSipie siriushits1</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>StarLite</text>
+ <action>EXEC /usr/bin/cliSipie starlite</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Love</text>
+ <action>EXEC /usr/bin/cliSipie siriuslove</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Movin EZ</text>
+ <action>EXEC /usr/bin/cliSipie movineasy</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Gold</text>
+ <action>EXEC /usr/bin/cliSipie siriusgold</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>'60s Vibrations</text>
+ <action>EXEC /usr/bin/cliSipie 60svibrations</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Totally '70s</text>
+ <action>EXEC /usr/bin/cliSipie totally70s</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Big '80s</text>
+ <action>EXEC /usr/bin/cliSipie big80s</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>ThePulse</text>
+ <action>EXEC /usr/bin/cliSipie thepulse</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Bridge</text>
+ <action>EXEC /usr/bin/cliSipie thebridge</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>BBC Radio 1</text>
+ <action>EXEC /usr/bin/cliSipie bbcradio1</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Super Shuffle</text>
+ <action>EXEC /usr/bin/cliSipie supershuffle</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Elvis Radio</text>
+ <action>EXEC /usr/bin/cliSipie elvisradio</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Classic Vinyl</text>
+ <action>EXEC /usr/bin/cliSipie classicvinyl</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Classic Rewind</text>
+ <action>EXEC /usr/bin/cliSipie classicrewind</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>TheVault</text>
+ <action>EXEC /usr/bin/cliSipie thevault</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Jam_ON</text>
+ <action>EXEC /usr/bin/cliSipie jamon</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Spectrum</text>
+ <action>EXEC /usr/bin/cliSipie thespectrum</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>BuzzSaw</text>
+ <action>EXEC /usr/bin/cliSipie buzzsaw</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Octane</text>
+ <action>EXEC /usr/bin/cliSipie octane</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Alt Nation</text>
+ <action>EXEC /usr/bin/cliSipie altnation</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>1st Wave</text>
+ <action>EXEC /usr/bin/cliSipie firstwave</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Hair Nation</text>
+ <action>EXEC /usr/bin/cliSipie hairnation</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>'90s Alternative</text>
+ <action>EXEC /usr/bin/cliSipie 90salternative</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Garage</text>
+ <action>EXEC /usr/bin/cliSipie undergroundgarage</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Left of Center</text>
+ <action>EXEC /usr/bin/cliSipie leftofcenter</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Hard Attack</text>
+ <action>EXEC /usr/bin/cliSipie hardattack</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Faction</text>
+ <action>EXEC /usr/bin/cliSipie faction</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Punk</text>
+ <action>EXEC /usr/bin/cliSipie punk</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>The Coffee House</text>
+ <action>EXEC /usr/bin/cliSipie coffeehouse</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Margaritaville</text>
+ <action>EXEC /usr/bin/cliSipie radiomargaritaville</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Disorder</text>
+ <action>EXEC /usr/bin/cliSipie siriusdisorder</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Reggae</text>
+ <action>EXEC /usr/bin/cliSipie reggaerhythms</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Area 33</text>
+ <action>EXEC /usr/bin/cliSipie area33</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Boombox</text>
+ <action>EXEC /usr/bin/cliSipie boombox</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Chill</text>
+ <action>EXEC /usr/bin/cliSipie chill</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>The Beat</text>
+ <action>EXEC /usr/bin/cliSipie thebeat</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Strobe</text>
+ <action>EXEC /usr/bin/cliSipie thestrobe</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Hip-Hop Nation</text>
+ <action>EXEC /usr/bin/cliSipie hiphopnation</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>BackSpin</text>
+ <action>EXEC /usr/bin/cliSipie backspin</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Shade 45</text>
+ <action>EXEC /usr/bin/cliSipie shade45</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Hot Jamz</text>
+ <action>EXEC /usr/bin/cliSipie hotjamz</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Heart &amp; Soul</text>
+ <action>EXEC /usr/bin/cliSipie heartandsoul</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>SoulTown</text>
+ <action>EXEC /usr/bin/cliSipie soultown</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>New Country</text>
+ <action>EXEC /usr/bin/cliSipie newcountry</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Prime Country</text>
+ <action>EXEC /usr/bin/cliSipie primecountry</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Roadhouse</text>
+ <action>EXEC /usr/bin/cliSipie theroadhouse</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Outlaw Country</text>
+ <action>EXEC /usr/bin/cliSipie outlawcountry</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Bluegrass</text>
+ <action>EXEC /usr/bin/cliSipie bluegrass</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Spirit</text>
+ <action>EXEC /usr/bin/cliSipie spirit</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Praise</text>
+ <action>EXEC /usr/bin/cliSipie praise</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Planet Jazz</text>
+ <action>EXEC /usr/bin/cliSipie planetjazz</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>JazzCafe</text>
+ <action>EXEC /usr/bin/cliSipie jazzcafe</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>PureJazz</text>
+ <action>EXEC /usr/bin/cliSipie purejazz</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Spa 73</text>
+ <action>EXEC /usr/bin/cliSipie spa73</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Blues</text>
+ <action>EXEC /usr/bin/cliSipie siriusblues</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Siriusly Sinatra</text>
+ <action>EXEC /usr/bin/cliSipie siriuslysinatra</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Broadway's Best</text>
+ <action>EXEC /usr/bin/cliSipie broadwaysbest</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Symphony Hall</text>
+ <action>EXEC /usr/bin/cliSipie symphonyhall</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Met Opera Radio</text>
+ <action>EXEC /usr/bin/cliSipie metropolitanopera</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Pops</text>
+ <action>EXEC /usr/bin/cliSipie siriuspops</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Universo Latino</text>
+ <action>EXEC /usr/bin/cliSipie universolatino</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Rumbon</text>
+ <action>EXEC /usr/bin/cliSipie rumbon</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Martha Stewart</text>
+ <action>EXEC /usr/bin/cliSipie marthastewartlivingradio</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius Stars</text>
+ <action>EXEC /usr/bin/cliSipie siriusstars</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>OutQ Gay Radio</text>
+ <action>EXEC /usr/bin/cliSipie siriusoutq</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Patriot</text>
+ <action>EXEC /usr/bin/cliSipie siriuspatriot</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Left</text>
+ <action>EXEC /usr/bin/cliSipie siriusleft</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>CNN</text>
+ <action>EXEC /usr/bin/cliSipie cnn</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>wrn</text>
+ <action>EXEC /usr/bin/cliSipie wrn</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Blue Collar Comedy</text>
+ <action>EXEC /usr/bin/cliSipie bluecollarcomedy</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Raw Dog Comedy</text>
+ <action>EXEC /usr/bin/cliSipie rawdog</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Laugh Break Comedy</text>
+ <action>EXEC /usr/bin/cliSipie laughbreak</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>thefoxxhole</text>
+ <action>EXEC /usr/bin/cliSipie thefoxxhole</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>lime</text>
+ <action>EXEC /usr/bin/cliSipie lime</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Kids Stuff</text>
+ <action>EXEC /usr/bin/cliSipie kidsstuff</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Catholic Channel</text>
+ <action>EXEC /usr/bin/cliSipie thecatholicchannel</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>EWTN</text>
+ <action>EXEC /usr/bin/cliSipie ewtnglobal</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>christiantalk</text>
+ <action>EXEC /usr/bin/cliSipie christiantalk</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Sirius NFL Radio</text>
+ <action>EXEC /usr/bin/cliSipie siriusnflradio</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Maxim Radio</text>
+ <action>EXEC /usr/bin/cliSipie maximradio</action>
+ </button>
+ <button>
+ <type>MUSIC</type>
+ <text>Cosmo Radio</text>
+ <action>EXEC /usr/bin/cliSipie cosmopolitanradio</action>
+ </button>
+ <button>
+ <type>TV_DELETE</type>
+ <text>Stop Listening</text>
+ <action>EXEC /usr/bin/sipie_kill</action>
+ </button>
+
+</mythmenu>
+
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/util_menu.xml.patch b/abs/extra/community/mythtv-vdpau/menu-xml/util_menu.xml.patch
new file mode 100644
index 0000000..26ac863
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/util_menu.xml.patch
@@ -0,0 +1,17 @@
+--- util_menu.xml.orig 2009-01-09 02:45:07.000000000 +0000
++++ util_menu.xml 2009-01-22 08:04:28.000000000 +0000
+@@ -76,7 +76,13 @@
+ <action>PLUGIN mythcontrols</action>
+ <depends>mythcontrols</depends>
+ </button>
+-
++
++ <button>
++ <type>VIDEO_SCREENSHOOTER</type>
++ <text>Thumbnail Generator</text>
++ <action>EXEC /usr/LH/bin/shootscreens-mythtv.sh</action>
++ </button>
++
+ <button>
+ <type>SETUP_MENU</type>
+ <text>Setup</text>
diff --git a/abs/extra/community/mythtv-vdpau/menu-xml/xmmenu.xml b/abs/extra/community/mythtv-vdpau/menu-xml/xmmenu.xml
new file mode 100644
index 0000000..6b26d11
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/menu-xml/xmmenu.xml
@@ -0,0 +1,574 @@
+<!-- Current as of April 25, 2007 -->
+<mythmenu name="XM">
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '40s</text>
+ <action>EXEC /usr/bin/xamp kill 4</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '50s</text>
+ <action>EXEC /usr/bin/xamp kill 5</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '60s</text>
+ <action>EXEC /usr/bin/xamp kill 6</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '70s</text>
+ <action>EXEC /usr/bin/xamp kill 7</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '80s</text>
+ <action>EXEC /usr/bin/xamp kill 8</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The '90s</text>
+ <action>EXEC /usr/bin/xamp kill 9</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>America</text>
+ <action>EXEC /usr/bin/xamp kill 10</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>X Country</text>
+ <action>EXEC /usr/bin/xamp kill 12</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Willie's Place</text>
+ <action>EXEC /usr/bin/xamp kill 13</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Bluegrass Junction</text>
+ <action>EXEC /usr/bin/xamp kill 14</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Village</text>
+ <action>EXEC /usr/bin/xamp kill 15</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Highway 16</text>
+ <action>EXEC /usr/bin/xamp kill 16</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>US Country</text>
+ <action>EXEC /usr/bin/xamp kill 17</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>20 on 20</text>
+ <action>EXEC /usr/bin/xamp kill 20</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Heart</text>
+ <action>EXEC /usr/bin/xamp kill 23</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Blend</text>
+ <action>EXEC /usr/bin/xamp kill 25</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Flight 26</text>
+ <action>EXEC /usr/bin/xamp kill 26</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Cinemagic</text>
+ <action>EXEC /usr/bin/xamp kill 27</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>On Broadway</text>
+ <action>EXEC /usr/bin/xamp kill 28</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>U-Pop</text>
+ <action>EXEC /usr/bin/xamp kill 29</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Hitlist</text>
+ <action>EXEC /usr/bin/xamp kill 30</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Torch</text>
+ <action>EXEC /usr/bin/xamp kill 31</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Message</text>
+ <action>EXEC /usr/bin/xamp kill 32</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Spirit</text>
+ <action>EXEC /usr/bin/xamp kill 33</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>enLighten</text>
+ <action>EXEC /usr/bin/xamp kill 34</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Deep Tracks</text>
+ <action>EXEC /usr/bin/xamp kill 40</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Boneyard</text>
+ <action>EXEC /usr/bin/xamp kill 41</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Liquid Metal</text>
+ <action>EXEC /usr/bin/xamp kill 42</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XMU</text>
+ <action>EXEC /usr/bin/xamp kill 43</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Fred</text>
+ <action>EXEC /usr/bin/xamp kill 44</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Cafe</text>
+ <action>EXEC /usr/bin/xamp kill 45</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Top Tracks</text>
+ <action>EXEC /usr/bin/xamp kill 46</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Ethel</text>
+ <action>EXEC /usr/bin/xamp kill 47</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Squizz</text>
+ <action>EXEC /usr/bin/xamp kill 48</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Big Tracks</text>
+ <action>EXEC /usr/bin/xamp kill 49</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Loft</text>
+ <action>EXEC /usr/bin/xamp kill 50</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Music Lab</text>
+ <action>EXEC /usr/bin/xamp kill 51</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Verge</text>
+ <action>EXEC /usr/bin/xamp kill 52</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Fungus</text>
+ <action>EXEC /usr/bin/xamp kill 53</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Lucy</text>
+ <action>EXEC /usr/bin/xamp kill 54</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Soul Street</text>
+ <action>EXEC /usr/bin/xamp kill 60</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Flow</text>
+ <action>EXEC /usr/bin/xamp kill 61</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Suite 62</text>
+ <action>EXEC /usr/bin/xamp kill 62</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Groove</text>
+ <action>EXEC /usr/bin/xamp kill 64</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Rhyme</text>
+ <action>EXEC /usr/bin/xamp kill 65</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>RAW</text>
+ <action>EXEC /usr/bin/xamp kill 66</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The City</text>
+ <action>EXEC /usr/bin/xamp kill 67</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Heat</text>
+ <action>EXEC /usr/bin/xamp kill 68</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Real Jazz</text>
+ <action>EXEC /usr/bin/xamp kill 70</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Watercolors</text>
+ <action>EXEC /usr/bin/xamp kill 71</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Beyond Jazz</text>
+ <action>EXEC /usr/bin/xamp kill 72</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>High Standards</text>
+ <action>EXEC /usr/bin/xamp kill 73</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Bluesville</text>
+ <action>EXEC /usr/bin/xamp kill 74</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Hear Music</text>
+ <action>EXEC /usr/bin/xamp kill 75</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Fine Tuning</text>
+ <action>EXEC /usr/bin/xamp kill 76</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Audio Visions</text>
+ <action>EXEC /usr/bin/xamp kill 77</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Escape</text>
+ <action>EXEC /usr/bin/xamp kill 78</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>On The Rocks</text>
+ <action>EXEC /usr/bin/xamp kill 79</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Move</text>
+ <action>EXEC /usr/bin/xamp kill 80</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>BPM</text>
+ <action>EXEC /usr/bin/xamp kill 81</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The System</text>
+ <action>EXEC /usr/bin/xamp kill 82</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Chrome</text>
+ <action>EXEC /usr/bin/xamp kill 83</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM-Chill</text>
+ <action>EXEC /usr/bin/xamp kill 84</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Fuego</text>
+ <action>EXEC /usr/bin/xamp kill 90</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Viva</text>
+ <action>EXEC /usr/bin/xamp kill 91</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Aguila</text>
+ <action>EXEC /usr/bin/xamp kill 92</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Caliente</text>
+ <action>EXEC /usr/bin/xamp kill 94</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Luna</text>
+ <action>EXEC /usr/bin/xamp kill 95</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Air Musique</text>
+ <action>EXEC /usr/bin/xamp kill 100</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Joint</text>
+ <action>EXEC /usr/bin/xamp kill 101</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Sur La Route</text>
+ <action>EXEC /usr/bin/xamp kill 102</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>World Zone</text>
+ <action>EXEC /usr/bin/xamp kill 103</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Ngoma</text>
+ <action>EXEC /usr/bin/xamp kill 104</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Classics</text>
+ <action>EXEC /usr/bin/xamp kill 110</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Vox</text>
+ <action>EXEC /usr/bin/xamp kill 112</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Pops</text>
+ <action>EXEC /usr/bin/xamp kill 113</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Kids</text>
+ <action>EXEC /usr/bin/xamp kill 116</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Bob Edwards Show</text>
+ <action>EXEC /usr/bin/xamp kill 133</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>XM Comedy</text>
+ <action>EXEC /usr/bin/xamp kill 150</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Laugh USA</text>
+ <action>EXEC /usr/bin/xamp kill 151</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Special X</text>
+ <action>EXEC /usr/bin/xamp kill 154</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Agenda</text>
+ <action>EXEC /usr/bin/xamp kill 134</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Oprah and Friends</text>
+ <action>EXEC /usr/bin/xamp kill 156</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>The Virus</text>
+ <action>EXEC /usr/bin/xamp kill 202</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>1 Hit Wonders</text>
+ <action>EXEC /usr/bin/xamp kill 300</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Metalcore</text>
+ <action>EXEC /usr/bin/xamp kill 301</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Indie First</text>
+ <action>EXEC /usr/bin/xamp kill 302</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Late Night Mix</text>
+ <action>EXEC /usr/bin/xamp kill 303</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Sessions@AOL</text>
+ <action>EXEC /usr/bin/xamp kill 304</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>Shuffle</text>
+ <action>EXEC /usr/bin/xamp kill 305</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Rock First</text>
+ <action>EXEC /usr/bin/xamp kill 306</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Country First</text>
+ <action>EXEC /usr/bin/xamp kill 307</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Hip Hop First</text>
+ <action>EXEC /usr/bin/xamp kill 308</action>
+ </button>
+
+ <button>
+ <type>MUSIC</type>
+ <text>New Pop First</text>
+ <action>EXEC /usr/bin/xamp kill 309</action>
+ </button>
+
+ <button>
+ <type>TV_DELETE</type>
+ <text>Stop Listening</text>
+ <action>EXEC /usr/bin/xamp kill</action>
+ </button>
+
+</mythmenu>
diff --git a/abs/extra/community/mythtv-vdpau/mpegpspatch b/abs/extra/community/mythtv-vdpau/mpegpspatch
new file mode 100644
index 0000000..eed08eb
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/mpegpspatch
@@ -0,0 +1,66 @@
+--- orig_mpeg.c 2009-03-23 11:26:22.000000000 -0700
++++ mpeg.c 2009-03-23 11:28:09.000000000 -0700
+@@ -66,35 +66,40 @@
+
+ static int mpegps_probe(AVProbeData *p)
+ {
++ uint32_t code= -1;
++ int sys=0, pspack=0, priv1=0, vid=0, audio=0, invalid=0;
+ int i;
+- int size= FFMIN(2048, p->buf_size);
+- uint32_t code=0xFF;
++ int score=0;
+
+- /* we search the first start code. If it is a packet start code,
+- then we decide it is mpeg ps. We do not send highest value to
+- give a chance to mpegts */
+- /* NOTE: the search range was restricted to avoid too many false
+- detections */
+-
+- for (i = 0; i < size; i++) {
+- code = (code << 8) | p->buf[i];
++ for(i=0; i<p->buf_size; i++){
++ code = (code<<8) + p->buf[i];
+ if ((code & 0xffffff00) == 0x100) {
+- if (code == PACK_START_CODE ||
+- code == SYSTEM_HEADER_START_CODE ||
+- (code >= 0x1e0 && code <= 0x1ef) ||
+- (code >= 0x1c0 && code <= 0x1df) ||
+- code == PRIVATE_STREAM_2 ||
+- code == PROGRAM_STREAM_MAP ||
+- code == PRIVATE_STREAM_1 ||
+- code == PADDING_STREAM ||
+- code >= 0x100 && code <= 0x1b0)
+- return AVPROBE_SCORE_MAX - 2;
+- else
+- return 0;
++ int pes= check_pes(p->buf+i, p->buf+p->buf_size);
++
++ if(code == SYSTEM_HEADER_START_CODE) sys++;
++ else if(code == PRIVATE_STREAM_1) priv1++;
++ else if(code == PACK_START_CODE) pspack++;
++ else if((code & 0xf0) == VIDEO_ID && pes) vid++;
++ else if((code & 0xe0) == AUDIO_ID && pes) audio++;
++
++ else if((code & 0xf0) == VIDEO_ID && !pes) invalid++;
++ else if((code & 0xe0) == AUDIO_ID && !pes) invalid++;
+ }
+ }
+
+- return 0;
++ if(vid+audio > invalid) /* invalid VDR files nd short PES streams */
++ score= AVPROBE_SCORE_MAX/4;
++
++//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d len:%d\n", sys, priv1, pspack,vid, audio, p->buf_size);
++ if(sys>invalid && sys*9 <= pspack*10)
++ return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
++ if(priv1 + vid + audio > invalid && (priv1+vid+audio)*9 <= pspack*10)
++ return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
++ if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack && p->buf_size>2048) /* PES stream */
++ return AVPROBE_SCORE_MAX/2+2;
++
++ //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1
++ return score;
+ }
+
+ typedef struct MpegDemuxContext {
diff --git a/abs/extra/community/mythtv-vdpau/mythbackend b/abs/extra/community/mythtv-vdpau/mythbackend
new file mode 100755
index 0000000..93773a2
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/mythbackend
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/mythbackend`
+case "$1" in
+ start)
+ stat_busy "Starting MythTV Backend"
+ [ ! -e /var/run/mysqld.pid ] && echo -n "mysqld not started" && stat_fail && exit
+ [ -z "$PID" ] && /usr/bin/mythbackend -d -l /var/log/mythbackend.log -v important
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo $PID > /var/run/mythbackend.pid
+ add_daemon mythbackend
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping MythTV Backend"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mythbackend
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1s
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/community/mythtv-vdpau/mythbackend.lr b/abs/extra/community/mythtv-vdpau/mythbackend.lr
new file mode 100644
index 0000000..4f218bc
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/mythbackend.lr
@@ -0,0 +1,9 @@
+/var/log/mythtv/mythbackend.log {
+ copytruncate
+ daily
+ size 10M
+ missingok
+ rotate 7
+ compress
+ notifempty
+}
diff --git a/abs/extra/community/mythtv-vdpau/mythfrontend.lr b/abs/extra/community/mythtv-vdpau/mythfrontend.lr
new file mode 100644
index 0000000..1580533
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/mythfrontend.lr
@@ -0,0 +1,9 @@
+/var/log/mythtv/mythfrontend.log {
+ copytruncate
+ daily
+ size 10M
+ missingok
+ rotate 7
+ compress
+ notifempty
+}
diff --git a/abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch b/abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch
new file mode 100644
index 0000000..e5c57ef
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/myththemedmenu.cpp.patch
@@ -0,0 +1,125 @@
+--- libs/libmythui/myththemedmenu.cpp.orig 2008-01-31 15:26:38.000000000 +0000
++++ libs/libmythui/myththemedmenu.cpp 2008-02-07 22:24:27.000000000 +0000
+@@ -2102,6 +2102,10 @@
+ }
+ lastbutton = NULL;
+ }
++ else if (action == "MENU")
++ {
++ parent->doMenu();
++ }
+ else if (action == "EJECT")
+ {
+ myth_eject();
+@@ -2482,6 +2486,8 @@
+
+ if (d->foundtheme)
+ d->parseMenu(menufile);
++
++ m_menuPopup = NULL;
+ }
+
+ MythThemedMenu::~MythThemedMenu(void)
+@@ -2592,3 +2598,102 @@
+ MythScreenType::aboutToShow();
+ d->updateLCD();
+ }
++void MythThemedMenu::doMenu()
++{
++ int allowsd = gContext->GetNumSetting("AllowQuitShutdown");
++ if (m_menuPopup)
++ return;
++ QString label = "System Menu";
++ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
++ m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup");
++ if (m_menuPopup->Create())
++ mainStack->AddScreen(m_menuPopup);
++
++ //changed line to always show shutdown/reboot
++ if ( allowsd != 10 && allowsd !=14 )
++ {
++ m_menuPopup->SetReturnEvent(this,"popmenu_exit");
++ m_menuPopup->AddButton("Power off");
++ m_menuPopup->AddButton("Reboot");
++ m_menuPopup->AddButton("About");
++ m_menuPopup->AddButton("Cancel");
++ }
++ else
++ {
++ m_menuPopup->SetReturnEvent(this,"popmenu_noexit");
++ m_menuPopup->AddButton("About");
++ m_menuPopup->AddButton("Cancel");
++ }
++}
++
++void MythThemedMenu::aboutScreen()
++{
++{
++ extern const char *myth_source_version;
++ extern const char *myth_source_path;
++ QString distro_line;
++ distro_line="";
++
++ QFile file("/etc/os_myth_release");
++ if ( file.open(IO_ReadOnly | IO_Translate) )
++ {
++ QTextStream t( &file ); // use a text stream
++ distro_line = t.readLine();
++ file.close();
++ }
++
++ QString label = "";
++ label.append(QObject::tr("Revision: ") + myth_source_version + " \n Branch:" + myth_source_path + "\n" + distro_line );
++
++ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
++ m_menuPopup = new MythDialogBox(label, mainStack, "About");
++ if (m_menuPopup->Create())
++ mainStack->AddScreen(m_menuPopup);
++
++ m_menuPopup->SetReturnEvent(this,"About");
++ m_menuPopup->AddButton("OK!");
++ }
++}
++
++void MythThemedMenu::customEvent(QCustomEvent *event)
++{
++ if (event->type() == kMythDialogBoxCompletionEventType)
++ {
++ DialogCompletionEvent *dce =
++ dynamic_cast<DialogCompletionEvent*>(event);
++
++ QString resultid= dce->GetId();
++ int buttonnum = dce->GetResult();
++ if (resultid == "popmenu_exit")
++ {
++ if (buttonnum == 0)
++ {
++ QString halt_cmd = gContext->GetSetting("HaltCommand",
++ "sudo /sbin/halt -p");
++ if (!halt_cmd.isEmpty())
++ system(halt_cmd.ascii());
++ }
++
++ if (buttonnum == 1)
++ {
++ QString reboot_cmd = gContext->GetSetting("RebootCommand",
++ "sudo /sbin/reboot");
++ if (!reboot_cmd.isEmpty())
++ system(reboot_cmd.ascii());
++ }
++
++ if (buttonnum == 2)
++ {
++ aboutScreen();
++ }
++ }
++
++ if (resultid == "popmenu_noexit")
++ {
++ if (buttonnum == 0)
++ aboutScreen();
++ }
++
++ m_menuPopup = NULL;
++ }
++}
diff --git a/abs/extra/community/mythtv-vdpau/myththemedmenu.h.patch b/abs/extra/community/mythtv-vdpau/myththemedmenu.h.patch
new file mode 100644
index 0000000..9744b11
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/myththemedmenu.h.patch
@@ -0,0 +1,25 @@
+--- libs/libmythui/myththemedmenu.h.orig 2008-01-31 15:26:45.000000000 +0000
++++ libs/libmythui/myththemedmenu.h 2008-02-07 21:00:22.000000000 +0000
+@@ -2,6 +2,7 @@
+ #define MYTHTHEMEDMENU_H_
+
+ #include "mythscreentype.h"
++#include "mythdialogbox.h"
+
+ class MythMainWindow;
+ class MythThemedMenuPrivate;
+@@ -26,8 +27,14 @@
+
+ void ReloadTheme(void);
+ void ReloadExitKey(void);
++
+ virtual void aboutToShow(void);
+
++ void doMenu();
++ void aboutScreen();
++ MythDialogBox *m_menuPopup;
++ void customEvent(QCustomEvent *event);
++
+ protected:
+ virtual bool keyPressEvent(QKeyEvent *e);
+ virtual void gestureEvent(MythUIType *origtype, MythGestureEvent *ge);
diff --git a/abs/extra/community/mythtv-vdpau/mythtv.install b/abs/extra/community/mythtv-vdpau/mythtv.install
new file mode 100644
index 0000000..a063766
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/mythtv.install
@@ -0,0 +1,61 @@
+# arg 1: the new package version
+post_install() {
+ if [ ! -d /var/log/mythtv ]
+ then
+ mkdir -p /var/log/mythv
+ chown -R mythtv /var/log/mythtv
+ echo "---" > /var/log/mythtv/mythbackend.log
+ chown mythtv /var/log/mythtv/mythbackend.log
+ fi
+ if [ -e /tmp/is.xml ]
+ then
+ cp /tmp/is.xml /usr/share/mythtv/is.xml
+ fi
+
+ if [ -e /tmp/media_settings.xml ]
+ then
+ cp /tmp/media_settings.xml /usr/share/mythtv/media_settings.xml
+ fi
+
+ echo
+ echo
+ echo "As is with no guarantee, please don't file any bu reports against this package."
+}
+pre_upgrade() {
+ if [ -e /usr/share/mythtv/is.xml ]
+ then
+ cp /usr/share/mythtv/is.xml /tmp
+ fi
+
+ if [ -e /usr/share/mythtv/media_settings.xml ]
+ then
+ cp /usr/share/mythtv/media_settings.xml /tmp
+ fi
+}
+
+post_upgrade() {
+ cp /tmp/is.xml /usr/share/mythtv/
+ cp /tmp/media_settings.xml /usr/share/mythtv/
+ if [ ! -d /var/log/mythtv ]
+ then
+ mkdir -p /var/log/mythv
+ chown -R mythtv /var/log/mythtv
+ fi
+ echo
+ echo
+ echo "As is with no guarantee, please don't file any bu reports against this package."
+
+}
+pre_remove () {
+ pre_upgrade
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/mythtv-vdpau/pretty b/abs/extra/community/mythtv-vdpau/pretty
new file mode 100644
index 0000000..eed6f9c
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/pretty
@@ -0,0 +1,2 @@
+#!/bin/bash
+su - mythtv -c "/usr/bin/perl /usr/share/mythtv/contrib/mythrename.pl --link /myth/pretty"
diff --git a/abs/extra/community/mythtv-vdpau/smolt_jump.patch b/abs/extra/community/mythtv-vdpau/smolt_jump.patch
new file mode 100644
index 0000000..696be80
--- /dev/null
+++ b/abs/extra/community/mythtv-vdpau/smolt_jump.patch
@@ -0,0 +1,9 @@
+--- programs/mythfrontend/networkcontrol.cpp.orig 2008-03-23 23:00:25.000000000 +0000
++++ programs/mythfrontend/networkcontrol.cpp 2008-03-23 23:01:33.000000000 +0000
+@@ -81,6 +81,7 @@
+ jumpMap["zoneminderliveview"] = "ZoneMinder Live View";
+ jumpMap["zoneminderevents"] = "ZoneMinder Events";
++ jumpMap["mythsmolt"] = "MythSmolt";
+
+ // These jump point names match the (lowercased) locations from gContext
+ jumpMap["channelrecpriority"] = "Channel Recording Priorities";
diff --git a/abs/extra/community/ncdu/PKGBUILD b/abs/extra/community/ncdu/PKGBUILD
new file mode 100644
index 0000000..fb61b63
--- /dev/null
+++ b/abs/extra/community/ncdu/PKGBUILD
@@ -0,0 +1,19 @@
+# Contributor: lp76 <l.peduto@gmail.com>
+pkgname=ncdu
+pkgver=1.4
+pkgrel=1
+pkgdesc="An NCurses version of the famous old 'du' unix command"
+arch=('i686' 'x86_64')
+url="http://dev.yorhel.nl/ncdu/"
+license=('MIT')
+depends=('ncurses')
+source=(http://dev.yorhel.nl/download/$pkgname-$pkgver.tar.gz)
+md5sums=('07f01579f7c9852033139ae9fa2414c9')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+ install -D COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/abs/extra/community/nvclock/PKGBUILD b/abs/extra/community/nvclock/PKGBUILD
new file mode 100644
index 0000000..d49f915
--- /dev/null
+++ b/abs/extra/community/nvclock/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 23406 2009-01-09 22:39:57Z andyrtr $
+# Contributor: Markus Meissner <markus@meissna.de>
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=nvclock
+pkgver=0.8b4
+pkgrel=1
+pkgdesc="A small utility which allows users to overclock NVIDIA based video cards"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gtk2')
+source=(http://www.linuxhardware.org/$pkgname/${pkgname}${pkgver}.tar.gz
+ nvclock-0.8b4-buildfix.patch)
+url="http://www.linuxhardware.org/nvclock/"
+md5sums=('23f1b3ebf40f35d76d5fdac50f66ab11'
+ '1da24b50dd6a8c4704fa550a3e1a8b53')
+options=('!makeflags')
+
+build(){
+ cd ${srcdir}/$pkgname$pkgver
+ # build fix from Fedora
+ patch -Np1 -i $srcdir/nvclock-0.8b4-buildfix.patch || return 1
+ sed -i 's:${prefix}/man:${prefix}\/share\/man:' ${srcdir}/$pkgname$pkgver/Makefile.in || return 1
+ ./configure --prefix=/usr --bindir=/usr/bin
+ make || return 1 || return 1
+ make DESTDIR=${pkgdir} install || return 1
+}
diff --git a/abs/extra/community/nvclock/nvclock-0.8b4-buildfix.patch b/abs/extra/community/nvclock/nvclock-0.8b4-buildfix.patch
new file mode 100644
index 0000000..cdc9f5c
--- /dev/null
+++ b/abs/extra/community/nvclock/nvclock-0.8b4-buildfix.patch
@@ -0,0 +1,16 @@
+diff -upNr nvclock0.8b4.orign/src/Makefile.in nvclock0.8b4/src/Makefile.in
+--- nvclock0.8b4.orign/src/Makefile.in 2009-01-03 18:02:54.000000000 +0100
++++ nvclock0.8b4/src/Makefile.in 2009-01-07 11:37:39.000000000 +0100
+@@ -50,8 +50,8 @@ distclean: distclean-recursive clean-app
+ install: install-recursive install-app
+ install-app:
+ mkdir -p $(bindir)
+- $(INSTALL) -c nvclock $(DESTDIR)$(bindir)/nvclock
+- $(INSTALL) -c smartdimmer $(DESTDIR)$(bindir)/smartdimmer
++ $(INSTALL) -c nvclock $(bindir)/nvclock
++ $(INSTALL) -c smartdimmer $(bindir)/smartdimmer
+
+
+ uninstall: uninstall-recursive uninstall-app
+
+
diff --git a/abs/extra/community/nvidia-beta/PKGBUILD b/abs/extra/community/nvidia-beta/PKGBUILD
new file mode 100644
index 0000000..d4beaf7
--- /dev/null
+++ b/abs/extra/community/nvidia-beta/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer : Dan Vratil <progdan@progdansoft.com>
+
+pkgname=nvidia-beta
+pkgver=180.41
+_kernver=2.6.28-LinHES
+pkgrel=1
+pkgdesc="NVIDIA beta drivers for kernel26."
+arch=('i686' 'x86_64')
+[ "$CARCH" = "i686" ] && ARCH=x86 && NV=0
+[ "$CARCH" = "x86_64" ] && ARCH=x86_64 && NV=0
+provides=('nvidia=180.41')
+url="http://www.nvidia.com/"
+depends=('kernel26' 'nvidia-utils-beta=180.41')
+conflicts=('nvidia-96xx' 'nvidia-71xx' 'nvidia-legacy')
+license=('custom')
+provides=("nvidia")
+install=('nvidia.install')
+source=(ftp://download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/NVIDIA-Linux-$ARCH-${pkgver}-pkg${NV}.run)
+
+md5sums=('ec91f014a00357303c12f4cfd03c8a3f')
+[ "$CARCH" = "x86_64" ] && md5sums=('07ec7b5521d927b6ff332ef019ac80cd')
+
+
+build()
+{
+ # Extract
+ echo ${_kernver}
+ cd $startdir/src/
+ sh NVIDIA-Linux-$ARCH-${pkgver}-pkg${NV}.run --extract-only
+ cd NVIDIA-Linux-$ARCH-${pkgver}-pkg${NV}
+
+ # Any extra patches are applied in here...
+
+ cd usr/src/nv/
+ ln -s Makefile.kbuild Makefile
+ make SYSSRC=/lib/modules/${_kernver}/build module
+
+ # install kernel module
+ mkdir -p $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
+ install -m644 nvidia.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
+
+ sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
+}
+
diff --git a/abs/extra/community/nvidia-beta/nvidia.install b/abs/extra/community/nvidia-beta/nvidia.install
new file mode 100644
index 0000000..f892d98
--- /dev/null
+++ b/abs/extra/community/nvidia-beta/nvidia.install
@@ -0,0 +1,22 @@
+# arg 1: the new package version
+post_install() {
+ KERNEL_VERSION=`uname -r`
+ depmod -v $KERNEL_VERSION > /dev/null 2>&1
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+ rmmod nvidia || echo 'In order to use the new nvidia module, exit Xserver and unload it manually.'
+}
+
+# arg 1: the old package version
+post_remove() {
+ KERNEL_VERSION=`uname -r`
+ depmod -v $KERNEL_VERSION > /dev/null 2>&1
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/nvidia-utils-beta/PKGBUILD b/abs/extra/community/nvidia-utils-beta/PKGBUILD
new file mode 100644
index 0000000..d89addd
--- /dev/null
+++ b/abs/extra/community/nvidia-utils-beta/PKGBUILD
@@ -0,0 +1,80 @@
+#Maintainer: Dan Vratil <progdan@progdansoft.com>
+
+pkgname=nvidia-utils-beta
+pkgver=180.41
+pkgrel=1
+pkgdesc="NVIDIA beta drivers utilities and libraries."
+provides=('nvidia-utils' 'libgl')
+arch=('i686' 'x86_64')
+[ "$CARCH" = "i686" ] && ARCH=x86 && NV=0
+[ "$CARCH" = "x86_64" ] && ARCH=x86_64 && NV=0
+url="http://www.nvidia.com/"
+depends=('xorg-server>=1.5')
+provides=('nvidia-utils=180.41' 'libgl')
+conflicts=('libgl' 'libgl-dri' 'ati-fglrx-utils' 'nvidia-legacy-utils' \
+ 'nvidia-71xx-utils' 'nvidia-96xx-utils')
+license=('custom')
+install=nvidia.install
+source=(ftp://download.nvidia.com/XFree86/Linux-${ARCH}/${pkgver}/NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}.run \
+ supported-cards.txt)
+
+md5sums=('ec91f014a00357303c12f4cfd03c8a3f'
+ '5b5835bdb1508a57591b812c109a2679')
+[ "$CARCH" = "x86_64" ] && md5sums=('07ec7b5521d927b6ff332ef019ac80cd'
+ '5b5835bdb1508a57591b812c109a2679')
+options=(docs)
+
+build()
+{
+ # override nvida install routine and do it the long way.
+ cd $startdir/src/
+ sh NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}.run --extract-only
+ cd NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}/usr/
+
+ mkdir -p $startdir/pkg/usr/{lib,bin,share/applications,share/pixmaps,man/man1}
+ mkdir -p $startdir/pkg/usr/lib/xorg/modules/{extensions,drivers}
+ mkdir -p $startdir/pkg/usr/share/licenses/nvidia/
+
+ #install lib/{libGLcore,libGL,libnvidia-cfg,libcuda,tls/libnvidia-tls}.so.${pkgver} \
+ mkdir -p $startdir/pkg/usr/include/{,GL,cuda,vdpau}
+
+ install -m644 include/cuda/{cudaGL,cuda}.h $startdir/pkg/usr/include/cuda
+ install -m644 include/vdpau/{vdpau_x11,vdpau}.h $startdir/pkg/usr/include/vdpau
+ # Conflicts with MESA; if you want to develop opengl app, enable this line
+ #install -m644 include/GL/{glxext,gl,glx,glext}.h $startdir/pkg/usr/include/GL
+
+ install lib/{libGLcore,libGL,libnvidia-cfg,libcuda,tls/libnvidia-tls,libvdpau_nvidia,libvdpau,libvdpau_trace}.so.${pkgver} \
+ $startdir/pkg/usr/lib/ || return 1
+
+ install -m644 share/man/man1/* $startdir/pkg/usr/man/man1/ || return 1
+ rm $startdir/pkg/usr/man/man1/nvidia-installer.1.gz || return 1
+ install X11R6/lib/libXv* $startdir/pkg/usr/lib/ || return 1
+ install -m644 share/applications/nvidia-settings.desktop $startdir/pkg/usr/share/applications/ || return 1
+ # fix nvidia .desktop file
+ sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i $startdir/pkg/usr/share/applications/nvidia-settings.desktop
+ install -m644 share/pixmaps/nvidia-settings.png $startdir/pkg/usr/share/pixmaps/ || return 1
+ install X11R6/lib/modules/libnvidia-wfb.so.$pkgver $startdir/pkg/usr/lib/xorg/modules || return 1
+ install X11R6/lib/modules/drivers/nvidia_drv.so $startdir/pkg/usr/lib/xorg/modules/drivers || return 1
+ install X11R6/lib/modules/extensions/libglx.so.$pkgver $startdir/pkg/usr/lib/xorg/modules/extensions || return 1
+ install -m755 bin/nvidia-{settings,xconfig,bug-report.sh} $startdir/pkg/usr/bin/ || return 1
+ cd $startdir/pkg/usr/lib/
+ ln -s libGL.so.$pkgver libGL.so || return 1
+ ln -s libGL.so.$pkgver libGL.so.1 || return 1
+ ln -s libGLcore.so.$pkgver libGLcore.so.1 || return 1
+ ln -s libnvidia-cfg.so.$pkgver libnvidia-cfg.so.1 || return 1
+ ln -s libnvidia-tls.so.$pkgver libnvidia-tls.so.1 || return 1
+ ln -s libcuda.so.$pkgver libcuda.so.1 || return 1
+ ln -s libXvMCNVIDIA.so.$pkgver libXvMCNVIDIA_dynamic.so.1 || return 1
+ ln -s libvdpau.so.$pkgver libvdpau.so.1 || return 1
+ ln -s libvdpau.so.$pkgver libvdpau.so || return 1
+ cd $startdir/pkg/usr/lib/xorg/modules/extensions
+ ln -s libglx.so.$pkgver libglx.so || return 1
+
+ install -m644 $startdir/src/NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}/LICENSE $startdir/pkg/usr/share/licenses/nvidia/ || return 1
+ ln -s nvidia $startdir/pkg/usr/share/licenses/nvidia-utils || return 1
+ install -D -m644 $startdir/src/NVIDIA-Linux-${ARCH}-${pkgver}-pkg${NV}/usr/share/doc/README.txt $startdir/pkg/usr/share/doc/nvidia/README || return 1
+ install -D -m644 $startdir/src/supported-cards.txt $startdir/pkg/usr/share/doc/nvidia/supported-cards.txt || return 1
+
+ find $startdir/pkg/usr -type d -exec chmod 755 {} \;
+}
+
diff --git a/abs/extra/community/nvidia-utils-beta/nvidia.install b/abs/extra/community/nvidia-utils-beta/nvidia.install
new file mode 100644
index 0000000..6f50f79
--- /dev/null
+++ b/abs/extra/community/nvidia-utils-beta/nvidia.install
@@ -0,0 +1,36 @@
+# arg 1: the new package version
+post_install() {
+
+ echo -------------------------------
+ echo By using this package you accept the NVIDIA license,
+ echo which has been installed in /usr/share/licenses/nvidia/LICENSE
+ echo If you do not accept this license, you must remove the package immediately.
+ echo Dont forget to update your /etc/X11/xorg.conf
+ echo In order to use nvidia-settings, you need to install the 'gtk2' package.
+ echo In order to use nvidia-xconfig, you need to install the 'pkgconfig' package.
+ echo -------------------------------
+ echo nvidia 9746 drops support for Geforce 3 and 4 cards
+ echo If you have such a card, install the nvidia-96xx, nvidia-96xx-utils,
+ echo nvidia-96xx-ck, nvidia-96xx-beyond, nvidia-96xx-suspend2 packages
+ echo For a list of supported cards, see /usr/share/doc/nvidia/supported-cards.txt
+ echo -------------------------------
+ echo This drivers are beta. We recommend to use drivers from extra repo.
+
+# echo ":: Updating symlinks to use built-in libwfb"
+# ln -sf /usr/lib/xorg/modules/libnvidia-wfb.so.* /usr/lib/xorg/modules/libwfb.so
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+#post_remove() {
+# echo ":: Updating symlinks to use xorg-server libwfb"
+# ln -sf /usr/lib/xorg/modules/libwfb.so.* /usr/lib/xorg/modules/libwfb.so
+#}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/nvidia-utils-beta/supported-cards.txt b/abs/extra/community/nvidia-utils-beta/supported-cards.txt
new file mode 100644
index 0000000..7dfcb45
--- /dev/null
+++ b/abs/extra/community/nvidia-utils-beta/supported-cards.txt
@@ -0,0 +1,272 @@
+Archlinux currently manages three branches of the NVIDIA binary driver:
+
+nvidia (latest nvidia release)
+nvidia-96xx (96xx legacy branch)
+nvidia-71xx (71xx legacy branch)
+
+This contains GPUs currently supported by the 177.76 beta driver.
+
+______________________________________________________________________________
+
+Appendix A. Supported NVIDIA GPU Products
+______________________________________________________________________________
+
+For the most complete and accurate listing of supported GPUs, please see the
+Supported Products List, available from the NVIDIA Linux x86 Graphics Driver
+download page. Please go to http://www.nvidia.com/object/unix.html, follow the
+Archive link under the Linux x86 heading, follow the link for the 177.36
+driver, and then go to the Supported Products List.
+
+
+A1. NVIDIA GEFORCE GPUS
+
+
+ NVIDIA GPU product Device PCI ID
+ ---------------------------------- ----------------------------------
+ GeForce 9800 GTX+ 0x0613
+ GeForce 9800GT 0x0614
+ GeForce 8100P 0x0847
+ nForce 780a SLI 0x084C
+ nForce 750a SLI 0x084D
+ GeForce 9700 M GTS 0x062A
+ GeForce 9800 GX2 0x0604
+ GeForce 9800 GTX 0x0612
+ GeForce 9600 GT 0x0622
+ GeForce 9500 GT 0x0640
+ GeForce 9500M GS 0x0405
+ GeForce 8800M GTX 0x060C
+ GeForce 8800M GTS 0x0609
+ GeForce 8800 Ultra 0x0194
+ GeForce 8800 GTX 0x0191
+ GeForce 8800 GTS 512 0x0600
+ GeForce 8800 GTS 0x0193
+ GeForce 8800 GT 0x0602
+ GeForce 8800 GT 0x0611
+ GeForce 8800 GS 0x0606
+ GeForce 8800 GS 0x060D
+ GeForce 8700M GT 0x0409
+ GeForce 8600M GT 0x0407
+ GeForce 8600M GS 0x0425
+ GeForce 8600 GTS 0x0400
+ GeForce 8600 GT 0x0401
+ GeForce 8600 GT 0x0402
+ GeForce 8500 GT 0x0421
+ GeForce 8400M GT 0x0426
+ GeForce 8400M GS 0x0427
+ GeForce 8400M G 0x0428
+ GeForce 8400 SE 0x0420
+ GeForce 8400 GS 0x0404
+ GeForce 8400 GS 0x0422
+ GeForce 8400 GS 0x0424
+ GeForce 8400 GS 0x06E4
+ GeForce 8300 GS 0x0423
+ GeForce 8300 0x0848
+ GeForce 8200/ nForce 730a 0x084A
+ GeForce 8200 0x0849
+ GeForce 8200 0x084B
+ GeForce 8100 / nForce 720a 0x084F
+ GeForce 7950 GX2 0x0293
+ GeForce 7950 GX2 0x0294
+ GeForce 7950 GT 0x0295
+ GeForce 7950 GT 0x02E4
+ GeForce 7900 GTX 0x0290
+ GeForce 7900 GT/GTO 0x0291
+ GeForce 7900 GS 0x0292
+ GeForce 7900 GS 0x02E3
+ GeForce 7800 SLI 0x0095
+ GeForce 7800 GTX 0x0090
+ GeForce 7800 GTX 0x0091
+ GeForce 7800 GT 0x0092
+ GeForce 7800 GS 0x0093
+ GeForce 7800 GS 0x00F5
+ GeForce 7650 GS 0x0390
+ GeForce 7600 LE 0x0394
+ GeForce 7600 GT 0x02E0
+ GeForce 7600 GT 0x0391
+ GeForce 7600 GS 0x02E1
+ GeForce 7600 GS 0x0392
+ GeForce 7500 LE 0x01DD
+ GeForce 7350 LE 0x01D0
+ GeForce 7300 SE/7200 GS 0x01D3
+ GeForce 7300 LE 0x01D1
+ GeForce 7300 GT 0x0393
+ GeForce 7300 GT 0x0395
+ GeForce 7300 GS 0x01DF
+ GeForce 7150M / nForce 630M 0x0531
+ GeForce 7150 / NVIDIA nForce 630i 0x07E0
+ GeForce 7100 GS 0x016A
+ GeForce 7100 / NVIDIA nForce 630i 0x07E1
+ GeForce 7050 PV / NVIDIA nForce 630a 0x053A
+ GeForce 7050 PV / NVIDIA nForce 630a 0x053B
+ GeForce 7050 / NVIDIA nForce 610i 0x07E3
+ GeForce 7025 / NVIDIA nForce 630a 0x053E
+ GeForce 7000M / nForce 610M 0x0533
+ GeForce 6800 XT 0x0044
+ GeForce 6800 XT 0x0048
+ GeForce 6800 XT 0x00C3
+ GeForce 6800 XT 0x0218
+ GeForce 6800 XE 0x0043
+ GeForce 6800 Ultra 0x0040
+ GeForce 6800 Ultra 0x00F9
+ GeForce 6800 LE 0x0042
+ GeForce 6800 LE 0x00C2
+ GeForce 6800 LE 0x0212
+ GeForce 6800 GT 0x0045
+ GeForce 6800 GT 0x0046
+ GeForce 6800 GT 0x0215
+ GeForce 6800 GS 0x0047
+ GeForce 6800 GS 0x00C0
+ GeForce 6800 GS 0x00F6
+ GeForce 6800 0x0041
+ GeForce 6800 0x00C1
+ GeForce 6800 0x00F0
+ GeForce 6800 0x0211
+ GeForce 6700 XL 0x0147
+ GeForce 6610 XL 0x0145
+ GeForce 6600 VE 0x0143
+ GeForce 6600 LE 0x00F4
+ GeForce 6600 LE 0x0142
+ GeForce 6600 GT 0x00F1
+ GeForce 6600 GT 0x0140
+ GeForce 6600 0x00F2
+ GeForce 6600 0x0141
+ GeForce 6500 0x0160
+ GeForce 6250 0x0169
+ GeForce 6200SE TurboCache(TM) 0x0162
+ GeForce 6200 TurboCache(TM) 0x0161
+ GeForce 6200 LE 0x0163
+ GeForce 6200 A-LE 0x0222
+ GeForce 6200 0x00F3
+ GeForce 6200 0x014F
+ GeForce 6200 0x0221
+ GeForce 6150SE nForce 430 0x03D0
+ GeForce 6150 LE 0x0241
+ GeForce 6150 0x0240
+ GeForce 6100 nForce 420 0x03D5
+ GeForce 6100 nForce 405 0x03D1
+ GeForce 6100 nForce 400 0x03D2
+ GeForce 6100 0x0242
+ GeForce PCX 5900 0x00FB
+ GeForce PCX 5750 0x00FA
+ GeForce PCX 5300 0x00FC
+ GeForce Go 7950 GTX 0x0297
+ GeForce Go 7900 GTX 0x0299
+ GeForce Go 7900 GS 0x0298
+ GeForce Go 7800 GTX 0x0099
+ GeForce Go 7800 0x0098
+ GeForce Go 7600 GT 0x0399
+ GeForce Go 7600 0x0398
+ GeForce Go 7400 0x01D8
+ GeForce Go 7300 0x01D7
+ GeForce Go 7200 0x01D6
+ GeForce Go 6800 Ultra 0x00C9
+ GeForce Go 6800 0x00C8
+ GeForce Go 6600 TE/6200 TE 0x0146
+ GeForce Go 6600 GT 0x0149
+ GeForce Go 6600 0x0144
+ GeForce Go 6600 0x0148
+ GeForce Go 6400 0x0166
+ GeForce Go 6400 0x0168
+ GeForce Go 6200 0x0164
+ GeForce Go 6200 0x0167
+ GeForce Go 6150 0x0244
+ GeForce Go 6100 0x0247
+ GeForce FX Go5700 0x0347
+ GeForce FX Go5700 0x0348
+ GeForce FX Go5650 0x031B
+ GeForce FX Go5600 0x031A
+ GeForce FX Go53xx 0x032C
+ GeForce FX Go5250 0x0325
+ GeForce FX Go5200 32M/64M 0x0328
+ GeForce FX Go5200 0x0324
+ GeForce FX Go5100 0x032D
+ GeForce FX 5950 Ultra 0x0333
+ GeForce FX 5900ZT 0x0334
+ GeForce FX 5900XT 0x0332
+ GeForce FX 5900 Ultra 0x0330
+ GeForce FX 5900 0x0331
+ GeForce FX 5800 Ultra 0x0301
+ GeForce FX 5800 0x0302
+ GeForce FX 5700VE 0x0344
+ GeForce FX 5700LE 0x0343
+ GeForce FX 5700 Ultra 0x0341
+ GeForce FX 5700 0x0342
+ GeForce FX 5600XT 0x0314
+ GeForce FX 5600 Ultra 0x0311
+ GeForce FX 5600 0x0312
+ GeForce FX 5500 0x0326
+ GeForce FX 5200LE 0x0323
+ GeForce FX 5200 Ultra 0x0321
+ GeForce FX 5200 0x0320
+ GeForce FX 5200 0x0322
+ GeForce FX 5100 0x0327
+
+
+A1. TESLA GPUS
+
+ NVIDIA GPU product Device PCI ID
+ ---------------------------------- ----------------------------------
+ Tesla C870 0x0197
+
+
+A1. NVIDIA GEFORCE GPUS
+
+ NVIDIA GPU product Device PCI ID
+ ---------------------------------- ----------------------------------
+ Quadro FX 770M 0x065C
+ Quadro NVS 160M 0x06EB
+ Quadro NVS 150M 0x06EA
+ Quadro FX 1000 0x0309
+ Quadro FX 1100 0x034E
+ Quadro FX 1300 0x00FE
+ Quadro FX 1400 0x00CE
+ Quadro FX 1500 0x029E
+ Quadro FX 1500M 0x029B
+ Quadro FX 1600M 0x040D
+ Quadro FX 1700 0x040F
+ Quadro FX 2000 0x0308
+ Quadro FX 2500M 0x029A
+ Quadro FX 3000 0x0338
+ Quadro FX 330 0x00FC
+ Quadro FX 3450/4000 SDI 0x00CD
+ Quadro FX 350 0x01DE
+ Quadro FX 3500 0x029D
+ Quadro FX 350M 0x01DC
+ Quadro FX 3600M 0x061C
+ Quadro FX 360M 0x042D
+ Quadro FX 370 0x040A
+ Quadro FX 3700 0x061A
+ Quadro FX 4000 0x004E
+ Quadro FX 4400/Quadro FX 3400 0x00F8
+ Quadro FX 4500 0x009D
+ Quadro FX 4500 X2 0x029F
+ Quadro FX 4600 0x019E
+ Quadro FX 500/FX 600 0x032B
+ Quadro FX 540 0x014E
+ Quadro FX 540M 0x014C
+ Quadro FX 550 0x014D
+ Quadro FX 5500 0x029C
+ Quadro FX 560 0x039E
+ Quadro FX 5600 0x019D
+ Quadro FX 570 0x040E
+ Quadro FX 570M 0x040C
+ Quadro FX 700 0x033F
+ Quadro FX Go1000 0x034C
+ Quadro FX Go1400 0x00CC
+ Quadro FX Go700 0x031C
+ Quadro NVS 110M 0x01D7
+ Quadro NVS 110M 0x01DA
+ Quadro NVS 120M 0x01DB
+ Quadro NVS 130M 0x042A
+ Quadro NVS 135M 0x042B
+ Quadro NVS 140M 0x0429
+ Quadro NVS 210S 0x0245
+ NVIDIA GeForce 6150L 0x0245
+ Quadro NVS 280 PCI-E/Quadro FX 330 0x00FD
+ Quadro NVS 285 0x0165
+ Quadro NVS 290 0x042F
+ Quadro NVS 320M 0x040B
+ Quadro NVS 440 0x014A
+ Quadro NVS 55/280 PCI 0x032A
+
+
diff --git a/abs/extra/community/nxtvepg.tar.gz b/abs/extra/community/nxtvepg.tar.gz
new file mode 100644
index 0000000..fe8da09
--- /dev/null
+++ b/abs/extra/community/nxtvepg.tar.gz
Binary files differ
diff --git a/abs/extra/community/nxtvepg/PKGBUILD b/abs/extra/community/nxtvepg/PKGBUILD
new file mode 100644
index 0000000..5de6bc7
--- /dev/null
+++ b/abs/extra/community/nxtvepg/PKGBUILD
@@ -0,0 +1,45 @@
+# Contributor: Perry3D <perry3d at gmail dot com>
+# Previous: Gilles CHAUVIN <gcnweb at gmail dot com>
+
+pkgname=nxtvepg
+pkgver=2.8.1
+pkgrel=2
+pkgdesc="A decoder for nexTView EPG an Electronic TV Programme Guide"
+url="http://nxtvepg.sf.net/"
+license="GPL"
+depends=('tcl>=8.5.0' 'tk' 'libxmu')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz \
+tcl_85.patch \
+$pkgname-icon-16.png $pkgname-icon-32.png $pkgname-icon-48.png \
+$pkgname.desktop)
+arch=('i686' 'x86_64')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+
+ msg "Applying patch for tcl/tk8.5..."
+ patch -p0 < ../tcl_85.patch
+
+ make || return 1
+
+ make prefix=$startdir/pkg/usr/ \
+ bindir=$startdir/pkg/usr/bin \
+ resdir=$startdir/pkg/usr/share/X11 \
+ INST_DB_DIR=$startdir/pkg/var/tmp/nxtvdb \
+ cfgdir=$startdir/pkg/usr/share/nxtvepg \
+ install
+
+ # Icons
+ for size in 16 32 48; do
+ install $startdir/src/$pkgname-icon-$size.png -D -m644 $startdir/pkg/usr/share/pixmaps/$pkgname-icon-$size.png
+ done
+
+ # .desktop file
+ install $startdir/src/$pkgname.desktop -D -m644 $startdir/pkg/usr/share/applications/$pkgname.desktop
+}
+md5sums=('0811b1b95537b3cbab9f8d18d1501411'
+ 'db5e77089204aeb35e84c7f5505664a6'
+ '5f7c220d3355b6f043a2bdd5acec8608'
+ '8988d3f33a90bd99f9a61d8f7e4f46c3'
+ '26d86bd935df1dc9328f07b879f30de2'
+ '5d14ff096ef811ccb7dc330e5d3a76fd')
diff --git a/abs/extra/community/nxtvepg/nxtvepg-icon-16.png b/abs/extra/community/nxtvepg/nxtvepg-icon-16.png
new file mode 100644
index 0000000..e6d8a85
--- /dev/null
+++ b/abs/extra/community/nxtvepg/nxtvepg-icon-16.png
Binary files differ
diff --git a/abs/extra/community/nxtvepg/nxtvepg-icon-32.png b/abs/extra/community/nxtvepg/nxtvepg-icon-32.png
new file mode 100644
index 0000000..9071f10
--- /dev/null
+++ b/abs/extra/community/nxtvepg/nxtvepg-icon-32.png
Binary files differ
diff --git a/abs/extra/community/nxtvepg/nxtvepg-icon-48.png b/abs/extra/community/nxtvepg/nxtvepg-icon-48.png
new file mode 100644
index 0000000..a5f991b
--- /dev/null
+++ b/abs/extra/community/nxtvepg/nxtvepg-icon-48.png
Binary files differ
diff --git a/abs/extra/community/nxtvepg/nxtvepg.desktop b/abs/extra/community/nxtvepg/nxtvepg.desktop
new file mode 100644
index 0000000..6703dfc
--- /dev/null
+++ b/abs/extra/community/nxtvepg/nxtvepg.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Comment=Electronic TV Programme Guide
+Icon=/usr/share/pixmaps/nxtvepg-icon-48.png
+Exec=nxtvepg
+Name=nexTView EPG
+GenericName=electronic TV Programme Guide
+Terminal=false
+Type=Application
+Categories=Application;AudioVideo;
diff --git a/abs/extra/community/nxtvepg/tcl_85.patch b/abs/extra/community/nxtvepg/tcl_85.patch
new file mode 100644
index 0000000..9059a6c
--- /dev/null
+++ b/abs/extra/community/nxtvepg/tcl_85.patch
@@ -0,0 +1,13 @@
+--- Makefile.orig 2008-02-03 20:01:14.000000000 +0100
++++ Makefile 2008-02-03 20:01:23.000000000 +0100
+@@ -58,8 +58,8 @@
+ YACC = /usr/bin/yacc
+
+ # select Tcl/Tk version (8.5 recommended due to modernized widget appearence)
+-TCL_VER := $(shell echo 'puts [package require Tcl]' | tclsh)
+-#TCL_VER = 8.5
++#TCL_VER := $(shell echo 'puts [package require Tcl]' | tclsh)
++TCL_VER = 8.5
+
+ ifeq ($(shell test -d /usr/include/tcl$(TCL_VER) && echo YES),YES)
+ INCS += -I/usr/include/tcl$(TCL_VER)
diff --git a/abs/extra/community/nzbperl/PKGBUILD b/abs/extra/community/nzbperl/PKGBUILD
new file mode 100755
index 0000000..bbfee00
--- /dev/null
+++ b/abs/extra/community/nzbperl/PKGBUILD
@@ -0,0 +1,16 @@
+#Contributor: Xavier Vierling <xavierling@free.fr>
+pkgname=nzbperl
+pkgver=0.6.8
+pkgrel=1
+pkgdesc="nzb based nntp/usenet downloader in perl"
+arch=('i686' 'x86_64')
+url="http://noisybox.net/computers/nzbperl/"
+license="GPL"
+depends=(perl-term-readkey perl-xml-dom uudeview)
+source=(http://noisybox.net/computers/nzbperl/$pkgname-$pkgver.pl)
+md5sums=('70e64b7cd4ff9c7c098bf8dffeb62578')
+
+build() {
+ cd $startdir/src
+ install -D nzbperl-$pkgver.pl $startdir/pkg/usr/bin/nzbperl
+} \ No newline at end of file
diff --git a/abs/extra/community/projectx/PKGBUILD b/abs/extra/community/projectx/PKGBUILD
new file mode 100644
index 0000000..62092a4
--- /dev/null
+++ b/abs/extra/community/projectx/PKGBUILD
@@ -0,0 +1,45 @@
+# Contributer: Sebastian Sareyko <public@nooms.de>
+
+pkgname=projectx
+pkgver=0.90.4.00
+pkgrel=8
+license=('GPL')
+arch=('i686' 'x86_64')
+pkgdesc="DVB demux tool for repairing and analyzing different stream types"
+makedepends=('java-environment')
+depends=('java-runtime')
+url="http://sourceforge.net/projects/project-x"
+source=(http://dl.sourceforge.net/sourceforge/project-x/ProjectX_Source_eng_$pkgver.zip \
+ http://dl.sourceforge.net/sourceforge/project-x/ProjectX_LanguagePack_$pkgver.zip \
+ projectx)
+
+md5sums=('92d7b5aea50b8811307f27b6e01ceb5c'
+ 'edfe8d04bd3d403eec4d9e27d1b976d2'
+ '0c88b15884a0c997e3386d15e207cd30')
+
+build() {
+ cd $startdir/src/ProjectX_Source_0.90.4
+
+ sed -i 's,^Exec=.*,Exec=projectx,' projectx.desktop
+
+ mkdir -p build
+
+ javac -encoding "ISO-8859-1" -O -g:none \
+ -classpath lib/commons-net-1.3.0.jar:lib/jakarta-oro-2.0.8.jar \
+ -d build @sources.lst || return 1
+
+ mv resources/* ./build
+ sed -i -e 's/ReleaseNotes_0.90.1.txt/ReleaseNotes_0.90.4.txt/' htmls/index.html
+ mv htmls build
+ mv ReadMe.txt build
+ mv ReleaseNotes_0.90.4.txt build
+ jar cvfm ProjectX.jar MANIFEST.MF -C build .
+
+ install -D -m0755 $startdir/projectx $startdir/pkg/usr/bin/projectx
+ install -D -m0644 ProjectX.jar $startdir/pkg/opt/projectx/ProjectX.jar
+ install -D -m0644 lib/commons-net-1.3.0.jar \
+ $startdir/pkg/opt/projectx/lib/commons-net-1.3.0.jar
+ install -D -m0644 lib/jakarta-oro-2.0.8.jar \
+ $startdir/pkg/opt/projectx/lib/jakarta-oro-2.0.8.jar
+ install -D -m0644 projectx.desktop $startdir/pkg/usr/share/applications/projectx.desktop
+}
diff --git a/abs/extra/community/projectx/projectx b/abs/extra/community/projectx/projectx
new file mode 100644
index 0000000..1d540bc
--- /dev/null
+++ b/abs/extra/community/projectx/projectx
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ ! -d ~/.projectx ] ; then
+ mkdir ~/.projectx
+fi
+
+if [ "$#" -eq 0 ] ; then
+ cd ~/.projectx
+fi
+java -jar /opt/projectx/ProjectX.jar "$@"
diff --git a/abs/extra/community/pyxdg/PKGBUILD b/abs/extra/community/pyxdg/PKGBUILD
new file mode 100644
index 0000000..c56fd55
--- /dev/null
+++ b/abs/extra/community/pyxdg/PKGBUILD
@@ -0,0 +1,18 @@
+# $Id: PKGBUILD 16878 2008-10-23 00:28:55Z douglas $
+# Maintainer: Aaron Griffin <aarongriffin@gmail.com>
+# Contributor: Mario A. Vazquez <mario_vazq@hotmail.com>
+pkgname=pyxdg
+pkgver=0.15
+pkgrel=3
+pkgdesc="Python library to access freedesktop.org standards."
+arch=(i686 x86_64)
+url="http://freedesktop.org/Software/pyxdg"
+license=("LGPL")
+depends=('python')
+source=(http://gentoolabs.com.ar/distfiles/${pkgname}-${pkgver}.tar.gz)
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ python setup.py install --prefix=/usr --root=${startdir}/pkg || return 1
+}
+md5sums=('86a5441285fc908145414b63348d11a3')
diff --git a/abs/extra/community/screen/PKGBUILD b/abs/extra/community/screen/PKGBUILD
new file mode 100644
index 0000000..f97df4b
--- /dev/null
+++ b/abs/extra/community/screen/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 9361 2008-08-17 06:28:44Z allan $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# Committer: dorphell <dorphell@gmx.net>
+
+pkgname=screen
+pkgver=4.0.3
+pkgrel=6
+_ptygroup=5 #the UID of our PTY/TTY group
+pkgdesc="Full-screen window manager that multiplexes a physical terminal"
+license=('GPL')
+arch=('i686' 'x86_64')
+install=screen.install
+depends=(ncurses libelf shadow gpm)
+backup=('etc/screenrc' 'etc/pam.d/screen')
+url="ftp://ftp.uni-erlangen.de/pub/utilities/screen"
+source=(ftp://ftp.uni-erlangen.de/pub/utilities/screen/screen-${pkgver}.tar.gz \
+ screen.pam)
+md5sums=('8506fd205028a96c741e4037de6e3c42' '74f7919d7b65436cc2ea5341fa8ca374')
+
+build() {
+ export MAKEFLAGS="-j1"
+ cd ${startdir}/src/${pkgname}-${pkgver}
+
+ ./configure --prefix=/usr --enable-pam \
+ --with-sys-screenrc=/etc/screenrc --enable-colors256 \
+ --enable-rxvt_osc --with-pty-group=$_ptygroup \
+ --mandir=/usr/share/man
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+ mkdir -p ${startdir}/pkg/etc/pam.d
+ install -m644 ${startdir}/src/screen.pam ${startdir}/pkg/etc/pam.d/screen
+
+ cd etc/
+ mkdir -p ${startdir}/pkg/usr/share/zsh/site-functions/
+ install -m644 completer.zsh ${startdir}/pkg/usr/share/zsh/site-functions/screen
+ mkdir -p ${startdir}/pkg/etc/skel/
+ install -m644 etcscreenrc ${startdir}/pkg/etc/screenrc
+ install -m644 screenrc ${startdir}/pkg/etc/skel/.screenrc
+
+ rm -rf ${startdir}/pkg/usr/info
+}
diff --git a/abs/extra/community/screen/screen.install b/abs/extra/community/screen/screen.install
new file mode 100644
index 0000000..51bd6a7
--- /dev/null
+++ b/abs/extra/community/screen/screen.install
@@ -0,0 +1,27 @@
+
+pre_upgrade() {
+ pre_remove $*
+}
+
+pre_remove() {
+ compiled="/usr/share/terminfo/s/screen-256color"
+ if [ -e $compiled ]; then
+ if pacman -Qo $compiled 2>&1 | grep "No package owns" >/dev/null; then
+ echo -n "removing compiled terminfo..."
+ rm -f $compiled
+ echo "done."
+ fi
+ fi
+ compiled="/usr/share/terminfo/s/screen-256color-bce"
+ if [ -e $compiled ]; then
+ if pacman -Qo $compiled 2>&1 | grep "No package owns" >/dev/null; then
+ echo -n "removing compiled terminfo..."
+ rm -f $compiled
+ echo "done."
+ fi
+ fi
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/community/screen/screen.pam b/abs/extra/community/screen/screen.pam
new file mode 100644
index 0000000..07c42ad
--- /dev/null
+++ b/abs/extra/community/screen/screen.pam
@@ -0,0 +1 @@
+auth required pam_unix.so
diff --git a/abs/extra/community/smplayer/ChangeLog b/abs/extra/community/smplayer/ChangeLog
new file mode 100644
index 0000000..a40f9a4
--- /dev/null
+++ b/abs/extra/community/smplayer/ChangeLog
@@ -0,0 +1,62 @@
+2009-03-13 Allan McRae <allan@archlinux.org>
+ * smplayer 0.6.7-1
+ * Upstream update
+
+2009-01-01 Allan McRae <allan@archlinux.org>
+ * smplayer 0.6.6-1
+ * Upstream update
+
+2008-11-14 Allan McRae <allan@archlinux.org>
+ * smplayer 0.6.5.1-1
+ * Upstream update
+
+2008-10-27 Allan McRae <allan@archlinux.org>
+ * smplayer 0.6.4-1
+ * Upstream update
+
+2008-09-27 Allan McRae <allan@archlinux.org>
+ * smplayer 0.6.3-1
+ * Upstream update
+
+2008-06-21 Allan McRae <allan@archlinux.org>
+
+ * smplayer 0.6.2-1
+ * Upstream update
+ * Removed install message
+
+2008-06-21 Allan McRae <allan@archlinux.org>
+
+ * smplayer 0.6.1-1
+ * Upstream update
+ * Removed provides/conflicts/replaces
+
+2008-05-23 Eric Belanger <eric@archlinux.org>
+
+ * smplayer 0.6.0-1
+ * Upstream update
+ * Updated .install file
+
+2008-01-32 Varun Acharya <varun@archlinux.org>
+
+ * smplayer-0.5.62-1 moved to extra, thanks molok
+ * PKGBUILD cleanup
+
+2007-11-27 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * smplayer-0.5.62-1
+ * version bump
+
+2007-10-24 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * smplayer-0.5.61-1
+ * build against qt4
+ * removed post_upgrade message
+
+2007-07-12 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * smplayer-0.5.21-1
+ * version bump
+
+2007-05-30 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+ * smplayer-0.5.0-1
+ * version bump
diff --git a/abs/extra/community/smplayer/PKGBUILD b/abs/extra/community/smplayer/PKGBUILD
new file mode 100644
index 0000000..3aa1d3d
--- /dev/null
+++ b/abs/extra/community/smplayer/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 29947 2009-03-14 00:58:48Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+# Contributor: shamrok <szamrok@gmail.com>
+
+pkgname=smplayer
+pkgver=0.6.7
+pkgrel=2
+pkgdesc="A complete front-end for MPlayer"
+arch=('i686' 'x86_64')
+url="http://smplayer.sourceforge.net/"
+license=('GPL')
+depends=('qt' 'mplayer')
+source=(http://downloads.sourceforge.net/sourceforge/smplayer/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('306b99374ad89cee93f1ad6fa94dea71')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # remove broken translation
+ sed -i "s|translations/smplayer_gl.ts|#translations/smplayer_gl.ts|" src/smplayer.pro
+
+ make PREFIX=/usr || return 1
+ make PREFIX=${pkgdir}/usr install || return 1
+
+ install -dm755 ${pkgdir}/usr/share/pixmaps
+ ln -s /usr/share/icons/hicolor/64x64/apps/smplayer.png \
+ ${pkgdir}/usr/share/pixmaps/
+}
+
diff --git a/abs/extra/community/torrentflux/PKGBUILD b/abs/extra/community/torrentflux/PKGBUILD
new file mode 100644
index 0000000..2f2c9f0
--- /dev/null
+++ b/abs/extra/community/torrentflux/PKGBUILD
@@ -0,0 +1,51 @@
+# 'Maintainer': Mikko Seppälä <t-r-a-y@mbnet.fi> aka Neverth
+
+pkgname=torrentflux
+pkgver=2.4
+pkgrel=4
+pkgdesc="TorrentFlux is a free php based Torrent client that runs on a web server. Manage all of your Torrents remotely or locally."
+arch=(i686 x86_64)
+url="http://www.torrentflux.com/"
+license=(GPL)
+# You still need your favorite httpd, I do not wish to force it.
+depends=('mysql' 'php' 'python' 'pycrypto' 'transmission-cli')
+makedepends=('findutils')
+conflicts=('torrentflux2')
+backup=('opt/torrentflux/config.php')
+install=(torrentflux.install)
+source=("http://mesh.dl.sourceforge.net/sourceforge/torrentflux/${pkgname}_${pkgver}.tar.gz" "torrentflux.install")
+md5sums=('8fdc3952bc2ece9f10bcee299b2aeb16' 'f14ebd47dd41c7949411973c2f74f4fd')
+
+build()
+{
+ cd $startdir/src/${pkgname}_${pkgver}
+ install -d $startdir/pkg/opt/torrentflux
+
+ # This thing is compressed in windows? fix permissions later..
+ cp -R html/* $startdir/pkg/opt/torrentflux/
+ cp -R sql $startdir/pkg/opt/torrentflux
+
+ cd $startdir/pkg
+ # Our group
+ chgrp -R daemon opt/torrentflux
+ chmod -R 775 opt/torrentflux
+
+ # Our mysqluser, we dont want root here :p
+ sed -re 's/root/torrentfluxie/' -i opt/torrentflux/config.php
+
+ cd opt/torrentflux
+ # Permissions...
+ find ./ -name \*php -exec chmod 444 '{}' \;
+ find ./ -name \*png -exec chmod 444 '{}' \;
+ find ./ -name \*gif -exec chmod 444 '{}' \;
+ # They dont want to read this
+ chmod 660 config.php
+ chmod 444 favicon.ico dtree.css *.js blank.html TF_BitTornado/index.html images/*{gif,png,ico,html} searchEngines/* themes/index.html downloads/index.html
+ # We dont touch to adodb, leave it for customizer, as so we leave subdirs for now
+
+ # Upgrade files
+ install -D -m444 $startdir/src/${pkgname}_${pkgver}/upgrades/upgrade21_22.php $startdir/pkg/opt/torrentflux/upgradeflux21_22.php
+ install -D -m444 $startdir/src/${pkgname}_${pkgver}/upgrades/upgrade22_23.php $startdir/pkg/opt/torrentflux/upgradeflux22_23.php
+ install -D -m444 $startdir/src/${pkgname}_${pkgver}/upgrades/upgrade23_24.php $startdir/pkg/opt/torrentflux/upgradeflux23_24.php
+}
+
diff --git a/abs/extra/community/torrentflux/torrentflux.install b/abs/extra/community/torrentflux/torrentflux.install
new file mode 100644
index 0000000..2aa50aa
--- /dev/null
+++ b/abs/extra/community/torrentflux/torrentflux.install
@@ -0,0 +1,60 @@
+post_install() {
+ cat << EOF
+OK. So youre about to install torrentflux? Postgresql and mysql are supported.
+Instructions are for mysql so lets use it? ok?
+Remove mysql from depencies if you dont like.
+(mysqlcommands might need '-u root -p' depending on your setup)
+
+1. You need to create mysql database for it
+mysqladmin create torrentflux
+(eg. 'mysqladmin -u root -p create torrentflux' if needed)
+
+2. Load the script that creates tables and such
+(.sql files for postgresql are here too!)
+mysql torrentflux < /opt/torrentflux/sql/mysql_torrentflux.sql
+
+3. Edit the config.php located in /opt/torrentflux/html
+
+4. Point your fav http server to use this,
+(eg. use vhosts for apache or create symlink to /opt/torrentflux from
+somewhere that http server can access)
+
+5. Our database user is "torrentfluxie"
+(use mysql_setpermission to give rights for him)
+mysql_setpermission -u mysqlroot
+hit 5 in menu and choose torrentflux as database
+give torrentfluxie as user and give password if you want
+(if you do this, you need to set the password to /opt/torrentflux/config.php:
+$cfg["db_pass"] = "yourpass";)
+localhost is good choice for host
+(we dont need password always if we got private comp)
+
+6. Safemode must be off in php.ini (/etc/php.ini)
+
+httpd server must support php and mysql, you can look for archwiki
+if you dont know howto enable them.
+Notice that the httpd server should belong to daemon group
+(one way or another)
+EOF
+}
+
+post_upgrade() {
+ cat << EOF
+To upgrade your database, use files in /opt/torrentflux/
+(eg for 2.2 -> 2.4 go from browser to http://yourtorrentfuxdomain.and.path/upgradeflux22_23.php
+and do the same on upgradeflux23_24.php file)
+All your old information should stay trough the upgrades
+When it tells you to remove the files, just chmod them to 000 and they will not harm.
+EOF
+}
+
+pre_remove() {
+ /bin/echo "Remember to remove mysql tables if you want :p"
+ /bin/echo "mysqladmin -f drop torrentflux"
+ /bin/echo "(remeber -u root -p, hope it worked)"
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/extra/community/transmission-cli/ChangeLog b/abs/extra/community/transmission-cli/ChangeLog
new file mode 100644
index 0000000..57a8a01
--- /dev/null
+++ b/abs/extra/community/transmission-cli/ChangeLog
@@ -0,0 +1,60 @@
+2008-12-27 Alexander Fehr <pizzapunk gmail com>
+
+ * transmission-cli-1.42-1:
+ New upstream release.
+
+2008-11-26 Alexander Fehr <pizzapunk gmail com>
+
+ * transmission-cli-1.40-1:
+ New upstream release.
+ Enabled web client.
+
+2008-09-17 Alexander Fehr <pizzapunk gmail com>
+
+ * transmission-cli-1.34-1:
+ New upstream release.
+
+2008-08-23 Alexander Fehr <pizzapunk gmail com>
+
+ * transmission-cli-1.33-1:
+ New upstream release.
+
+2008-08-09 Alexander Fehr <pizzapunk gmail com>
+
+ * transmission-cli-1.32-1:
+ New upstream release.
+
+2008-08-07 Alexander Fehr <pizzapunk gmail com>
+
+ * transmission-cli-1.31-1:
+ New upstream release.
+ Replaced transmission-remote -q with kill in init script.
+ Removed install message on upgrade.
+
+2008-07-20 Alexander Fehr <pizzapunk gmail com>
+
+ * transmission-cli-1.22-1:
+ New upstream release.
+ Renamed from transmission to transmission-cli.
+ New maintainer.
+ Split out GTK+ GUI into transmission-gtk.
+ Changed url.
+ Added make dependency on intltool.
+ Cleaned up init script.
+ Cleaned up install file.
+
+2008-01-07 Varun Acharya <varun@archlinux.org>
+
+ * transmission-1.00-1:
+ Adopted and moved to extra.
+
+2007-06-26 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * transmission-0.72-4:
+ I had to use gentoo's sources because the tarball provided by the official site is broken.
+ transmission-{daemon,remote} are back.
+
+2007-06-19 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * transmission-0.72-3:
+ Rebuild against libevent-1.3b.
diff --git a/abs/extra/community/transmission-cli/PKGBUILD b/abs/extra/community/transmission-cli/PKGBUILD
new file mode 100644
index 0000000..a3791fc
--- /dev/null
+++ b/abs/extra/community/transmission-cli/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 23076 2009-01-02 11:33:41Z alexanderf $
+# Maintainer: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+pkgname=transmission-cli
+pkgver=1.42
+pkgrel=1
+pkgdesc="Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)"
+arch=('i686' 'x86_64')
+url="http://www.transmissionbt.com/"
+license=('MIT')
+depends=('curl')
+makedepends=('intltool')
+replaces=('transmission')
+backup=('etc/conf.d/transmissiond')
+install=transmission-cli.install
+source=(http://mirrors.m0k.org/transmission/files/transmission-$pkgver.tar.bz2
+ transmissiond
+ transmissiond.conf)
+md5sums=('c083bdcb01426466e80ee339bccd9351'
+ 'e2326d412e25b4449ff663a5d4015e1a'
+ '7b019a710493ec4f8b54a1f528e1981d')
+
+build() {
+ cd "$srcdir/transmission-$pkgver"
+
+ ./configure --prefix=/usr --disable-gtk --disable-wx || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -D -m755 "$srcdir/transmissiond" "$pkgdir/etc/rc.d/transmissiond" || return 1
+ install -D -m644 "$srcdir/transmissiond.conf" "$pkgdir/etc/conf.d/transmissiond" || return 1
+
+ install -D -m644 COPYING "$pkgdir/usr/share/licenses/transmission-cli/COPYING" || return 1
+}
diff --git a/abs/extra/community/transmission-cli/transmission-cli.install b/abs/extra/community/transmission-cli/transmission-cli.install
new file mode 100644
index 0000000..cb6bf60
--- /dev/null
+++ b/abs/extra/community/transmission-cli/transmission-cli.install
@@ -0,0 +1,9 @@
+post_install() {
+ cat << _EOF
+
+ If you want to run the Transmission daemon at boot,
+ add transmissiond to the DAEMONS array in /etc/rc.conf.
+ You have to set the user in /etc/conf.d/transmissiond.
+
+_EOF
+}
diff --git a/abs/extra/community/transmission-cli/transmissiond b/abs/extra/community/transmission-cli/transmissiond
new file mode 100644
index 0000000..b2c9322
--- /dev/null
+++ b/abs/extra/community/transmission-cli/transmissiond
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/transmissiond
+
+PID=`pidof -o %PPID /usr/bin/transmission-daemon`
+case "$1" in
+ start)
+ stat_busy "Starting Transmission Daemon"
+ [ -z "$PID" ] && su -l -c "/usr/bin/transmission-daemon" $TRANS_USER
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon transmissiond
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Transmission Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon transmissiond
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/community/transmission-cli/transmissiond.conf b/abs/extra/community/transmission-cli/transmissiond.conf
new file mode 100644
index 0000000..8f1275b
--- /dev/null
+++ b/abs/extra/community/transmission-cli/transmissiond.conf
@@ -0,0 +1 @@
+TRANS_USER=""
diff --git a/abs/extra/community/tre/PKGBUILD b/abs/extra/community/tre/PKGBUILD
new file mode 100644
index 0000000..b7d82eb
--- /dev/null
+++ b/abs/extra/community/tre/PKGBUILD
@@ -0,0 +1,19 @@
+# Contributor: Igor Galic<i.galic@gmail.com>
+# Maintainer: Stefan Husmann <stefan-husmann@t-online.de
+pkgname=tre
+pkgver=0.7.5
+pkgrel=4
+arch=('i686' 'x86_64')
+pkgdesc="POSIX compliant regexp matching library. It includes agrep for aproximate (fuzzy) grepping."
+url="http://laurikari.net/tre/index.html"
+license=('GPL')
+source=(http://laurikari.net/tre/$pkgname-$pkgver.tar.bz2)
+md5sums=('e72e5c94008865cf720992a0b25d6e89')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --enable-static || return 1
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+}
+
diff --git a/abs/extra/community/unrar/PKGBUILD b/abs/extra/community/unrar/PKGBUILD
new file mode 100644
index 0000000..6b68616
--- /dev/null
+++ b/abs/extra/community/unrar/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 18913 2008-11-10 11:16:31Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: dorphell <dorphell@gmx.net>
+
+pkgname=unrar
+pkgver=3.8.5
+pkgrel=1
+pkgdesc="The RAR uncompression program"
+arch=('i686' 'x86_64')
+depends=('gcc-libs')
+url="http://rarlab.com"
+license=('custom')
+replaces=('rar')
+source=(http://www.rarlab.com/rar/unrarsrc-${pkgver}.tar.gz)
+md5sums=('875688e6a144a3f75d2a6a0da3e43f8b')
+
+build() {
+ cd ${srcdir}/${pkgname}
+ make -f makefile.unix
+ install -Dm755 unrar ${pkgdir}/usr/bin/unrar
+ # install license
+ install -Dm644 license.txt ${pkgdir}/usr/share/licenses/$pkgname/license.txt
+}
diff --git a/abs/extra/community/unrar/unrar-3.5.2-optimalization-fix.patch b/abs/extra/community/unrar/unrar-3.5.2-optimalization-fix.patch
new file mode 100644
index 0000000..2ed2e6e
--- /dev/null
+++ b/abs/extra/community/unrar/unrar-3.5.2-optimalization-fix.patch
@@ -0,0 +1,12 @@
+diff -Naur unrar.orig/makefile.unix unrar/makefile.unix
+--- unrar.orig/makefile.unix 2005-05-27 21:53:56.000000000 +0000
++++ unrar/makefile.unix 2005-05-27 21:54:16.000000000 +0000
+@@ -7,7 +7,7 @@
+
+ # Linux using GCC
+ CXX=g++
+-CXXFLAGS=-O2
++CXXFLAGS=${CFLAGS}
+ DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ STRIP=strip
+
diff --git a/abs/extra/community/uudeview/PKGBUILD b/abs/extra/community/uudeview/PKGBUILD
new file mode 100644
index 0000000..cdb3a81
--- /dev/null
+++ b/abs/extra/community/uudeview/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD,v 1.5 2008/09/23 12:49:17 sergej Exp $
+# Maintainer: Sergej Pupykin <sergej@aur.archlinux.org>
+# Maintainer: kmaster <kmaster12@sasktel.net>
+
+pkgname=uudeview
+pkgver=0.5.20
+pkgrel=6
+pkgdesc="UUDeview helps transmitting & recieving binary files using mail or newsgroups. Includes library files."
+arch=('i686' 'x86_64')
+url="http://www.fpx.de/fp/Software/UUDeview/"
+license=('GPL')
+optdepends=('tk: for GUI')
+source=(http://www.fpx.de/fp/Software/UUDeview/download/$pkgname-$pkgver.tar.gz)
+md5sums=('0161abaec3658095044601eae82bbc5b')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make prefix=$startdir/pkg/usr install || return 1
+ mkdir -p $startdir/pkg/usr/lib/uudeview && \
+ mkdir -p $startdir/pkg/usr/include/uudeview || return 1
+
+ cd $startdir/src/uudeview-$pkgver/uulib
+ ./configure --prefix=/usr
+ make || return 1
+ cp -v *.o $startdir/pkg/usr/lib/uudeview && \
+ cp -v *.a $startdir/pkg/usr/lib/uudeview && \
+ cp -v *.h $startdir/pkg/usr/include/uudeview
+}
diff --git a/abs/extra/community/vlc/PKGBUILD b/abs/extra/community/vlc/PKGBUILD
new file mode 100644
index 0000000..77e21f7
--- /dev/null
+++ b/abs/extra/community/vlc/PKGBUILD
@@ -0,0 +1,71 @@
+# $Id: PKGBUILD 24027 2009-01-11 23:38:33Z eric $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
+
+pkgname=vlc
+pkgver=0.9.8a
+pkgrel=4
+pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
+arch=('i686' 'x86_64')
+url="http://www.videolan.org/vlc/"
+license=('GPL2')
+depends=('libmad' 'libmpeg2' 'ffmpeg>=20081220' 'x264>=20090108' 'fluidsynth' \
+ 'libdvbpsi' 'fribidi' 'sysfsutils' 'libdvdnav' \
+ 'libmatroska' 'zvbi' 'libdvdread' 'libmpcdec' \
+ 'libdca' 'libxml2' 'lirc-utils' 'libcddb' 'libraw1394' \
+ 'smbclient' 'taglib' 'libmodplug' 'avahi' 'libv4l' \
+ 'sdl_image' 'libshout' 'lua' 'qt' 'a52dec' 'libgcrypt')
+makedepends=('pkgconfig' 'live-media>=2008.09.02')
+optdepends=('libnotify')
+options=('!libtool' 'force')
+source=(http://download.videolan.org/pub/videolan/vlc/${pkgver}/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('8ffa2ff763badd5de7592004d8d69a63')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ sed -i -e 's:#include <vlc\/vlc.h>:#include <vlc/vlc.h> \n #include <locale.h>: ' modules/misc/freetype.c
+ sed -i -e 's:/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf:/usr/share/fonts/TTF/VeraBd.ttf:' modules/misc/freetype.c
+ [ "${CARCH}" = "i686" ] && EXTRAFEATURES="--enable-loader --enable-live555 --with-live555-tree=/usr/lib/live-media"
+ [ "${CARCH}" = "x86_64" ] && EXTRAFEATURES="--enable-fast-install"
+ ./configure --prefix=/usr \
+ --enable-dvdread \
+ --enable-dvdnav \
+ --enable-madi \
+ --enable-ffmpeg \
+ --disable-rpath \
+ --enable-qt4 \
+ --enable-faad \
+ --enable-alsa \
+ --enable-skins2 \
+ --enable-dvb \
+ --enable-dmo \
+ --with-ffmpeg-faac \
+ --with-ffmpeg-vorbis \
+ --with-ffmpeg-dts \
+ --with-ffmpeg-ogg \
+ --with-ffmpeg-theora \
+ --enable-v4l \
+ --enable-theora \
+ --enable-flac \
+ --enable-snapshot \
+ --enable-hal \
+ --enable-dbus \
+ --enable-ogg \
+ --enable-dbus-control \
+ --enable-shared \
+ --enable-nls \
+ --enable-lirc \
+ --enable-shout \
+ --enable-pvr \
+ --enable-release \
+ --program-suffix= \
+ --with-dv-raw1394=/usr/include/libraw1394 ${EXTRAFEATURES} || return 1
+ make || return 1
+ make DESTDIR=${pkgdir}/ install || return 1
+
+ for res in 16 32 48 128; do
+ install -D -m644 ${srcdir}/vlc-${pkgver}/share/vlc${res}x${res}.png \
+ ${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png || return 1
+ done
+ rm -rf ${pkgdir}/usr/lib/mozilla
+}
diff --git a/abs/extra/community/vsftpd/PKGBUILD b/abs/extra/community/vsftpd/PKGBUILD
new file mode 100644
index 0000000..32a4007
--- /dev/null
+++ b/abs/extra/community/vsftpd/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id: PKGBUILD 29700 2009-03-11 22:18:56Z hugo $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=vsftpd
+pkgver=2.1.0
+pkgrel=4
+pkgdesc="Very Secure FTP daemon"
+arch=('i686' 'x86_64')
+license=('GPL')
+backup=(etc/vsftpd.conf etc/xinetd.d/vsftpd)
+url="http://vsftpd.beasts.org/"
+#makedepends=('vim')
+depends=('glibc' 'pam' 'tcp_wrappers>=7.6-8' 'openssl>=0.9.8j-1' 'libcap>=2.16')
+install=vsftpd.install
+source=(ftp://vsftpd.beasts.org/users/cevans/vsftpd-$pkgver.tar.gz \
+ vsftpd.xinetd vsftpd.d run)
+md5sums=('7890b54e7ffa6106ffbdfda53f47fa41'
+ 'b07fd4609c70063c1d6b20142910c1a6'
+ 'e46ed8e4c4a6e6a3de59f60b98e4f569'
+ '8abbed7cc75f9a9d2944e0e83c8dd90d')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ # build-time config
+ sed \
+ -e 's|^#undef VSF_BUILD_TCPWRAPPERS$|#define VSF_BUILD_TCPWRAPPERS|' \
+ -e 's|^#undef VSF_BUILD_SSL$|#define VSF_BUILD_SSL|' \
+ -i builddefs.h
+ make CFLAGS="${CFLAGS}" || return 1
+ install -D -m755 vsftpd ${pkgdir}/usr/sbin/vsftpd || return 1
+ install -D -m644 vsftpd.conf ${pkgdir}/etc/vsftpd.conf || return 1
+ install -D -m644 vsftpd.8 ${pkgdir}/usr/share/man/man8/vsftpd.8 || return 1
+ install -D -m644 vsftpd.conf.5 ${pkgdir}/usr/share/man/man5/vsftpd.conf.5 || return 1
+ install -D -m644 ../vsftpd.xinetd ${pkgdir}/etc/xinetd.d/vsftpd || return 1
+ install -D -m755 ../vsftpd.d ${pkgdir}/etc/rc.d/vsftpd || return 1
+ mkdir -p $startdir/pkg/usr/share/empty
+# ex ${pkgdir}/etc/vsftpd.conf <<_EOF
+#2
+#i
+##
+## Use this to use vsftpd in standalone mode, otherwise it runs through (x)inetd
+##listen=YES
+#.
+#w
+#q
+#_EOF
+#}
+# Below added for LinHES
+ mkdir -p $startdir/pkg/etc/sv/vsftpd/supervise
+ install -D -m755 $startdir/src/run $startdir/pkg/etc/sv/vsftpd/
+}
diff --git a/abs/extra/community/vsftpd/run b/abs/extra/community/vsftpd/run
new file mode 100644
index 0000000..1fd5202
--- /dev/null
+++ b/abs/extra/community/vsftpd/run
@@ -0,0 +1,13 @@
+#!/bin/sh
+exec 2>&1
+. /etc/profile
+. /etc/systemconfig
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+stat_runit "Starting VSFTPD"
+export HOME=/root
+
+# Start vsftpd
+/usr/sbin/vsftpd /etc/vsftpd.conf
diff --git a/abs/extra/community/vsftpd/vsftpd.d b/abs/extra/community/vsftpd/vsftpd.d
new file mode 100644
index 0000000..b43a6d0
--- /dev/null
+++ b/abs/extra/community/vsftpd/vsftpd.d
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/vsftpd`
+case "$1" in
+ start)
+ stat_busy "Starting vsftpd FTP Daemon"
+ if [ -z "$PID" ]; then
+ /usr/sbin/vsftpd &
+ PID=`pidof -o %PPID /usr/sbin/vsftpd`
+ if [ -z $PID ]; then
+ stat_fail
+ else
+ add_daemon vsftpd
+ stat_done
+ fi
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping vsftpd FTP Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon vsftpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/abs/extra/community/vsftpd/vsftpd.install b/abs/extra/community/vsftpd/vsftpd.install
new file mode 100644
index 0000000..3bbb2cc
--- /dev/null
+++ b/abs/extra/community/vsftpd/vsftpd.install
@@ -0,0 +1,22 @@
+# arg 1: the new package version
+post_install() {
+ if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then
+ echo ">>> It appears that your current kernel has linux security"
+ echo ">>> capabilities built as a module. vsftpd requires this"
+ echo ">>> functionality to operate."
+ echo ">>>"
+ echo ">>> To activate the module, please load it now (modprobe capability)."
+ echo ">>> Also, you should add it to your MODULES array in rc.conf, so"
+ echo ">>> it will be activated automatically at boot-up."
+ fi
+# Below added for LinHES
+ add_service.sh vsftpd
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ remove_service.sh vsftpd
+}
diff --git a/abs/extra/community/vsftpd/vsftpd.xinetd b/abs/extra/community/vsftpd/vsftpd.xinetd
new file mode 100644
index 0000000..eff2eb3
--- /dev/null
+++ b/abs/extra/community/vsftpd/vsftpd.xinetd
@@ -0,0 +1,10 @@
+service ftp
+{
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/vsftpd
+ log_on_success += HOST DURATION
+ log_on_failure += HOST
+ disable = yes
+}
diff --git a/abs/extra/community/wiiuse/PKGBUILD b/abs/extra/community/wiiuse/PKGBUILD
new file mode 100644
index 0000000..d8b1e2b
--- /dev/null
+++ b/abs/extra/community/wiiuse/PKGBUILD
@@ -0,0 +1,26 @@
+#Contributor:Andrea Tarocchi <valdar@email.it>
+pkgname=wiiuse
+pkgver=0.12
+pkgrel=2
+pkgdesc="Wiiuse is a library written in C that connects with several Nintendo Wii remotes."
+arch=(i686 x86_64)
+url="http://wiiuse.sourceforge.net/"
+depends=('bluez')
+license="GPL3"
+install=wiiuse.install
+postfix=_src.tar.gz
+source=(http://downloads.sourceforge.net/sourceforge/wiiuse/wiiuse_v$pkgver\_src.tar.gz)
+
+md5sums=('29b555096f79dbd3fbc9b96b8d443083')
+
+build() {
+ cd $startdir/src/wiiuse_v$pkgver
+ make wiiuse || return 1
+
+#installing
+ mkdir -p $startdir/pkg/usr/lib
+ mkdir -p $startdir/pkg/usr/include
+
+ install -D -m644 ./src/release-`gcc -v 2>&1|grep ^Target:|cut -d' ' -f2`/libwiiuse.so $startdir/pkg/usr/lib
+ install -D -m644 ./src/wiiuse.h $startdir/pkg/usr/include
+}
diff --git a/abs/extra/community/wiiuse/wiiuse.install b/abs/extra/community/wiiuse/wiiuse.install
new file mode 100644
index 0000000..d856696
--- /dev/null
+++ b/abs/extra/community/wiiuse/wiiuse.install
@@ -0,0 +1,17 @@
+# arg 1: the new package version
+post_install() {
+cat << EOF
+Note:
+==> for using this lib in your projects include wiiuse.h and link against libwiiuse.so
+EOF
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+op=$1
+shift
+$op $* \ No newline at end of file
diff --git a/abs/extra/community/xbmc-svn/CHANGELOG b/abs/extra/community/xbmc-svn/CHANGELOG
new file mode 100644
index 0000000..ddcbd53
--- /dev/null
+++ b/abs/extra/community/xbmc-svn/CHANGELOG
@@ -0,0 +1,110 @@
+xbmc-svn Change log:
+--------------------
+2nd July 2009
+21333 haggy: updated to current svn head which has media flagging support if your skin
+ supports it (the shipped PM3HD does already, also Aeon and MediaStream redux)
+
+3rd June 2009
+20896 haggy: enabled external libs for every lib supported despite python and ffmpeg
+ enabling external python breaks python support in xbmc due to Arch's python
+ compiled with UCS2 support whereas xbmc expects UCS4. Enabling external ffmpeg
+ disables VDPAU and we don't want that for sure.
+
+ IMPORTANT NOTE: If compilation breaks at configure step with some message about
+ not being able to compute the size of int or size_t, try running makepkg as root
+ with 'sudo makepkg --asroot'. This is a known issue and happens only on systems
+ linked to nvidia's libgl which causes binaries to segfault within a fakeroot
+ environment. pacman 3.3 will fix this by splitting configure and installation steps.
+
+1st June 2009
+20818 haggy: this is the last revision before external-libs-support got patched
+ in. Unfortunately this will not compile with fakeroot. waiting for
+ pacman 3.3 which can split up configure and make install steps.
+
+30th May 2009
+20793 haggy: removed gcc44-fixes.patch - got merged into svn
+
+29th May 2009
+20755 haggy: pushed rev as requested
+
+27th May 2009
+20705 haggy: added a patch which fixed compilation with GCC 4.4.
+
+21th May 2009
+20509 haggy: xbmc got updates on goom due to the jaunty build system update. i
+ i wiped all goom specific hacks from the PKGBUILD and it compiled
+ fine, so let's see what you guys achieve.
+
+19th May 2009
+20449-1 richy: 1. Removed the autoreconf line as it didn't seem to help
+ 2. Added !makeflags
+ 3. Rev push :-)
+
+16th May 2009
+20343-1 richy: 1. added python as a depenency and removed x-server (namcap advised),
+ 2. added autoreconf to goom before aclocal - another pot-shot at the goom compile prob.
+ 3. added flax and bison to makedepends - I thought they were implicitely provided, but
+ some users didn't have them.
+ 4. Rev push to 20343
+ 5. Removed the --quiet flag form SVN for now as sourcforge was timing out and
+ failing silently.
+
+ Note: namcap advised a number of other changes which I ignored for now.
+
+15th May 2009
+20231-3 - haggy: added libsamplerate as a dependency, it is needed for the recent smoothvideo patches
+
+14th May 2009
+20231-2 - haggy: another shot in the dark to fix that damn goom compilation error
+
+13th May 2009
+20231 - haggy: smoothvideo!
+
+12th May 2009
+20172 - haggy: a shot in the dark: try another autoreconf inside goom and see if it helps.
+
+11th May 2009
+20149 - haggy: pushed rev, removed 'hitting-o-breaks...'-patch - it got fixed in svn
+
+9th May 2009
+20101 - haggy: an updated PM3 skin made it into xbmc. added conflicts hint to this PKGBUILD
+
+8th May 2009
+20059 - haggy: minor push past 9.04, removed copying the source tree to a build tree which wastes space,
+ takes ages and stresses the hdd for no reason. instead we now use svn to revert to a
+ clean build dir.
+
+5th May 2009
+19941 - rich: heaps more tickets closed, Mexican translation
+
+30th April 2009
+19841 - haggy: lots of closed tickets worth a release, removed xsession patch
+
+27th April 2009
+19753 - haggy: added patch for xsession file breaking installation into fakeroot.
+
+22nd April 2009
+19602 - richy: version bump to address problem with python scripts and plugins
+
+20th April 2009
+19550 - haggy: pushed rev, some .mov fixes and better i18n in xbmc
+
+17th April 2009
+19517 - haggy: pushed rev, re-added installfile
+19516-2- richy: Added back autoreconf -vif in libdvdcss - still required for some folk (me)
+19516 - haggy: pushed rev, moved patches to patchfiles, added 'safe fullscreen patch', several cleanups
+
+15th April 2009
+19484 - haggy: pushed rev, re-enabled MAKEFLAGS to allow a more streamlined package
+
+14th April 2009
+19463 - haggy: added install file
+19463 - richy: moved _svn* back inside build() on Haggy's suggestion. Let's try and avoid broken releases!
+19463 - richy: makedepends 'subversion' instead of 'svn' because that's what's in the guidelines
+19463 - richy: changed licens from ('GPL' 'custom') to ('GPL', 'LGPL') - See: http://xbmc.org/about/
+
+13th April 2009 - initial upload to AUR, tested on 32bit and 64bit.
+19444 - richy: Moved _svn* outside of build so that users get the latest SVN.
+19444 - richy: Added a symlink for XBMCtex to usr/bin/XBMCtex
+19444 - richy: Moved libcdio into depends from opt-depends - right now it is a dependency.
+
diff --git a/abs/extra/community/xbmc-svn/Lircmap.xml b/abs/extra/community/xbmc-svn/Lircmap.xml
new file mode 100644
index 0000000..600567f
--- /dev/null
+++ b/abs/extra/community/xbmc-svn/Lircmap.xml
@@ -0,0 +1,233 @@
+<!-- This file contains the mapping of LIRC keys to XBMC keys used in Keymap.xml -->
+<!-- -->
+<!-- How to add remotes -->
+<!-- <remote device="name_Lirc_calls_the_remote"> -->
+<!-- -->
+<!-- For the commands the layout following layout is used -->
+<!-- <XBMC_COMMAND>LircButtonName</XBMC_COMMAND> -->
+<!-- -->
+<!-- For a list of XBMC_COMMAND's check out the <remote> sections of keymap.xml -->
+
+<lircmap>
+ <remote device="mceusb">
+ <pause>Pause</pause>
+ <stop>Stop</stop>
+ <forward>Forward</forward>
+ <reverse>Rewind</reverse>
+ <left>Left</left>
+ <right>Right</right>
+ <up>Up</up>
+ <down>Down</down>
+ <select>OK</select>
+ <pageplus>ChanUp</pageplus>
+ <pageminus>ChanDown</pageminus>
+ <back>Back</back>
+ <menu>PreviousMenu</menu>
+ <title>Play</title>
+ <info>More</info>
+ <skipplus>Skip</skipplus>
+ <skipminus>Replay</skipminus>
+ <display>Teletext</display>
+ <start>Home</start>
+ <record>Record</record>
+ <volumeplus>VolUp</volumeplus>
+ <volumeminus>VolDown</volumeminus>
+ <mute>Mute</mute>
+ <power>Power</power>
+ <myvideo>Videos</myvideo>
+ <mymusic>Music</mymusic>
+ <mypictures>Pictures</mypictures>
+ <mytv>TV</mytv>
+ <one>One</one>
+ <two>Two</two>
+ <three>Three</three>
+ <four>Four</four>
+ <five>Five</five>
+ <six>Six</six>
+ <seven>Seven</seven>
+ <eight>Eight</eight>
+ <nine>Nine</nine>
+ <zero>Zero</zero>
+ <mytv>Red</mytv>
+ <mymusic>Green</mymusic>
+ <mypictures>Yellow</mypictures>
+ <myvideo>Blue</myvideo>
+ </remote>
+
+ <remote device="mceusb2">
+ <pause>Pause</pause>
+ <stop>Stop</stop>
+ <forward>Forward</forward>
+ <reverse>Rewind</reverse>
+ <left>Left</left>
+ <right>Right</right>
+ <up>Up</up>
+ <down>Down</down>
+ <select>OK</select>
+ <pageplus>ChanUp</pageplus>
+ <pageminus>ChanDown</pageminus>
+ <back>Back</back>
+ <menu>PreviousMenu</menu>
+ <title>Play</title>
+ <info>More</info>
+ <skipplus>Skip</skipplus>
+ <skipminus>Replay</skipminus>
+ <display>Teletext</display>
+ <start>Home</start>
+ <record>Record</record>
+ <volumeplus>VolUp</volumeplus>
+ <volumeminus>VolDown</volumeminus>
+ <mute>Mute</mute>
+ <power>Power</power>
+ <myvideo>Videos</myvideo>
+ <mymusic>Music</mymusic>
+ <mypictures>Pictures</mypictures>
+ <mytv>TV</mytv>
+ <one>One</one>
+ <two>Two</two>
+ <three>Three</three>
+ <four>Four</four>
+ <five>Five</five>
+ <six>Six</six>
+ <seven>Seven</seven>
+ <eight>Eight</eight>
+ <nine>Nine</nine>
+ <zero>Zero</zero>
+ <mytv>Red</mytv>
+ <mymusic>Green</mymusic>
+ <mypictures>Yellow</mypictures>
+ <myvideo>Blue</myvideo>
+ </remote>
+
+ <remote device="XboxDVDDongle">
+ <play>PLAY</play>
+ <pause>PAUSE</pause>
+ <stop>STOP</stop>
+ <forward>FORWARD</forward>
+ <reverse>REVERSE</reverse>
+ <left>LEFT</left>
+ <right>RIGHT</right>
+ <up>UP</up>
+ <down>DOWN</down>
+ <select>SELECT</select>
+ <back>BACK</back>
+ <menu>MENU</menu>
+ <title>TITLE</title>
+ <info>INFO</info>
+ <skipplus>SKIP+</skipplus>
+ <skipminus>SKIP-</skipminus>
+ <display>DISPLAY</display>
+ <one>1</one>
+ <two>2</two>
+ <three>3</three>
+ <four>4</four>
+ <five>5</five>
+ <six>6</six>
+ <seven>7</seven>
+ <eight>8</eight>
+ <nine>9</nine>
+ <zero>0</zero>
+ </remote>
+
+ <remote device="Microsoft_Xbox">
+ <play>PLAY</play>
+ <pause>PAUSE</pause>
+ <stop>STOP</stop>
+ <forward>FORWARD</forward>
+ <reverse>REVERSE</reverse>
+ <left>LEFT</left>
+ <right>RIGHT</right>
+ <up>UP</up>
+ <down>DOWN</down>
+ <select>SELECT</select>
+ <back>BACK</back>
+ <menu>MENU</menu>
+ <title>TITLE</title>
+ <info>INFO</info>
+ <skipplus>SKIP+</skipplus>
+ <skipminus>SKIP-</skipminus>
+ <display>DISPLAY</display>
+ <one>1</one>
+ <two>2</two>
+ <three>3</three>
+ <four>4</four>
+ <five>5</five>
+ <six>6</six>
+ <seven>7</seven>
+ <eight>8</eight>
+ <nine>9</nine>
+ <zero>0</zero>
+ </remote>
+
+ <remote device="PinnacleSysPCTVRemote">
+ <play>Play</play>
+ <pause>pause</pause>
+ <stop>Stop</stop>
+ <forward>FForward</forward>
+ <reverse>Rewind</reverse>
+ <left>Vol-Rew</left>
+ <right>Vol+FF</right>
+ <up>Chan+Play</up>
+ <down>Chan-Stop</down>
+ <pageplus>channel+</pageplus>
+ <pageminus>channel-</pageminus>
+ <select>middle</select>
+ <back>undo</back>
+ <menu>Menu</menu>
+ <title>L</title>
+ <info>Info</info>
+ <skipplus>next</skipplus>
+ <display>Fullscreen</display>
+ <record>Record</record>
+ <volumeplus>vol+</volumeplus>
+ <volumeminus>vol-</volumeminus>
+ <mute>Mute</mute>
+ <power>Power</power>
+ <one>1</one>
+ <two>2</two>
+ <three>3</three>
+ <four>4</four>
+ <five>5</five>
+ <six>6</six>
+ <seven>7</seven>
+ <eight>8</eight>
+ <nine>9</nine>
+ <zero>0</zero>
+ </remote>
+
+ <remote device="Streamzap_PC_Remote">
+ <play>PLAY</play>
+ <pause>PAUSE</pause>
+ <stop>STOP</stop>
+ <forward>&gt;&gt;</forward>
+ <reverse>&lt;&lt;</reverse>
+ <left>LEFT</left>
+ <right>RIGHT</right>
+ <up>UP</up>
+ <down>DOWN</down>
+ <pageplus>CH_UP</pageplus>
+ <pageminus>CH_DOWN</pageminus>
+ <select>OK</select>
+ <back>EXIT</back>
+ <menu>MENU</menu>
+ <title>RED</title>
+ <info>GREEN</info>
+ <skipplus>&gt;&gt;|</skipplus>
+ <display>YELLOW</display>
+ <record>RECORD</record>
+ <volumeplus>VOL_UP</volumeplus>
+ <volumeminus>VOL_DOWN</volumeminus>
+ <mute>MUTE</mute>
+ <power>POWER</power>
+ <one>1</one>
+ <two>2</two>
+ <three>3</three>
+ <four>4</four>
+ <five>5</five>
+ <six>6</six>
+ <seven>7</seven>
+ <eight>8</eight>
+ <nine>9</nine>
+ <zero>0</zero>
+ </remote>
+</lircmap>
diff --git a/abs/extra/community/xbmc-svn/PKGBUILD b/abs/extra/community/xbmc-svn/PKGBUILD
new file mode 100644
index 0000000..45d6671
--- /dev/null
+++ b/abs/extra/community/xbmc-svn/PKGBUILD
@@ -0,0 +1,139 @@
+# Contributors : Richard Atkinson atkinsonr-at-gmail
+# Ralf Barth <archlinux dot org at haggy dot org>
+#
+# Original credits go to Edgar Hucek <gimli at dark-green dot com>
+# for his xbmc-vdpau-vdr PKGBUILD at https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-vdpau-vdr/PKGBUILD
+
+pkgname=xbmc-svn
+pkgver=21748
+pkgrel=1
+pkgdesc="XBMC Media Center from SVN (linuxport branch)"
+provides=('xbmc')
+conflicts=('xbmc' 'xbmc-smoothvideo' 'xbmc-vdpau')
+arch=('i686' 'x86_64')
+url="http://xbmc.org"
+license=('GPL' 'LGPL')
+depends=('alsa-lib' 'curl' 'enca' 'faac' 'freetype2' 'fribidi' 'gawk' 'glew'
+ 'hal' 'jasper' 'libgl' 'libjpeg>=6b-5' 'libmad' 'libmysqlclient'
+ 'libxinerama' 'libxrandr' 'lzo2' 'sdl_image' 'sdl_mixer' 'sqlite3'
+ 'tre' 'unzip' 'libcdio' 'libsamplerate' 'python' 'avahi' 'libmad'
+ 'a52dec' 'libdca' 'faad2' 'libmpeg2' 'libvorbis' 'libogg' 'libmms'
+ 'libmpcdec' 'flac' 'wavpack' 'xorg-utils')
+makedepends=('subversion' 'autoconf' 'automake' 'boost' 'cmake' 'gcc' 'gperf'
+ 'libtool>=2.2.6a-1' 'make' 'nasm' 'patch' 'pkgconfig' 'zip' 'flex' 'bison')
+optdepends=('lirc: remote controller support'
+ 'pmount: mount removable devices as normal user'
+ 'smbclient: access windows shares'
+ 'unrar: access compressed files without unpacking them')
+install=("${pkgname}.install")
+source=('libcurl-not-in-lib64.patch'
+ 'Lircmap.xml')
+noextract=('libcurl-not-in-lib64.patch'
+ 'Lircmap.xml')
+md5sums=('c5e808703d0c9e392e1c2837fea1a5ef'
+ '3f93186f1ea4aad73011d00754c7265a')
+
+options=(!makeflags)
+
+build() {
+
+ _svntrunk=http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC
+ _svnmod=XBMC
+ _prefix=/usr
+
+ cd ${srcdir}/
+ if [ -d $_svnmod/.svn ]; then
+ msg "SVN tree found, reverting changes and updating to -r$pkgver"
+ (cd $_svnmod && svn revert -R . && svn up -r $pkgver) || return 1
+ else
+ msg "Checking out SVN tree of -r$pkgver"
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod || return 1
+ fi
+
+ # Apply patches
+ cd "$srcdir/$_svnmod"
+
+ # Arch's libcurl lives in /usr/lib, not /usr/lib64 - fix the path:
+ msg "Patching with libcurl-not-in-lib64.patch"
+ patch -p0 < "$srcdir/libcurl-not-in-lib64.patch" || return 1
+
+ # Goom also needs a fixup due to newer autotools
+ cd "$srcdir/$_svnmod/xbmc/visualizations/Goom/goom2k4-0"
+ aclocal
+ libtoolize --copy --force
+ ./autogen.sh --enable-static --with-pic
+
+ cd "$srcdir/$_svnmod"
+
+ # Configure XBMC
+ #
+ # Note on external-libs:
+ # - We cannot use external python because Arch's python was built with
+ # UCS2 unicode support, whereas xbmc expects UCS4 support
+ # - We cannot use external ffmpeg as we would loose VDPAU functionality
+ # because Arch's ffmpeg package does not support VDPAU
+ # - We don't want to rely on AUR packages, so we also don't use libass
+ # as long as it's in AUR
+ msg "Configuring XBMC"
+ make clean
+ ./configure --prefix=${_prefix} \
+ --enable-external-libmad \
+ --enable-external-liba52 \
+ --enable-external-libdts \
+ --enable-external-libfaad \
+ --enable-external-libmpeg2 \
+ --enable-external-libvorbis \
+ --enable-external-libogg \
+ --enable-external-libmpcdec \
+ --enable-external-libflac \
+ --enable-external-libwavpack \
+ --disable-external-libass \
+ --disable-external-python \
+ --disable-external-ffmpeg \
+ --disable-pulse \
+ --disable-debug || return 1
+
+ # Fix false negative detections of realloc that happens some times
+ msg "Fixing false negative detections of realloc"
+ if grep -q 'HAVE_REALLOC 0' config.h; then
+ sed -e 's|#define HAVE_REALLOC 0|#define HAVE_REALLOC 1|' \
+ -e 's|#define realloc rpl_realloc|/* #define realloc rpl_realloc */|' \
+ -i config.h || return 1
+ fi
+
+ # XBMCTex will segfault on systems with nvidia installed if linked to OpenGL
+ msg "Fixing XBMCTex on systems using the nvidia driver blob"
+ sed -e 's/-lGLU -lGLEW -lGL//' \
+ -i ${srcdir}/$_svnmod/tools/XBMCTex/Makefile
+
+ # Now (finally) build
+ msg "Running make"
+ make || return 1
+ msg "Running make install"
+ make prefix=${pkgdir}${_prefix} install || return 1
+
+ # Install
+ install -Dm755 ${srcdir}/$_svnmod/xbmc-xrandr \
+ ${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr || return 1
+
+ install -Dm644 ${srcdir}/$_svnmod/tools/Linux/xbmc.desktop \
+ ${pkgdir}${_prefix}/share/applications/xbmc.desktop || return 1
+
+ install -Dm644 ${srcdir}/$_svnmod/tools/Linux/xbmc.png \
+ ${pkgdir}${_prefix}/share/pixmaps/xbmc.png || return 1
+
+ install -Dm755 ${srcdir}/$_svnmod/tools/XBMCTex/XBMCTex \
+ ${pkgdir}${_prefix}/share/xbmc/tools/xbmctex || return 1
+
+ # Skins often use build.sh that looks for /usr/bin/XBMCTex
+ ln -s "${_prefix}/share/xbmc/tools/xbmctex" "$pkgdir/usr/bin/XBMCTex"
+
+ install -dm755 ${pkgdir}${_prefix}/share/licenses/${pkgname}
+ for licensef in LICENSE.GPL README.linux copying.txt; do
+ mv ${pkgdir}${_prefix}/share/xbmc/${licensef} \
+ ${pkgdir}${_prefix}/share/licenses/${pkgname} || return 1
+ done
+
+ # Use custom Lircmap to support StreamZap remote
+ cp ${srcdir}/Lircmap.xml ${pkgdir}${_prefix}/share/xbmc/system/Lircmap.xml
+}
diff --git a/abs/extra/community/xbmc-svn/__changelog b/abs/extra/community/xbmc-svn/__changelog
new file mode 100644
index 0000000..bbf1705
--- /dev/null
+++ b/abs/extra/community/xbmc-svn/__changelog
@@ -0,0 +1 @@
+Added Lircmap.xml to PKGBUILD to support MCE2 and StreamZap remotes
diff --git a/abs/extra/community/xbmc-svn/libcurl-not-in-lib64.patch b/abs/extra/community/xbmc-svn/libcurl-not-in-lib64.patch
new file mode 100644
index 0000000..0bfbc4c
--- /dev/null
+++ b/abs/extra/community/xbmc-svn/libcurl-not-in-lib64.patch
@@ -0,0 +1,13 @@
+Index: Makefile.include.in
+===================================================================
+--- Makefile.include.in (revision 21447)
++++ Makefile.include.in (working copy)
+@@ -25,7 +25,7 @@
+
+ ifeq (linux,$(findstring linux, $(ARCH)))
+ ifeq ($(ARCH), x86_64-linux)
+- DEFINES+=-DDLL_PATH_LIBCURL="\"/usr/lib64/libcurl.so.4\""
++ DEFINES+=-DDLL_PATH_LIBCURL="\"/usr/lib/libcurl.so.4\""
+ else
+ DEFINES+=-DDLL_PATH_LIBCURL="\"/usr/lib/libcurl.so.4\""
+ endif
diff --git a/abs/extra/community/xbmc-svn/xbmc-svn.install b/abs/extra/community/xbmc-svn/xbmc-svn.install
new file mode 100644
index 0000000..acf409c
--- /dev/null
+++ b/abs/extra/community/xbmc-svn/xbmc-svn.install
@@ -0,0 +1,13 @@
+post_install() {
+ echo ">> If XBMC won't start, but just segfaults, double check your X.Org config"
+ echo ">> so that your display depth is at least 24-bit. Eg: change "
+ echo ">> \"DefaultDepth 16\" under the \"Screen\" section so it says 24 instead"
+ echo ">> of 16."
+ echo ">> If you have problems or suggestions for this PKGBUILD, have a look at its"
+ echo ">> dedicated forum thread: http://bbs.archlinux.org/viewtopic.php?pid=559107"
+ echo ">> or the wiki: http://xbmc.org/wiki/?title=XBMC_on_Arch_Linux_(Unofficial)"
+ echo
+ /bin/true
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/abs/extra/community/xbmc/ChangeLog b/abs/extra/community/xbmc/ChangeLog
new file mode 100644
index 0000000..59f2370
--- /dev/null
+++ b/abs/extra/community/xbmc/ChangeLog
@@ -0,0 +1,64 @@
+2009-03-07 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-10 :
+ Try and fix some autoconf issues (thanks Gentoo ebuild).
+
+2009-02-08 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-9 :
+ Replace some libtool 'ltmain.sh' scripts with the one from libtool
+ installed with Arch.
+ Make sure XBMCTex isn't linked to OpenGL libraries or it will segfault
+ on systems using the nvidia driver.
+
+2009-01-30 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-8 :
+ Fix some include's so that gcc 4.3.x is happy, shouldn't complain about
+ undefined '::realloc' anymore.
+ Remove Mac OS X specific files.
+
+2009-01-25 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-7 :
+ Moved libcdio, pmount, smbclient and unrar to optdepends.
+ Removed unneeded dependency on sdl_gfx.
+ Removed dependency on libpng as sdl_image depends on it.
+
+2008-12-14 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-6 :
+ Added libpng to dependency list.
+ Added gawk to dependency list.
+ Removed '--disable-mms' and '--enable-halmount' configure flags as they
+ are not mentioned as supported in the configure script.
+
+2008-12-06 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-5 :
+ Added libmad to the dependency list.
+ Streamripper 1.64.0+ does not include tre anymore, removed streamripper
+ and added tre instead.
+ Removed subversion from makedepends.
+
+2008-12-06 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-4 :
+ Fix permissions for some more scripts, ffmpeg/texi2doc.pl should not
+ fail any longer.
+
+2008-12-05 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-3 :
+ Added lirc to the optdepends array.
+
+2008-11-26 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-2 :
+ Added install file which informs users that a display depth of at
+ least 24-bit is required.
+
+2008-11-17 [vEX] <niechift.dot.vex.at.gmail.dot.com>
+
+ * 8.10-1 :
+ Initial package, based on previous work by Zeqadious.
diff --git a/abs/extra/community/xbmc/PKGBUILD b/abs/extra/community/xbmc/PKGBUILD
new file mode 100644
index 0000000..950d704
--- /dev/null
+++ b/abs/extra/community/xbmc/PKGBUILD
@@ -0,0 +1,118 @@
+# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
+# Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
+
+pkgname=xbmc
+pkgver=8.10
+pkgrel=10
+pkgdesc="XBMC Media Center"
+arch=('i686' 'x86_64')
+url="http://xbmc.org"
+license=('GPL' 'custom')
+depends=('alsa-lib' 'curl' 'enca' 'faac' 'freetype2' 'fribidi' 'gawk' 'glew' \
+ 'hal' 'jasper' 'libgl' 'libjpeg>=6b-5' 'libmad' 'libmysqlclient' \
+ 'libxinerama' 'libxrandr' 'lzo2' 'sdl_image' 'sdl_mixer' 'sqlite3' \
+ 'tre' 'unzip' 'x-server')
+makedepends=('autoconf' 'automake' 'boost' 'cmake' 'gcc' 'gperf'
+ 'libtool>=2.2.6a-1' 'make' 'nasm' 'patch' 'pkgconfig' 'zip')
+optdepends=('libcdio: optical disc support'
+ 'lirc: remote controller support'
+ 'pmount: mount removable devices as normal user'
+ 'smbclient: access windows shares'
+ 'unrar: access compressed files without unpacking them')
+install=("${pkgname}.install")
+source=("http://downloads.sourceforge.net/${pkgname}/XBMC-${pkgver}.src.tar.gz")
+md5sums=('2d20d255a211223eaa47f1c6bcf4be8e')
+
+build() {
+ cd "${srcdir}/XBMC"
+
+ # Remove Mac OS X specific files
+ rm -rf system/python/lib-osx/
+ rm system/players/dvdplayer/*-osx*
+
+ # Fix permissions for the configure scripts
+ find -type f -name "configure"|xargs chmod a+x || return 1
+
+ # Fix other permissions
+ find -type f -name "*.pl"|xargs chmod a+x || return 1
+
+ # Make it gcc 4.3.x compatible
+ sed '92i#include <stdlib.h>' -i guilib/system.h || return 1
+
+ # Clean up the configure files and make sure they support C++.
+ for file in `find . -type f -name configure.in -or -name configure.ac`; do
+ echo 'AC_PROG_CXX' >> "${file}"
+ sed -e '/AM_PATH_XMMS/ c\echo' \
+ -e '/AM_PATH_SDL2/ c\echo' \
+ -i ${file} || return 1
+ done
+ sed -e 's/test_libFLAC++//g' \
+ -i "${srcdir}/XBMC/xbmc/cores/paplayer/flac-1.2.1/src/Makefile.am" || return 1
+
+ # Fix some autoconf issues
+ touch ${srcdir}/XBMC/xbmc/cores/dvdplayer/Codecs/libmad/{NEWS,AUTHORS,ChangeLog} || return 1
+ touch ${srcdir}/XBMC/xbmc/visualizations/Goom/goom2k4-0/ylwrap || return 1
+ touch ${srcdir}/XBMC/xbmc/lib/libid3tag/libid3tag/{NEWS,README,AUTHORS,ChangeLog} || return 1
+ for dir in \
+ . \
+ xbmc/cores/dvdplayer/Codecs/libDVDCSS \
+ xbmc/cores/dvdplayer/Codecs/libdts \
+ xbmc/cores/dvdplayer/Codecs/libdvdnav \
+ xbmc/cores/dvdplayer/Codecs/libfaad2 \
+ xbmc/cores/dvdplayer/Codecs/libmad \
+ xbmc/cores/dvdplayer/Codecs/libmpeg2 \
+ xbmc/cores/paplayer/flac-1.2.1 \
+ xbmc/cores/paplayer/vorbisfile/libvorbis \
+ xbmc/cores/paplayer/vorbisfile/ogg \
+ xbmc/visualizations/Goom/goom2k4-0 \
+ xbmc/lib/libass \
+ xbmc/lib/libid3tag/libid3tag
+ do
+ autoreconf --install "${srcdir}/XBMC/${dir}" || return 1
+ done
+
+ cd "${srcdir}/XBMC/"
+
+ # Configure XBMC
+ ./configure --prefix=/usr \
+ --disable-debug || return 1
+
+ # Fix false negative detections of realloc that happens some times
+ if grep -q 'HAVE_REALLOC 0' config.h; then
+ sed -e 's|#define HAVE_REALLOC 0|#define HAVE_REALLOC 1|' \
+ -e 's|#define realloc rpl_realloc|/* #define realloc rpl_realloc */|' \
+ -i config.h || return 1
+ fi
+
+ # XBMCTex will segfault on systems with nvidia instaleld if linked to OpenGL
+ sed -e 's/-lGLU -lGLEW -lGL//' \
+ -i ${srcdir}/XBMC/tools/XBMCTex/Makefile
+
+ # Now (finally) build
+ make || return 1
+ make prefix=${pkgdir}/usr install || return 1
+
+ # Fix the shell script
+ sed -i '4iexport SDL_AUDIODRIVER=alsa' ${pkgdir}/usr/bin/xbmc
+
+ # Xrandr
+ install -Dm755 ${srcdir}/XBMC/xbmc-xrandr \
+ ${pkgdir}/usr/share/xbmc/xbmc-xrandr || return 1
+
+ # Menu item
+ install -Dm644 ${srcdir}/XBMC/tools/Linux/xbmc.desktop \
+ ${pkgdir}/usr/share/applications/xbmc.desktop || return 1
+ install -Dm644 ${srcdir}/XBMC/tools/Linux/xbmc.png \
+ ${pkgdir}/usr/share/pixmaps/xbmc.png || return 1
+
+ # XBMCTex
+ install -Dm755 ${srcdir}/XBMC/tools/XBMCTex/XBMCTex \
+ ${pkgdir}/usr/share/xbmc/tools/xbmctex || return 1
+
+ # License(s)
+ install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
+ for licensef in LICENSE.GPL README.linux copying.txt; do
+ mv ${pkgdir}/usr/share/xbmc/${licensef} \
+ ${pkgdir}/usr/share/licenses/${pkgname} || return 1
+ done
+}
diff --git a/abs/extra/community/xbmc/xbmc.install b/abs/extra/community/xbmc/xbmc.install
new file mode 100644
index 0000000..9316bc8
--- /dev/null
+++ b/abs/extra/community/xbmc/xbmc.install
@@ -0,0 +1,9 @@
+post_install() {
+ echo ">> If XBMC won't start, but just segfaults, double check your X.Org config"
+ echo ">> so that your display depth is at least 24-bit. Eg: change "
+ echo ">> \"DefaultDepth 16\" under the \"Screen\" section so it says 24 instead"
+ echo ">> of 16."
+ /bin/true
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/abs/extra/community/xine-lib-vdpau-svn/PKGBUILD b/abs/extra/community/xine-lib-vdpau-svn/PKGBUILD
new file mode 100644
index 0000000..2d1e887
--- /dev/null
+++ b/abs/extra/community/xine-lib-vdpau-svn/PKGBUILD
@@ -0,0 +1,47 @@
+# Contributor: Dennis Brendel <buddabrod@gmail.com>
+pkgname=xine-lib-vdpau-svn
+pkgver=222
+pkgrel=2
+pkgdesc="A free video player library for Unix with support for vdpau"
+arch=('i686' 'x86_64')
+url="http://xinehq.de/"
+license=('GPL')
+depends=('libxvmc' 'esound' 'flac>=1.1.4' 'libvorbis' 'sdl' 'libmng' 'libtheora' 'libxcb' 'wavpack' 'ffmpeg>=20080715' 'heimdal>=1.2.1' 'nvidia-utils>=180.22' 'nvidia>=180.22')
+optdepends=('codecs')
+makedepends=('subversion' 'pkgconfig' 'libtool' 'imagemagick' 'smbclient' 'mesa' 'alsa-lib' 'vcdimager' 'jack-audio-connection-kit' 'cvs')
+conflicts=('xine-lib')
+provides=('xine-lib=1.1.16.1' 'xine-lib')
+
+_svntrunk=svn://jusst.de/xine-vdpau
+_svnmod=xine-vdpau
+
+build() {
+
+ cd ${srcdir}
+
+ if [ -d $_svnmod/.svn ]; then
+ (cd $_svnmod && svn up -r $pkgver)
+ else
+ svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
+ fi
+
+ msg "SVN checkout done or server timeout"
+ msg "Starting make..."
+
+ cp -r $_svnmod $_svnmod-build
+ cd $_svnmod-build
+
+ unset CFLAGS
+
+ ./autogen.sh --prefix=/usr --with-w32-path=/usr/lib/codecs \
+ --with-xv-path=/usr/lib --with-xxmc-path=/usr/lib --with-xvmc-path=/usr/lib \
+ --with-libflac --with-wavpack --with-xcb \
+ --without-arts --with-jack --without-speex \
+ --disable-gnomevfs --without-pulseaudio --disable-aalib \
+ --disable-modplug --with-external-ffmpeg || return 1
+
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+
+ rm -rf ${srcdir}/${_svnmod}-build
+}
diff --git a/abs/extra/community/zvbi/PKGBUILD b/abs/extra/community/zvbi/PKGBUILD
new file mode 100644
index 0000000..f638f29
--- /dev/null
+++ b/abs/extra/community/zvbi/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Alexander Baldeck <alexander@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+pkgname=zvbi
+pkgver=0.2.26
+pkgrel=1
+pkgdesc="zvbi is needed for zapping"
+arch=(i686 x86_64)
+depends=('libpng')
+license=('GPL')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/zapping/$pkgname-$pkgver.tar.bz2)
+url="http://zapping.sourceforge.net/cgi-bin/view/ZVBI/WebHome"
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+}
+md5sums=('82805319ca61f6ffd7b7bb64d7433448')
diff --git a/abs/extra/conky/PKGBUILD b/abs/extra/conky/PKGBUILD
new file mode 100644
index 0000000..726f426
--- /dev/null
+++ b/abs/extra/conky/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 15346 2008-10-12 21:48:59Z giovanni $
+# Maintainer: James Rayner <james@archlinux.org>
+# Contributor: MrGreen <mrgreen.linuxuser@gmail.com>
+
+pkgname=conky
+pkgver=1.6.1
+pkgrel=2
+pkgdesc="Conky is an advanced, highly configurable system monitor for X based on torsmo"
+arch=('i686' 'x86_64')
+url="http://conky.sourceforge.net/"
+license=('custom')
+replaces=('torsmo')
+depends=('libxext' 'libxml2' 'curl' 'wireless_tools' 'libxft' 'glib2' 'libxdamage')
+makedepends=('pkgconfig')
+source=(http://downloads.sourceforge.net/sourceforge/conky/$pkgname-$pkgver.tar.bz2)
+md5sums=('b2839f21cec18e5eaa338c7440a1ba28')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --enable-xft --enable-mpd --enable-double-buffer \
+ --enable-proc-uptime --enable-seti --enable-wlan --enable-rss --enable-smapi
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ mkdir -p $startdir/pkg/etc/xdg/
+ mv $startdir/pkg/usr/etc/conky/ $startdir/pkg/etc/xdg/
+ rmdir $startdir/pkg/usr/etc
+ install -D -m644 COPYING $startdir/pkg/usr/share/licenses/$pkgname/COPYING
+}
+
diff --git a/abs/extra/crda/PKGBUILD b/abs/extra/crda/PKGBUILD
new file mode 100644
index 0000000..5a23fbd
--- /dev/null
+++ b/abs/extra/crda/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 24388 2009-01-15 23:18:18Z thomas $
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+
+pkgname=crda
+pkgver=0.9.5
+_regdbver=2009-01-15
+pkgrel=2
+pkgdesc="Central Regulatory Domain Agent"
+arch=(i686 x86_64)
+url="http://wireless.kernel.org/en/developers/Regulatory/CRDA"
+license=('custom')
+depends=('libnl' 'libgcrypt' 'udev' 'iw')
+makedepends=('python-m2crypto')
+source=(http://wireless.kernel.org/download/crda/$pkgname-$pkgver.tar.bz2
+ http://wireless.kernel.org/download/wireless-regdb/regulatory.bins/${_regdbver}-regulatory.bin
+ crda.rc
+ crda.conf.d)
+backup=(etc/conf.d/wireless-regdom)
+md5sums=('cee459e588441f713a96ae2fb0472d7f'
+ 'a0db99e5385c876b6da7e2869546f6e2'
+ '014eef3f8655e9a130064ec6891317fc'
+ '2374dcf1c6530332f375e5362b80169b')
+
+build() {
+ # Install crda, regdbdump and udev rules
+ msg "Compiling and installing crda ..."
+ cd $srcdir/$pkgname-$pkgver
+ make crda regdbdump || return 1
+ make DESTDIR=$pkgdir install || return 1
+
+ # Install and verify regulatory.bin file
+ msg "Installing and verifying the regulatory.bin file ..."
+ install -D -m444 $srcdir/${_regdbver}-regulatory.bin $pkgdir/usr/lib/crda/regulatory.bin || return 1
+ if $pkgdir/sbin/regdbdump $pkgdir/usr/lib/crda/regulatory.bin > /dev/null; then
+ msg "Regulatory database verification was succesful."
+ else
+ error "Regulatory database verification failed."
+ return 1
+ fi
+
+ msg "Installing license ..."
+ install -D -m644 $srcdir/$pkgname-$pkgver/LICENSE $pkgdir/usr/share/licenses/crda/LICENSE || return 1
+
+ msg "Installing boot scripts ..."
+ install -D -m755 $srcdir/crda.rc $pkgdir/etc/rc.d/wireless-regdom || return 1
+ install -D -m644 $srcdir/crda.conf.d $pkgdir/etc/conf.d/wireless-regdom || return 1
+ for dom in $($pkgdir/sbin/regdbdump $pkgdir/usr/lib/crda/regulatory.bin | grep ^country | cut -d' ' -f2 | sed 's|:||g'); do
+ echo "#WIRELESS_REGDOM=\"${dom}\"" >> $pkgdir/etc/conf.d/wireless-regdom || return 1
+ done
+}
diff --git a/abs/extra/crda/crda.conf.d b/abs/extra/crda/crda.conf.d
new file mode 100644
index 0000000..8511238
--- /dev/null
+++ b/abs/extra/crda/crda.conf.d
@@ -0,0 +1,4 @@
+#
+# Wireless regulatory domain configuration
+#
+
diff --git a/abs/extra/crda/crda.rc b/abs/extra/crda/crda.rc
new file mode 100755
index 0000000..13dbd87
--- /dev/null
+++ b/abs/extra/crda/crda.rc
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/wireless-regdom
+
+case "$1" in
+ start)
+ if [ -n "${WIRELESS_REGDOM}" ]; then
+ stat_busy "Setting wireless regulatory domain: ${WIRELESS_REGDOM}"
+ if iw reg set ${WIRELESS_REGDOM}; then
+ stat_done
+ else
+ stat_fail
+ fi
+ fi
+ ;;
+ stop)
+ ;;
+ restart)
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 start"
+esac
+exit 0
diff --git a/abs/extra/cvs/PKGBUILD b/abs/extra/cvs/PKGBUILD
new file mode 100644
index 0000000..488f4a0
--- /dev/null
+++ b/abs/extra/cvs/PKGBUILD
@@ -0,0 +1,20 @@
+# $Id: PKGBUILD 20493 2008-12-05 11:27:50Z allan $
+# Maintainer: dorphell <dorphell@archlinux.org>
+pkgname=cvs
+pkgver=1.11.23
+pkgrel=3
+pkgdesc="Concurrent Versions System - a source control system"
+arch=(i686 x86_64)
+url="http://ximbiot.com/cvs/wiki/index.php"
+license=('GPL')
+depends=('heimdal>=1.2')
+source=(ftp://ftp.gnu.org/non-gnu/cvs/source/stable/$pkgver/$pkgname-$pkgver.tar.bz2)
+md5sums=('0213ea514e231559d6ff8f80a34117f0')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ unset EDITOR VISUAL
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/ddclient/ChangeLog b/abs/extra/ddclient/ChangeLog
new file mode 100644
index 0000000..4520b69
--- /dev/null
+++ b/abs/extra/ddclient/ChangeLog
@@ -0,0 +1,22 @@
+2008-08-07 Abhishek Dasgupta <abhidg@gmail.com>
+
+ * ddclient 3.7.3-2
+ * added /etc/conf.d/ddclient for modifying
+ daemon poll frequency. This overrides the
+ setting specified in /etc/ddclient/ddclient.conf
+ when ddclient is called as an rc script.
+
+2007-08-08 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * ddclient-3.7.3-1
+ * version bump
+ * GPL -> GPL2
+ * shortened pkgdesc
+
+2007-07-02 tardo <tardo@nagi-fanboi.net>
+
+ * Built for x86_64
+
+2007-06-29 Georg Grabler (STiAT) <ggrabler@gmail.com>
+
+ * Version Bump to 3.7.2
diff --git a/abs/extra/ddclient/PKGBUILD b/abs/extra/ddclient/PKGBUILD
new file mode 100644
index 0000000..121d2c5
--- /dev/null
+++ b/abs/extra/ddclient/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD,v 1.13 2008/08/07 07:11:09 abhidg Exp $
+# Maintainer: Abhishek Dasgupta <abhidg@gmail.com>
+# Contributor: David Rosenstrauch <darose@darose.net>
+
+pkgname=ddclient
+pkgver=3.7.3
+pkgrel=2
+pkgdesc="Update dynamic DNS entries for accounts on many dynamic DNS services."
+arch=('i686' 'x86_64')
+url="http://ddclient.sourceforge.net/"
+license=('GPL2')
+depends=('perl' 'perl-io-socket-ssl')
+backup=('etc/ddclient/ddclient.conf' 'etc/conf.d/ddclient')
+install=ddclient.install
+source=(http://downloads.sourceforge.net/sourceforge/ddclient/ddclient-$pkgver.tar.bz2 ddclient.rc ddclient.conf.d)
+
+build() {
+ cd ${srcdir}/ddclient-${pkgver}
+
+ # core files
+ install -D -m755 ddclient ${pkgdir}/usr/sbin/ddclient
+ install -D -m755 ${srcdir}/ddclient.rc ${pkgdir}/etc/rc.d/ddclient
+ install -D -m600 sample-etc_ddclient.conf ${pkgdir}/etc/ddclient/ddclient.conf
+ install -D -m644 ${srcdir}/ddclient.conf.d ${pkgdir}/etc/conf.d/ddclient
+ install -d ${pkgdir}/var/cache/ddclient
+
+ # additional instructions, sample configs
+ install -D -m644 README ${pkgdir}/etc/ddclient/samples/README
+ install -D -m644 sample-etc_cron.d_ddclient ${pkgdir}/etc/ddclient/samples/sample-etc_cron.d_ddclient
+ install -D -m644 sample-etc_dhcpc_dhcpcd-eth0.exe ${pkgdir}/etc/ddclient/samples/sample-etc_dhcpc_dhcpcd-eth0.exe
+ install -D -m644 sample-etc_ppp_ip-up.local ${pkgdir}/etc/ddclient/samples/sample-etc_ppp_ip-up.local
+}
+md5sums=('f6a55bc68cf73ffe7e80d2fa5cd44f85'
+ '7035bf8132f3517a59167f61ee5e8b90'
+ 'b8f39c82827776da948b76ef83544d33')
diff --git a/abs/extra/ddclient/ddclient.conf.d b/abs/extra/ddclient/ddclient.conf.d
new file mode 100644
index 0000000..8b754a3
--- /dev/null
+++ b/abs/extra/ddclient/ddclient.conf.d
@@ -0,0 +1,2 @@
+# Parameters passed to ddclient
+EXTRA_ARGS="-daemon 300"
diff --git a/abs/extra/ddclient/ddclient.install b/abs/extra/ddclient/ddclient.install
new file mode 100644
index 0000000..d6edc0e
--- /dev/null
+++ b/abs/extra/ddclient/ddclient.install
@@ -0,0 +1,41 @@
+# arg 1: the new package version
+post_install() {
+cat << EOM
+
+If you want to use ddclient with dhcpcd, cron or pppd,
+see /etc/ddclient/samples for further instructions.
+
+If you have ddclient in the DAEMONS array of /etc/rc.conf:
+- Change /etc/conf.d/ddclient according to your needs.
+- This setting OVERRIDES any setting in
+ /etc/ddclient/ddclient.conf
+
+EOM
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+
+if [ -f /etc/ddclient/ddclient.cache ]; then
+ echo -n "Moving ddclient.cache from /etc/ddclient/ to /var/cache/ddclient/."
+ mv /etc/ddclient/ddclient.cache /var/cache/ddclient/
+ echo " (done)"
+fi
+
+if [ "$(vercmp $2 3.7.3-2)" -lt 0 ]; then
+cat << EOM
+
+If you have ddclient in the DAEMONS array of /etc/rc.conf:
+- Change /etc/conf.d/ddclient according to your needs.
+- This setting OVERRIDES any setting in
+ /etc/ddclient/ddclient.conf
+
+EOM
+fi
+
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/ddclient/ddclient.rc b/abs/extra/ddclient/ddclient.rc
new file mode 100644
index 0000000..a9093f7
--- /dev/null
+++ b/abs/extra/ddclient/ddclient.rc
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+[ -f /etc/conf.d/ddclient ] && . /etc/conf.d/ddclient
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/ddclient`
+case "$1" in
+ start)
+ stat_busy "Starting ddclient"
+ [ -z "$PID" ] && /usr/sbin/ddclient ${EXTRA_ARGS}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon ddclient
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping ddclient"
+ [ -n "$PID" ] && kill -15 $PID >/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ddclient
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/abs/extra/diffstat/PKGBUILD b/abs/extra/diffstat/PKGBUILD
new file mode 100644
index 0000000..2c049ce
--- /dev/null
+++ b/abs/extra/diffstat/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 13739 2008-09-28 10:43:08Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Matthias-Christian Ott <matthias.christian.at.tiscali.de>
+
+pkgname=diffstat
+pkgver=1.46
+pkgrel=1
+pkgdesc="diffstat produces graph of changes introduced by a diff file"
+arch=('i686' 'x86_64')
+url="http://invisible-island.net/diffstat"
+depends=('glibc')
+license=('GPL')
+source=(ftp://invisible-island.net/diffstat/diffstat-$pkgver.tgz)
+md5sums=('626acb8cdd9e5cdb3a502bc12b828067')
+
+build () {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/docbook-xml/PKGBUILD b/abs/extra/docbook-xml/PKGBUILD
new file mode 100644
index 0000000..feac080
--- /dev/null
+++ b/abs/extra/docbook-xml/PKGBUILD
@@ -0,0 +1,268 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Committer: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=docbook-xml
+pkgver=4.5
+pkgrel=1
+pkgdesc="A widely used XML scheme for writing documentation and help"
+arch=(i686 x86_64)
+url="http://scrollkeeper.sourceforge.net/docbook.shtml"
+depends=('libxml2')
+makedepends=('unzip')
+install=docbook-xml.install
+source=(http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip
+ http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip
+ http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip
+ http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip
+ http://www.docbook.org/xml/4.1.2/docbkx412.zip)
+noextract=('docbook-xml-4.5.zip' 'docbook-xml-4.4.zip' 'docbook-xml-4.3.zip' 'docbook-xml-4.2.zip' 'docbkx412.zip')
+md5sums=('03083e288e87a7e829e437358da7ef9e'
+ 'cbb04e9a700955d88c50962ef22c1634'
+ 'ab200202b9e136a144db1e0864c45074'
+ '73fe50dfe74ca631c1602f558ed8961f'
+ '900d7609fb7e6d78901b357e4acfbc17')
+
+build() {
+ for ver in 4.2 4.3 4.4 4.5; do
+ mkdir docbook-xml-${ver}
+ pushd docbook-xml-${ver}
+ unzip ${startdir}/src/docbook-xml-${ver}.zip
+ mkdir -p ${startdir}/pkg/usr/share/xml/docbook/xml-dtd-${ver}
+ cp -af docbook.cat *.dtd ent/ *.mod \
+ ${startdir}/pkg/usr/share/xml/docbook/xml-dtd-${ver}/
+ popd
+ done
+ mkdir docbook-xml-4.1.2
+ pushd docbook-xml-4.1.2
+ unzip ${startdir}/src/docbkx412.zip
+ mkdir -p ${startdir}/pkg/usr/share/xml/docbook/xml-dtd-4.1.2
+ cp -af docbook.cat *.dtd ent/ *.mod \
+ ${startdir}/pkg/usr/share/xml/docbook/xml-dtd-4.1.2/
+ popd
+
+ mkdir -p ${startdir}/pkg/etc/xml
+ xmlcatalog --noout --create ${startdir}/pkg/etc/xml/docbook-xml
+
+ # V4.1.2
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/soextblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+
+ # V4.2
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML V4.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook CALS Table Model V4.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/calstblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/dbpoolx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/dbhierx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/dbgenent.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Notations V4.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/dbnotnx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://www.oasis-open.org/docbook/xml/4.2" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.2" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://www.oasis-open.org/docbook/xml/4.2" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.2" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+
+ # V4.3
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML V4.3//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook CALS Table Model V4.3//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/calstblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/soextblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/dbpoolx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/dbhierx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/dbgenent.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Notations V4.3//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/dbnotnx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://www.oasis-open.org/docbook/xml/4.3" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.3" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://www.oasis-open.org/docbook/xml/4.3" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.3" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+
+ # V4.4
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook CALS Table Model V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/calstblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/htmltblx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/soextblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/dbpoolx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/dbhierx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/dbgenent.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Notations V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/dbnotnx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.4/dbcentx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://www.oasis-open.org/docbook/xml/4.4" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.4" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://www.oasis-open.org/docbook/xml/4.4" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.4" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+
+ # V4.5
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML V4.5//EN" \
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://www.oasis-open.org/docbook/xml/4.5" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://www.oasis-open.org/docbook/xml/4.5" \
+ "file:///usr/share/xml/docbook/xml-dtd-4.5" \
+ ${startdir}/pkg/etc/xml/docbook-xml
+}
diff --git a/abs/extra/docbook-xml/docbook-xml.install b/abs/extra/docbook-xml/docbook-xml.install
new file mode 100644
index 0000000..c62f65f
--- /dev/null
+++ b/abs/extra/docbook-xml/docbook-xml.install
@@ -0,0 +1,46 @@
+post_install() {
+ if [ -e etc/xml/catalog.preserve ]; then
+ mv etc/xml/catalog.preserve etc/xml/catalog
+ elif [ ! -e etc/xml/catalog ]; then
+ xmlcatalog --noout --create etc/xml/catalog
+ fi
+ xmlcatalog --noout --add "delegatePublic" \
+ "-//OASIS//ENTITIES DocBook XML" \
+ "file:///etc/xml/docbook-xml" \
+ etc/xml/catalog
+ xmlcatalog --noout --add "delegatePublic" \
+ "-//OASIS//DTD DocBook XML" \
+ "file:///etc/xml/docbook-xml" \
+ etc/xml/catalog
+ xmlcatalog --noout --add "delegateSystem" \
+ "http://www.oasis-open.org/docbook/" \
+ "file:///etc/xml/docbook-xml" \
+ etc/xml/catalog
+ xmlcatalog --noout --add "delegateURI" \
+ "http://www.oasis-open.org/docbook/" \
+ "file:///etc/xml/docbook-xml" \
+ etc/xml/catalog
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ if [ $(vercmp $2 4.5) -lt 0 ]; then
+ xmlcatalog --del "file:///etc/xml/docbook" etc/xml/catalog > etc/xml/catalog.preserve
+ fi
+}
+
+post_upgrade() {
+ if [ $(vercmp $2 4.5) -ge 0 ]; then
+ post_remove
+ fi
+ post_install
+}
+
+post_remove() {
+ xmlcatalog --noout --del file:///etc/xml/docbook-xml etc/xml/catalog
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/docbook-xml/docbook.patch b/abs/extra/docbook-xml/docbook.patch
new file mode 100644
index 0000000..1932f19
--- /dev/null
+++ b/abs/extra/docbook-xml/docbook.patch
@@ -0,0 +1,226 @@
+diff -Naur docbookx412-orig/Makefile docbookx412/Makefile
+--- docbookx412-orig/Makefile 2002-02-16 11:08:29.000000000 -0800
++++ docbookx412/Makefile 2002-08-24 12:03:31.000000000 -0700
+@@ -1,7 +1,7 @@
+ SHELL=/bin/sh
+ VERSION=4.1.2-9
+-DESTDIR=/usr/share/xml/docbook/xml-dtd-$(VERSION)
+-CATALOG=/usr/share/xml/docbook/catalog
++DESTDIR=$(ROOT)/usr/share/xml/docbook/xml-dtd-$(VERSION)
++CATALOG=$(ROOT)/usr/share/xml/docbook/catalog
+ OPENJADEVER=1.3
+
+ all:
+@@ -24,7 +24,7 @@
+ #
+ #
+ # DocBook XML V4.1.2
+- @./buildDocBookCatalog
++ @./buildDocBookCatalog $(ROOT)
+
+ uninstall:
+ #
+diff -Naur docbookx412-orig/buildDocBookCatalog docbookx412/buildDocBookCatalog
+--- docbookx412-orig/buildDocBookCatalog 2002-02-17 09:32:45.000000000 -0800
++++ docbookx412/buildDocBookCatalog 2002-08-24 12:15:23.000000000 -0700
+@@ -28,16 +28,20 @@
+ # Modifications made to Daniel Veillard's catalog build script at
+ # http://xmlsoft.org/buildDocBookCatalog.
+
+-if [ ! -d /etc/xml -a -w /etc ]
++DESTDIR=$1
++echo "DESTDIR is $DESTDIR"
++mkdir $DESTDIR/etc
++
++if [ ! -d $DESTDIR/etc/xml -a -w $DESTDIR/etc ]
+ then
+ echo Directory /etc/xml missing creating it
+- mkdir /etc/xml
+- chmod 755 /etc/xml
++ mkdir $DESTDIR/etc/xml
++ chmod 755 $DESTDIR/etc/xml
+ fi
+-if [ -w /etc/xml ]
++if [ -w $DESTDIR/etc/xml ]
+ then
+- ROOTCATALOG=/etc/xml/catalog
+- CATALOG=/etc/xml/docbook
++ ROOTCATALOG=$DESTDIR/etc/xml/catalog
++ CATALOG=$DESTDIR/etc/xml/docbook
+ else
+ echo Unable to update root catalog /etc/xml/catalog
+ echo Using $HOME/xmlcatalog as the root catalog
+@@ -69,16 +73,7 @@
+ #
+ # find the prefix for DocBook DTD
+ #
+-found=`find /usr/share/xml -name docbookx.dtd`
+-if [ "$found" = "" ] ; then
+- found=`find $HOME -name docbookx.dtd`
+-fi
+-if [ "$found" = "" ] ; then
+- found=`find /usr/local -name docbookx.dtd`
+-fi
+-if [ "$found" = "" ] ; then
+- found=`find /usr/share/sgml -name docbookx.dtd`
+-fi
++found=`find $DESTDIR/usr/share/xml -name docbookx.dtd`
+ if [ "$found" = "" ] ; then
+ echo could not locate docbookx.dtd for DocBook XML
+ exit 1
+@@ -105,49 +100,52 @@
+ # exit 2
+ #fi
+
++fakedocbookdir=`echo $docbookdir | sed "s|^$DESTDIR||"`
++FAKECATALOG=`echo $CATALOG | sed "s|^$DESTDIR||"`
++
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \
+- "file://$docbookdir/dbpoolx.mod" $CATALOG
++ "file://$fakedocbookdir/dbpoolx.mod" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN" \
+- "file://$docbookdir/docbookx.dtd" $CATALOG
++ "file://$fakedocbookdir/docbookx.dtd" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \
+- "file://$docbookdir/dbcentx.mod" $CATALOG
++ "file://$fakedocbookdir/dbcentx.mod" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \
+- "file://$docbookdir/dbnotnx.mod" $CATALOG
++ "file://$fakedocbookdir/dbnotnx.mod" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \
+- "file://$docbookdir/dbgenent.mod" $CATALOG
++ "file://$fakedocbookdir/dbgenent.mod" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \
+- "file://$docbookdir/dbhierx.mod" $CATALOG
++ "file://$fakedocbookdir/dbhierx.mod" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+- "file://$docbookdir/soextblx.dtd" $CATALOG
++ "file://$fakedocbookdir/soextblx.dtd" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \
+- "file://$docbookdir/calstblx.dtd" $CATALOG
++ "file://$fakedocbookdir/calstblx.dtd" $CATALOG
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2" \
+- "file://$docbookdir" $CATALOG
++ "file://$fakedocbookdir" $CATALOG
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://www.oasis-open.org/docbook/xml/4.1.2" \
+- "file://$docbookdir" $CATALOG
++ "file://$fakedocbookdir" $CATALOG
+
+ xmlcatalog --noout --add "delegatePublic" \
+ "-//OASIS//ENTITIES DocBook XML" \
+- "file://$CATALOG" $ROOTCATALOG
++ "file://$FAKECATALOG" $ROOTCATALOG
+ xmlcatalog --noout --add "delegatePublic" \
+ "-//OASIS//DTD DocBook XML" \
+- "file://$CATALOG" $ROOTCATALOG
++ "file://$FAKECATALOG" $ROOTCATALOG
+ xmlcatalog --noout --add "delegateSystem" \
+ "http://www.oasis-open.org/docbook/" \
+- "file://$CATALOG" $ROOTCATALOG
++ "file://$FAKECATALOG" $ROOTCATALOG
+ xmlcatalog --noout --add "delegateURI" \
+ "http://www.oasis-open.org/docbook/" \
+- "file://$CATALOG" $ROOTCATALOG
++ "file://$FAKECATALOG" $ROOTCATALOG
+
+ #
+ # find the prefix for ISO DocBook entities
+@@ -187,66 +185,68 @@
+ isodir=`dirname $entxml`
+ echo Found ISO DocBook entities in $isodir
+
++fakeisodir=`echo $isodir | sed "s|^$DESTDIR||"`
++
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Publishing//EN" \
+- "file://$isodir/iso-pub.ent" $CATALOG
++ "file://$fakeisodir/iso-pub.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Greek Letters//EN" \
+- "file://$isodir/iso-grk1.ent" $CATALOG
++ "file://$fakeisodir/iso-grk1.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" \
+- "file://$isodir/iso-box.ent" $CATALOG
++ "file://$fakeisodir/iso-box.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Greek Symbols//EN" \
+- "file://$isodir/iso-grk3.ent" $CATALOG
++ "file://$fakeisodir/iso-grk3.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" \
+- "file://$isodir/iso-amsn.ent" $CATALOG
++ "file://$fakeisodir/iso-amsn.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" \
+- "file://$isodir/iso-num.ent" $CATALOG
++ "file://$fakeisodir/iso-num.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" \
+- "file://$isodir/iso-grk4.ent" $CATALOG
++ "file://$fakeisodir/iso-grk4.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Diacritical Marks//EN" \
+- "file://$isodir/iso-dia.ent" $CATALOG
++ "file://$fakeisodir/iso-dia.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" \
+- "file://$isodir/iso-grk2.ent" $CATALOG
++ "file://$fakeisodir/iso-grk2.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" \
+- "file://$isodir/iso-amsa.ent" $CATALOG
++ "file://$fakeisodir/iso-amsa.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" \
+- "file://$isodir/iso-amso.ent" $CATALOG
++ "file://$fakeisodir/iso-amso.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" \
+- "file://$isodir/iso-cyr1.ent" $CATALOG
++ "file://$fakeisodir/iso-cyr1.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES General Technical//EN" \
+- "file://$isodir/iso-tech.ent" $CATALOG
++ "file://$fakeisodir/iso-tech.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" \
+- "file://$isodir/iso-amsc.ent" $CATALOG
++ "file://$fakeisodir/iso-amsc.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Added Latin 1//EN" \
+- "file://$isodir/iso-lat1.ent" $CATALOG
++ "file://$fakeisodir/iso-lat1.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" \
+- "file://$isodir/iso-amsb.ent" $CATALOG
++ "file://$fakeisodir/iso-amsb.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Added Latin 2//EN" \
+- "file://$isodir/iso-lat2.ent" $CATALOG
++ "file://$fakeisodir/iso-lat2.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" \
+- "file://$isodir/iso-amsr.ent" $CATALOG
++ "file://$fakeisodir/iso-amsr.ent" $CATALOG
+ xmlcatalog --noout --add "public" \
+ "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" \
+- "file://$isodir/iso-cyr2.ent" $CATALOG
++ "file://$fakeisodir/iso-cyr2.ent" $CATALOG
+
+ xmlcatalog --noout --add "delegatePublic" \
+ "ISO 8879:1986" \
+- "file://$CATALOG" $ROOTCATALOG
++ "file://$FAKECATALOG" $ROOTCATALOG
+ #
+ #
diff --git a/abs/extra/docbook-xsl/PKGBUILD b/abs/extra/docbook-xsl/PKGBUILD
new file mode 100644
index 0000000..cedcfa8
--- /dev/null
+++ b/abs/extra/docbook-xsl/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 20950 2008-12-08 05:32:07Z allan $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributer: Sean Middleditch <elanthis@awesomeplay.com>
+
+pkgname=docbook-xsl
+pkgver=1.74.0
+pkgrel=1
+pkgdesc="XML stylesheets for Docbook-xml transformations."
+arch=(i686 x86_64)
+license=('custom')
+url="http://scrollkeeper.sourceforge.net/docbook.shtml"
+depends=('libxml2' 'libxslt' 'docbook-xml')
+source=(http://downloads.sourceforge.net/sourceforge/docbook/docbook-xsl-${pkgver}.tar.bz2)
+install=docbook-xsl.install
+md5sums=('a56b598decd006d5d39e4544c0bfbc6a')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ mkdir -p ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/common
+ install -m644 common/*.{xml,xsl,dtd,ent} ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/common/
+
+ mkdir -p ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/params
+ install -m644 params/*.xml ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/params/
+
+ for fn in fo highlighting html roundtrip; do
+ mkdir -p ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/${fn}
+ install -m644 ${fn}/*.{xml,xsl} ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/${fn}/
+ done
+ for fn in eclipse htmlhelp javahelp lib manpages profiling template website xhtml; do
+ mkdir -p ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/${fn}
+ install -m644 ${fn}/*.xsl ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/${fn}/
+ done
+ mkdir -p ${pkgdir}/etc/xml
+ install -m644 VERSION ${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver}/
+
+ install -m644 -D COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
+}
diff --git a/abs/extra/docbook-xsl/docbook-xsl.install b/abs/extra/docbook-xsl/docbook-xsl.install
new file mode 100644
index 0000000..a8ea3e7
--- /dev/null
+++ b/abs/extra/docbook-xsl/docbook-xsl.install
@@ -0,0 +1,47 @@
+post_install() {
+ if [ ! -f /etc/xml/catalog ]; then
+ xmlcatalog --noout --create /etc/xml/catalog
+ fi
+ _NEW=`echo $1 | sed 's|\(.*\)\-.*|\1|'`
+
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://docbook.sourceforge.net/release/xsl/${_NEW}" \
+ "/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \
+ etc/xml/catalog
+
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://docbook.sourceforge.net/release/xsl/${_NEW}" \
+ "/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \
+ etc/xml/catalog &&
+
+ xmlcatalog --noout --add "rewriteSystem" \
+ "http://docbook.sourceforge.net/release/xsl/current" \
+ "/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \
+ etc/xml/catalog &&
+
+ xmlcatalog --noout --add "rewriteURI" \
+ "http://docbook.sourceforge.net/release/xsl/current" \
+ "/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \
+ etc/xml/catalog
+}
+
+post_upgrade() {
+ post_remove $2
+ post_install $1
+}
+
+post_remove() {
+ _OLD=`echo $1 | sed 's|\(.*\)\-.*|\1|'`
+ xmlcatalog --noout --del "/usr/share/xml/docbook/xsl-stylesheets-${_OLD}" etc/xml/catalog
+
+ if [ $(vercmp $1 1.72.0-3) -lt 0 ]; then
+ xmlcatalog --noout --del "/usr/share/xml/docbook" etc/xml/catalog
+ xmlcatalog --noout --del "file:///etc/xml/docbook" etc/xml/catalog
+ fi
+}
+
+op=$1
+shift
+
+$op $*
+
diff --git a/abs/extra/doxygen/PKGBUILD b/abs/extra/doxygen/PKGBUILD
new file mode 100644
index 0000000..5959ce5
--- /dev/null
+++ b/abs/extra/doxygen/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 14308 2008-10-05 15:59:28Z dan $
+# Maintainer: Dan McGee <dan@archlinux.org>
+pkgname=doxygen
+pkgver=1.5.7.1
+pkgrel=1
+pkgdesc="A documentation system for C++, C, Java, IDL and PHP"
+license=('GPL')
+arch=(i686 x86_64)
+url="http://www.doxygen.org/"
+depends=('gcc-libs')
+# qt required to build and run doxywizard, but don't want to drag it in
+makedepends=('flex' 'qt3')
+optdepends=('graphviz: for caller/callee graph generation'
+ 'qt3: for doxywizard')
+source=(ftp://ftp.stack.nl/pub/users/dimitri/${pkgname}-${pkgver}.src.tar.gz)
+
+build() {
+ . /etc/profile.d/qt3.sh
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix /usr --with-doxywizard
+ make || return 1
+ make INSTALL=${startdir}/pkg/usr MAN1DIR=share/man/man1 install
+}
+
+md5sums=('bc35dfd52bdae0247b862e67e0cbe7d7')
diff --git a/abs/extra/enchant/PKGBUILD b/abs/extra/enchant/PKGBUILD
new file mode 100644
index 0000000..e22aa05
--- /dev/null
+++ b/abs/extra/enchant/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 2581 2008-06-08 12:52:18Z jgc $
+# Maintainer: dorphell <dorphell@archlinux.org>
+pkgname=enchant
+pkgver=1.4.2
+pkgrel=1
+pkgdesc="A wrapper library for generic spell checking"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('aspell' 'dbus-glib>=0.74' 'hunspell>=1.2.2')
+makedepends=('hspell')
+options=(!libtool)
+source=(http://www.abisource.com/downloads/enchant/${pkgver}/${pkgname}-${pkgver}.tar.gz)
+url="http://www.abisource.com/enchant/"
+md5sums=('fe4558269ff59f569ab9581c907d58cb')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --disable-static || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/ethtool/PKGBUILD b/abs/extra/ethtool/PKGBUILD
new file mode 100644
index 0000000..1fddeb1
--- /dev/null
+++ b/abs/extra/ethtool/PKGBUILD
@@ -0,0 +1,22 @@
+pkgname=ethtool
+pkgver=6
+pkgrel=1
+pkgdesc="gkernel ethtool"
+arch=(i686 x86_64)
+url="http://sourceforge.net/projects/gkernel/"
+license=('GPL')
+depends=(glibc)
+makedepends=()
+conflicts=()
+replaces=()
+backup=()
+install=
+source=(http://easynews.dl.sf.net/sourceforge/gkernel/$pkgname-$pkgver.tar.gz)
+md5sums=('3b721ec27f17ebf320ba8c505cf66d9c')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver || return 1
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR=$startdir/pkg install || return 1
+}
diff --git a/abs/extra/evrouter/PKGBUILD b/abs/extra/evrouter/PKGBUILD
new file mode 100644
index 0000000..e4fb59d
--- /dev/null
+++ b/abs/extra/evrouter/PKGBUILD
@@ -0,0 +1,18 @@
+# Contributor: Jonathan Liu <net147@hotmail.com>
+pkgname=evrouter
+pkgver=0.3.3
+pkgrel=2
+pkgdesc="An Input Event Router for Linux"
+arch=(i686)
+url="http://www.bedroomlan.org/~alexios/coding_evrouter.html"
+license=('GPL2')
+depends=('libxt' 'libxtst' 'xorg-server')
+source=(http://www.bedroomlan.org/~alexios/files/SOFTWARE/evrouter/${pkgname}_${pkgver}.tar.gz)
+md5sums=('a20073e04679eb11a5c2da9ab59e75fd')
+
+build() {
+ cd "$startdir/src/$pkgname"
+ ./configure --prefix=/usr --without-xmms
+ make || return 1
+ make DESTDIR="$startdir/pkg" install
+}
diff --git a/abs/extra/exo/PKGBUILD b/abs/extra/exo/PKGBUILD
new file mode 100644
index 0000000..e402aac
--- /dev/null
+++ b/abs/extra/exo/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 28206 2009-02-28 11:01:08Z andyrtr $
+# Maintainer: tobias <tobias funnychar archlinux.org>
+# Contributor: Aurelien Foret <orelien@chez.com>
+
+pkgname=exo
+pkgver=0.3.100
+pkgrel=1
+pkgdesc="Extensions to Xfce by os-cillation"
+arch=('i686' 'x86_64')
+license=('GPL2' 'LGPL2')
+url="http://www.os-cillation.com/article.php?sid=40"
+groups=('xfce4')
+depends=("libxfce4util" "hal" 'hicolor-icon-theme')
+makedepends=("pygtk>=2.14.0" 'pkgconfig' 'libnotify' 'perl-uri')
+optdepends=('libnotify enables notification support' \
+ 'perl enables mail-compose helper script')
+options=('!libtool')
+install=${pkgname}.install
+source=(http://www.xfce.org/archive/xfce-4.6.0/src/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('ebded97ff55f43cd0fe6b16242992ecf')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/xfce4 \
+ --localstatedir=/var --disable-static --enable-notifications \
+ --enable-python || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+}
diff --git a/abs/extra/exo/exo.install b/abs/extra/exo/exo.install
new file mode 100644
index 0000000..21b79d2
--- /dev/null
+++ b/abs/extra/exo/exo.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
diff --git a/abs/extra/fakeroot/PKGBUILD b/abs/extra/fakeroot/PKGBUILD
new file mode 100644
index 0000000..f8dd4b2
--- /dev/null
+++ b/abs/extra/fakeroot/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 29508 2009-03-09 17:06:43Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Jochem Kossen <j.kossen@home.nl>
+
+pkgname=fakeroot
+pkgver=1.12.2
+pkgrel=2
+pkgdesc="Gives a fake root environment, useful for building packages as a non-privileged user"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://packages.debian.org/fakeroot"
+groups=('base-devel')
+install=fakeroot.install
+depends=('glibc' 'filesystem' 'grep' 'sed')
+options=('!libtool')
+source=(http://ftp.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.tar.gz)
+md5sums=('1eb7d972a19159035892e7d132602726')
+
+build() {
+ cd ${srcdir}/$pkgname-$pkgver
+ ./configure --prefix=/usr --libdir=/usr/lib/libfakeroot \
+ --disable-static --with-ipc=sysv
+ # --with-ipc=tcp is currently broken and no option on smp systems
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ # install README for sysv/tcp usage
+ install -Dm644 $srcdir/$pkgname-$pkgver/README $pkgdir/usr/share/doc/$pkgname/README
+}
diff --git a/abs/extra/fakeroot/fakeroot.install b/abs/extra/fakeroot/fakeroot.install
new file mode 100644
index 0000000..c2f62a7
--- /dev/null
+++ b/abs/extra/fakeroot/fakeroot.install
@@ -0,0 +1,30 @@
+# arg 1: the new package version
+post_install() {
+ if [ ! "`grep /usr/lib/libfakeroot etc/ld.so.conf`" ]; then
+ echo -n "updating /etc/ld.so.conf... "
+ echo "/usr/lib/libfakeroot" >>etc/ld.so.conf
+ sbin/ldconfig -r .
+ echo "done."
+ fi
+echo "The package is built using sysv ipc. If this causes segfaults"
+echo "see included README file and rebuild the pkg --with-ipc=tcp"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ echo -ne "\nupdating /etc/ld.so.conf... "
+ sed -i -e '/\/usr\/lib\/libfakeroot/d' etc/ld.so.conf
+ sbin/ldconfig -r .
+ echo "done."
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/extra/fceu/PKGBUILD b/abs/extra/fceu/PKGBUILD
new file mode 100755
index 0000000..cdae29a
--- /dev/null
+++ b/abs/extra/fceu/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Eric Belanger <belanger@astro.umontreal.ca>
+# Contributor: Jo Christian Bergskås <jcberg@gmail.com>
+
+pkgname=fceu
+pkgver=0.98.15
+pkgrel=1
+pkgdesc="FCE Ultra is a fast and ultra-compatible NES/Famicom emulator with SDL, OpenGL and SVGALIB support."
+arch=('i686' 'x86_64')
+url="http://fceultra.sourceforge.net"
+license="GPL"
+options=('docs')
+depends=('sdl' 'zlib')
+source=(ftp://ftp.knoppmyth.net/R6/sources/$pkgname-$pkgver-src.tar.bz2)
+md5sums=('bfe9aa7f91c19fa17bb6e5424dc5901b')
+
+build() {
+ cd $startdir/src/fceu
+ ./configure --prefix=/usr --with-opengl --build=i686-linux-gnu
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ install -D -m644 $startdir/src/fceu/Documentation/fceu-sdl.6 $startdir/pkg/usr/man/man6/fceu.6
+ install -d $startdir/pkg/usr/share/doc/fceu-doc
+ cp -r $startdir/src/fceu/Documentation/* $startdir/pkg/usr/share/doc/fceu-doc
+}
diff --git a/abs/extra/fftw/PKGBUILD b/abs/extra/fftw/PKGBUILD
new file mode 100644
index 0000000..1556108
--- /dev/null
+++ b/abs/extra/fftw/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 20304 2008-12-02 10:48:00Z ronald $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+
+pkgname=fftw
+pkgver=3.2
+pkgrel=1
+pkgdesc="A library for computing the discrete Fourier transform (DFT)"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.fftw.org/"
+depends=('glibc')
+options=(!libtool)
+source=(http://www.fftw.org/${pkgname}-${pkgver}.tar.gz)
+install=fftw.install
+
+# notes:
+# http://www.fftw.org/fftw2_doc/fftw_6.html#SEC69
+# http://www.fftw.org/faq/section2.html#singleprec
+# http://www.fftw.org/fftw3_doc/Precision.html#Precision
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # build & install double precision
+ ./configure F77=gfortran --prefix=/usr \
+ --enable-shared || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ make clean
+
+ # build & install long double precission
+ ./configure F77=gfortran --prefix=/usr \
+ --enable-long-double --enable-shared || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ make clean
+
+ # build + install single precision
+ ./configure F77=gfortran --prefix=/usr \
+ --enable-float --enable-shared || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+
+ # handle info files
+ rm -f $pkgdir/usr/share/info/dir
+ gzip $pkgdir/usr/share/info/*
+}
diff --git a/abs/extra/fftw/fftw.install b/abs/extra/fftw/fftw.install
new file mode 100644
index 0000000..a3748aa
--- /dev/null
+++ b/abs/extra/fftw/fftw.install
@@ -0,0 +1,22 @@
+info_dir=/usr/share/info
+info_files=(fftw3.info)
+
+post_install() {
+ for f in ${info_files[@]}; do
+ install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ for f in ${info_files[@]}; do
+ install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+
+
+
diff --git a/abs/extra/frozen-bubble/PKGBUILD b/abs/extra/frozen-bubble/PKGBUILD
new file mode 100644
index 0000000..ca48827
--- /dev/null
+++ b/abs/extra/frozen-bubble/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Thomas Baechler <thomas@archlinux.org>
+# Contributer: Brandon Niemczyk <maccorin@cfl.rr.com>
+
+pkgname=frozen-bubble
+pkgver=2.1.0
+pkgrel=2
+pkgdesc="A game in which you throw colorful bubbles and build groups to destroy the bubbles"
+arch=(i686 x86_64)
+url="http://www.frozen-bubble.org"
+depends=('sdl_perl' 'sdl_mixer' 'perl-locale-gettext' 'sdl_pango')
+makedepends=('imagemagick')
+source=(http://www.frozen-bubble.org/data/${pkgname}-${pkgver}.tar.bz2 \
+ frozen-bubble.desktop)
+md5sums=('f5eb984897e1ccd52a0d8820d8359861' '3e0755836580e374e0911653f8cd33e2')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}/gfx/balls
+ # Fix missing files for colourblind
+ for g in bubble-colourblind-?.gif; do
+ convert -depth 8 -scale 16x16 ${g} ${g/%.gif/-mini.png}
+ done
+ cd ../..
+ make OPTIMIZE="${CFLAGS}" \
+ CFLAGS="$(pkg-config glib-2.0 --cflags)" INSTALLDIRS=vendor \
+ PREFIX=/usr || return 1
+
+ make DESTDIR=${startdir}/pkg PREFIX=/usr install || return 1
+ install -D -m644 icons/frozen-bubble-icon-64x64.png ${startdir}/pkg/usr/share/pixmaps/frozen-bubble.png || return 1
+ install -D -m644 ${startdir}/src/frozen-bubble.desktop ${startdir}/pkg/usr/share/applications/frozen-bubble.desktop || return 1
+}
diff --git a/abs/extra/frozen-bubble/frozen-bubble.desktop b/abs/extra/frozen-bubble/frozen-bubble.desktop
new file mode 100644
index 0000000..6e53e5d
--- /dev/null
+++ b/abs/extra/frozen-bubble/frozen-bubble.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Encoding=UTF-8
+Name=Frozen Bubble
+Icon=frozen-bubble.png
+Exec=frozen-bubble
+Terminal=false
+Categories=Game;
diff --git a/abs/extra/fuppes-svn/PKGBUILD b/abs/extra/fuppes-svn/PKGBUILD
new file mode 100644
index 0000000..67936c0
--- /dev/null
+++ b/abs/extra/fuppes-svn/PKGBUILD
@@ -0,0 +1,52 @@
+# Contributor: Andrew Krawchyk <krawch_a@denison.edu>
+# patch for svn r634: Ivan Yurasov <vd@vdk.su>
+
+pkgname=fuppes-svn
+pkgver=636
+pkgrel=9
+pkgdesc="A free, multiplatform Universal Plug and Play A/V MediaServer"
+arch=('i686' 'x86_64')
+url="http://fuppes.ulrich-voelkel.de/"
+license=('GPL2')
+depends=('pcre' 'libxml2' 'sqlite3' 'gettext' 'taglib' 'imagemagick' 'ffmpeg' 'libmp4v2' 'lame' 'libvorbis' 'libmpcdec' 'flac' 'faad2' 'libmad')
+makdepends=('pkgconfig' 'autoconf' 'subversion')
+install=fuppes.install
+source=(fuppes-r634-archlinux.patch fuppes.diff fuppes.cfg run fuppes.ch fuppes.lr)
+md5sums=('5d9f6331cc91b64aab69449ce327b214' 'c495fa1bd9a870ae36820632434319ee' \
+ 'b0cef07d8e60d01c8146a69870672e1f' '3850001378088e5efac60487e5550d54' \
+ '3c355b860f1b0d273f5aa8b2bea1bde6')
+
+_svnmod="fuppes"
+_svntrunk="https://fuppes.svn.sourceforge.net/svnroot/fuppes/trunk"
+
+build()
+{
+ cd ${startdir}/src
+
+ msg "Getting sources..."
+ svn co ${_svntrunk} ${_svnmod}
+ msg "Done getting sources or failed to connect to server."
+
+ cd ${_svnmod}
+
+# patch -Np0 -i ../fuppes-r634-archlinux.patch
+# patch -Np0 -i ../fuppes.diff
+ autoreconf -vfi
+
+ ./configure --prefix=/usr \
+ --enable-video-transcoding \
+ --disable-twolame || return 1
+
+ make || return 1
+ make DESTDIR=$startdir/pkg install || return 1
+ mkdir -p $startdir/pkg/etc/sv/fuppes/supervise
+ install -D -m755 $startdir/src/run $startdir/pkg/etc/sv/fuppes/
+ mkdir -p $startdir/pkg/etc/fuppes
+ cp $startdir/src/fuppes.cfg $startdir/pkg/etc/fuppes
+ mkdir -p $startdir/pkg/etc/cron.hourly
+ mkdir -p $startdir/pkg/etc/logrotate.d/
+ mkdir -p $startdir/pkg/etc/sv/fuppes/supervise
+ install -D -m755 $startdir/src/fuppes.ch $startdir/pkg/etc/cron.hourly
+ install -D -m755 $startdir/src/run $startdir/pkg/etc/sv/fuppes
+ install -D -m755 $startdir/src/fuppes.lr $startdir/pkg/etc/logrotate.d
+}
diff --git a/abs/extra/fuppes-svn/PKGBUILD.orig b/abs/extra/fuppes-svn/PKGBUILD.orig
new file mode 100644
index 0000000..79d11e2
--- /dev/null
+++ b/abs/extra/fuppes-svn/PKGBUILD.orig
@@ -0,0 +1,52 @@
+# Contributor: Andrew Krawchyk <krawch_a@denison.edu>
+# patch for svn r634: Ivan Yurasov <vd@vdk.su>
+
+pkgname=fuppes-svn
+pkgver=636
+pkgrel=9
+pkgdesc="A free, multiplatform Universal Plug and Play A/V MediaServer"
+arch=('i686' 'x86_64')
+url="http://fuppes.ulrich-voelkel.de/"
+license=('GPL2')
+depends=('pcre' 'libxml2' 'sqlite3' 'gettext' 'taglib' 'imagemagick' 'ffmpeg' 'libmp4v2' 'lame' 'libvorbis' 'libmpcdec' 'flac' 'faad2' 'libmad')
+makdepends=('pkgconfig' 'autoconf' 'subversion')
+install=fuppes.install
+source=(fuppes-r634-archlinux.patch fuppes.diff fuppes.cfg run fuppes.ch fuppes.lr)
+md5sums=('5d9f6331cc91b64aab69449ce327b214' 'c495fa1bd9a870ae36820632434319ee' \
+ 'b0cef07d8e60d01c8146a69870672e1f' '3850001378088e5efac60487e5550d54' \
+ '3c355b860f1b0d273f5aa8b2bea1bde6')
+
+_svnmod="fuppes"
+_svntrunk="https://fuppes.svn.sourceforge.net/svnroot/fuppes/trunk"
+
+build()
+{
+ cd ${startdir}/src
+
+ msg "Getting sources..."
+ svn co -r 636 ${_svntrunk} ${_svnmod}
+ msg "Done getting sources or failed to connect to server."
+
+ cd ${_svnmod}
+
+ patch -Np0 -i ../fuppes-r634-archlinux.patch
+ patch -Np0 -i ../fuppes.diff
+ autoreconf -vfi
+
+ ./configure --prefix=/usr \
+ --enable-video-transcoding \
+ --disable-twolame || return 1
+
+ make || return 1
+ make DESTDIR=$startdir/pkg install || return 1
+ mkdir -p $startdir/pkg/etc/sv/fuppes/supervise
+ install -D -m755 $startdir/src/run $startdir/pkg/etc/sv/fuppes/
+ mkdir -p $startdir/pkg/etc/fuppes
+ cp $startdir/src/fuppes.cfg $startdir/pkg/etc/fuppes
+ mkdir -p $startdir/pkg/etc/cron.hourly
+ mkdir -p $startdir/pkg/etc/logrotate.d/
+ mkdir -p $startdir/pkg/etc/sv/fuppes/supervise
+ install -D -m755 $startdir/src/fuppes.ch $startdir/pkg/etc/cron.hourly
+ install -D -m755 $startdir/src/run $startdir/pkg/etc/sv/fuppes
+ install -D -m755 $startdir/src/fuppes.lr $startdir/pkg/etc/logrotate.d
+}
diff --git a/abs/extra/fuppes-svn/fuppes-r634-archlinux.patch b/abs/extra/fuppes-svn/fuppes-r634-archlinux.patch
new file mode 100644
index 0000000..feaccfa
--- /dev/null
+++ b/abs/extra/fuppes-svn/fuppes-r634-archlinux.patch
@@ -0,0 +1,93 @@
+Index: src/plugins/ffmpeg/ffmpeg.cpp
+===================================================================
+--- src/plugins/ffmpeg/ffmpeg.cpp (revision 634)
++++ src/plugins/ffmpeg/ffmpeg.cpp (working copy)
+@@ -2190,7 +2190,7 @@
+ p=NULL;
+ for(p = av_codec_next(p); p != NULL; p = av_codec_next(p) ) {
+ #else
+- for(p = first_avcodec; p != NULL; p = p->next) {
++ for(p = av_codec_next(NULL); p != NULL; p = p->next) {
+ #endif
+
+ if((p2==NULL || strcmp(p->name, p2->name)<0) &&
+@@ -2269,7 +2269,7 @@
+ }
+ avformat_opts = av_alloc_format_context();
+ #ifdef HAVE_LIBSWSCALE
+- sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL);
++ sws_opts = sws_getContext(16,16,(PixelFormat)0, 16,16,(PixelFormat)0, sws_flags, NULL,NULL,NULL);
+ #endif
+
+
+Index: src/plugins/ffmpeg/ffmpeg.h
+===================================================================
+--- src/plugins/ffmpeg/ffmpeg.h (revision 634)
++++ src/plugins/ffmpeg/ffmpeg.h (working copy)
+@@ -38,7 +38,7 @@
+ #include <ctype.h>
+ #include <string.h>
+
+-#if FFMPEG_VERSION >= 52 && !defined(OLD_INCLUDES_PATH)
++/* #if FFMPEG_VERSION >= 52 && !defined(OLD_INCLUDES_PATH) */
+ #include <libavformat/avformat.h>
+ #include <libavutil/avutil.h>
+ #include <libavutil/fifo.h>
+@@ -51,27 +51,27 @@
+ #ifdef HAVE_AVSTRING_H
+ #include <libavutil/avstring.h>
+ #endif
+-#else
++/* #else
+ #include <avformat.h>
+ #include <avutil.h>
+ #include <fifo.h>
+- #include <opt.h>
++ #include <opt.h> */
+
+
+ #ifdef HAVE_LIBSWSCALE
+- #include <swscale.h>
++ #include <libswscale/swscale.h>
+ #endif
+
+ #ifdef HAVE_AVSTRING_H
+- #include <avstring.h>
++ #include <libavutil/avstring.h>
+ #endif
+-#endif
++/* #endif */
+
+
+ #include <math.h>
+ #include <stdlib.h>
+ #include <limits.h>
+- //#include <mem.h>
++ //#include <mem.h>
+
+ }
+ #endif // __cplusplus
+Index: version.sh
+===================================================================
+--- version.sh (revision 634)
++++ version.sh (working copy)
+@@ -1,8 +1,15 @@
+ #!/bin/sh
+
+-svn_revision=`cd "$1" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
+-test $svn_revision || svn_revision=`cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2`
+-test $svn_revision || svn_revision=`cd "$1" && sed -n -e '/^dir$/{n;p;q}' .svn/entries 2>/dev/null`
++if [ "$1" == "" ]
++then
++DIR="."
++else
++DIR="$1"
++fi
++
++svn_revision=`cd "$DIR" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
++test $svn_revision || svn_revision=`cd "$DIR" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2`
++test $svn_revision || svn_revision=`cd "$DIR" && sed -n -e '/^dir$/{n;p;q}' .svn/entries 2>/dev/null`
+ test $svn_revision || svn_revision=UNKNOWN
+
+ NEW_REVISION="#define FUPPES_VERSION \"0.$svn_revision\""
+
diff --git a/abs/extra/fuppes-svn/fuppes.cfg b/abs/extra/fuppes-svn/fuppes.cfg
new file mode 100644
index 0000000..beb81cf
--- /dev/null
+++ b/abs/extra/fuppes-svn/fuppes.cfg
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fuppes_config version="0.7.2.3">
+ <shared_objects>
+ <!--<dir>/mnt/music</dir>-->
+ <!--<itunes>/Users/.../iTunes.xml</itunes>-->
+ <dir>/myth/tv</dir>
+ <dir>/myth/video</dir>
+ <dir>/myth/music</dir>
+ <dir>/myth/gallery</dir>
+ <dir>/myth/pretty</dir>
+ </shared_objects>
+ <network>
+ <!--empty = automatic detection-->
+ <interface>192.168.1.253</interface>
+ <!--empty or 0 = random port-->
+ <http_port>81</http_port>
+ <!--list of ip addresses allowed to access fuppes. if empty all ips are allowed-->
+ <allowed_ips>
+ <!--<ip>192.168.0.1</ip>-->
+ </allowed_ips>
+ </network>
+ <content_directory>
+ <!--a list of possible charsets can be found under:
+ http://www.gnu.org/software/libiconv/-->
+ <local_charset>UTF-8</local_charset>
+ <!--libs used for metadata extraction when building the database. [true|false]-->
+ <use_imagemagick>true</use_imagemagick>
+ <use_taglib>true</use_taglib>
+ <use_libavformat>true</use_libavformat>
+ </content_directory>
+ <global_settings>
+ <temp_dir/>
+ <!--uuid is written to and read from <config-dir>/uuid.txt if set to true-->
+ <use_fixed_uuid>false</use_fixed_uuid>
+ </global_settings>
+ <device_settings>
+ <!--"default" settings are inhertied by specific devices and can be overwritten-->
+ <!--do NOT remove the "default" device settings-->
+ <!--all new file types have to be added to the default settings-->
+ <!--adding new file types just to a specific device will have no affect-->
+ <device name="default">
+ <!--specify the maximum length for file names (0 or empty = unlimited)-->
+ <max_file_name_length>0</max_file_name_length>
+ <!--[file|container]-->
+ <playlist_style>file</playlist_style>
+ <show_childcount_in_title>false</show_childcount_in_title>
+ <enable_dlna>false</enable_dlna>
+ <transcoding_release_delay>4</transcoding_release_delay>
+ <file_settings>
+ <!--audio files-->
+ <file ext="mp3">
+ <type>AUDIO_ITEM</type>
+ <mime_type>audio/mpeg</mime_type>
+ <dlna>MP3</dlna>
+ </file>
+ <file ext="ogg">
+ <type>AUDIO_ITEM</type>
+ <mime_type>application/octet-stream</mime_type>
+ <transcode enabled="true">
+ <ext>mp3</ext>
+ <mime_type>audio/mpeg</mime_type>
+ <dlna>MP3</dlna>
+ <http_encoding>chunked</http_encoding>
+ <decoder>vorbis</decoder>
+ <encoder>lame</encoder>
+ <bitrate>192</bitrate>
+ <samplerate>44100</samplerate>
+ </transcode>
+ </file>
+ <file ext="mpc">
+ <type>AUDIO_ITEM</type>
+ <mime_type>application/octet-stream</mime_type>
+ <transcode enabled="true">
+ <ext>mp3</ext>
+ <mime_type>audio/mpeg</mime_type>
+ <dlna>MP3</dlna>
+ <http_encoding>chunked</http_encoding>
+ <decoder>musepack</decoder>
+ <encoder>lame</encoder>
+ <bitrate>192</bitrate>
+ <samplerate>44100</samplerate>
+ </transcode>
+ </file>
+ <file ext="wav">
+ <type>AUDIO_ITEM</type>
+ <mime_type>audio/x-wav</mime_type>
+ </file>
+ <file ext="flac">
+ <type>AUDIO_ITEM</type>
+ <mime_type>audio/x-flac</mime_type>
+ <transcode enabled="true">
+ <ext>mp3</ext>
+ <mime_type>audio/mpeg</mime_type>
+ <dlna>MP3</dlna>
+ <http_encoding>chunked</http_encoding>
+ <decoder>flac</decoder>
+ <encoder>lame</encoder>
+ <bitrate>192</bitrate>
+ <samplerate>44100</samplerate>
+ </transcode>
+ </file>
+ <file ext="wma">
+ <type>AUDIO_ITEM</type>
+ <mime_type>audio/x-ms-wma</mime_type>
+ <dlna>WMAFULL</dlna>
+ </file>
+ <!--image files-->
+ <file ext="jpg">
+ <ext>jpeg</ext>
+ <type>IMAGE_ITEM</type>
+ <mime_type>image/jpeg</mime_type>
+ <convert enabled="false">
+ <!--<dcraw enabled="true">-q 0</dcraw>-->
+ <ext>png</ext>
+ <mime_type>image/png</mime_type>
+ <height>0</height>
+ <width>0</width>
+ <!--set "greater" to "true" if you only want to resize images greater than "height" or "width"-->
+ <greater>false</greater>
+ <!--set "less" to "true" if you only want to resize images less than "height" or "width"-->
+ <less>false</less>
+ <!--set "less" and "greater" to "false" if you always want to resize-->
+ </convert>
+ </file>
+ <file ext="bmp">
+ <type>IMAGE_ITEM</type>
+ <mime_type>image/bmp</mime_type>
+ </file>
+ <file ext="png">
+ <type>IMAGE_ITEM</type>
+ <mime_type>image/png</mime_type>
+ </file>
+ <file ext="gif">
+ <type>IMAGE_ITEM</type>
+ <mime_type>image/gif</mime_type>
+ </file>
+ <!--video files-->
+ <file ext="mpg">
+ <ext>mpeg</ext>
+ <type>VIDEO_ITEM</type>
+ <mime_type>video/mpeg</mime_type>
+ </file>
+ <file ext="mp4">
+ <type>VIDEO_ITEM</type>
+ <mime_type>video/mp4</mime_type>
+ </file>
+ <file ext="avi">
+ <type>VIDEO_ITEM</type>
+ <mime_type>video/x-msvideo</mime_type>
+ </file>
+ <file ext="wmv">
+ <type>VIDEO_ITEM</type>
+ <mime_type>video/x-ms-wmv</mime_type>
+ </file>
+ <file ext="vob">
+ <type>VIDEO_ITEM</type>
+ <mime_type>video/x-ms-vob</mime_type>
+ </file>
+ <file ext="vdr">
+ <type>VIDEO_ITEM</type>
+ <mime_type>video/x-extension-vdr</mime_type>
+ <transcode enabled="true">
+ <ext>vob</ext>
+ <mime_type>video/x-ms-vob</mime_type>
+ </transcode>
+ </file>
+ <file ext="flv">
+ <type>VIDEO_ITEM</type>
+ <mime_type>application/x-flash-video</mime_type>
+ </file>
+ <file ext="asf">
+ <type>VIDEO_ITEM</type>
+ <mime_type>video/x-ms-asf</mime_type>
+ </file>
+ <!--playlists-->
+ <file ext="pls">
+ <type>PLAYLIST</type>
+ <mime_type>audio/x-scpls</mime_type>
+ </file>
+ <file ext="m3u">
+ <type>PLAYLIST</type>
+ <mime_type>audio/x-mpegurl</mime_type>
+ </file>
+ </file_settings>
+ </device>
+ <!--For other device settings take a look at http://fuppes.ulrich-voelkel.de/wiki/index.php/Category:Device-->
+ <!--If you have more than one device it is a good idea to set the ip address as some devices may have conflicting "user agents".-->
+ <!--It is safe to remove unneeded devices-->
+ <device name="PS3" enabled="false">
+ <user_agent>UPnP/1.0 DLNADOC/1.00</user_agent>
+ <user_agent>PLAYSTATION3</user_agent>
+ <!--<ip></ip>-->
+ <enable_dlna>true</enable_dlna>
+ <transcoding_release_delay>50</transcoding_release_delay>
+ <file_settings>
+ <file ext="ogg">
+ <type>AUDIO_ITEM_MUSIC_TRACK</type>
+ <transcode enabled="true">
+ <http_encoding>stream</http_encoding>
+ </transcode>
+ </file>
+ </file_settings>
+ </device>
+ <device name="Xbox 360" virtual="Xbox 360" enabled="false">
+ <user_agent>Xbox/2.0.\d+.\d+ UPnP/1.0 Xbox/2.0.\d+.\d+</user_agent>
+ <user_agent>Xenon</user_agent>
+ <xbox360>true</xbox360>
+ <show_empty_resolution>true</show_empty_resolution>
+ <description_values>
+ <friendly_name>%s %v : 1 : Windows Media Connect</friendly_name>
+ <model_name>Windows Media Connect compatible (%s)</model_name>
+ <model_number>2.0</model_number>
+ </description_values>
+ </device>
+ </device_settings>
+</fuppes_config>
diff --git a/abs/extra/fuppes-svn/fuppes.ch b/abs/extra/fuppes-svn/fuppes.ch
new file mode 100644
index 0000000..60960b5
--- /dev/null
+++ b/abs/extra/fuppes-svn/fuppes.ch
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/wget -O /dev/null -q http://localhost:81/presentation/options.html?db=update &> /dev/null
diff --git a/abs/extra/fuppes-svn/fuppes.diff b/abs/extra/fuppes-svn/fuppes.diff
new file mode 100644
index 0000000..9b7b6a8
--- /dev/null
+++ b/abs/extra/fuppes-svn/fuppes.diff
@@ -0,0 +1,25 @@
+--- src/plugins/ffmpeg/ffmpeg.cpp.orig 2009-05-29 20:12:09.000000000 +0000
++++ src/plugins/ffmpeg/ffmpeg.cpp 2009-05-29 20:10:01.000000000 +0000
+@@ -1021,19 +1021,9 @@
+ if (subtitle_to_free) {
+ if (subtitle_to_free->rects != NULL) {
+ for (i = 0; i < subtitle_to_free->num_rects; i++) {
+-
+-#ifndef LIBAVCODEC_VERSION_MINOR
+-#define LIBAVCODEC_VERSION_MINOR 0
+-#endif
+-
+-#if LIBAVCODEC_VERSION_MINOR >= 11
+- av_freep(subtitle_to_free->rects[i]->pict.data[0]);
+- av_freep(subtitle_to_free->rects[i]->pict.data[1]);
+- av_freep(subtitle_to_free->rects[i]);
+-#else
+- av_free(subtitle_to_free->rects[i].bitmap);
+- av_free(subtitle_to_free->rects[i].rgba_palette);
+-#endif
++ av_freep(&subtitle_to_free->rects[i]->pict.data[0]);
++ av_freep(&subtitle_to_free->rects[i]->pict.data[1]);
++ av_freep(&subtitle_to_free->rects[i]);
+ }
+ av_freep(&subtitle_to_free->rects);
+ }
diff --git a/abs/extra/fuppes-svn/fuppes.install b/abs/extra/fuppes-svn/fuppes.install
new file mode 100644
index 0000000..d0099e3
--- /dev/null
+++ b/abs/extra/fuppes-svn/fuppes.install
@@ -0,0 +1,20 @@
+# arg 1: the new package version
+post_install() {
+ sv stop mythbackend
+ mv /etc/sv/mythbackend/run /tmp
+ sed 's/logfile/noupnp\ --logfile/' </tmp/run >/etc/sv/mythbackend/run
+ chmod 755 /etc/sv/mythbackend/run
+ sv start mythbackend
+ add_service.sh fuppes
+ sv start fuppes
+}
+
+post_remove() {
+ sv stop fuppes
+ remove_service.sh fuppes
+ mv /etc/sv/mythbackend/run /tmp/run
+ sv stop mythbackend
+ sed 's/--noupnp\ --logfile/--logfile/' </tmp/run >/etc/sv/mythbackend/run
+ chmod 755 /etc/sv/mythbackend/run
+ sv start mythbackend
+}
diff --git a/abs/extra/fuppes-svn/fuppes.lr b/abs/extra/fuppes-svn/fuppes.lr
new file mode 100644
index 0000000..ec2f88f
--- /dev/null
+++ b/abs/extra/fuppes-svn/fuppes.lr
@@ -0,0 +1,9 @@
+/var/log/fuppes/fuppes.log {
+ copytruncate
+ daily
+ size 10M
+ missingok
+ rotate 7
+ compress
+ notifempty
+}
diff --git a/abs/extra/fuppes-svn/run b/abs/extra/fuppes-svn/run
new file mode 100755
index 0000000..dc69879
--- /dev/null
+++ b/abs/extra/fuppes-svn/run
@@ -0,0 +1,2 @@
+#!/bin/bash
+exec su mythtv -c "/usr/bin/fuppes --config-dir /etc/fuppes --database-file /data/srv/fuppes/fuppes.db --temp-dir /myth/tmp"
diff --git a/abs/extra/gconf/01_xml-gettext-domain.patch b/abs/extra/gconf/01_xml-gettext-domain.patch
new file mode 100644
index 0000000..7491ca8
--- /dev/null
+++ b/abs/extra/gconf/01_xml-gettext-domain.patch
@@ -0,0 +1,299 @@
+# Description: Support calling gettext at runtime and putting the gettext domain into the .schemas file instead of replicating translations in /usr/share/gconf/schemas/*.schemas *and* /var/lib/gconf/defaults/%gconf-tree-$LANG.xml. This saves in the order of 90 MB uncompressed/10 MB compressed on hard disks.
+# Ubuntu: https://bugs.launchpad.net/bugs/123025
+# Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=568845
+diff -Nur -x '*.orig' -x '*~' gconf-2.25.0/backends/markup-tree.c gconf-2.25.0.new/backends/markup-tree.c
+--- gconf-2.25.0/backends/markup-tree.c 2009-01-10 05:55:08.000000000 +0100
++++ gconf-2.25.0.new/backends/markup-tree.c 2009-01-23 12:11:48.000000000 +0100
+@@ -52,6 +52,7 @@
+ char *schema_name;
+ char *mod_user;
+ GTime mod_time;
++ char *gettext_domain;
+ };
+
+ static LocalSchemaInfo* local_schema_info_new (void);
+@@ -1351,6 +1352,7 @@
+ gconf_value_free (entry->value);
+ g_free (entry->schema_name);
+ g_free (entry->mod_user);
++ g_free (entry->gettext_domain);
+
+ g_slist_foreach (entry->local_schemas,
+ (GFunc) local_schema_info_free,
+@@ -1593,6 +1595,8 @@
+ gconf_schema_get_type (schema));
+ gconf_schema_set_owner (current_schema,
+ gconf_schema_get_owner (schema));
++ gconf_schema_set_gettext_domain (current_schema,
++ gconf_schema_get_gettext_domain (schema));
+ }
+
+ /* Update mod time */
+@@ -1805,6 +1809,8 @@
+ else if (c_local_schema && c_local_schema->long_desc)
+ gconf_schema_set_long_desc (schema, c_local_schema->long_desc);
+
++ gconf_schema_set_gettext_domain (schema, entry->gettext_domain);
++
+ return retval;
+ }
+ }
+@@ -2339,8 +2345,9 @@
+ const char *ltype;
+ const char *list_type;
+ const char *owner;
++
+ GConfValueType vtype;
+- const char *dummy1, *dummy2, *dummy3, *dummy4;
++ const char *dummy1, *dummy2, *dummy3, *dummy4, *dummy5;
+
+ #if 0
+ g_assert (ELEMENT_IS ("entry") ||
+@@ -2377,6 +2384,7 @@
+ "muser", &dummy2,
+ "mtime", &dummy3,
+ "schema", &dummy4,
++ "gettext_domain", &dummy5,
+
+ NULL))
+ return;
+@@ -2682,6 +2690,7 @@
+ const char *mtime;
+ const char *schema;
+ const char *type;
++ const char *gettext_domain;
+ const char *dummy1, *dummy2, *dummy3, *dummy4;
+ const char *dummy5, *dummy6, *dummy7;
+ GConfValue *value;
+@@ -2692,6 +2701,7 @@
+ mtime = NULL;
+ schema = NULL;
+ type = NULL;
++ gettext_domain = NULL;
+
+ if (!locate_attributes (context, element_name, attribute_names, attribute_values,
+ error,
+@@ -2700,6 +2710,7 @@
+ "mtime", &mtime,
+ "schema", &schema,
+ "type", &type,
++ "gettext_domain", &gettext_domain,
+
+ /* These are allowed but we don't use them until
+ * parse_value_element
+@@ -2767,6 +2778,9 @@
+ */
+ if (schema)
+ entry->schema_name = g_strdup (schema);
++
++ if (gettext_domain)
++ entry->gettext_domain = g_strdup (gettext_domain);
+ }
+ else
+ {
+@@ -3705,6 +3719,7 @@
+ GConfSchema *schema;
+ GConfValueType stype;
+ const char *owner;
++ const char *gettext_domain;
+
+ schema = gconf_value_get_schema (value);
+
+@@ -3730,6 +3745,23 @@
+
+ g_free (s);
+ }
++
++ gettext_domain = gconf_schema_get_gettext_domain (schema);
++
++ if (gettext_domain)
++ {
++ char *s;
++
++ s = g_markup_escape_text (gettext_domain, -1);
++
++ if (fprintf (f, " gettext_domain=\"%s\"", s) < 0)
++ {
++ g_free (s);
++ return FALSE;
++ }
++
++ g_free (s);
++ }
+
+ if (stype == GCONF_VALUE_LIST)
+ {
+diff -Nur -x '*.orig' -x '*~' gconf-2.25.0/gconf/gconf-schema.c gconf-2.25.0.new/gconf/gconf-schema.c
+--- gconf-2.25.0/gconf/gconf-schema.c 2009-01-10 05:55:07.000000000 +0100
++++ gconf-2.25.0.new/gconf/gconf-schema.c 2009-01-23 12:11:48.000000000 +0100
+@@ -35,6 +35,7 @@
+ gchar* owner; /* Name of creating application */
+ gchar* short_desc; /* 40 char or less description, no newlines */
+ gchar* long_desc; /* could be a paragraph or so */
++ gchar* gettext_domain; /* description gettext domain */
+ GConfValue* default_value; /* Default value of the key */
+ } GConfRealSchema;
+
+@@ -63,6 +64,7 @@
+ g_free (real->locale);
+ g_free (real->short_desc);
+ g_free (real->long_desc);
++ g_free (real->gettext_domain);
+ g_free (real->owner);
+
+ if (real->default_value)
+@@ -91,6 +93,8 @@
+
+ dest->long_desc = g_strdup (real->long_desc);
+
++ dest->gettext_domain = g_strdup (real->gettext_domain);
++
+ dest->owner = g_strdup (real->owner);
+
+ dest->default_value = real->default_value ? gconf_value_copy (real->default_value) : NULL;
+@@ -136,6 +140,20 @@
+ REAL_SCHEMA (sc)->locale = NULL;
+ }
+
++void
++gconf_schema_set_gettext_domain (GConfSchema* sc, const gchar* domain)
++{
++ g_return_if_fail (domain == NULL || g_utf8_validate (domain, -1, NULL));
++
++ if (REAL_SCHEMA (sc)->gettext_domain)
++ g_free (REAL_SCHEMA (sc)->gettext_domain);
++
++ if (domain)
++ REAL_SCHEMA (sc)->gettext_domain = g_strdup (domain);
++ else
++ REAL_SCHEMA (sc)->gettext_domain = NULL;
++}
++
+ void
+ gconf_schema_set_short_desc (GConfSchema* sc, const gchar* desc)
+ {
+@@ -228,6 +246,14 @@
+ return FALSE;
+ }
+
++ if (real->gettext_domain && !g_utf8_validate (real->gettext_domain, -1, NULL))
++ {
++ g_set_error (err, GCONF_ERROR,
++ GCONF_ERROR_FAILED,
++ _("Schema contains invalid UTF-8"));
++ return FALSE;
++ }
++
+ if (real->owner && !g_utf8_validate (real->owner, -1, NULL))
+ {
+ g_set_error (err, GCONF_ERROR,
+@@ -299,11 +325,22 @@
+ }
+
+ const char*
++gconf_schema_get_gettext_domain (const GConfSchema *schema)
++{
++ g_return_val_if_fail (schema != NULL, NULL);
++
++ return REAL_SCHEMA (schema)->gettext_domain;
++}
++
++const char*
+ gconf_schema_get_short_desc (const GConfSchema *schema)
+ {
+ g_return_val_if_fail (schema != NULL, NULL);
+
+- return REAL_SCHEMA (schema)->short_desc;
++ if (REAL_SCHEMA (schema)->gettext_domain)
++ return g_dgettext(REAL_SCHEMA (schema)->gettext_domain, REAL_SCHEMA (schema)->short_desc);
++ else
++ return REAL_SCHEMA (schema)->short_desc;
+ }
+
+ const char*
+@@ -311,7 +348,10 @@
+ {
+ g_return_val_if_fail (schema != NULL, NULL);
+
+- return REAL_SCHEMA (schema)->long_desc;
++ if (REAL_SCHEMA (schema)->gettext_domain)
++ return dgettext(REAL_SCHEMA (schema)->gettext_domain, REAL_SCHEMA (schema)->long_desc);
++ else
++ return REAL_SCHEMA (schema)->long_desc;
+ }
+
+ const char*
+diff -Nur -x '*.orig' -x '*~' gconf-2.25.0/gconf/gconf-schema.h gconf-2.25.0.new/gconf/gconf-schema.h
+--- gconf-2.25.0/gconf/gconf-schema.h 2009-01-10 05:55:07.000000000 +0100
++++ gconf-2.25.0.new/gconf/gconf-schema.h 2009-01-23 12:11:48.000000000 +0100
+@@ -48,6 +48,8 @@
+ GConfValueType type);
+ void gconf_schema_set_locale (GConfSchema *sc,
+ const gchar *locale);
++void gconf_schema_set_gettext_domain (GConfSchema *sc,
++ const gchar *domain);
+ void gconf_schema_set_short_desc (GConfSchema *sc,
+ const gchar *desc);
+ void gconf_schema_set_long_desc (GConfSchema *sc,
+@@ -65,6 +67,7 @@
+ GConfValueType gconf_schema_get_car_type (const GConfSchema *schema);
+ GConfValueType gconf_schema_get_cdr_type (const GConfSchema *schema);
+ const char* gconf_schema_get_locale (const GConfSchema *schema);
++const char* gconf_schema_get_gettext_domain(const GConfSchema *schema);
+ const char* gconf_schema_get_short_desc (const GConfSchema *schema);
+ const char* gconf_schema_get_long_desc (const GConfSchema *schema);
+ const char* gconf_schema_get_owner (const GConfSchema *schema);
+diff -Nur -x '*.orig' -x '*~' gconf-2.25.0/gconf/gconftool.c gconf-2.25.0.new/gconf/gconftool.c
+--- gconf-2.25.0/gconf/gconftool.c 2009-01-10 05:55:07.000000000 +0100
++++ gconf-2.25.0.new/gconf/gconftool.c 2009-01-23 12:11:48.000000000 +0100
+@@ -3293,6 +3293,7 @@
+ GConfValueType cdr_type;
+ GConfValue* global_default;
+ GHashTable* hash;
++ gchar* gettext_domain;
+ };
+
+ static int
+@@ -3545,6 +3546,15 @@
+ else
+ g_printerr (_("WARNING: empty <applyto> node"));
+ }
++ else if (strcmp((char *)iter->name, "gettext_domain") == 0)
++ {
++ tmp = (char *)xmlNodeGetContent(iter);
++ if (tmp)
++ {
++ info->gettext_domain = g_strdup(tmp);
++ xmlFree(tmp);
++ }
++ }
+ else
+ g_printerr (_("WARNING: node <%s> not understood below <schema>\n"),
+ iter->name);
+@@ -3634,6 +3644,9 @@
+ if (info->owner != NULL)
+ gconf_schema_set_owner(schema, info->owner);
+
++ if (info->gettext_domain != NULL)
++ gconf_schema_set_gettext_domain(schema, info->gettext_domain);
++
+ xmlFree(name);
+
+ /* Locale-specific info */
+@@ -3763,6 +3776,7 @@
+ info.apply_to = NULL;
+ info.owner = NULL;
+ info.global_default = NULL;
++ info.gettext_domain = NULL;
+ info.hash = g_hash_table_new(g_str_hash, g_str_equal);
+
+ extract_global_info(node, &info);
+@@ -3799,6 +3813,8 @@
+ ; /* nothing */
+ else if (strcmp((char *)iter->name, "applyto") == 0)
+ ; /* nothing */
++ else if (strcmp((char *)iter->name, "gettext_domain") == 0)
++ ; /* nothing */
+ else if (strcmp((char *)iter->name, "locale") == 0)
+ {
+ process_locale_info(iter, &info);
diff --git a/abs/extra/gconf/05_from_vuntz_gconf2-pk-default-path.patch b/abs/extra/gconf/05_from_vuntz_gconf2-pk-default-path.patch
new file mode 100644
index 0000000..c303e19
--- /dev/null
+++ b/abs/extra/gconf/05_from_vuntz_gconf2-pk-default-path.patch
@@ -0,0 +1,12 @@
+diff -Nur -x '*.orig' -x '*~' gconf-2.25.2/defaults/gconf-defaults.c gconf-2.25.2.new/defaults/gconf-defaults.c
+--- gconf-2.25.2/defaults/gconf-defaults.c 2009-02-17 01:15:19.000000000 +0100
++++ gconf-2.25.2.new/defaults/gconf-defaults.c 2009-02-17 11:12:39.000000000 +0100
+@@ -507,7 +507,7 @@
+ else {
+ annotation_key = "org.gnome.gconf.defaults.set-system.prefix";
+ default_action = "org.gnome.gconf.defaults.set-system";
+- dest_address = "xml:merged:" SYSGCONFDIR "/gconf.xml.system";
++ dest_address = "xml:merged:" SYSGCONFDIR "/gconf.xml.defaults";
+ }
+
+ for (i = 0; includes[i]; i++) {
diff --git a/abs/extra/gconf/PKGBUILD b/abs/extra/gconf/PKGBUILD
new file mode 100644
index 0000000..053e26a
--- /dev/null
+++ b/abs/extra/gconf/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 33882 2009-04-05 19:42:30Z jgc $
+# Maintainer: Jan de Groot <jan@archlinux.org>
+
+pkgname=gconf
+pkgver=2.26.0
+pkgrel=3
+pkgdesc="A configuration database system"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('orbit2>=2.14.17' 'gtk2>=2.16.0' 'libxml2>=2.7.3' 'policykit>=0.9' 'libldap>=2.3.43')
+makedepends=('pkgconfig' 'intltool>=0.40.6' 'gtk-doc>=1.10')
+options=('!libtool')
+install=gconf.install
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/GConf/2.26/GConf-${pkgver}.tar.bz2
+ gconf-merge-schema
+ gconfpkg
+ gconf-reload.patch
+ xml-gettext-domain.patch
+ 05_from_vuntz_gconf2-pk-default-path.patch)
+md5sums=('b010f0de356ea093c6a73778b13de956'
+ '240b473fa17b748fc9020caf372d936c'
+ 'b745f04b4121d8724c002b14a4c110b6'
+ 'cfcc8e15be7b8a48de4aa34336ff6090'
+ '1c8a0eece8202c4c2fbba596fe0d9c67'
+ 'd9a02aee25ec04f2340f4e98963aabb0')
+
+build() {
+ cd "${srcdir}/GConf-${pkgver}"
+ # Patch from fedora - reloads gconf after installing schemas
+ patch -Np1 -i "${srcdir}/gconf-reload.patch" || return 1
+ # http://bugzilla.gnome.org/show_bug.cgi?id=568845
+ patch -Np1 -i "${srcdir}/xml-gettext-domain.patch" || return 1
+ # Patch from Ubuntu: change default path
+ patch -Np1 -i "${srcdir}/05_from_vuntz_gconf2-pk-default-path.patch" || return 1
+ libtoolize --force --copy || return 1
+ aclocal || return 1
+ autoconf || return 1
+ automake --add-missing || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --libexecdir=/usr/lib/GConf \
+ --disable-static --enable-defaults-service || return 1
+ make pkglibdir=/usr/lib/GConf || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+ install -m755 -d "${pkgdir}/etc/gconf/gconf.xml.system" || return 1
+ install -m755 "${srcdir}/gconf-merge-schema" "${pkgdir}/usr/bin/" || return 1
+ install -d -m755 "${pkgdir}/usr/sbin"
+ install -m755 "${srcdir}/gconfpkg" "${pkgdir}/usr/sbin/" || return 1
+}
diff --git a/abs/extra/gconf/gconf-merge-schema b/abs/extra/gconf/gconf-merge-schema
new file mode 100755
index 0000000..992c162
--- /dev/null
+++ b/abs/extra/gconf/gconf-merge-schema
@@ -0,0 +1,34 @@
+#!/bin/bash
+if [ ! "$1" -a ! "$2" ]; then
+ echo "Usage: $0 output.schemas [--domain gettextdomain] file1.schemas [file2.schemas [...]]"
+ exit 1
+fi
+
+OUTFILE="$1"
+DOMAIN=""
+shift
+
+if [ "$1" = "--domain" ]; then
+ shift
+ DOMAIN=$1
+ shift
+fi
+
+echo '<?xml version="1.0"?>' > "$OUTFILE"
+echo '<gconfschemafile><schemalist>' >> "$OUTFILE"
+
+while [ "$1" ]; do
+ if [ -f "$1" ]; then
+ sed -e '/<?xml/d' \
+ -e 's|<gconfschemafile>||g' \
+ -e 's|</gconfschemafile>||g' \
+ -e 's|<schemalist>||g' \
+ -e 's|</schemalist>||g' "$1" >> "$OUTFILE"
+ fi
+ shift
+done
+
+echo '</schemalist></gconfschemafile>' >> "$OUTFILE"
+if [ "$DOMAIN" != "" ]; then
+ sed -ri "s/^([[:space:]]*)(<locale name=\"C\">)/\1<gettext_domain>$DOMAIN<\/gettext_domain>\n\1\2/; /^[[:space:]]*<locale name=\"[^C]/,/^[[:space:]]*<\/locale>[[:space:]]*\$/ d; /^$/d; s/<\/schema>$/&\n/" "$OUTFILE"
+fi
diff --git a/abs/extra/gconf/gconf-reload.patch b/abs/extra/gconf/gconf-reload.patch
new file mode 100644
index 0000000..910f0da
--- /dev/null
+++ b/abs/extra/gconf/gconf-reload.patch
@@ -0,0 +1,20 @@
+--- GConf-2.16.0/gconf/gconftool.c.orig 2006-10-14 17:37:14.000000000 +0000
++++ GConf-2.16.0/gconf/gconftool.c 2006-10-14 17:39:27.000000000 +0000
+@@ -963,6 +963,8 @@ main (int argc, char** argv)
+
+ gconf_engine_unref (conf);
+
++ g_spawn_command_line_sync ("/usr/bin/killall -q -TERM " GCONF_SERVERDIR "/" GCONFD, NULL, NULL, NULL, NULL);
++
+ return retval;
+ }
+
+@@ -975,6 +977,8 @@ main (int argc, char** argv)
+
+ gconf_engine_unref (conf);
+
++ g_spawn_command_line_sync ("/usr/bin/killall -q -TERM " GCONF_SERVERDIR "/" GCONFD, NULL, NULL, NULL, NULL);
++
+ return retval;
+ }
+
diff --git a/abs/extra/gconf/gconf.install b/abs/extra/gconf/gconf.install
new file mode 100644
index 0000000..4e792c4
--- /dev/null
+++ b/abs/extra/gconf/gconf.install
@@ -0,0 +1,26 @@
+post_install() {
+ ldconfig -r .
+ chmod 755 etc/gconf/gconf.xml.system
+}
+
+post_upgrade() {
+ ldconfig -r .
+ if [ `vercmp $2 2.18.0.1-2` -lt 0 ]; then
+ echo "Regenerating GConf database... "
+ # Move from /opt/gnome to /usr
+ ldconfig -r .
+ export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
+ find /opt/gnome/{etc,share}/gconf/schemas -name "*.schemas" | xargs \
+ usr/bin/gconftool-2 --makefile-install-rule > /dev/null
+ if [ -f opt/gnome/etc/gconf/panel-default-setup.entries ]; then
+ usr/bin/gconftool-2 --direct --load opt/gnome/etc/gconf/panel-default-setup.entries > /dev/null
+ fi
+ echo "done."
+ fi
+ chmod 755 etc/gconf/gconf.xml.system
+
+ PID=`pidof gconfd-2`
+ if [ ! -z "${PID}" ]; then
+ kill ${PID}
+ fi
+}
diff --git a/abs/extra/gconf/gconfpkg b/abs/extra/gconf/gconfpkg
new file mode 100755
index 0000000..72021e4
--- /dev/null
+++ b/abs/extra/gconf/gconfpkg
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+usage() {
+cat << _EOF
+Usage:
+ gconfpkg [OPTION] [PACKAGE]
+
+ Help Options:
+ -?, --help Show help options
+
+ Application Options:
+ --install Install schemas for a given package
+ --uninstall Uninstall schemas for a given package
+
+_EOF
+}
+
+install() {
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-install-rule /usr/share/gconf/schemas/${pkgname}.schemas >/dev/null
+}
+
+uninstall() {
+ if [ -f /usr/share/gconf/schemas/${pkgname}.schemas ]; then
+ schemas=/usr/share/gconf/schemas/${pkgname}.schemas
+ elif [ -f /opt/gnome/share/gconf/schemas/${pkgname}.schemas ]; then
+ schemas=/opt/gnome/share/gconf/schemas/${pkgname}.schemas
+ else
+ schemas=`pacman -Ql ${pkgname} | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`
+ fi
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-uninstall-rule ${schemas} >/dev/null
+}
+
+if [ -z "$2" ]; then
+ usage
+else
+ pkgname="$2"
+ case "$1" in
+ --install)
+ install
+ ;;
+ --uninstall)
+ uninstall
+ ;;
+ *)
+ usage
+ ;;
+ esac
+fi
diff --git a/abs/extra/gconf/xml-gettext-domain.patch b/abs/extra/gconf/xml-gettext-domain.patch
new file mode 100644
index 0000000..1c5a78e
--- /dev/null
+++ b/abs/extra/gconf/xml-gettext-domain.patch
@@ -0,0 +1,367 @@
+diff -ru GConf-2.26.0/backends/markup-tree.c GConf-2.26.0.patched/backends/markup-tree.c
+--- GConf-2.26.0/backends/markup-tree.c 2009-02-16 18:17:43.000000000 +0000
++++ GConf-2.26.0.patched/backends/markup-tree.c 2009-04-05 19:36:42.000000000 +0000
+@@ -52,6 +52,7 @@
+ char *schema_name;
+ char *mod_user;
+ GTime mod_time;
++ char *gettext_domain;
+ };
+
+ static LocalSchemaInfo* local_schema_info_new (void);
+@@ -1351,6 +1352,7 @@
+ gconf_value_free (entry->value);
+ g_free (entry->schema_name);
+ g_free (entry->mod_user);
++ g_free (entry->gettext_domain);
+
+ g_slist_foreach (entry->local_schemas,
+ (GFunc) local_schema_info_free,
+@@ -1593,6 +1595,8 @@
+ gconf_schema_get_type (schema));
+ gconf_schema_set_owner (current_schema,
+ gconf_schema_get_owner (schema));
++ gconf_schema_set_gettext_domain (current_schema,
++ gconf_schema_get_gettext_domain (schema));
+ }
+
+ /* Update mod time */
+@@ -1805,6 +1809,8 @@
+ else if (c_local_schema && c_local_schema->long_desc)
+ gconf_schema_set_long_desc (schema, c_local_schema->long_desc);
+
++ gconf_schema_set_gettext_domain (schema, entry->gettext_domain);
++
+ return retval;
+ }
+ }
+@@ -2339,8 +2345,9 @@
+ const char *ltype;
+ const char *list_type;
+ const char *owner;
++
+ GConfValueType vtype;
+- const char *dummy1, *dummy2, *dummy3, *dummy4;
++ const char *dummy1, *dummy2, *dummy3, *dummy4, *dummy5;
+
+ #if 0
+ g_assert (ELEMENT_IS ("entry") ||
+@@ -2377,6 +2384,7 @@
+ "muser", &dummy2,
+ "mtime", &dummy3,
+ "schema", &dummy4,
++ "gettext_domain", &dummy5,
+
+ NULL))
+ return;
+@@ -2683,6 +2691,7 @@
+ const char *mtime;
+ const char *schema;
+ const char *type;
++ const char *gettext_domain;
+ const char *dummy1, *dummy2, *dummy3, *dummy4;
+ const char *dummy5, *dummy6, *dummy7;
+ GConfValue *value;
+@@ -2693,6 +2702,7 @@
+ mtime = NULL;
+ schema = NULL;
+ type = NULL;
++ gettext_domain = NULL;
+
+ if (!locate_attributes (context, element_name, attribute_names, attribute_values,
+ error,
+@@ -2701,6 +2711,7 @@
+ "mtime", &mtime,
+ "schema", &schema,
+ "type", &type,
++ "gettext_domain", &gettext_domain,
+
+ /* These are allowed but we don't use them until
+ * parse_value_element
+@@ -2768,6 +2779,9 @@
+ */
+ if (schema)
+ entry->schema_name = g_strdup (schema);
++
++ if (gettext_domain)
++ entry->gettext_domain = g_strdup (gettext_domain);
+ }
+ else
+ {
+@@ -3716,6 +3730,7 @@
+ GConfSchema *schema;
+ GConfValueType stype;
+ const char *owner;
++ const char *gettext_domain;
+
+ schema = gconf_value_get_schema (value);
+
+@@ -3741,6 +3756,23 @@
+
+ g_free (s);
+ }
++
++ gettext_domain = gconf_schema_get_gettext_domain (schema);
++
++ if (gettext_domain)
++ {
++ char *s;
++
++ s = g_markup_escape_text (gettext_domain, -1);
++
++ if (fprintf (f, " gettext_domain=\"%s\"", s) < 0)
++ {
++ g_free (s);
++ return FALSE;
++ }
++
++ g_free (s);
++ }
+
+ if (stype == GCONF_VALUE_LIST)
+ {
+Only in GConf-2.26.0.patched/backends: markup-tree.c.orig
+diff -ru GConf-2.26.0/doc/gconf-1.0.dtd GConf-2.26.0.patched/doc/gconf-1.0.dtd
+--- GConf-2.26.0/doc/gconf-1.0.dtd 2008-05-09 14:29:51.000000000 +0000
++++ GConf-2.26.0.patched/doc/gconf-1.0.dtd 2009-04-05 19:36:42.000000000 +0000
+@@ -7,7 +7,7 @@
+ <!-- A single schema. What I am trying to say is "this set of
+ elements, in any order". Duplicate elements (apart from <locale>) are
+ not allowed). -->
+-<!ELEMENT schema (key|applyto*|owner?|type|(list_type|(car_type,cdr_type))?|default?|locale*)*>
++<!ELEMENT schema (key|applyto*|owner?|type|(list_type|(car_type,cdr_type))?|default?|locale*|gettext_domain?)*>
+
+ <!-- The key for this schema (e.g. /schemas/apps/foo/bar) -->
+ <!ELEMENT key (#PCDATA)>
+diff -ru GConf-2.26.0/gconf/GConfX.idl GConf-2.26.0.patched/gconf/GConfX.idl
+--- GConf-2.26.0/gconf/GConfX.idl 2008-05-09 14:29:51.000000000 +0000
++++ GConf-2.26.0.patched/gconf/GConfX.idl 2009-04-05 19:36:46.000000000 +0000
+@@ -16,6 +16,7 @@
+ string short_desc;
+ string long_desc;
+ string owner;
++ string gettext_domain;
+ // Work around lack of recursive data types
+ string encoded_default_value;
+ };
+diff -ru GConf-2.26.0/gconf/gconf-internals.c GConf-2.26.0.patched/gconf/gconf-internals.c
+--- GConf-2.26.0/gconf/gconf-internals.c 2009-03-17 02:47:13.000000000 +0000
++++ GConf-2.26.0.patched/gconf/gconf-internals.c 2009-04-05 19:36:46.000000000 +0000
+@@ -513,6 +513,7 @@
+ cs->short_desc = CORBA_string_dup (gconf_schema_get_short_desc (sc) ? gconf_schema_get_short_desc (sc) : "");
+ cs->long_desc = CORBA_string_dup (gconf_schema_get_long_desc (sc) ? gconf_schema_get_long_desc (sc) : "");
+ cs->owner = CORBA_string_dup (gconf_schema_get_owner (sc) ? gconf_schema_get_owner (sc) : "");
++ cs->gettext_domain = CORBA_string_dup (gconf_schema_get_gettext_domain (sc) ? gconf_schema_get_gettext_domain (sc) : "");
+
+ {
+ gchar* encoded;
+@@ -600,6 +601,14 @@
+ gconf_schema_set_owner(sc, cs->owner);
+ }
+
++ if (*cs->gettext_domain != '\0')
++ {
++ if (!g_utf8_validate (cs->gettext_domain, -1, NULL))
++ gconf_log (GCL_ERR, _("Invalid UTF-8 in gettext domain for schema"));
++ else
++ gconf_schema_set_gettext_domain(sc, cs->gettext_domain);
++ }
++
+ {
+ GConfValue* val;
+
+diff -ru GConf-2.26.0/gconf/gconf-schema.c GConf-2.26.0.patched/gconf/gconf-schema.c
+--- GConf-2.26.0/gconf/gconf-schema.c 2008-10-09 17:51:31.000000000 +0000
++++ GConf-2.26.0.patched/gconf/gconf-schema.c 2009-04-05 19:36:42.000000000 +0000
+@@ -32,9 +32,10 @@
+ GConfValueType car_type; /* Pair car type of the described entry */
+ GConfValueType cdr_type; /* Pair cdr type of the described entry */
+ gchar* locale; /* Schema locale */
+- gchar* owner; /* Name of creating application */
++ const gchar* owner; /* Name of creating application */
+ gchar* short_desc; /* 40 char or less description, no newlines */
+ gchar* long_desc; /* could be a paragraph or so */
++ const gchar* gettext_domain; /* description gettext domain */
+ GConfValue* default_value; /* Default value of the key */
+ } GConfRealSchema;
+
+@@ -63,7 +64,6 @@
+ g_free (real->locale);
+ g_free (real->short_desc);
+ g_free (real->long_desc);
+- g_free (real->owner);
+
+ if (real->default_value)
+ gconf_value_free (real->default_value);
+@@ -91,7 +91,9 @@
+
+ dest->long_desc = g_strdup (real->long_desc);
+
+- dest->owner = g_strdup (real->owner);
++ dest->gettext_domain = real->gettext_domain;
++
++ dest->owner = real->owner;
+
+ dest->default_value = real->default_value ? gconf_value_copy (real->default_value) : NULL;
+
+@@ -136,6 +138,17 @@
+ REAL_SCHEMA (sc)->locale = NULL;
+ }
+
++void
++gconf_schema_set_gettext_domain (GConfSchema* sc, const gchar* domain)
++{
++ g_return_if_fail (domain == NULL || g_utf8_validate (domain, -1, NULL));
++
++ if (domain)
++ REAL_SCHEMA (sc)->gettext_domain = g_intern_string (domain);
++ else
++ REAL_SCHEMA (sc)->gettext_domain = NULL;
++}
++
+ void
+ gconf_schema_set_short_desc (GConfSchema* sc, const gchar* desc)
+ {
+@@ -169,11 +182,8 @@
+ {
+ g_return_if_fail (owner == NULL || g_utf8_validate (owner, -1, NULL));
+
+- if (REAL_SCHEMA (sc)->owner)
+- g_free (REAL_SCHEMA (sc)->owner);
+-
+ if (owner)
+- REAL_SCHEMA (sc)->owner = g_strdup (owner);
++ REAL_SCHEMA (sc)->owner = g_intern_string (owner);
+ else
+ REAL_SCHEMA (sc)->owner = NULL;
+ }
+@@ -228,6 +238,14 @@
+ return FALSE;
+ }
+
++ if (real->gettext_domain && !g_utf8_validate (real->gettext_domain, -1, NULL))
++ {
++ g_set_error (err, GCONF_ERROR,
++ GCONF_ERROR_FAILED,
++ _("Schema contains invalid UTF-8"));
++ return FALSE;
++ }
++
+ if (real->owner && !g_utf8_validate (real->owner, -1, NULL))
+ {
+ g_set_error (err, GCONF_ERROR,
+@@ -299,11 +317,29 @@
+ }
+
+ const char*
++gconf_schema_get_gettext_domain (const GConfSchema *schema)
++{
++ g_return_val_if_fail (schema != NULL, NULL);
++
++ return REAL_SCHEMA (schema)->gettext_domain;
++}
++
++static inline const char *
++schema_translate (const GConfSchema *schema,
++ const char *string)
++{
++ if (REAL_SCHEMA (schema)->gettext_domain)
++ return g_dgettext(REAL_SCHEMA (schema)->gettext_domain, string);
++ else
++ return string;
++}
++
++const char*
+ gconf_schema_get_short_desc (const GConfSchema *schema)
+ {
+ g_return_val_if_fail (schema != NULL, NULL);
+
+- return REAL_SCHEMA (schema)->short_desc;
++ return schema_translate (schema, REAL_SCHEMA (schema)->short_desc);
+ }
+
+ const char*
+@@ -311,7 +347,7 @@
+ {
+ g_return_val_if_fail (schema != NULL, NULL);
+
+- return REAL_SCHEMA (schema)->long_desc;
++ return schema_translate (schema, REAL_SCHEMA (schema)->long_desc);
+ }
+
+ const char*
+diff -ru GConf-2.26.0/gconf/gconf-schema.h GConf-2.26.0.patched/gconf/gconf-schema.h
+--- GConf-2.26.0/gconf/gconf-schema.h 2008-10-09 17:51:29.000000000 +0000
++++ GConf-2.26.0.patched/gconf/gconf-schema.h 2009-04-05 19:36:42.000000000 +0000
+@@ -48,6 +48,8 @@
+ GConfValueType type);
+ void gconf_schema_set_locale (GConfSchema *sc,
+ const gchar *locale);
++void gconf_schema_set_gettext_domain (GConfSchema *sc,
++ const gchar *domain);
+ void gconf_schema_set_short_desc (GConfSchema *sc,
+ const gchar *desc);
+ void gconf_schema_set_long_desc (GConfSchema *sc,
+@@ -65,6 +67,7 @@
+ GConfValueType gconf_schema_get_car_type (const GConfSchema *schema);
+ GConfValueType gconf_schema_get_cdr_type (const GConfSchema *schema);
+ const char* gconf_schema_get_locale (const GConfSchema *schema);
++const char* gconf_schema_get_gettext_domain(const GConfSchema *schema);
+ const char* gconf_schema_get_short_desc (const GConfSchema *schema);
+ const char* gconf_schema_get_long_desc (const GConfSchema *schema);
+ const char* gconf_schema_get_owner (const GConfSchema *schema);
+diff -ru GConf-2.26.0/gconf/gconftool.c GConf-2.26.0.patched/gconf/gconftool.c
+--- GConf-2.26.0/gconf/gconftool.c 2009-02-16 18:17:43.000000000 +0000
++++ GConf-2.26.0.patched/gconf/gconftool.c 2009-04-05 19:36:42.000000000 +0000
+@@ -3295,6 +3295,7 @@
+ GConfValueType cdr_type;
+ GConfValue* global_default;
+ GHashTable* hash;
++ gchar* gettext_domain;
+ };
+
+ static int
+@@ -3547,6 +3548,15 @@
+ else
+ g_printerr (_("WARNING: empty <applyto> node"));
+ }
++ else if (strcmp((char *)iter->name, "gettext_domain") == 0)
++ {
++ tmp = (char *)xmlNodeGetContent(iter);
++ if (tmp)
++ {
++ info->gettext_domain = g_strdup(tmp);
++ xmlFree(tmp);
++ }
++ }
+ else
+ g_printerr (_("WARNING: node <%s> not understood below <schema>\n"),
+ iter->name);
+@@ -3636,6 +3646,9 @@
+ if (info->owner != NULL)
+ gconf_schema_set_owner(schema, info->owner);
+
++ if (info->gettext_domain != NULL)
++ gconf_schema_set_gettext_domain(schema, info->gettext_domain);
++
+ xmlFree(name);
+
+ /* Locale-specific info */
+@@ -3765,6 +3778,7 @@
+ info.apply_to = NULL;
+ info.owner = NULL;
+ info.global_default = NULL;
++ info.gettext_domain = NULL;
+ info.hash = g_hash_table_new(g_str_hash, g_str_equal);
+
+ extract_global_info(node, &info);
+@@ -3801,6 +3815,8 @@
+ ; /* nothing */
+ else if (strcmp((char *)iter->name, "applyto") == 0)
+ ; /* nothing */
++ else if (strcmp((char *)iter->name, "gettext_domain") == 0)
++ ; /* nothing */
+ else if (strcmp((char *)iter->name, "locale") == 0)
+ {
+ process_locale_info(iter, &info);
+Only in GConf-2.26.0.patched/gconf: gconftool.c.orig
diff --git a/abs/extra/gd/PKGBUILD b/abs/extra/gd/PKGBUILD
new file mode 100644
index 0000000..3df77a1
--- /dev/null
+++ b/abs/extra/gd/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+
+pkgname=gd
+pkgver=2.0.35
+pkgrel=2
+pkgdesc="Library for the dynamic creation of images by programmers"
+arch=('i686' 'x86_64')
+url="http://www.libgd.org/"
+license=('custom')
+depends=('libpng>=1.2.16' 'fontconfig>=2.4.2' 'libjpeg')
+options=('!libtool')
+source=(http://www.libgd.org/releases/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('6c6c3dbb7bf079e0bb5fbbfd3bb8a71c')
+sha1sums=('ccf34a610abff2dbf133a20c4d2a4aa94939018a')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --without-xpm
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+ install -D -m644 COPYING $startdir/pkg/usr/share/licenses/$pkgname/COPYING
+}
diff --git a/abs/extra/gdl/PKGBUILD b/abs/extra/gdl/PKGBUILD
new file mode 100644
index 0000000..ee649c2
--- /dev/null
+++ b/abs/extra/gdl/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 32356 2009-03-30 17:59:10Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gdl
+pkgver=2.26.0
+pkgrel=1
+pkgdesc="Gnome Devtool Libraries"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.gnome.org/"
+depends=('libglade>=2.6.4')
+makedepends=('pkgconfig')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/GNOME/sources/gdl/2.26/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('8915b8808d88e12c1bb53e84f50e6707')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/glew/PKGBUILD b/abs/extra/glew/PKGBUILD
new file mode 100644
index 0000000..989621b
--- /dev/null
+++ b/abs/extra/glew/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 27226 2009-02-17 05:43:56Z eric $
+# AUR-Maintainer: William Rea <sillywilly@gmail.com>
+# Contributor: SleepyDog
+
+pkgname=glew
+pkgver=1.5.1
+pkgrel=1
+pkgdesc="A cross-platform C/C++ extension loading library"
+arch=('i686' 'x86_64')
+url="http://glew.sourceforge.net"
+license=('BSD' 'MIT' 'GPL')
+depends=('libxmu' 'libxi' 'mesa')
+makedepends=('hd2u')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}-src.tgz)
+md5sums=('759a59853dfaae4d007b414a3c1712f2')
+
+build() {
+ cd ${startdir}/src/${pkgname}
+ dos2unix config/config.guess
+ make || return 1
+ make GLEW_DEST=${startdir}/pkg/usr LIBDIR=${startdir}/pkg/usr/lib install || return 1
+ install -D -m644 LICENSE.txt ${startdir}/pkg/usr/share/licenses/${pkgname}/LICENSE.txt || return 1
+}
diff --git a/abs/extra/gnome-desktop/PKGBUILD b/abs/extra/gnome-desktop/PKGBUILD
new file mode 100644
index 0000000..ddd10ad
--- /dev/null
+++ b/abs/extra/gnome-desktop/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 24727 2009-01-20 10:17:53Z douglas $
+# Maintainer: Jan de Groot <jan@archlinux.org>
+
+pkgname=gnome-desktop
+pkgver=2.24.3
+pkgrel=1
+pkgdesc="The GNOME Desktop"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+depends=('libgnomeui>=2.24.0' 'startup-notification>=0.9')
+makedepends=('gnome-doc-utils>=0.14.2' 'pkgconfig' 'intltool')
+optdepends=('gnome-python: gnome-about')
+url="http://www.gnome.org"
+groups=('gnome')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.24/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('27579963a56d1d35a22e30c21666a500')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --with-gnome-distributor="Archlinux" \
+ --disable-scrollkeeper || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/gnome-doc-utils/PKGBUILD b/abs/extra/gnome-doc-utils/PKGBUILD
new file mode 100644
index 0000000..b450165
--- /dev/null
+++ b/abs/extra/gnome-doc-utils/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 24717 2009-01-20 09:52:00Z douglas $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnome-doc-utils
+pkgver=0.14.2
+pkgrel=1
+pkgdesc="Documentation utilities for Gnome"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+depends=('libxslt>=1.1.24' 'python>=2.6' 'docbook-xml' 'rarian>=0.8.1')
+makedependd7a7d8646f34571704e4be62e5c7107fs=('pkgconfig' 'perlxml')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.14/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('d7a7d8646f34571704e4be62e5c7107f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
+ --localstatedir=/var --disable-scrollkeeper || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/gnome-keyring/PKGBUILD b/abs/extra/gnome-keyring/PKGBUILD
new file mode 100644
index 0000000..d0ea53d
--- /dev/null
+++ b/abs/extra/gnome-keyring/PKGBUILD
@@ -0,0 +1,34 @@
+#$Id: PKGBUILD 15806 2008-10-19 09:55:58Z jgc $
+#Maintainer: Jan De Groot <jgc@archlinux.org>
+
+pkgname=gnome-keyring
+pkgver=2.24.1
+pkgrel=1
+pkgdesc="GNOME Password Management daemon"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+depends=('gconf>=2.24.0' 'hal>=0.5.11')
+makedepends=('perlxml' 'pkgconfig')
+options=('!libtool' '!emptydirs')
+url="http://www.gnome.org"
+install=gnome-keyring.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.24/${pkgname}-${pkgver}.tar.bz2
+ gnome-keyring.service)
+md5sums=('aa5552dc129f3509ee39145b7f0bf977' '16062d82eb8062201fb24f3e0ceb49a6')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --libexecdir=/usr/lib/gnome-keyring \
+ --with-pam-dir=/lib/security || return 1
+ make || return 1
+ make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
+
+ install -m755 -d "${pkgdir}/usr/share/dbus-1/services"
+ install -m644 "${srcdir}/gnome-keyring.service" "${pkgdir}/usr/share/dbus-1/services/" || return 1
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" ${pkgdir}/etc/gconf/schemas/*.schemas || return 1
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/abs/extra/gnome-keyring/gnome-keyring.install b/abs/extra/gnome-keyring/gnome-keyring.install
new file mode 100644
index 0000000..8874c6e
--- /dev/null
+++ b/abs/extra/gnome-keyring/gnome-keyring.install
@@ -0,0 +1,19 @@
+pkgname=gnome-keyring
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ if [ -f usr/share/gconf/${pkgname}.schemas ]; then
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+ fi
+}
diff --git a/abs/extra/gnome-keyring/gnome-keyring.service b/abs/extra/gnome-keyring/gnome-keyring.service
new file mode 100644
index 0000000..96ea061
--- /dev/null
+++ b/abs/extra/gnome-keyring/gnome-keyring.service
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.keyring
+Exec=/usr/bin/gnome-keyring-daemon
diff --git a/abs/extra/gnome-menus/PKGBUILD b/abs/extra/gnome-menus/PKGBUILD
new file mode 100644
index 0000000..491fd40
--- /dev/null
+++ b/abs/extra/gnome-menus/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 19656 2008-11-28 20:25:40Z jgc $
+# Maintainer: Jan de Groot <jan@archlinux.org>
+
+pkgname=gnome-menus
+pkgver=2.24.2
+pkgrel=1
+pkgdesc="GNOME menu specifications"
+arch=(i686 x86_64)
+depends=('pygtk>=2.13.0')
+makedepends=('pkgconfig' 'intltool')
+options=('!libtool' '!makeflags')
+license=('GPL' 'LGPL')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.24/${pkgname}-${pkgver}.tar.bz2
+ menus.patch)
+md5sums=('ca8e25b031fd7024b3f9abe1c6865d2c' '37b1021887f60a9cead67172e51a3a18')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np0 -i "${srcdir}/menus.patch" || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/gnome-menus/menus.patch b/abs/extra/gnome-menus/menus.patch
new file mode 100644
index 0000000..bf73e86
--- /dev/null
+++ b/abs/extra/gnome-menus/menus.patch
@@ -0,0 +1,25 @@
+--- layout/applications.menu 2005-06-28 10:16:39.000000000 +0200
++++ layout/applications.menu 2005-09-12 23:21:20.000000000 +0200
+@@ -7,7 +7,6 @@
+ <Directory>Applications.directory</Directory>
+
+ <!-- Scan legacy dirs first, as later items take priority -->
+- <KDELegacyDirs/>
+ <LegacyDir>/etc/X11/applnk</LegacyDir>
+ <LegacyDir>/usr/share/gnome/apps</LegacyDir>
+
+@@ -18,6 +17,14 @@
+ <!-- Read in overrides and child menus from applications-merged/ -->
+ <DefaultMergeDirs/>
+
++ <!-- Archlinux submenu -->
++ <Menu>
++ <Name>Archlinux</Name>
++ <Directory>Archlinux.directory</Directory>
++ <Include>
++ <Category>Archlinux</Category>
++ </Include>
++ </Menu> <!-- End Archlinux -->
+ <!-- Accessories submenu -->
+ <Menu>
+ <Name>Accessories</Name>
diff --git a/abs/extra/gnome-mime-data/PKGBUILD b/abs/extra/gnome-mime-data/PKGBUILD
new file mode 100644
index 0000000..2ce4092
--- /dev/null
+++ b/abs/extra/gnome-mime-data/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnome-mime-data
+pkgver=2.18.0
+pkgrel=3
+pkgdesc="The base MIME and Application database for GNOME"
+arch=(i686 x86_64)
+license=('GPL')
+depends=('shared-mime-info')
+makedepens=('perlxml')
+url="http://www.gnome.org"
+groups=('gnome')
+source=(ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.18/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('541858188f80090d12a33b5a7c34d42c')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+
+ mkdir -p ${startdir}/pkg/usr/lib
+ mv ${startdir}/pkg/usr/share/pkgconfig ${startdir}/pkg/usr/lib/
+}
diff --git a/abs/extra/gnome-python-extras/PKGBUILD b/abs/extra/gnome-python-extras/PKGBUILD
new file mode 100644
index 0000000..297ef68
--- /dev/null
+++ b/abs/extra/gnome-python-extras/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 35285 2009-04-11 20:46:50Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnome-python-extras
+pkgver=2.25.3
+pkgrel=1
+pkgdesc="Gnome Python interfaces for libraries not part of the core platform"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+depends=('gnome-python>=2.22.1')
+makedepends=('libgtkhtml' 'gtkspell' 'gdl' 'xulrunner>=1.9' 'libgksu' 'pkgconfig' 'libgnomeui' 'libgda')
+optdepends=('libgtkhtml' 'gtkspell' 'gdl' 'xulrunner' 'libgksu' 'libgnomeui' 'libgda')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/gnome/sources/gnome-python-extras/2.25/gnome-python-extras-${pkgver}.tar.bz2)
+url="http://www.daa.com.au/~james/pygtk/"
+md5sums=('9f3b7ec5c57130b96061cb486b79c076')
+
+build() {
+ cd "${srcdir}/gnome-python-extras-${pkgver}"
+ ./configure --prefix=/usr || return 1
+ make MOZILLA_HOME=/usr/lib/xulrunner-1.9 || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/gnome-python-extras/gnome-python-extras-2.19.1-pkg-config.patch b/abs/extra/gnome-python-extras/gnome-python-extras-2.19.1-pkg-config.patch
new file mode 100644
index 0000000..77fd0a4
--- /dev/null
+++ b/abs/extra/gnome-python-extras/gnome-python-extras-2.19.1-pkg-config.patch
@@ -0,0 +1,61 @@
+diff -up gnome-python-extras-2.19.1/configure.pkg-config gnome-python-extras-2.19.1/configure
+--- gnome-python-extras-2.19.1/configure.pkg-config 2008-01-12 21:07:56.000000000 -0500
++++ gnome-python-extras-2.19.1/configure 2008-01-12 21:09:49.000000000 -0500
+@@ -22096,14 +22096,14 @@ if test -n "$PKG_CONFIG"; then
+ pkg_cv_GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$mozpackage-gtkmozembed >= \$mozpackage_required_version,
++ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\mozilla-gtkmozembed >= \$mozpackage_required_version,
+ gtk+-2.0 >= 2.4.0\"") >&5
+- ($PKG_CONFIG --exists --print-errors "$mozpackage-gtkmozembed >= $mozpackage_required_version,
++ ($PKG_CONFIG --exists --print-errors "mozilla-gtkmozembed >= $mozpackage_required_version,
+ gtk+-2.0 >= 2.4.0") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+- pkg_cv_GTKMOZEMBED_CFLAGS=`$PKG_CONFIG --cflags "$mozpackage-gtkmozembed >= $mozpackage_required_version,
++ pkg_cv_GTKMOZEMBED_CFLAGS=`$PKG_CONFIG --cflags "mozilla-gtkmozembed >= $mozpackage_required_version,
+ gtk+-2.0 >= 2.4.0" 2>/dev/null`
+ else
+ pkg_failed=yes
+@@ -22117,14 +22117,14 @@ if test -n "$PKG_CONFIG"; then
+ pkg_cv_GTKMOZEMBED_LIBS="$GTKMOZEMBED_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$mozpackage-gtkmozembed >= \$mozpackage_required_version,
++ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\mozilla-gtkmozembed >= \$mozpackage_required_version,
+ gtk+-2.0 >= 2.4.0\"") >&5
+- ($PKG_CONFIG --exists --print-errors "$mozpackage-gtkmozembed >= $mozpackage_required_version,
++ ($PKG_CONFIG --exists --print-errors "mozilla-gtkmozembed >= $mozpackage_required_version,
+ gtk+-2.0 >= 2.4.0") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+- pkg_cv_GTKMOZEMBED_LIBS=`$PKG_CONFIG --libs "$mozpackage-gtkmozembed >= $mozpackage_required_version,
++ pkg_cv_GTKMOZEMBED_LIBS=`$PKG_CONFIG --libs "mozilla-gtkmozembed >= $mozpackage_required_version,
+ gtk+-2.0 >= 2.4.0" 2>/dev/null`
+ else
+ pkg_failed=yes
+@@ -22144,10 +22144,10 @@ else
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- GTKMOZEMBED_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$mozpackage-gtkmozembed >= $mozpackage_required_version,
++ GTKMOZEMBED_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "mozilla-gtkmozembed >= $mozpackage_required_version,
+ gtk+-2.0 >= 2.4.0"`
+ else
+- GTKMOZEMBED_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$mozpackage-gtkmozembed >= $mozpackage_required_version,
++ GTKMOZEMBED_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mozilla-gtkmozembed >= $mozpackage_required_version,
+ gtk+-2.0 >= 2.4.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+@@ -22179,7 +22179,7 @@ fi
+ if test -n "$export_dynamic"; then
+ GTKMOZEMBED_LIBS=`echo $GTKMOZEMBED_LIBS | sed -e "s/$export_dynamic//"`
+ fi
+-MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $mozpackage-gtkmozembed`"
++MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
+
+
+
diff --git a/abs/extra/gnome-python-extras/gnome-python-extras-2.19.1-xulrunner.patch b/abs/extra/gnome-python-extras/gnome-python-extras-2.19.1-xulrunner.patch
new file mode 100644
index 0000000..d2fa26e
--- /dev/null
+++ b/abs/extra/gnome-python-extras/gnome-python-extras-2.19.1-xulrunner.patch
@@ -0,0 +1,22 @@
+diff -up gnome-python-extras-2.19.1/docs/gtkmozembed/html/class-gtkmozembed.html.old gnome-python-extras-2.19.1/docs/gtkmozembed/html/class-gtkmozembed.html
+diff -up gnome-python-extras-2.19.1/docs/gtkmozembed/html/pygtkmozembed.devhelp.old gnome-python-extras-2.19.1/docs/gtkmozembed/html/pygtkmozembed.devhelp
+diff -up gnome-python-extras-2.19.1/docs/gtkmozembed/gtkmozembed-gtkmozembed.xml.old gnome-python-extras-2.19.1/docs/gtkmozembed/gtkmozembed-gtkmozembed.xml
+diff -up gnome-python-extras-2.19.1/gtkmozembed/gtkmozembed.override.old gnome-python-extras-2.19.1/gtkmozembed/gtkmozembed.override
+diff -up gnome-python-extras-2.19.1/gtkmozembed/gtkmozembed.defs.old gnome-python-extras-2.19.1/gtkmozembed/gtkmozembed.defs
+--- gnome-python-extras-2.19.1/gtkmozembed/gtkmozembed.defs.old 2007-06-05 16:52:30.000000000 +0200
++++ gnome-python-extras-2.19.1/gtkmozembed/gtkmozembed.defs 2007-11-27 12:54:42.000000000 +0100
+@@ -123,6 +123,14 @@
+ )
+ )
+
++(define-function set_path
++ (c-name "gtk_moz_embed_set_path")
++ (return-type "none")
++ (parameters
++ '("char*" "aPath")
++ )
++)
++
+ (define-function gtk_moz_embed_set_profile_path
+ (c-name "gtk_moz_embed_set_profile_path_deprecated")
+ (return-type "none")
diff --git a/abs/extra/gnome-python/PKGBUILD b/abs/extra/gnome-python/PKGBUILD
new file mode 100644
index 0000000..d9e0045
--- /dev/null
+++ b/abs/extra/gnome-python/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 16730 2008-10-22 02:56:32Z allan $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Sarah Hay <sarah@archlinux.org>
+
+pkgname=gnome-python
+pkgver=2.22.3
+pkgrel=3
+pkgdesc="gnome-python is a set of interfaces to gnome-libs."
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('pygtk>=2.13.0' 'pyorbit>=2.24.0' 'libgnomeui>=2.24.0')
+makedepends=('pkgconfig')
+groups=('gnome')
+options=('!libtool')
+url="http://www.pygtk.org/"
+source=(http://ftp.gnome.org/pub/gnome/sources/gnome-python/2.22/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('ab12d94954a57de39b25eb7903d8429c')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./waf configure --prefix=/usr || return 1
+ ./waf build ${MAKEFLAGS} || return 1
+ ./waf install --destdir="${pkgdir}" || return 1
+}
diff --git a/abs/extra/gnome-screensaver/PKGBUILD b/abs/extra/gnome-screensaver/PKGBUILD
new file mode 100644
index 0000000..cdd4e0b
--- /dev/null
+++ b/abs/extra/gnome-screensaver/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 29213 2009-03-06 18:47:56Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnome-screensaver
+pkgver=2.24.1
+pkgrel=7
+pkgdesc="Screensaver designed to integrate well with the GNOME desktop."
+arch=(i686 x86_64)
+license=('GPL')
+url="http://live.gnome.org/GnomeScreensaver"
+backup=(etc/pam.d/gnome-screensaver)
+depends=('gnome-menus>=2.24.2' 'libgnomekbd>=2.24.0' 'libxss' 'libgl' 'libnotify' 'gnome-desktop>=2.24.2' 'libxxf86misc')
+makedepends=('pkgconfig' 'gettext' 'intltool' 'mesa' 'xscreensaver' 'libxslt')
+groups=('gnome')
+options=(!emptydirs)
+install=gnome-screensaver.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/2.24/${pkgname}-${pkgver}.tar.bz2
+ gnome-screensaver.pam
+ bug564548.patch)
+md5sums=('f0b9cc3108bb9105141a8c22b56bf615'
+ '4b4d2672a787e0d2ed792b4c308ccf8d'
+ 'b2accd56fd1e7e3855c1cee3cc3780c4')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/bug564548.patch" || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/gnome-screensaver \
+ --localstatedir=/var --with-gdm-config=/usr/share/gdm/defaults.conf \
+ --with-xscreensaverdir=/usr/share/xscreensaver/config \
+ --with-xscreensaverhackdir=/usr/lib/xscreensaver \
+ --with-dpms-ext || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+
+ install -m644 "${srcdir}/gnome-screensaver.pam" "${pkgdir}/etc/pam.d/gnome-screensaver" || return 1
+
+ #Migrate xscreensaver configuration files
+ cd "${pkgdir}/usr/share/applications/screensavers"
+ "${srcdir}/${pkgname}-${pkgver}/data/migrate-xscreensaver-config.sh" /usr/share/xscreensaver/config/*.xml || return 1
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" ${pkgdir}/etc/gconf/schemas/*.schemas || return 1
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+ ls $pkgdir/usr/share/applications/screensavers/|cut -d. -f1 > $startdir/gscreensavers
+
+}
diff --git a/abs/extra/gnome-screensaver/__changelog b/abs/extra/gnome-screensaver/__changelog
new file mode 100644
index 0000000..3fb149c
--- /dev/null
+++ b/abs/extra/gnome-screensaver/__changelog
@@ -0,0 +1,5 @@
+add defaults to install file
+make xsltproc part of makedepends
+print list of screensavers to gscreensavers
+ ls $pkgdir/usr/share/applications/screensavers/|cut -d. -f1 > $startdir/gscreensavers
+
diff --git a/abs/extra/gnome-screensaver/bug564548.patch b/abs/extra/gnome-screensaver/bug564548.patch
new file mode 100644
index 0000000..da58094
--- /dev/null
+++ b/abs/extra/gnome-screensaver/bug564548.patch
@@ -0,0 +1,13 @@
+--- trunk/src/gs-window-x11.c 2008/05/29 17:03:19 1452
++++ trunk/src/gs-window-x11.c 2008/12/15 15:19:36 1571
+@@ -2287,6 +2287,10 @@
+
+ gs_window_dialog_finish (window);
+
++ if (window->priv->background_pixmap) {
++ g_object_unref (window->priv->background_pixmap);
++ }
++
+ G_OBJECT_CLASS (gs_window_parent_class)->finalize (object);
+ }
+
diff --git a/abs/extra/gnome-screensaver/gnome-screensaver.install b/abs/extra/gnome-screensaver/gnome-screensaver.install
new file mode 100644
index 0000000..bd98655
--- /dev/null
+++ b/abs/extra/gnome-screensaver/gnome-screensaver.install
@@ -0,0 +1,32 @@
+pkgname=gnome-screensaver
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+ #set defaults
+ gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /apps/gnome-screensaver/lock_enabled false
+ gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type int -s "/apps/gnome-screensaver/idle_delay" 10
+ gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --set --type list --list-type=string /apps/gnome-screensaver/themes [screensavers-cosmos-slideshow]
+ gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string -s "/apps/gnome-screensaver/mode" single
+
+ if grep gnome-screensaver-command /home/mythtv/.mplayer/config
+ then
+ echo "Nothing to do here..."
+ else
+ echo "heartbeat-cmd=\"gnome-screensaver-command -p &\"" >> /home/mythtv/.mplayer/config
+ fi
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+ grep -v gnome-screensaver /home/mythtv/.mplayer/config > /tmp/mp-config
+ mv /tmp/mp-config /home/mythtv/.mplayer/config
+ chown mythtv.mythtv /home/mythtv/.mplayer/config
+}
diff --git a/abs/extra/gnome-screensaver/gnome-screensaver.pam b/abs/extra/gnome-screensaver/gnome-screensaver.pam
new file mode 100644
index 0000000..c776a54
--- /dev/null
+++ b/abs/extra/gnome-screensaver/gnome-screensaver.pam
@@ -0,0 +1,3 @@
+#%PAM-1.0
+auth required pam_unix_auth.so
+auth optional pam_gnome_keyring.so
diff --git a/abs/extra/gnome-screensaver/gscreensavers b/abs/extra/gnome-screensaver/gscreensavers
new file mode 100644
index 0000000..7f56072
--- /dev/null
+++ b/abs/extra/gnome-screensaver/gscreensavers
@@ -0,0 +1,200 @@
+abstractile
+anemone
+anemotaxis
+antinspect
+antmaze
+antspotlight
+apollonian
+apple2
+atlantis
+attraction
+atunnel
+barcode
+blaster
+blinkbox
+blitspin
+blocktube
+boing
+bouboule
+bouncingcow
+boxed
+boxfit
+braid
+bsod
+bubble3d
+bumps
+cage
+carousel
+ccurve
+celtic
+circuit
+cloudlife
+compass
+coral
+cosmos-slideshow
+crackberg
+crystal
+cube21
+cubenetic
+cubestorm
+cubicgrid
+cwaves
+cynosure
+dangerball
+decayscreen
+deco
+deluxe
+demon
+discrete
+distort
+drift
+endgame
+engine
+epicycle
+eruption
+euler2d
+extrusion
+fadeplot
+fiberlamp
+fireworkx
+flame
+flipflop
+flipscreen3d
+fliptext
+flow
+fluidballs
+flurry
+flyingtoasters
+fontglide
+footlogo-floaters
+fuzzyflakes
+galaxy
+gears
+gflux
+glblur
+glcells
+gleidescope
+glhanoi
+glknots
+glmatrix
+glplanet
+glschool
+glslideshow
+glsnake
+gltext
+goop
+grav
+greynetic
+halftone
+halo
+helix
+hopalong
+hyperball
+hypercube
+hypertorus
+hypnowheel
+ifs
+imsmap
+interaggregate
+interference
+intermomentary
+jigglypuff
+jigsaw
+juggle
+juggler3d
+julia
+kaleidescope
+klein
+kumppa
+lament
+lavalite
+lcdscrub
+lockward
+loop
+m6502
+maze
+memscroller
+menger
+metaballs
+mirrorblob
+moebius
+moebiusgears
+moire
+moire2
+molecule
+morph3d
+mountain
+munch
+nerverot
+noof
+noseguy
+pacman
+pedal
+penetrate
+penrose
+personal-slideshow
+petri
+phosphor
+photopile
+piecewise
+pinion
+pipes
+polyhedra
+polyominoes
+polytopes
+pong
+popsquares
+providence
+pulsar
+pyro
+qix
+queens
+rd-bomb
+ripples
+rocks
+rorschach
+rotzoomer
+rubik
+sballs
+shadebobs
+sierpinski
+sierpinski3d
+skytentacles
+slidescreen
+slip
+sonar
+speedmine
+spheremonics
+spotlight
+sproingies
+squiral
+stairs
+starfish
+starwars
+stonerview
+strange
+substrate
+superquadrics
+swirl
+tangram
+thornbird
+timetunnel
+topblock
+triangle
+truchet
+twang
+vermiculate
+vidwhacker
+voronoi
+wander
+webcollage
+whirlwindwarp
+wormhole
+xanalogtv
+xflame
+xjack
+xlyap
+xmatrix
+xrayswarm
+xspirograph
+zoom
diff --git a/abs/extra/gnome-vfs/PKGBUILD b/abs/extra/gnome-vfs/PKGBUILD
new file mode 100644
index 0000000..9a54cdd
--- /dev/null
+++ b/abs/extra/gnome-vfs/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 30314 2009-03-18 21:34:12Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnome-vfs
+pkgver=2.24.1
+pkgrel=2
+pkgdesc="The GNOME Virtual File System"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('fam' 'gconf>=2.26.0-2' 'hal>=0.5.11' 'bzip2' 'avahi>=0.6.24' 'smbclient>=3.3.1' 'gnome-mime-data>=2.18.0-2' 'heimdal>=1.2.1' 'gnutls>=2.6.4')
+makedepends=('pkgconfig' 'intltool')
+options=('!libtool' '!emptydirs')
+conflicts=(gnome-vfs-samba)
+provides=(gnome-vfs-samba)
+replaces=(gnome-vfs-samba gnome-vfs-extras)
+url="http://www.gnome.org"
+install=gnome-vfs.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.24/gnome-vfs-${pkgver}.tar.bz2
+ hal-show-volume-names.patch)
+md5sums=('100f9af16dc659e375ee8da45175a28d' '109d07aa1dc8cb6523c47c4984047dce')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ #Archlinux patch (b.g.o #321498)
+ patch -Np1 -i ${startdir}/src/hal-show-volume-names.patch || return 1
+
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --libexecdir=/usr/lib/gnome-vfs-2.0 \
+ --enable-samba --enable-hal \
+ --enable-avahi --disable-howl \
+ --disable-openssl --enable-gnutls || return 1
+ make || return 1
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
+
+ install -d -m755 "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gnome-vfs-2.0 ${startdir}/pkg/etc/gconf/schemas/*.schemas
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/abs/extra/gnome-vfs/gnome-vfs.install b/abs/extra/gnome-vfs/gnome-vfs.install
new file mode 100644
index 0000000..793a3e7
--- /dev/null
+++ b/abs/extra/gnome-vfs/gnome-vfs.install
@@ -0,0 +1,17 @@
+pkgname=gnome-vfs
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}
diff --git a/abs/extra/gnome-vfs/hal-show-volume-names.patch b/abs/extra/gnome-vfs/hal-show-volume-names.patch
new file mode 100644
index 0000000..5b8420c
--- /dev/null
+++ b/abs/extra/gnome-vfs/hal-show-volume-names.patch
@@ -0,0 +1,46 @@
+Index: gnome-vfs-hal-mounts.c
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-hal-mounts.c,v
+retrieving revision 1.33
+diff -u -p -r1.33 gnome-vfs-hal-mounts.c
+--- gnome-vfs/libgnomevfs/gnome-vfs-hal-mounts.c 7 Jul 2006 15:56:57 -0000 1.33
++++ gnome-vfs/libgnomevfs/gnome-vfs-hal-mounts.c 14 Jul 2006 18:48:51 -0000
+@@ -877,6 +877,7 @@ _hal_add_volume (GnomeVFSVolumeMonitorDa
+ GnomeVFSDrive *drive;
+ GnomeVFSVolumeMonitor *volume_monitor;
+ char *name;
++ char *icon;
+ gboolean allowed_by_policy;
+ const char *backing_udi;
+
+@@ -975,6 +976,8 @@ _hal_add_volume (GnomeVFSVolumeMonitorDa
+ */
+ drive = _gnome_vfs_volume_monitor_find_drive_by_hal_udi (volume_monitor, libhal_volume_get_udi (hal_volume));
+ if (drive == NULL && allowed_by_policy) {
++ name = _hal_drive_policy_get_display_name (volume_monitor_daemon, hal_drive, hal_volume);
++ icon = _hal_drive_policy_get_icon (volume_monitor_daemon, hal_drive, hal_volume);
+ drive = g_object_new (GNOME_VFS_TYPE_DRIVE, NULL);
+ if (libhal_volume_disc_has_audio (hal_volume)) {
+ drive->priv->activation_uri = g_strdup_printf ("cdda://%s",
+@@ -989,16 +992,16 @@ _hal_add_volume (GnomeVFSVolumeMonitorDa
+ * So just set it to the empty string
+ */
+ drive->priv->activation_uri = g_strdup ("");
++ g_free (name);
++ name = _hal_volume_policy_get_display_name (volume_monitor_daemon, hal_drive, hal_volume);
++ g_free (icon);
++ icon = _hal_volume_policy_get_icon (volume_monitor_daemon, hal_drive, hal_volume);
+ }
+ drive->priv->is_connected = TRUE;
+ drive->priv->device_path = g_strdup (libhal_volume_get_device_file (hal_volume));
+ drive->priv->device_type = _hal_get_gnome_vfs_device_type (hal_drive);
+
+- /* TODO: could add an icon of a drive with media in it since this codepath only
+- * handles drives with media in them
+- */
+- drive->priv->icon = _hal_drive_policy_get_icon (volume_monitor_daemon, hal_drive, NULL);
+- name = _hal_drive_policy_get_display_name (volume_monitor_daemon, hal_drive, hal_volume);
++ drive->priv->icon = icon;
+ drive->priv->display_name = _gnome_vfs_volume_monitor_uniquify_drive_name (volume_monitor, name);
+ g_free (name);
+ name = g_utf8_casefold (drive->priv->display_name, -1);
diff --git a/abs/extra/gnuplot/PKGBUILD b/abs/extra/gnuplot/PKGBUILD
new file mode 100644
index 0000000..ec372f0
--- /dev/null
+++ b/abs/extra/gnuplot/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id$
+# Maintainer: damir <damir@archlinux.org>
+# Contributor: Niklas Volbers <mithrandir42@web.de>
+
+pkgname=gnuplot
+pkgver=4.2.5
+pkgrel=1
+pkgdesc="Command-line driven interactive data and function plotting utility"
+url="http://www.gnuplot.info"
+depends=('gd>=2.0.29' 'wxgtk' 'libjpeg>=7')
+makedepends=('texinfo')
+license='custom'
+arch=('i686')
+source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz)
+md5sums=(85d042f8efd7aae3d9cbfd85b14d06d2)
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+
+ ./configure --prefix=/usr \
+ --datadir=/usr/share \
+ --libexecdir=/usr/bin \
+ --with-readline=gnu \
+ --enable-history-file \
+ --with-x
+
+ make X11_DRIVER_DIR='/usr/bin' || return 1
+
+ make DESTDIR=$startdir/pkg \
+ libexecdir=/usr/bin \
+ pkglibexecdir=/usr/bin install
+
+ install -D $startdir/src/$pkgname-$pkgver/Copyright $startdir/pkg/usr/share/licenses/custom/gnuplot/Copyright
+}
diff --git a/abs/extra/gpac/ChangeLog b/abs/extra/gpac/ChangeLog
new file mode 100644
index 0000000..5e63198
--- /dev/null
+++ b/abs/extra/gpac/ChangeLog
@@ -0,0 +1,9 @@
+2009-04-19 Allan McRae <allan@archlinux.org>
+ * gpac-0.4.5-2
+ * Rebuild against libavcodec.so.52 (FS#14291)
+
+2008-12-14 Allan McRae <allan@archlinux.org>
+ * gpac-0.4.5-1
+ * upstream update
+ * FHS man page
+
diff --git a/abs/extra/gpac/PKGBUILD b/abs/extra/gpac/PKGBUILD
new file mode 100755
index 0000000..04ce3cc
--- /dev/null
+++ b/abs/extra/gpac/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD,v 1.4 2009/04/19 08:06:33 allan Exp $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: niQo
+
+pkgname=gpac
+pkgver=0.4.5
+pkgrel=4
+pkgdesc="A multimedia framework based on the MPEG-4 Systems standard"
+arch=('i686' 'x86_64')
+url="http://gpac.sourceforge.net"
+depends=('libxml2' 'wxgtk' 'alsa-lib' 'sdl' 'spidermonkey' 'libmad' \
+ 'faad2' 'xvidcore' 'ffmpeg' 'freeglut' 'libjpeg')
+license=('LGPL')
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+md5sums=('755e8c438a48ebdb13525dd491f5b0d1')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+ chmod +x configure
+ sed -i 's#osmozilla##g' applications/Makefile
+ sed -i 's#"$(prefix)#"$(DESTDIR)$(prefix)#' applications/osmo4_wx/Makefile
+ sed -i 's#ldconfig || true##g' Makefile
+ ./configure --prefix=/usr --mandir=/usr/share/man --use-js=no
+ make || return 1
+ make DESTDIR=${pkgdir}/ install-lib
+ make DESTDIR=${pkgdir}/ install
+}
diff --git a/abs/extra/gpac/gpac-0.4.2-ffmpeg-errno.patch b/abs/extra/gpac/gpac-0.4.2-ffmpeg-errno.patch
new file mode 100755
index 0000000..ec59cec
--- /dev/null
+++ b/abs/extra/gpac/gpac-0.4.2-ffmpeg-errno.patch
@@ -0,0 +1,20 @@
+Index: gpac/modules/ffmpeg_in/ffmpeg_demux.c
+===================================================================
+--- gpac.orig/modules/ffmpeg_in/ffmpeg_demux.c
++++ gpac/modules/ffmpeg_in/ffmpeg_demux.c
+@@ -23,6 +23,7 @@
+ */
+
+ #include "ffmpeg_in.h"
++#include <errno.h>
+
+ /*default buffer is 200 ms per channel*/
+ #define FFD_DATA_BUFFER 800
+@@ -285,7 +286,6 @@ static GF_ESD *FFD_GetESDescriptor(FFDem
+ case CODEC_ID_MP3:
+ esd->decoderConfig->objectTypeIndication = 0x69;
+ break;
+- case CODEC_ID_MPEG4AAC:
+ case CODEC_ID_AAC:
+ if (!dec->extradata_size) goto opaque_audio;
+ esd->decoderConfig->objectTypeIndication = 0x40;
diff --git a/abs/extra/graphload/PKGBUILD b/abs/extra/graphload/PKGBUILD
new file mode 100644
index 0000000..6af2f95
--- /dev/null
+++ b/abs/extra/graphload/PKGBUILD
@@ -0,0 +1,16 @@
+pkgname=graphload
+pkgver=1
+pkgrel=1
+pkgdesc="command to graph the total CPU utilization for N-core systems for a given interval"
+depends=('gnuplot>=4.2.5')
+license='GPLv2'
+arch=('i686')
+
+build() {
+ LH_ROOT=/usr/LH
+ mkdir -p $startdir/pkg/$LH_ROOT/bin/
+
+ cd $startdir
+ # executables
+ install -m0755 -D graphload.sh $startdir/pkg/$LH_ROOT/bin/
+}
diff --git a/abs/extra/graphload/graphload.sh b/abs/extra/graphload/graphload.sh
new file mode 100755
index 0000000..79023ec
--- /dev/null
+++ b/abs/extra/graphload/graphload.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+MYTICKS=100
+MYINTERVAL=4 # we sample once every $MYINTERVAL seconds
+MYINVERSEINTERVAL=0.25
+
+top -d $MYINVERSEINTERVAL -n $MYTICKS -b -i | grep Cpu | perl -e "while(<>) { split(','); \$load = 100 - substr @_[3], 0, -3; print \$load,\"\n\";}" > profile
+perl -e '$second=0; while(<>) { chop(); $load = $_; print "$second $load "; split " ", $load; print @_[0] + @_[1], "\n"; $second+=0.25;}' < profile > points
+echo "set grid
+set xrange [0: $(($MYTICKS/$MYINTERVAL))]
+set yrange [0: 101]
+set xtics 0,$MYINVERSEINTERVAL,$(($MYTICKS/$MYINTERVAL))
+set xlabel \"time\"
+set ylabel \"CPU usage\"
+plot \"points\" using 1:2 with lines title 'total load'
+replot" > gplot.cmds
+gnuplot -persist gplot.cmds
diff --git a/abs/extra/gtk-doc/PKGBUILD b/abs/extra/gtk-doc/PKGBUILD
new file mode 100644
index 0000000..6bbbb94
--- /dev/null
+++ b/abs/extra/gtk-doc/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: dorphell <dorphell@archlinux.org>
+
+pkgname=gtk-doc
+pkgver=1.10
+pkgrel=1
+options=('docs')
+pkgdesc="Used to document the public API of libraries"
+arch=(i686 x86_64)
+license=('GPL' 'FDL')
+depends=('perl>=5.8.8' 'rarian' 'docbook-xsl')
+makedepends=('pkgconfig' 'jade')
+install=gtk-doc.install
+url="http://www.gtk.org/gtk-doc/"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('cbd4be396b0cf8b8ce1fc9b927cdf451')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/gtk-doc/gtk-doc.install b/abs/extra/gtk-doc/gtk-doc.install
new file mode 100644
index 0000000..5e39bbf
--- /dev/null
+++ b/abs/extra/gtk-doc/gtk-doc.install
@@ -0,0 +1,14 @@
+post_install() {
+cat << _EOF
+==> SGML support in gtk-doc is no longer maintained, only very old projects
+==> still use SGML. Install (open)jade for SGML support.
+_EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/gtk-sharp-2/PKGBUILD b/abs/extra/gtk-sharp-2/PKGBUILD
new file mode 100644
index 0000000..cabcc92
--- /dev/null
+++ b/abs/extra/gtk-sharp-2/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 26977 2009-02-15 00:09:35Z jgc $
+# Maintainer: tobias <tobias@archlinux.org>
+
+pkgname=gtk-sharp-2
+pkgver=2.12.8
+pkgrel=1
+pkgdesc="gtk2 bindings for C#"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://gtk-sharp.sourceforge.net"
+depends=('mono>=2.2' 'libglade>=2.6.3' 'gtk2>=2.14.7')
+makedepends=('pkgconfig' 'monodoc')
+conflicts=('gtk#')
+options=('!libtool' '!makeflags')
+source=(http://ftp.gnome.org/pub/GNOME/sources/gtk-sharp/2.12/gtk-sharp-${pkgver}.tar.bz2)
+md5sums=('1b12a33df2ab87448848c0cc0733ca77')
+
+build() {
+ # get rid of that .wapi errors; thanks to brice
+ export MONO_SHARED_DIR="${srcdir}/weird"
+ mkdir -p "${MONO_SHARED_DIR}"
+
+ cd "${srcdir}/gtk-sharp-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --disable-static || return 1
+ make || return 1
+ make GACUTIL="/usr/bin/gacutil /root ${pkgdir}/usr/lib" \
+ DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/gtkspell/PKGBUILD b/abs/extra/gtkspell/PKGBUILD
new file mode 100644
index 0000000..1b372a1
--- /dev/null
+++ b/abs/extra/gtkspell/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 22305 2008-12-25 18:48:10Z jgc $
+# Maintainer: Roman Kyrylych <roman@archlinux.org>
+# Contributer: Ben <ben@benmazer.net>
+
+pkgname=gtkspell
+pkgver=2.0.15
+pkgrel=1
+url="http://gtkspell.sourceforge.net/"
+pkgdesc="GtkSpell provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gtk2>=2.14.6' 'enchant>=1.4.2')
+makedepends=('intltool')
+options=('!libtool')
+source=(http://gtkspell.sourceforge.net/download/${pkgname}-${pkgver}.tar.gz)
+md5sums=('d90a7fe883f29caca149f04f31e2f0f9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/guile/PKGBUILD b/abs/extra/guile/PKGBUILD
new file mode 100644
index 0000000..3721e3f
--- /dev/null
+++ b/abs/extra/guile/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 23033 2009-01-01 17:11:52Z jgc $
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=guile
+pkgver=1.8.6
+pkgrel=1
+pkgdesc="Guile is a portable, embeddable Scheme implementation written in C"
+url="http://www.gnu.org/software/guile/"
+arch=(i686 x86_64)
+license=('GPL')
+depends=('gmp' 'libtool' 'ncurses>=5.6-7' 'texinfo')
+install=guile.install
+source=(ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+options=('!libtool')
+md5sums=('9e23d3dbea0e89bab8a9acc6880150de')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --disable-networking \
+ --disable-error-on-warning || return 1
+ make LDFLAGS+="-lpthread" || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+ rm -f "${pkgdir}/usr/share/info/dir"
+ gzip "${pkgdir}/usr/share/info"/* || return 1
+}
diff --git a/abs/extra/guile/guile.install b/abs/extra/guile/guile.install
new file mode 100644
index 0000000..8fab0b1
--- /dev/null
+++ b/abs/extra/guile/guile.install
@@ -0,0 +1,27 @@
+files=(goops.info
+ guile-tut.info
+ guile.info
+ guile.info-1
+ guile.info-2
+ guile.info-3
+ guile.info-4
+ guile.info-5
+ guile.info-6
+ guile.info-7
+ r5rs.info)
+
+post_install() {
+ for f in "${files[@]}"; do
+ install-info usr/share/info/${f}.gz usr/share/info/dir 2>/dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ for f in "${files[@]}"; do
+ install-info --delete usr/share/info/${f}.gz usr/share/info/dir 2> /dev/null
+ done
+}
diff --git a/abs/extra/gvim/PKGBUILD b/abs/extra/gvim/PKGBUILD
new file mode 100644
index 0000000..63c901a
--- /dev/null
+++ b/abs/extra/gvim/PKGBUILD
@@ -0,0 +1,84 @@
+# $Id: PKGBUILD 17439 2008-10-29 19:05:16Z tobias $
+# Maintainer: tobias [ tobias at archlinux org ]
+
+pkgname=gvim
+_srcver=7.2
+_patchlevel=132
+pkgver=${_srcver}.${_patchlevel}
+pkgrel=1
+pkgdesc="the vim text editor with advanced features enabled, such as a gui mode"
+arch=(i686 x86_64)
+license=('custom:vim')
+url="http://www.vim.org"
+depends=("vim>=${pkgver}" 'perl' 'python' 'acl' 'libxt' 'gtk2' )
+makedepends=('pkgconfig')
+backup=(etc/gvimrc)
+conflicts=('gvim-devel')
+provides=('gvim-devel')
+install=${pkgname}.install
+source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
+ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
+ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
+ ${pkgname}.desktop fetch_patches.sh)
+
+build()
+{
+ # patch party
+ # pull in patches from vim.org (or the src cache alternatively)
+ . ${startdir}/src/fetch_patches.sh
+ get_patches || return 1
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ # define the place for the global (g)vimrc file (set to /etc/vimrc)
+ sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
+ ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
+ --with-compiledby=ArchLinux --with-features=big \
+ --with-x=yes --disable-gpm --with-x=yes --enable-gui=gtk2 \
+ --with-global-runtime=/usr/share/vim --with-vim-name=gvim \
+ --enable-multibyte --enable-cscope \
+ --enable-perlinterp --enable-pythoninterp
+ make || return 1
+ # install everything first ...
+ make VIMRCLOC=/etc DESTDIR=${startdir}/pkg VIMRTDIR= install
+
+ # ... and clean up what vim already has for us
+ # move the binary and fix the (g)* related symlinks
+ find ${startdir}/pkg/usr/bin -type l 2> /dev/null | while read symlink; do
+ rm ${symlink}
+ done
+ cd ${startdir}/pkg/usr/bin
+ rm -f gvimtutor xxd
+ ln -s gvim evim
+ ln -s gvim egview
+ ln -s gvim gview
+ ln -s gvim gvimdiff
+ ln -s gvim rgview
+ ln -s gvim rgvim
+
+ # delete the manpages/symlinks provided by vi package
+ find ${startdir}/pkg/usr/share/man -type d -name 'man1' 2> /dev/null | \
+ while read mandir; do
+ cd ${mandir}
+ rm -f *.1
+ ln -s evi.1.gz evim.1.gz
+ ln -s vi.1.gz egview.1.gz
+ ln -s vi.1.gz gview.1.gz
+ ln -s vi.1.gz gvim.1.gz
+ ln -s vimdiff.1.gz gvimdiff.1.gz
+ ln -s vi.1.gz rgvim.1.gz
+ ln -s vi.1.gz rgview.1.gz
+ done
+
+ install -Dm644 ${startdir}/pkg/usr/share/vim/gvimrc_example.vim \
+ ${startdir}/pkg/etc/gvimrc
+ # clean all settings and controls - served by vi package
+ rm -rf ${startdir}/pkg/usr/share/vim
+ # freedesktop links
+ install -D -m644 ${startdir}/src/${pkgname}.desktop \
+ ${startdir}/pkg/usr/share/applications/gvim.desktop
+ install -D -m644 ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")/runtime/vim48x48.png \
+ ${startdir}/pkg/usr/share/pixmaps/gvim.png
+
+ ##############################################################
+ sed -i "s/mouse=a/mouse-=a/g" $startdir/pkg/etc/gvimrc
+ #################################################################
+}
diff --git a/abs/extra/gvim/fetch_patches.sh b/abs/extra/gvim/fetch_patches.sh
new file mode 100644
index 0000000..2ce1019
--- /dev/null
+++ b/abs/extra/gvim/fetch_patches.sh
@@ -0,0 +1,61 @@
+# the external logic for pulling in patches
+
+get_patches() {
+ _patchdir=${startdir}/src/patches
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ if [ -d ${_patchdir} ]; then
+ rm -rf ${_patchdir}
+ echo -e "\tremove patches from old build"
+ fi
+ mkdir ${_patchdir} && cd ${_patchdir}
+ _rpath=ftp://ftp.vim.org/pub/vim/patches/${_srcver}
+
+ # change IFS to loop line-by-line
+ _OLDIFS=$IFS
+ IFS="
+"
+ echo -e "\tfetching checksumfile for patches"
+ wget ${_rpath}/MD5SUMS >/dev/null 2>&1
+
+ downloads=-1
+ for _line in $(/bin/cat MD5SUMS); do
+ downloads=$((${downloads} + 1))
+ _md5=$(echo $_line | cut -d ' ' -f1)
+ _file=$(echo $_line | cut -d ' ' -f3)
+ if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then
+ echo -e "\thaving patch file:${_file}"
+ cp ${SRCDEST}/vim-${_srcver}/${_file} ./
+ else
+ echo -n -e "\t... fetching patch file: ${_file} ..."
+ wget ${_rpath}/${_file} >/dev/null 2>&1
+ if [ -w ${SRCDEST} ]; then
+ if [ ! -d ${SRCDEST}/vim-${_srcver} ]; then
+ mkdir -p ${SRCDEST}/vim-${_srcver}
+ fi
+ cp ${_file} ${SRCDEST}/vim-${_srcver}/
+ echo " done!"
+ fi
+ fi
+
+ if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then
+ echo ${_file} md5sums do not match
+ return 1
+ fi
+ done
+ cd $startdir/src/patches
+ rm 7.2.001-100.gz
+ ########
+
+ if [ ${downloads} != ${_patchlevel} ]; then
+ echo -e "Number of patches does not match the patchlevel!\nEdit the PKGBUILD accordingly!"
+ return 1
+ fi
+ IFS=$_OLDIFS
+ rm MD5SUMS
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ for _patch in $(/bin/ls ${_patchdir}); do
+ patch -Np0 -i ${_patchdir}/${_patch} || return 1
+ done
+ rm -rf ${_patchdir}
+ return 0
+}
diff --git a/abs/extra/gvim/gvim.desktop b/abs/extra/gvim/gvim.desktop
new file mode 100644
index 0000000..8c99660
--- /dev/null
+++ b/abs/extra/gvim/gvim.desktop
@@ -0,0 +1,42 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Name=gVim
+Name[eo]=VIM-fasado
+Name[sv]=gVim
+Name[xx]=xx
+Comment=GTK2 enhanced vim text editor
+Comment[ar]=محرر نصوص
+Comment[bg]=ТекÑÑ‚ Редактор
+Comment[de]=Texteditor
+Comment[el]=ΔιοÏθωτής Κειμένου
+Comment[eo]=Tekstredaktilo
+Comment[et]=Tekstiredaktor
+Comment[eu]=Testu Editorea
+Comment[fi]=Tekstieditori
+Comment[he]=עורך טקסט
+Comment[is]=Textaritill
+Comment[ja]=テキストエディタ
+Comment[lt]=Teksto redaktorius
+Comment[mt]=Editur tat-test
+Comment[pt_BR]=Editor de Texto
+Comment[ro]=Editor de text
+Comment[ru]=редактор
+Comment[sk]=Textový editor
+Comment[sl]=Urejevalnik besedil
+Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
+Comment[tr]=Metin Düzenleyici
+Comment[uk]=Редактор текÑтів
+Comment[vi]=Trình soạn văn bản
+Comment[xx]=xx
+Comment[zh_CN]=文本编辑器
+Comment[zh_TW]=文字編輯器
+GenericName=Text Editor
+Type=Application
+TryExec=gvim
+Exec=gvim
+Icon=gvim
+Terminal=false
+X-MultipleArgs=false
+Categories=GTK;Application;Utility;TextEditor;
+MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-c;text/x-objc;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-php;text/x-php-source;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text/x-xslt;
diff --git a/abs/extra/gvim/gvim.install b/abs/extra/gvim/gvim.install
new file mode 100644
index 0000000..f49c345
--- /dev/null
+++ b/abs/extra/gvim/gvim.install
@@ -0,0 +1,24 @@
+post_install() {
+ echo "Updating desktop and mime database..."
+ update-desktop-database -q
+ echo -n "Updating vim help tags..."
+ usr/bin/vim --noplugins -u NONE -U NONE \
+ --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ echo -n "Updating desktop and mime database..."
+ update-desktop-database
+ echo "done."
+}
+
+op=$1
+shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
+
+# vim:set ts=2 sw=2 et ft=sh:
diff --git a/abs/extra/hd2u/PKGBUILD b/abs/extra/hd2u/PKGBUILD
new file mode 100644
index 0000000..8cde95c
--- /dev/null
+++ b/abs/extra/hd2u/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 13676 2008-09-27 21:20:46Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
+
+pkgname=hd2u
+pkgver=1.0.3
+pkgrel=1
+pkgdesc="Dos2Unix text file converter"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://hany.sk/~hany/software/hd2u/"
+depends=('popt')
+source=(http://hany.sk/~hany/_data/hd2u/$pkgname-$pkgver.tgz)
+md5sums=('8f6668fafb279aa19f956ec0515717b6')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make || return 1
+ make prefix=$pkgdir/usr install
+}
diff --git a/abs/extra/hddtemp/ChangeLog b/abs/extra/hddtemp/ChangeLog
new file mode 100644
index 0000000..d9b03e7
--- /dev/null
+++ b/abs/extra/hddtemp/ChangeLog
@@ -0,0 +1,14 @@
+2009-03-05 Andreas Radke <andyrtr@archlinux.org>
+* pkg moved to extra from AUR
+
+2008-01-23 Roman Kyrylych <roman@archlinux.org>
+* Updated to v38 of Debian's patchset
+
+2007-11-30 Roman Kyrylych <roman@archlinux.org>
+* Backup /etc/conf.d/hddtemp
+
+2007-11-09 Roman Kyrylych <roman@archlinux.org>
+* Updated to v37 of Debian's patchset
+
+2007-06-26 tardo <tardo@nagi-fanboi.net>
+* Built for x86_64
diff --git a/abs/extra/hddtemp/PKGBUILD b/abs/extra/hddtemp/PKGBUILD
new file mode 100644
index 0000000..996577d
--- /dev/null
+++ b/abs/extra/hddtemp/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 29127 2009-03-05 18:08:55Z andyrtr $
+# Maintainer: Andrea Scarpino <bash@archlinux.it>
+# Contributor: Roman Kyrylych <roman@archlinux.org>
+# Contributor: Damir Perisa <damir@archlinux.org>
+
+pkgname=hddtemp
+pkgver=0.3.beta15.45
+_origver=0.3-beta15
+_patchver=45
+pkgrel=2
+pkgdesc="Gives you the temperature of your hard drive by reading S.M.A.R.T. information"
+arch=('i686' 'x86_64')
+url="http://www.guzu.net/linux/hddtemp.php"
+license=('GPL')
+depends=('glibc')
+backup=('etc/conf.d/hddtemp')
+source=(http://www.guzu.net/files/hddtemp-${_origver}.tar.bz2
+ http://ftp.debian.org/debian/pool/main/h/hddtemp/hddtemp_${_origver}-${_patchver}.diff.gz
+ 'hddtemp' 'hddtemp.confd')
+md5sums=('8b829339e1ae9df701684ec239021bb8'
+ 'a809a3a28d29ee719b2855af9b4eb1a8'
+ 'b7ebb86dfeef3bc4577ed1040307e36b'
+ 'fdca5c43900406f0be76534ef2a5a697')
+options=('!libtool')
+
+build() {
+ cd "$srcdir/$pkgname-${_origver}"
+
+ patch -Np1 -i "$srcdir/${pkgname}_${_origver}-${_patchver}.diff" || return 1
+
+ ./configure --prefix=/usr --mandir=/usr/share/man --with-db-path=/usr/share/$pkgname/hddtemp.db
+ make || return 1
+ make DESTDIR=$startdir/pkg install || return 1
+
+ install -D -m644 "$srcdir/$pkgname-${_origver}/debian/hddtemp.db" \
+ "$pkgdir/usr/share/${pkgname}/hddtemp.db" || return 1
+ install -D -m644 "$srcdir/hddtemp.confd" "$pkgdir/etc/conf.d/hddtemp" || return 1
+ install -D -m755 "$srcdir/hddtemp" "$pkgdir/etc/rc.d/hddtemp" || return 1
+}
diff --git a/abs/extra/hddtemp/hddtemp b/abs/extra/hddtemp/hddtemp
new file mode 100644
index 0000000..62f0908
--- /dev/null
+++ b/abs/extra/hddtemp/hddtemp
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PARAMS=
+DRIVES=
+[ -f /etc/conf.d/hddtemp ] && . /etc/conf.d/hddtemp
+PID=$(pidof -o %PPID /usr/sbin/hddtemp)
+case "$1" in
+ start)
+ stat_busy "Starting HDDTemp"
+ [ -z "$PID" ] && /usr/sbin/hddtemp -d $PARAMS $DRIVES
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon hddtemp
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping HDDTemp"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon hddtemp
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/hddtemp/hddtemp.confd b/abs/extra/hddtemp/hddtemp.confd
new file mode 100644
index 0000000..6a1e18e
--- /dev/null
+++ b/abs/extra/hddtemp/hddtemp.confd
@@ -0,0 +1,2 @@
+PARAMS="-q -l 127.0.0.1"
+DRIVES="/dev/sda"
diff --git a/abs/extra/hdhgrab/PKGBUILD b/abs/extra/hdhgrab/PKGBUILD
new file mode 100755
index 0000000..be4fc7f
--- /dev/null
+++ b/abs/extra/hdhgrab/PKGBUILD
@@ -0,0 +1,19 @@
+pkgname=hdhgrab
+pkgver=1
+pkgrel=1
+arch=("i686")
+pkgdesc="A multimedia framework based on the MPEG-4 Systems standard"
+url="myth2ipod.com"
+depends=('hdhomerun' )
+source=(http://ops.nocc.us/hdh/hdhgrab.tar.gz)
+
+
+build() {
+ cd $startdir/src
+
+ install -D -m 755 hdhscan $startdir/pkg/usr/bin/hdhscan
+ install -D -m 755 hdhgrab $startdir/pkg/usr/bin/hdhgrab
+ install -D -m755 README $startdir/pkg/usr/share/README.hdhgrab
+
+
+}
diff --git a/abs/extra/hicolor-icon-theme/PKGBUILD b/abs/extra/hicolor-icon-theme/PKGBUILD
new file mode 100644
index 0000000..55e4c34
--- /dev/null
+++ b/abs/extra/hicolor-icon-theme/PKGBUILD
@@ -0,0 +1,19 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: arjan <arjan@archlinux.org>
+# Contributer: Jan De Groot <jan@jgc.homeip.net>
+pkgname=hicolor-icon-theme
+pkgver=0.10
+pkgrel=1
+pkgdesc="Freedesktop.org Hicolor icon theme"
+arch=(i686 x86_64)
+depends=()
+url="http://icon-theme.freedesktop.org/wiki/HicolorTheme"
+source=(http://icon-theme.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz)
+md5sums=('3534f7b8e59785c7d5bfa923e85510a7')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
diff --git a/abs/extra/hspell/PKGBUILD b/abs/extra/hspell/PKGBUILD
new file mode 100644
index 0000000..7700435
--- /dev/null
+++ b/abs/extra/hspell/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 28768 2009-03-02 04:21:08Z eric $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=hspell
+pkgver=1.0
+pkgrel=2
+pkgdesc="Hebrew spell-checker"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.ivrix.org.il/projects/spell-checker/"
+depends=('glibc>=2.7' 'zlib' 'perl')
+options=('!libtool' '!makeflags')
+source=(ftp://ftp.archlinux.org/other/hspell/${pkgname}-${pkgver}.tar.gz)
+md5sums=('3e12fa383c2cfd430918d115f33f9841')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ [ "${CARCH}" = "x86_64" ] && export CFLAGS="${CFLAGS} -fPIC"
+ sed -i -e 's|/usr/bin/awk|/bin/awk|' wzip
+ ./configure --prefix=/usr --enable-linginfo
+ make || return 1
+ make DESTDIR=${startdir}/pkg/ install || return 1
+}
diff --git a/abs/extra/htop/ChangeLog b/abs/extra/htop/ChangeLog
new file mode 100644
index 0000000..7d77d0b
--- /dev/null
+++ b/abs/extra/htop/ChangeLog
@@ -0,0 +1,8 @@
+2008-12-09 Alexander Fehr <pizzapunk gmail com>
+
+ * htop-0.8.1-1:
+ New upstream release.
+ New maintainer.
+ Added patch to fix FS#12235.
+ Enabled Unicode support.
+ Added ChangeLog.
diff --git a/abs/extra/htop/PKGBUILD b/abs/extra/htop/PKGBUILD
new file mode 100644
index 0000000..326a98a
--- /dev/null
+++ b/abs/extra/htop/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 21081 2008-12-09 17:41:11Z alexanderf $
+# Maintainer: Alexander Fehr <pizzapunk gmail com>
+
+pkgname=htop
+pkgver=0.8.1
+pkgrel=1
+pkgdesc="Interactive process viewer"
+arch=('i686' 'x86_64')
+url="http://htop.sourceforge.net/"
+license=('GPL')
+depends=('ncurses')
+options=('!emptydirs')
+source=(http://downloads.sourceforge.net/htop/htop-$pkgver.tar.gz
+ htop-treeview.patch)
+md5sums=('f0b259ca29175656de48bf0fa0a2e619'
+ '54613e5237592691da8903fae05780d9')
+
+build() {
+ cd "$srcdir/htop-$pkgver"
+
+ # Fix tree view
+ # http://sourceforge.net/tracker2/?func=detail&aid=2343835&group_id=108839&atid=651635
+ patch -Np1 -i "$srcdir/htop-treeview.patch" || return 1
+
+ ./configure --prefix=/usr --enable-unicode || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+}
diff --git a/abs/extra/htop/htop-treeview.patch b/abs/extra/htop/htop-treeview.patch
new file mode 100644
index 0000000..bcf6334
--- /dev/null
+++ b/abs/extra/htop/htop-treeview.patch
@@ -0,0 +1,12 @@
+diff -ur htop-0.8.1.orig/ProcessList.c htop-0.8.1/ProcessList.c
+--- htop-0.8.1.orig/ProcessList.c 2008-09-23 08:23:14.000000000 +0200
++++ htop-0.8.1/ProcessList.c 2008-12-09 15:14:56.000000000 +0100
+@@ -331,7 +331,7 @@
+
+ for (int i = Vector_size(this->processes) - 1; i >= 0; i--) {
+ Process* process = (Process*) (Vector_get(this->processes, i));
+- if (process->tgid == pid || (process->tgid == process->pid && process->ppid == pid)) {
++ if (process->tgid == pid || process->ppid == pid) {
+ Process* process = (Process*) (Vector_take(this->processes, i));
+ Vector_add(children, process);
+ }
diff --git a/abs/extra/hunspell/ChangeLog b/abs/extra/hunspell/ChangeLog
new file mode 100644
index 0000000..dcb3a2a
--- /dev/null
+++ b/abs/extra/hunspell/ChangeLog
@@ -0,0 +1,6 @@
+2008-12-02 Alexander Fehr <pizzapunk gmail com>
+
+ * hunspell-1.2.8-1:
+ New upstream release.
+ New maintainer.
+ Added ChangeLog.
diff --git a/abs/extra/hunspell/PKGBUILD b/abs/extra/hunspell/PKGBUILD
new file mode 100644
index 0000000..2db38c2
--- /dev/null
+++ b/abs/extra/hunspell/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 20746 2008-12-06 14:17:50Z alexanderf $
+# Maintainer: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Hussam Al-Tayeb <ht990332@gmail.com>
+
+pkgname=hunspell
+pkgver=1.2.8
+pkgrel=1
+pkgdesc="Spell checker and morphological analyzer library and program"
+arch=('i686' 'x86_64')
+url="http://hunspell.sourceforge.net/"
+license=('GPL' 'LGPL' 'MPL')
+depends=('gcc-libs')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/hunspell/hunspell-$pkgver.tar.gz)
+md5sums=('1177af54a09e320d2c24015f29c3a93e')
+
+build() {
+ cd "$srcdir/hunspell-$pkgver"
+
+ ./configure --prefix=/usr --disable-static || return 1
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+}
diff --git a/abs/extra/i2c-tools/Makefile.patch b/abs/extra/i2c-tools/Makefile.patch
new file mode 100644
index 0000000..f90fa14
--- /dev/null
+++ b/abs/extra/i2c-tools/Makefile.patch
@@ -0,0 +1,19 @@
+--- Makefile.orig 2007-11-01 18:54:57.000000000 +0100
++++ Makefile 2008-09-24 14:46:54.000000000 +0200
+@@ -5,7 +5,7 @@
+ # Licensed under the GNU General Public License.
+
+ DESTDIR =
+-prefix = /usr/local
++prefix = /usr
+ bindir = $(prefix)/bin
+ sbindir = $(prefix)/sbin
+ mandir = $(prefix)/share/man
+@@ -32,6 +32,6 @@
+ all:
+
+ include eeprom/Module.mk
+-include include/Module.mk
++#include include/Module.mk
+ include stub/Module.mk
+ include tools/Module.mk
diff --git a/abs/extra/i2c-tools/PKGBUILD b/abs/extra/i2c-tools/PKGBUILD
new file mode 100644
index 0000000..db1700d
--- /dev/null
+++ b/abs/extra/i2c-tools/PKGBUILD
@@ -0,0 +1,21 @@
+# Contributor: DonVla <donvla@users.sourceforge.net>
+
+pkgname=i2c-tools
+pkgver=3.0.2
+pkgrel=1
+pkgdesc="Heterogeneous set of I2C tools for Linux that used to be part of lm-sensors"
+arch=('i686' 'x86_64')
+url="http://www.lm-sensors.org/wiki/I2CTools"
+license=('GPL')
+depends=('lm_sensors' 'perl' 'read-edid')
+options=(strip)
+source=(http://dl.lm-sensors.org/$pkgname/releases/$pkgname-$pkgver.tar.bz2 Makefile.patch)
+md5sums=('b546345ac19db56719dea6b8199f11e0' '49d17834f9d7e68407ec46785e47bb94')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p0 < $startdir/Makefile.patch
+ make || return 1
+ make DESTDIR="$pkgdir" install
+}
+# vim:set ts=2 sw=2 et:
diff --git a/abs/extra/icon-naming-utils/PKGBUILD b/abs/extra/icon-naming-utils/PKGBUILD
new file mode 100644
index 0000000..82592ff
--- /dev/null
+++ b/abs/extra/icon-naming-utils/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 4394 2008-07-06 20:12:55Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=icon-naming-utils
+pkgver=0.8.7
+pkgrel=1
+pkgdesc="Maps the new names of icons for Tango to the legacy names used by the GNOME and KDE desktops."
+arch=(i686 x86_64)
+license=('GPL')
+url="http://tango.freedesktop.org/"
+depends=('perl-xml-simple')
+source=(http://tango.freedesktop.org/releases/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('2bcd77b8b6361831a932a5e76e82b66d')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/icon-naming-utils \
+ --localstatedir=/var
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+ mv ${startdir}/pkg/usr/share/pkgconfig ${startdir}/pkg/usr/lib/pkgconfig
+}
diff --git a/abs/extra/id3lib/PKGBUILD b/abs/extra/id3lib/PKGBUILD
new file mode 100644
index 0000000..ba0328a
--- /dev/null
+++ b/abs/extra/id3lib/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 2134 2008-05-26 00:30:40Z eric $
+# Maintainer:
+# Contributor: Jochem Kossen <j.kossen@home.nl>
+pkgname=id3lib
+pkgver=3.8.3
+pkgrel=10
+pkgdesc="An open-source, cross-platform software development library for reading, writing, and manipulating ID3v1 and ID3v2 tags"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://id3lib.sourceforge.net/"
+depends=('zlib' 'gcc-libs')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ patch_id3lib_3.8.3_UTF16_writing_bug.diff
+ id3lib-3.8.3-CVE-2007-4460.patch
+ id3lib-3.8.3-gcc-4.3.patch)
+md5sums=('19f27ddd2dda4b2d26a559a4f0f402a7' '196c65adee1ba511ddacef2de0dfd102'\
+ '78e90e15ddd1122b66da352b6c3b00ff' 'fdbffd2d9d289ed0d730950c78d4ebc4')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ patch -Np1 -i ${startdir}/src/patch_id3lib_3.8.3_UTF16_writing_bug.diff || return 1
+ patch -Np0 -i ${startdir}/src/id3lib-3.8.3-CVE-2007-4460.patch || return 1
+ patch -Np1 -i ${startdir}/src/id3lib-3.8.3-gcc-4.3.patch || return 1
+ ./configure --prefix=/usr
+ sed -i -e 's/^LIBS =/LIBS = -lz -lstdc++/' src/Makefile || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
diff --git a/abs/extra/id3lib/id3lib-3.8.3-CVE-2007-4460.patch b/abs/extra/id3lib/id3lib-3.8.3-CVE-2007-4460.patch
new file mode 100644
index 0000000..daa0866
--- /dev/null
+++ b/abs/extra/id3lib/id3lib-3.8.3-CVE-2007-4460.patch
@@ -0,0 +1,49 @@
+--- src/tag_file.cpp
++++ src/tag_file.cpp
+@@ -242,8 +242,8 @@
+ strcpy(sTempFile, filename.c_str());
+ strcat(sTempFile, sTmpSuffix.c_str());
+
+-#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
+- // This section is for Windows folk && gcc 3.x folk
++#if !defined(HAVE_MKSTEMP)
++ // This section is for Windows folk
+ fstream tmpOut;
+ createFile(sTempFile, tmpOut);
+
+@@ -257,7 +257,7 @@
+ tmpOut.write((char *)tmpBuffer, nBytes);
+ }
+
+-#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
++#else //!defined(HAVE_MKSTEMP)
+
+ // else we gotta make a temp file, copy the tag into it, copy the
+ // rest of the old file after the tag, delete the old file, rename
+@@ -270,7 +270,7 @@
+ //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
+ }
+
+- ofstream tmpOut(fd);
++ ofstream tmpOut(sTempFile);
+ if (!tmpOut)
+ {
+ tmpOut.close();
+@@ -285,14 +285,14 @@
+ uchar tmpBuffer[BUFSIZ];
+ while (file)
+ {
+- file.read(tmpBuffer, BUFSIZ);
++ file.read((char *)tmpBuffer, BUFSIZ);
+ size_t nBytes = file.gcount();
+- tmpOut.write(tmpBuffer, nBytes);
++ tmpOut.write((char *)tmpBuffer, nBytes);
+ }
+
+ close(fd); //closes the file
+
+-#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
++#endif ////!defined(HAVE_MKSTEMP)
+
+ tmpOut.close();
+ file.close();
diff --git a/abs/extra/id3lib/id3lib-3.8.3-gcc-4.3.patch b/abs/extra/id3lib/id3lib-3.8.3-gcc-4.3.patch
new file mode 100644
index 0000000..f5ec498
--- /dev/null
+++ b/abs/extra/id3lib/id3lib-3.8.3-gcc-4.3.patch
@@ -0,0 +1,83 @@
+diff -Naur id3lib-3.8.3-orig/configure id3lib-3.8.3/configure
+--- id3lib-3.8.3-orig/configure 2008-05-24 23:39:36.000000000 -0400
++++ id3lib-3.8.3/configure 2008-05-24 23:39:57.000000000 -0400
+@@ -10296,8 +10296,7 @@
+
+ for ac_header in \
+ string \
+- iomanip.h \
+
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+
+diff -Naur id3lib-3.8.3-orig/include/id3/id3lib_strings.h id3lib-3.8.3/include/id3/id3lib_strings.h
+--- id3lib-3.8.3-orig/include/id3/id3lib_strings.h 2008-03-05 18:19:46.000000000 -0600
++++ id3lib-3.8.3/include/id3/id3lib_strings.h 2008-03-05 18:19:38.000000000 -0600
+@@ -30,6 +30,7 @@
+ #define _ID3LIB_STRINGS_H_
+
+ #include <string>
++#include <cstring>
+
+ #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
+ namespace std
+diff -Naur id3lib-3.8.3-orig/include/id3/writers.h id3lib-3.8.3/include/id3/writers.h
+--- id3lib-3.8.3-orig/include/id3/writers.h 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/include/id3/writers.h 2008-03-05 18:23:05.000000000 -0600
+@@ -30,7 +30,7 @@
+
+ #include "id3/writer.h"
+ #include "id3/id3lib_streams.h"
+-//#include <string.h>
++#include <string.h>
+
+ class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
+ {
+diff -Naur id3lib-3.8.3-orig/examples/demo_convert.cpp id3lib-3.8.3/examples/demo_convert.cpp
+--- id3lib-3.8.3-orig/examples/demo_convert.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_convert.cpp 2008-03-05 18:26:50.000000000 -0600
+@@ -84,7 +84,7 @@
+ }
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ flags_t ulFlag = ID3TT_ALL;
+ gengetopt_args_info args;
+diff -Naur id3lib-3.8.3-orig/examples/demo_info.cpp id3lib-3.8.3/examples/demo_info.cpp
+--- id3lib-3.8.3-orig/examples/demo_info.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_info.cpp 2008-03-05 18:27:40.000000000 -0600
+@@ -309,7 +309,7 @@
+
+ #define DEBUG
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ ID3D_INIT_DOUT();
+
+diff -Naur id3lib-3.8.3-orig/examples/demo_tag.cpp id3lib-3.8.3/examples/demo_tag.cpp
+--- id3lib-3.8.3-orig/examples/demo_tag.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_tag.cpp 2008-03-05 18:31:20.000000000 -0600
+@@ -46,7 +46,7 @@
+ os << "v2";
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ int ulFlag = ID3TT_ID3;
+ ID3D_INIT_DOUT();
+diff -Naur id3lib-3.8.3-orig/examples/demo_copy.cpp id3lib-3.8.3/examples/demo_copy.cpp
+--- id3lib-3.8.3-orig/examples/demo_copy.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_copy.cpp 2008-03-05 18:32:44.000000000 -0600
+@@ -81,7 +81,7 @@
+ }
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ int ulFlag = ID3TT_ID3;
+ ID3D_INIT_DOUT();
diff --git a/abs/extra/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff b/abs/extra/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff
new file mode 100644
index 0000000..b05d2cf
--- /dev/null
+++ b/abs/extra/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff
@@ -0,0 +1,39 @@
+diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog
+--- id3lib-3.8.3.orig/ChangeLog 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/ChangeLog 2006-02-22 00:33:59.946214472 +0100
+@@ -1,3 +1,8 @@
++2006-02-17 Jerome Couderc
++
++ * Patch from Spoon to fix UTF-16 writing bug
++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++
+ 2003-03-02 Sunday 17:38 Thijmen Klok <thijmen@id3lib.org>
+
+ * THANKS (1.20): added more people
+diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp
+--- id3lib-3.8.3.orig/src/io_helpers.cpp 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/src/io_helpers.cpp 2006-02-22 00:35:02.926639992 +0100
+@@ -363,11 +363,22 @@
+ // Write the BOM: 0xFEFF
+ unicode_t BOM = 0xFEFF;
+ writer.writeChars((const unsigned char*) &BOM, 2);
++ // Patch from Spoon : 2004-08-25 14:17
++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++ // Wrong code
++ //for (size_t i = 0; i < size; i += 2)
++ //{
++ // unicode_t ch = (data[i] << 8) | data[i+1];
++ // writer.writeChars((const unsigned char*) &ch, 2);
++ //}
++ // Right code
++ unsigned char *pdata = (unsigned char *) data.c_str();
+ for (size_t i = 0; i < size; i += 2)
+ {
+- unicode_t ch = (data[i] << 8) | data[i+1];
++ unicode_t ch = (pdata[i] << 8) | pdata[i+1];
+ writer.writeChars((const unsigned char*) &ch, 2);
+ }
++ // End patch
+ }
+ return writer.getCur() - beg;
+ }
diff --git a/abs/extra/ifenslave/PKGBUILD b/abs/extra/ifenslave/PKGBUILD
new file mode 100644
index 0000000..8a75170
--- /dev/null
+++ b/abs/extra/ifenslave/PKGBUILD
@@ -0,0 +1,20 @@
+# $Id: PKGBUILD 12836 2008-09-21 14:41:26Z dan $
+# Maintainer: Judd Vinet <jvinet@zeroflux.org>
+pkgname=ifenslave
+pkgver=1.1.0
+pkgrel=4
+pkgdesc="Utility for bonding ethernet interfaces"
+license=('GPL2')
+arch=(i686 x86_64)
+url="http://www.linuxfoundation.org/en/Net:Bonding"
+depends=('glibc')
+source=(ftp://ftp.archlinux.org/other/ifenslave/ifenslave.c bonding.conf.d)
+md5sums=('b0d8e4c97094155747cc9238f762c7aa'
+ '397fccbf574d5082c7a3c8d3793dc000')
+
+build() {
+ cd $startdir/src
+ gcc $CFLAGS -I/usr/src/linux/include ifenslave.c -o ifenslave || return 1
+ install -D -m755 ifenslave $startdir/pkg/sbin/ifenslave
+ install -D -m644 bonding.conf.d $startdir/pkg/etc/conf.d/bonding
+}
diff --git a/abs/extra/ifenslave/bonding.conf.d b/abs/extra/ifenslave/bonding.conf.d
new file mode 100644
index 0000000..3092c5e
--- /dev/null
+++ b/abs/extra/ifenslave/bonding.conf.d
@@ -0,0 +1,12 @@
+#
+# Settings for ethernet bonding
+#
+# For each bond interface declared in INTERFACES (in rc.conf), declare
+# a bond_${IF} variable that contains the real ethernet interfaces that
+# should be bonded to the bond interface with the ifenslave utility.
+# Then list the bond interface name in the BOND_INTERFACES array.
+#
+
+#bond_bond0="eth0 eth1"
+#BOND_INTERFACES=(bond0)
+
diff --git a/abs/extra/inadyn/PKGBUILD b/abs/extra/inadyn/PKGBUILD
new file mode 100644
index 0000000..405f34d
--- /dev/null
+++ b/abs/extra/inadyn/PKGBUILD
@@ -0,0 +1,18 @@
+pkgname=inadyn
+pkgver=1.96.2
+pkgrel=4
+pkgdesc="Simple dynamic DNS client"
+url="http://www.dyndns.com/support/kb/using_inadyn_with_dyndns_services.html"
+makedepends=('unzip')
+arch=('i686' 'x86_64')
+license=('GPL')
+source=(http://cdn.dyndns.com/$pkgname.zip run)
+
+
+build() {
+ cd $startdir/src/$pkgname
+ install -m755 -D bin/linux/$pkgname $startdir/pkg/usr/sbin/$pkgname
+ install -m644 -D man/$pkgname.8 $startdir/pkg/usr/man/man8/$pkgname.8
+ install -m644 -D man/$pkgname.conf.5 $startdir/pkg/usr/man/man5/$pkgname.conf.5
+ install -m755 -D ../run $startdir/pkg/etc/sv/inadyn/run
+}
diff --git a/abs/extra/inadyn/run b/abs/extra/inadyn/run
new file mode 100644
index 0000000..7046c12
--- /dev/null
+++ b/abs/extra/inadyn/run
@@ -0,0 +1,4 @@
+#!/bin/bash
+exec 2>&1
+. /etc/systemconfig
+exec /usr/sbin/inadyn -u $DDnslogin -p $DDnspassword -a $DDnshostname --syslog
diff --git a/abs/extra/irqbalance/Makefile.irqbalance b/abs/extra/irqbalance/Makefile.irqbalance
new file mode 100644
index 0000000..fe08dc0
--- /dev/null
+++ b/abs/extra/irqbalance/Makefile.irqbalance
@@ -0,0 +1,13 @@
+CFLAGS := $(CFLAGS) -D_FORTIFY_SOURCE=2 -Wall -W $(shell pkg-config --cflags glib-2.0)
+LDFLAGS := $(shell pkg-config --libs glib-2.0)
+
+OBJS = bitmap.o irqbalance.o cputree.o procinterrupts.o irqlist.o \
+ placement.o activate.o network.o powermode.o numa.o classify.o
+
+all: irqbalance
+
+irqbalance: $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+clean:
+ rm -f irqbalance *~ *.o
diff --git a/abs/extra/irqbalance/PKGBUILD b/abs/extra/irqbalance/PKGBUILD
new file mode 100644
index 0000000..5d823cd
--- /dev/null
+++ b/abs/extra/irqbalance/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Dan McGee <dan@archlinux.org>
+# Contributor: Martin Striz <ms@poruba.net>
+
+pkgname=irqbalance
+pkgver=0.55
+pkgrel=3
+pkgdesc="IRQ balancing daemon for SMP systems"
+arch=('i686' 'x86_64')
+url="http://www.irqbalance.org/"
+license=('GPL')
+depends=(glib2)
+makedepends=(pkgconfig)
+backup=(etc/conf.d/irqbalance)
+source=(http://www.irqbalance.org/releases/$pkgname-$pkgver.tar.gz
+ Makefile.irqbalance
+ irqbalance.conf.d
+ irqbalance.rc.d)
+md5sums=('9f6b314ff1fdc14173abeb40592d4edf'
+ '45bc9e1d041d8547f2dbf12f887216df'
+ '336c1ee99818f9ecda1687e34c69fd6b'
+ '96efae052553711f74a61760cefa93b5')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ # use our Makefile instead of one provided which is not quite right
+ cp ../Makefile.irqbalance Makefile
+ make || return 1
+
+ install -D -m755 irqbalance $pkgdir/usr/sbin/irqbalance
+ install -D -m644 ../irqbalance.conf.d $pkgdir/etc/conf.d/irqbalance
+ install -D -m755 ../irqbalance.rc.d $pkgdir/etc/rc.d/irqbalance
+}
diff --git a/abs/extra/irqbalance/irqbalance.conf.d b/abs/extra/irqbalance/irqbalance.conf.d
new file mode 100644
index 0000000..ef1bdfd
--- /dev/null
+++ b/abs/extra/irqbalance/irqbalance.conf.d
@@ -0,0 +1,6 @@
+#
+# Settings for irqbalance daemon
+#
+
+# one shot mode - set to 1 if you have Pentium 4 with HT
+ONESHOT=0
diff --git a/abs/extra/irqbalance/irqbalance.rc.d b/abs/extra/irqbalance/irqbalance.rc.d
new file mode 100644
index 0000000..c8d197f
--- /dev/null
+++ b/abs/extra/irqbalance/irqbalance.rc.d
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# source application-specific settings
+ONESHOT=0
+[ -f /etc/conf.d/irqbalance ] && . /etc/conf.d/irqbalance
+
+if [ "$ONESHOT" -ne 0 ]; then
+ ONESHOT_CMD="oneshot"
+fi
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/irqbalance`
+case "$1" in
+ start)
+ stat_busy "Starting IRQ balancing"
+ [ -z "$PID" ] && /usr/sbin/irqbalance $ONESHOT_CMD
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ if [ "$ONESHOT" -eq 0 ]; then
+ add_daemon irqbalance
+ fi
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping IRQ balancing"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon irqbalance
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/iso-codes/PKGBUILD b/abs/extra/iso-codes/PKGBUILD
new file mode 100644
index 0000000..21504a3
--- /dev/null
+++ b/abs/extra/iso-codes/PKGBUILD
@@ -0,0 +1,19 @@
+# $Id: PKGBUILD 1166 2008-05-01 15:36:12Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=iso-codes
+pkgver=2.0
+pkgrel=1
+arch=(i686 x86_64)
+license=('LGPL')
+pkgdesc="Lists of the country, language, and currency names"
+source=(ftp://pkg-isocodes.alioth.debian.org/pub/pkg-isocodes/${pkgname}-${pkgver}.tar.bz2)
+url="http://pkg-isocodes.alioth.debian.org/"
+md5sums=('58e7fee45749583e11a3880c8e1ae567')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} pkgconfigdir=/usr/lib/pkgconfig install || return 1
+}
diff --git a/abs/extra/iw/PKGBUILD b/abs/extra/iw/PKGBUILD
new file mode 100644
index 0000000..052e6d0
--- /dev/null
+++ b/abs/extra/iw/PKGBUILD
@@ -0,0 +1,20 @@
+# $Id: PKGBUILD 24436 2009-01-17 00:02:46Z thomas $
+# Maintainer: Thomas Baechler <thomas@archlinux.org>
+
+pkgname=iw
+pkgver=0.9.8
+pkgrel=1
+pkgdesc="nl80211 based CLI configuration utility for wireless devices"
+arch=("i686" "x86_64")
+url="http://www.linuxwireless.org/en/users/Documentation/iw"
+license=("GPL")
+depends=("libnl")
+makedepends=("kernel-headers")
+source=(http://wireless.kernel.org/download/$pkgname/$pkgname-$pkgver.tar.bz2)
+md5sums=('d39f85e3866b1be5533fe0edce412951')
+
+build() {
+ cd $pkgname-$pkgver
+ make || return 1
+ make DESTDIR=$pkgdir install
+}
diff --git a/abs/extra/jade/PKGBUILD b/abs/extra/jade/PKGBUILD
new file mode 100644
index 0000000..e6a7722
--- /dev/null
+++ b/abs/extra/jade/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 3700 2008-06-29 13:36:31Z jgc $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+pkgname=jade
+pkgver=1.2.1
+pkgrel=5
+_debpatch=47
+pkgdesc="James Clark's DSSSL Engine"
+url='http://www.jclark.com/jade/'
+arch=('i686' 'x86_64')
+license=('custom')
+depends=('gcc-libs')
+replaces='openjade'
+options=('!libtool')
+source=(ftp://ftp.jclark.com/pub/jade/jade-${pkgver}.tar.gz
+ http://ftp.debian.org/debian/pool/main/j/jade/jade_${pkgver}-${_debpatch}.diff.gz)
+md5sums=('4239670ca6b578bff68b8c2e7cd1225f'
+ 'feb3889e2a5fa86ac6bdb742a25d0001')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -Np1 -i ${srcdir}/jade_${pkgver}-${_debpatch}.diff || return 1
+ chmod 755 configure || return 1
+ ./configure --prefix=/usr --enable-default-catalog=/usr/share/sgml/catalog || return 1
+ make || return 1
+ install -d -m755 ${pkgdir}/usr/lib
+ make prefix=${pkgdir}/usr install || return 1
+ mv ${pkgdir}/usr/bin/sx ${pkgdir}/usr/bin/sgml2xml || return 1
+ install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname}
+ install -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
+}
diff --git a/abs/extra/joyutils/PKGBUILD b/abs/extra/joyutils/PKGBUILD
new file mode 100644
index 0000000..bd24a63
--- /dev/null
+++ b/abs/extra/joyutils/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Arkham <arkham at archlinux dot us>
+# Contributor: dirty_d <andrew2085 at gmail dot com>
+
+pkgname=joyutils
+pkgver=1.2.15
+pkgrel=2
+pkgdesc="jscal, jstest, and jsattach utilities for the linux joystick driver"
+arch=('i686' 'x86_64')
+url="http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/"
+license=('GPL')
+source=(ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick/joystick-$pkgver.tar.gz)
+md5sums=('023500eb6986e1a94aa1a0c30af729c2')
+
+build() {
+ # Fix some warnings
+ cd $srcdir/joystick-$pkgver
+ sed -i 's:#include <sys/ioctl.h>:#include <stdlib.h>\n#include <sys/ioctl.h>:' jscal.c
+
+ # Compile
+ gcc -lm -o jscal jscal.c
+ gcc -o jstest jstest.c
+ gcc -o jsattach jsattach.c
+
+ # Install
+ install -Dm 755 jscal $pkgdir/usr/bin/jscal
+ install -m 755 jstest $pkgdir/usr/bin/
+ install -m 755 jsattach $pkgdir/usr/bin/
+ install -Dm 644 jscal.1 $pkgdir/usr/share/man/man1/jscal.1
+ install -m 644 jstest.1 $pkgdir/usr/share/man/man1/
+ install -m 644 jsattach.1 $pkgdir/usr/share/man/man1/
+}
diff --git a/abs/extra/ladspa/PKGBUILD b/abs/extra/ladspa/PKGBUILD
new file mode 100644
index 0000000..c734ca0
--- /dev/null
+++ b/abs/extra/ladspa/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 18545 2008-11-06 23:58:57Z jgc $
+# Maintainer: damir <damir@archlinux.org>
+
+pkgname=ladspa
+pkgver=1.13
+pkgrel=2
+pkgdesc="Linux Audio Developer's Simple Plugin API (LADSPA)"
+arch=("i686" "x86_64")
+license=('LGPL')
+url="http://www.ladspa.org/"
+depends=('gcc-libs>=4.3')
+source=(http://www.ladspa.org/download/${pkgname}_sdk_${pkgver}.tgz
+ hardcode-path.patch)
+md5sums=('671be3e1021d0722cadc7fb27054628e'
+ '27743258232d828575d66940e6de2858')
+
+build() {
+ cd "${srcdir}/${pkgname}_sdk/src"
+ patch -Np1 -i "${srcdir}/hardcode-path.patch" || return 1
+ sed -i -e 's/mkdirhier/mkdir -p/' makefile || return 1
+ make targets || return 1
+ make INSTALL_PLUGINS_DIR="${pkgdir}/usr/lib/ladspa/" \
+ INSTALL_INCLUDE_DIR="${pkgdir}/usr/include/" \
+ INSTALL_BINARY_DIR="${pkgdir}/usr/bin/" install || return 1
+}
diff --git a/abs/extra/ladspa/hardcode-path.patch b/abs/extra/ladspa/hardcode-path.patch
new file mode 100644
index 0000000..821c200
--- /dev/null
+++ b/abs/extra/ladspa/hardcode-path.patch
@@ -0,0 +1,28 @@
+--- src/search.c.orig 2008-11-07 00:38:18.000000000 +0100
++++ src/search.c 2008-11-07 00:50:51.000000000 +0100
+@@ -83,6 +83,8 @@
+ dlclose(pcFilename);
+ free(pcFilename);
+ }
++ } else {
++ free(pcFilename);
+ }
+ }
+ }
+@@ -99,13 +101,10 @@
+
+ pcLADSPAPath = getenv("LADSPA_PATH");
+ if (!pcLADSPAPath) {
+- fprintf(stderr,
+- "Warning: You do not have a LADSPA_PATH "
+- "environment variable set.\n");
+- return;
++ pcStart = "/usr/lib/ladspa/";
++ } else {
++ pcStart = pcLADSPAPath;
+ }
+-
+- pcStart = pcLADSPAPath;
+ while (*pcStart != '\0') {
+ pcEnd = pcStart;
+ while (*pcEnd != ':' && *pcEnd != '\0')
diff --git a/abs/extra/lcdproc/PKGBUILD b/abs/extra/lcdproc/PKGBUILD
new file mode 100644
index 0000000..7ee6e50
--- /dev/null
+++ b/abs/extra/lcdproc/PKGBUILD
@@ -0,0 +1,29 @@
+# Contributor: Bernhard Walle <bernhard.walle@gmx.de>
+pkgname=lcdproc
+pkgver=0.5.2
+pkgrel=2
+pkgdesc="LCDproc is a utility to drive one or more LCD (and LCD-like) devices attached to a host."
+url="http://lcdproc.omnipotent.net/"
+license="GPL"
+depends=(libusb serdisplib libftdi autoconf automake lirc libnxml libmrss pkgconfig xosd)
+backup=(etc/LCDd.conf)
+arch=(i686 x86_64)
+source=(http://switch.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
+ lcdd
+ lcdproc-add-serdisplib
+ )
+md5sums=('860f192d061d87dda6512b11b79daac2'
+ '56f52dcccd6e129a9cf84cd1a0452d56'
+ '274322642740ad323c43ec5d324519d4')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ patch -p1 < ../lcdproc-add-serdisplib
+ autoreconf
+ ./configure --prefix=/usr --sysconfdir=/etc --enable-libusb --enable-lcdproc-menus --enable-stat-smbfs --enable-drivers=all
+ make
+ make DESTDIR=$startdir/pkg install
+ sed -e "s/server\/drivers\//\/usr\/lib\/lcdproc\//g" LCDd.conf > $startdir/pkg/etc/LCDd.conf
+ mkdir -p $startdir/pkg/etc/rc.d
+ install -m 755 $startdir/src/lcdd $startdir/pkg/etc/rc.d
+}
diff --git a/abs/extra/lcdproc/__changelog b/abs/extra/lcdproc/__changelog
new file mode 100644
index 0000000..52c2d35
--- /dev/null
+++ b/abs/extra/lcdproc/__changelog
@@ -0,0 +1 @@
+add xosd \ No newline at end of file
diff --git a/abs/extra/lcdproc/lcdd b/abs/extra/lcdproc/lcdd
new file mode 100755
index 0000000..a124c00
--- /dev/null
+++ b/abs/extra/lcdproc/lcdd
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/LCDd`
+case "$1" in
+ start)
+ stat_busy "Starting LCDd daemon"
+ [ -z "$PID" ] && /usr/sbin/LCDd -c /etc/LCDd.conf
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo $PID > /var/run/lcdd.pid
+ add_daemon lcdd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping LCDd daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm /var/run/lcdd.pid
+ rm_daemon lcdd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/lcdproc/lcdproc-add-serdisplib b/abs/extra/lcdproc/lcdproc-add-serdisplib
new file mode 100644
index 0000000..48d239a
--- /dev/null
+++ b/abs/extra/lcdproc/lcdproc-add-serdisplib
@@ -0,0 +1,1353 @@
+[PATCH] Add serdisplib driver
+
+This patch adds a serdisplib driver for the serdisplib library
+(http://serdisplib.sf.net) that is used for low-level accessing of dot-matrix
+devices (i.e. such displays that are drived by pixel and not by characters
+unlike HD44780, for example).
+
+I know there's already glcdlib. But that approach has several disadvantages:
+
+ o Unnecessary library dependencies.
+ o Complicated installation, i.e. you have to edit two configuration files.
+ o Too much redraws. In fact, that was the reason for me to write this
+ driver because my ctinclud display (http://www.ct-maeusekino.de) was quite
+ unusable with the glcdlib driver. The problem is simply that lcdproc
+ redraws the whole screen each second and it's the task of the driver
+ to not to redraw it in reality. The problem is now that the glcdproc
+ driver only has the view of characters, and cannot decide which pixels it
+ actually has to redraw. And graphlcd which has the per-pixel view doesn't
+ do that "caching" and simply redraws all. Of course, that _can_
+ be changed in graphlcd, but I'm sure that leads to endless discussions and
+ because I didn't like the glcdlib -> graphlcd -> serdisplib approach
+ anyway, I decided to write that driver.
+
+Some important design decisions:
+
+ o The driver is split into lcdgraphic.c and serdisplib.c. All function that
+ do the character -> pixel "rendering" are split out into lcdgraphic.c,
+ so it would be possible to write another low-level driver that uses that
+ function. However, in normal cases it makes more sense to add that part to
+ serdisplib.
+ o It only requires FreeType (http://freetype.sf.net) for font rendering.
+ That's no new real dependency because in almost all cases, graphlcd was
+ compiled with FreeType support.
+ o Only mono space fonts are supported.
+ o The driver implements symbols (arrow, etc.) using Unicode characters of the
+ font. (The recommended font is Andale Mono which is available for free
+ from http://corefonts.sf.net)
+ o Works on i686 and x86_64.
+
+Please review. The patch is against 0.5.2. If you consider to add this into
+CVS, I'll provide documentation. And this time, I'll provide the documentation
+in time unlike with the ula200 driver. ;-)
+
+
+Signed-off-by: Bernhard Walle <bernhard.walle@gmx.de>
+
+---
+ LCDd.conf | 28 ++
+ acinclude.m4 | 27 +-
+ server/drivers/Makefile.am | 5
+ server/drivers/lcdgraphic.c | 590 ++++++++++++++++++++++++++++++++++++++++++++
+ server/drivers/lcdgraphic.h | 195 ++++++++++++++
+ server/drivers/serdisplib.c | 379 ++++++++++++++++++++++++++++
+ 6 files changed, 1220 insertions(+), 4 deletions(-)
+
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -10,13 +10,13 @@ AC_ARG_ENABLE(drivers,
+ [ irman,joy,lb216,lcdm001,lcterm,lirc,MD8800,ms6931,]
+ [ mtc_s16209x,MtxOrb,NoritakeVFD,picolcd,pyramid,sed1330]
+ [ sed1520,serialPOS,serialVFD,sli,stv5730,svga,t6963,text,]
+- [ tyan,ula200,xosd]
++ [ tyan,ula200,serdisplib,xosd]
+ [ 'all' compiles all drivers;]
+ [ 'all,!xxx,!yyy' de-selects previously selected drivers],
+ drivers="$enableval",
+ drivers=[bayrad,CFontz,CFontz633,curses,CwLnx,glk,lb216,lcdm001,MtxOrb,pyramid,text])
+
+-allDrivers=[bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,ea65,EyeboxOne,g15,glcdlib,glk,hd44780,icp_a106,imon,IOWarrior,irman,joy,lb216,lcdm001,lcterm,lirc,MD8800,ms6931,mtc_s16209x,MtxOrb,NoritakeVFD,picolcd,pyramid,sed1330,sed1520,serialPOS,serialVFD,sli,stv5730,svga,t6963,text,tyan,ula200,xosd]
++allDrivers=[bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,ea65,EyeboxOne,g15,glcdlib,glk,hd44780,icp_a106,imon,IOWarrior,irman,joy,lb216,lcdm001,lcterm,lirc,MD8800,ms6931,mtc_s16209x,MtxOrb,NoritakeVFD,picolcd,pyramid,sed1330,sed1520,serialPOS,serialVFD,sli,stv5730,svga,t6963,text,tyan,ula200,serdisplib,xosd]
+
+ drivers=`echo $drivers | sed -e 's/,/ /g'`
+
+@@ -383,6 +383,29 @@ dnl else
+ AC_MSG_WARN([The ula200 driver needs ftdi.h and usb.h])
+ ])
+ ;;
++ serdisplib)
++ LIBFREETYPE_CFLAGS=`pkg-config --cflags freetype2`
++ LIBFREETYPE_LIBS=`pkg-config --libs freetype2`
++ if test x"$LIBFREETYPE_CFLAGS" = "x" ; then
++ AC_MSG_WARN([The serdisplib driver needs freetype2])
++ fi
++
++ AC_CHECK_HEADERS([serdisplib/serdisp.h],[
++ AC_CHECK_LIB(serdisp, serdisp_nextdisplaydescription,[
++ LIBSERDISP="-lserdisp"
++ DRIVERS="$DRIVERS serdisplib${SO}"
++ actdrivers=["$actdrivers serdisplib"]
++ ],[
++ AC_MSG_WARN([The serdisplib driver needs serdisplib])
++ ])
++ ],[
++ AC_MSG_WARN([The serdisplib driver needs serdislib/serdisp.h])
++ ])
++
++ AC_SUBST(LIBFREETYPE_CFLAGS)
++ AC_SUBST(LIBFREETYPE_LIBS)
++ AC_SUBST(LIBSERDISP)
++ ;;
+ xosd)
+ AC_CHECK_HEADERS([xosd.h],[
+ AC_CHECK_LIB(xosd, main,[
+--- a/server/drivers/Makefile.am
++++ b/server/drivers/Makefile.am
+@@ -19,12 +19,13 @@ AM_LDFLAGS = @LDSHARED@
+ #LIBS =
+
+ pkglib_PROGRAMS = @DRIVERS@
+-EXTRA_PROGRAMS = bayrad CFontz CFontz633 CFontzPacket curses CwLnx ea65 EyeboxOne g15 glcdlib glk hd44780 icp_a106 imon IOWarrior irman joy lb216 lcdm001 lcterm lirc MD8800 ms6931 mtc_s16209x MtxOrb NoritakeVFD picolcd pyramid sed1330 sed1520 serialPOS serialVFD stv5730 svga t6963 text tyan sli ula200 xosd
++EXTRA_PROGRAMS = bayrad CFontz CFontz633 CFontzPacket curses CwLnx ea65 EyeboxOne g15 glcdlib glk hd44780 icp_a106 imon IOWarrior irman joy lb216 lcdm001 lcterm lirc MD8800 ms6931 mtc_s16209x MtxOrb NoritakeVFD picolcd pyramid sed1330 sed1520 serialPOS serialVFD stv5730 svga t6963 text tyan sli ula200 serdisplib xosd
+ noinst_LIBRARIES = libLCD.a libbignum.a
+
+ IOWarrior_CFLAGS = @libusb_cflags@ $(AM_CFLAGS)
+ hd44780_CFLAGS = @libusb_cflags@ $(AM_CFLAGS)
+ g15_CFLAGS = @libusb_cflags@ $(AM_CFLAGS)
++serdisplib_CFLAGS = @LIBFREETYPE_CFLAGS@ $(AM_CFLAGS)
+
+ CFontz_LDADD = libLCD.a libbignum.a
+ CFontz633_LDADD = libLCD.a libbignum.a
+@@ -53,6 +54,7 @@ svga_LDADD = @LIBSVGA@
+ t6963_LDADD = libLCD.a
+ tyan_LDADD = libLCD.a libbignum.a
+ ula200_LDADD = libLCD.a @LIBFTDI@
++serdisplib_LDADD = libLCD.a @LIBSERDISP@ @LIBFREETYPE_LIBS@
+ sli_LDADD = libLCD.a
+ xosd_LDADD = @LIBXOSD@
+
+@@ -99,6 +101,7 @@ t6963_SOURCES = lcd.h lcd_lib.h t69
+ text_SOURCES = lcd.h text.h text.c report.h
+ tyan_SOURCES = lcd.h lcd_lib.h tyan_lcdm.h tyan_lcdm.c report.h adv_bignum.h
+ ula200_SOURCES = lcd.h lcd_lib.h ula200.h ula200.c report.h
++serdisplib_SOURCES = lcd.h serdisplib.h serdisplib.c lcdgraphic.c lcdgraphic.h
+ sli_SOURCES = lcd.h lcd_lib.h wirz-sli.h wirz-sli.c report.h
+ xosd_SOURCES = lcd.h xosdlib_drv.c xosdlib_drv.h report.h
+
+--- /dev/null
++++ b/server/drivers/lcdgraphic.c
+@@ -0,0 +1,590 @@
++// Description:
++
++/* Copyright (C) 2007 Bernhard Walle <bernhard.walle@gmx.de>
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 */
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <termios.h>
++#include <fcntl.h>
++#include <string.h>
++#include <errno.h>
++#include <limits.h>
++#include <syslog.h>
++#include <stdint.h>
++
++#include "lcdgraphic.h"
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Defines
++
++#undef report
++#define lcdgr_report lcdgr->drv->report
++
++///////////////////////////////////////////////////////////////////////////////
++// Returns the value of a pixel in the new_buffer buffer.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the x location of the pixel
++// @param y the y location of the pixel
++//
++// @return the value of the pixel
++//
++static inline int get_pixel_new(struct lcdgraphic *lcdgr, int x, int y)
++{
++ if (x >= lcdgr->width || y >= lcdgr->height)
++ return -1;
++ else
++ return lcdgr->new_buffer[lcdgr->width * y + x];
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Returns the value of a pixel in the disp_buffer buffer.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the x location of the pixel
++// @param y the y location of the pixel
++//
++// @return the value of the pixel
++//
++static inline int get_pixel_disp(struct lcdgraphic *lcdgr, int x, int y)
++{
++ if (x >= lcdgr->width || y >= lcdgr->height)
++ return -1;
++ else
++ return lcdgr->disp_buffer[lcdgr->width * y + x];
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Sets the value of a pixel in the new_buffer buffer.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the x location of the pixel
++// @param y the y location of the pixel
++// @param value the value to which the buffer should be set
++//
++static void set_pixel_new(struct lcdgraphic *lcdgr, int x, int y, int value)
++{
++ if (x < lcdgr->width && y < lcdgr->height)
++ lcdgr->new_buffer[lcdgr->width * y + x] = value;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Sets the value of a pixel in the disp_buffer buffer.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the x location of the pixel
++// @param y the y location of the pixel
++// @param value the value to which the buffer should be set
++//
++static void set_pixel_disp(struct lcdgraphic *lcdgr, int x, int y, int value)
++{
++ if (x < lcdgr->width && y < lcdgr->height)
++ lcdgr->disp_buffer[lcdgr->width * y + x] = value;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Maps a lcdproc icon to a unicode code for an icon.
++//
++// @param icon the lcdproc icon constant
++//
++// @return Unicode value
++//
++static int icon2unicode(int icon)
++{
++ switch (icon) {
++ case ICON_BLOCK_FILLED:
++ return UNICODE_BLOCK_FILLED;
++ case ICON_HEART_FILLED:
++ return UNICODE_HEART_FILLED;
++ case ICON_HEART_OPEN:
++ return UNICODE_HEART_OPEN;
++ case ICON_ARROW_UP:
++ return UNICODE_ARROW_UP;
++ case ICON_ARROW_DOWN:
++ return UNICODE_ARROW_DOWN;
++ case ICON_ARROW_LEFT:
++ return UNICODE_ARROW_LEFT;
++ case ICON_ARROW_RIGHT:
++ return UNICODE_ARROW_RIGHT;
++ case ICON_SELECTOR_AT_LEFT:
++ return UNICODE_SELECTOR_AT_LEFT;
++ case ICON_SELECTOR_AT_RIGHT:
++ return UNICODE_SELECTOR_AT_RIGHT;
++ case ICON_ELLIPSIS:
++ return UNICODE_ELLIPSIS;
++ default:
++ return -1;
++ }
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Initialises the instance
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure (not initialised,
++// only allocated
++// @param settings a pointer to a settings structure, for a description of the
++// members, see above
++// @param functions a pointer to the functions structure, for a description of
++// the members, see above
++//
++// @return 0 on success, != 0 on failure
++//
++int lcdgraphic_init(struct lcdgraphic *lcdgr,
++ struct lcdgraphic_settings *settings,
++ struct lcdgraphic_functions *functions)
++{
++ int ret;
++
++ // check the arguments
++ if (!lcdgr || !functions || !settings) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_init: one of the arguments is NULL");
++ return -EINVAL;
++ }
++
++ // check functions
++ if (!functions->setpixel || !functions->clear || !functions->flush) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_init: all functions must be valid");
++ return -EINVAL;
++ }
++
++ // validation
++ if (settings->cwidth == 0 || settings->cheight == 0) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_init: cwidth / cheight is 0");
++ return -EINVAL;
++ }
++
++ // zero all first
++ memset(lcdgr, 0, sizeof(struct lcdgraphic));
++
++ // assign some members
++ lcdgr->width = settings->width;
++ lcdgr->height = settings->height;
++ lcdgr->cwidth = settings->cwidth;
++ lcdgr->cheight = settings->cheight;
++ lcdgr->bwidth = settings->bheight;
++ lcdgr->drv = settings->drv;
++ strncpy(lcdgr->normal_font, settings->normal_font, PATH_MAX);
++ lcdgr->normal_font[PATH_MAX-1] = 0;
++ lcdgr->funcs = *functions;
++ lcdgr->all_dirty = 1;
++
++ // calculate some stuff
++ lcdgr->num_pixels = lcdgr->width * lcdgr->height;
++ lcdgr->xchars = (lcdgr->width - 2*lcdgr->bwidth) / lcdgr->cwidth;
++ lcdgr->ychars = (lcdgr->height - 2*lcdgr->bheight) / lcdgr->cheight;
++
++ // initialise freetype
++ ret = FT_Init_FreeType(&lcdgr->ft_library);
++ if (ret != 0) {
++ lcdgr_report(RPT_ERR, "Freetype initialisation failed");
++ goto out;
++ }
++
++ // load the font face for freetype
++ ret = FT_New_Face(lcdgr->ft_library, lcdgr->normal_font, 0,
++ &lcdgr->ft_normal_font);
++ if (ret != 0) {
++ lcdgr_report(RPT_ERR, "Freetype creation of font '%s' failed",
++ lcdgr->normal_font);
++ goto out;
++ }
++
++ // allocate the buffers
++ lcdgr->disp_buffer = (int *)malloc(sizeof(int) * lcdgr->num_pixels);
++ if (!lcdgr->disp_buffer) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_init: malloc of disp_buffer failed");
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ lcdgr->new_buffer = (int *)malloc(sizeof(int) * lcdgr->num_pixels);
++ if (!lcdgr->new_buffer) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_init: malloc of new_buffer failed");
++ ret = -ENOMEM;
++ goto out;
++ }
++
++ // clear buffers initially
++ memset(lcdgr->new_buffer, 0, sizeof(int) * lcdgr->num_pixels);
++ memset(lcdgr->disp_buffer, 0, sizeof(int) * lcdgr->num_pixels);
++
++ return 0;
++
++out:
++ if (lcdgr->ft_normal_font)
++ FT_Done_Face(lcdgr->ft_normal_font);
++ if (lcdgr->ft_library)
++ FT_Done_FreeType(lcdgr->ft_library);
++ if (lcdgr->new_buffer)
++ free(lcdgr->new_buffer);
++ if (lcdgr->disp_buffer)
++ free(lcdgr->disp_buffer);
++
++ return ret;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Destroys the instance
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++//
++void lcdgraphic_destroy(struct lcdgraphic *lcdgr)
++{
++ if (!lcdgr) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_destroy: lcdgr == NULL");
++ return;
++ }
++
++ if (lcdgr->ft_normal_font)
++ FT_Done_Face(lcdgr->ft_normal_font);
++ if (lcdgr->ft_library)
++ FT_Done_FreeType(lcdgr->ft_library);
++
++ free(lcdgr->disp_buffer);
++ free(lcdgr->new_buffer);
++
++ // allow multiple calls of that function
++ lcdgr->disp_buffer = NULL;
++ lcdgr->new_buffer = NULL;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Returns the number of characters in one line. This function can be used
++// inside the width callback of the display driver.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++//
++// @return the number of characters in a line
++//
++int lcdgraphic_width(struct lcdgraphic *lcdgr)
++{
++ if (!lcdgr) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_destroy: lcdgr == NULL");
++ return -1;
++ }
++
++ return lcdgr->xchars;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Returns the number of lines. This function can be used inside the height
++// callback of the display driver.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++//
++// @return the number lines
++//
++int lcdgraphic_height(struct lcdgraphic *lcdgr)
++{
++ if (!lcdgr) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_destroy: lcdgr == NULL");
++ return -1;
++ }
++
++ return lcdgr->ychars;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Clears the buffer. Doesn't draw anything.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++//
++void lcdgraphic_clear(struct lcdgraphic *lcdgr)
++{
++ if (!lcdgr) {
++ lcdgr_report(RPT_ERR, "lcdgraphic_destroy: lcdgr == NULL");
++ return;
++ }
++
++ memset(lcdgr->new_buffer, 0, sizeof(int) * lcdgr->num_pixels);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws a string into the display buffer. This calls lcdgraphic_draw_char()
++// internally.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the column (position in characters!) where the character
++// should be drawn
++// @param y the line (position in characters!) where the character
++// should be drawn
++// @param str the string that should be drawn
++//
++void lcdgraphic_draw_string(struct lcdgraphic *lcdgr, int x, int y, char *str)
++{
++ int i;
++ int num_chars = strlen(str);
++
++ // check string length
++ if (x + num_chars > lcdgr->xchars) {
++ lcdgr_report(RPT_WARNING, "lcdgraphic_draw_string: %dx%d - %s too long",
++ x, y, str);
++ return;
++ }
++
++ for (i = 0; i < num_chars; i++)
++ lcdgraphic_draw_char(lcdgr, x + i, y, str[i]);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws a Unicode character into the display buffer.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the column (position in characters!) where the character
++// should be drawn
++// @param y the line (position in characters!) where the character
++// should be drawn
++// @param c the character that should be drawn (unicode code)
++// @param scale for big numbers -- the number of cells that the rendered
++// string should occupy
++// @param width the width in characters
++//
++static int lcdgraphic_draw_char_unicode(struct lcdgraphic *lcdgr,
++ int x,
++ int y,
++ int c,
++ int scale,
++ int width)
++{
++ static int last_font_size = -1;
++ int xoffset, yoffset; // in pixel
++ int err;
++ FT_Bitmap *bitmap;
++ unsigned char *bitmap_buf;
++ int col, row;
++ FT_GlyphSlot glyph;
++ FT_Face face;
++ int cwidth, cheight;
++ int font_size;
++
++ face = lcdgr->ft_normal_font;
++ xoffset = lcdgr->bwidth + x*lcdgr->cwidth;
++ yoffset = lcdgr->bheight + y*lcdgr->cheight;
++
++ // set the font size
++ font_size = lcdgr->cheight * scale;
++ if (last_font_size != font_size) {
++ err = FT_Set_Pixel_Sizes(lcdgr->ft_normal_font, font_size, font_size);
++ if (err != 0) {
++ lcdgr_report(RPT_ERR, "Failed to set pixel size (%dx%x)",
++ lcdgr->cwidth * scale, lcdgr->cheight * scale);
++ return -1;
++ }
++
++ last_font_size = font_size;
++ }
++
++ // load the glyph and render it
++ err = FT_Load_Char(lcdgr->ft_normal_font, c,
++ FT_LOAD_RENDER | FT_LOAD_MONOCHROME);
++ if (err != 0) {
++ lcdgr_report(RPT_WARNING, "lcdgraphic_draw_char: loading char "
++ "'%c' (%d) failed", c, c);
++
++ return -1;
++ }
++
++ // clear the rectangle first
++ cwidth = lcdgr->cwidth * width;
++ cheight = lcdgr->cheight * scale;
++ for (col = 0; col < cwidth; col++)
++ for (row = 0; row < cheight; row++)
++ set_pixel_new(lcdgr, xoffset + col, yoffset + row, 0);
++
++ // set some data elements for convenience
++ glyph = lcdgr->ft_normal_font->glyph;
++ bitmap = &glyph->bitmap;
++ bitmap_buf = bitmap->buffer;
++
++ // and now copy the pixels
++ for (row = 0; row < bitmap->rows; row++) {
++ for (col = 0; col < bitmap->width; col++) {
++ int bitmap_left = glyph->bitmap_left;
++
++ if (scale != width)
++ bitmap_left = (cwidth - bitmap->width)/2;
++
++ set_pixel_new(lcdgr, xoffset + col + bitmap_left,
++ yoffset + row + lcdgr->cheight + (face->size->metrics.descender >> 6)
++ - glyph->bitmap_top,
++ bitmap_buf[col/8] >> (7 - (col % 8)) & 1);
++ }
++ bitmap_buf += bitmap->pitch;
++ }
++
++ return 0;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws a character into the display buffer.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the column (position in characters!) where the character
++// should be drawn
++// @param y the line (position in characters!) where the character
++// should be drawn
++// @param c the character that should be drawn
++//
++void lcdgraphic_draw_char(struct lcdgraphic *lcdgr, int x, int y, char c)
++{
++ if (lcdgraphic_draw_char_unicode(lcdgr, x, y, c & 0xff, 1, 1) != 0)
++ lcdgraphic_draw_char_unicode(lcdgr, x, y, '?', 1, 1);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws a big number into the display buffer.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the x position
++// @param num the actual number
++//
++void lcdgraphic_draw_num(struct lcdgraphic *lcdgr, int x, int num)
++{
++ int y;
++ const int BIG_HEIGHT = 3;
++
++ if (num < 0 || num > 10) {
++ lcdgr_report(RPT_WARNING, "lcdgraphic_draw_num: num out of range (%d)", num);
++ return;
++ }
++
++ y = lcdgr->ychars - (lcdgr->ychars - BIG_HEIGHT + 1)/2;
++ if (num == 10)
++ lcdgraphic_draw_char_unicode(lcdgr, x, y, ':', BIG_HEIGHT, 1);
++ else
++ lcdgraphic_draw_char_unicode(lcdgr, x, y, '0' + num, BIG_HEIGHT, BIG_HEIGHT);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws an icon (which standard lcdproc icon syntax)
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the x position of the icon
++// @param y the y position of the icon
++// @param icon the icon constant
++//
++// @return 0 on success, -1 on failure (i.e. the core replaces the icon by a
++// suitable character
++//
++int lcdgraphic_icon(struct lcdgraphic *lcdgr, int x, int y, int icon)
++{
++ int unicode;
++
++ unicode = icon2unicode(icon);
++ if (unicode > 0)
++ return lcdgraphic_draw_char_unicode(lcdgr, x, y, unicode, 1, 1);
++ else
++ return -1;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws a horizontal bar
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the x position of the bar
++// @param y the y position of the bar
++// @param len the maximum length
++// @param promille the current state
++// @param options
++//
++void lcdgraphic_hbar(struct lcdgraphic *lcdgr,
++ int x,
++ int y,
++ int len,
++ int promille,
++ int options)
++{
++ int startx, midx, endx, starty, endy;
++ int col, row;
++
++ /* calculate positions */
++ startx = lcdgr->bwidth + x*lcdgr->cwidth;
++ midx = startx + promille * (len*lcdgr->cwidth) / 1000;
++ endx = startx + len*lcdgr->cwidth;
++ starty = lcdgr->bheight + y*lcdgr->cheight;
++ endy = starty + lcdgr->cheight - 1; /* don't draw the last line */
++
++ for (col = startx; col < endx; col++)
++ for (row = starty; row < endy; row++)
++ set_pixel_new(lcdgr, col, row, col < midx);
++}
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws a vertical bar
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++// @param x the x position of the bar
++// @param y the y position of the bar
++// @param len the maximum length
++// @param promille the current state
++// @param options
++//
++void lcdgraphic_vbar(struct lcdgraphic *lcdgr,
++ int x,
++ int y,
++ int len,
++ int promille,
++ int options)
++{
++ int startx, endx, starty, midy, endy;
++ int col, row;
++
++ /* calculation positions */
++ startx = lcdgr->bwidth + x*lcdgr->cwidth;
++ endx = startx + lcdgr->cwidth - 1; /* don't draw the last column */
++ starty = lcdgr->bheight + (y + 1)*lcdgr->cheight - 1;
++ midy = starty - promille * (len*lcdgr->cheight) / 1000;
++ endy = starty - len*lcdgr->cheight;
++
++ for (col = startx; col < endx; col++)
++ for (row = starty; row > endy; row--)
++ set_pixel_new(lcdgr, col, row, row > midy);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Flushes the output to the display. Uses the provided callback functions
++// of the underlying display.
++//
++// @param lcdgr a pointer to a valid lcdgraphic structure
++//
++void lcdgraphic_flush(struct lcdgraphic *lcdgr)
++{
++ int x, y;
++
++ if (lcdgr->all_dirty)
++ lcdgr->funcs.clear(lcdgr->drv);
++
++ for (y = 0; y < lcdgr->height; y++) {
++ for (x = 0; x < lcdgr->width; x++) {
++ int val = get_pixel_new(lcdgr, x, y);
++
++ if (lcdgr->all_dirty ||
++ (val != get_pixel_disp(lcdgr, x, y)) ) {
++ lcdgr->funcs.setpixel(lcdgr->drv, x, y, val);
++ set_pixel_disp(lcdgr, x, y, val);
++ }
++ }
++ }
++
++ lcdgr->funcs.flush(lcdgr->drv);
++ lcdgr->all_dirty = 0;
++}
++
++// vimx: set sw=4 ts=4 et:
+--- /dev/null
++++ b/server/drivers/lcdgraphic.h
+@@ -0,0 +1,195 @@
++// Description:
++
++/* Copyright (C) 2007 Bernhard Walle <bernhard.walle@gmx.de>
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 */
++
++#ifndef LCDGRAPHIC_H
++#define LCDGRAPHIC_H
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <termios.h>
++#include <fcntl.h>
++#include <string.h>
++#include <errno.h>
++#include <syslog.h>
++#include <iconv.h>
++
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++#include <ft2build.h>
++#include FT_FREETYPE_H
++
++#include <serdisplib/serdisp.h>
++
++
++#include "lcd.h"
++#include "report.h"
++#include "timing.h"
++
++///////////////////////////////////////////////////////////////////////////////
++// constants
++//
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Unicode characters
++//
++
++#define UNICODE_BLOCK_FILLED 0x2588
++#define UNICODE_HEART_OPEN 0x2661
++#define UNICODE_HEART_FILLED 0x2665
++#define UNICODE_ARROW_UP 0x2191
++#define UNICODE_ARROW_DOWN 0x2193
++#define UNICODE_ARROW_LEFT 0x2190
++#define UNICODE_ARROW_RIGHT 0x2192
++#define UNICODE_CHECKBOX_OFF -1 /* -1 == not implemented */
++#define UNICODE_CHECKBOX_ON -1
++#define UNICODE_CHECKBOX_GRAY -1
++#define UNICODE_SELECTOR_AT_LEFT -1
++#define UNICODE_SELECTOR_AT_RIGHT -1
++#define UNICODE_ELLIPSIS -1
++
++///////////////////////////////////////////////////////////////////////////////
++// These are callback functions that the low level driver must provide
++//
++struct lcdgraphic_functions {
++
++ // sets the colour of a pixel
++ void (*setpixel)(Driver *drvthis, int x, int y, int pixel);
++
++ // clears the whole display
++ void (*clear)(Driver *drvthis);
++
++ // flushes the display
++ void (*flush)(Driver *drvthis);
++};
++
++
++///////////////////////////////////////////////////////////////////////////////
++// That structure should be passed by the user, while struct lcdgraphic is
++// entirely private to the library
++struct lcdgraphic_settings {
++
++ // the width and the height (in number of pixels) of the display
++ int width, height;
++
++ // the width and the height of one character
++ int cwidth, cheight;
++
++ // defines unused area on the display (border width / border height)
++ int bwidth, bheight;
++
++ // that's the cookie that is passed to the callback functions
++ // it's also used for reporting errors
++ Driver *drv;
++
++ // font file used for normal characters (TTF, must be monospaced)
++ char normal_font[PATH_MAX];
++};
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Private structure for drivers that use the functions of that library.
++// Don't access the members by hand here.
++//
++struct lcdgraphic {
++
++ // --- public members from the structure above -----
++
++ // the width and the height (in number of pixels) of the display
++ int width, height;
++
++ // the width and the height of one character
++ int cwidth, cheight;
++
++ // defines unused area on the display (border width / border height)
++ int bwidth, bheight;
++
++ // that's the cookie that is passed to the callback functions
++ // it's also used for reporting errors
++ Driver *drv;
++
++ // font file used for normal characters (TTF, must be monospaced)
++ char normal_font[PATH_MAX];
++
++ // a set of callback functions
++ struct lcdgraphic_functions funcs;
++
++ // --- private members -----
++
++ // the framebuffer that's actually displayed
++ int *disp_buffer;
++
++ // the buffer that shows the contents of the next update but wasn't
++ // flushed yet
++ int *new_buffer;
++
++ // (calculated) convenience value because we need that often
++ int num_pixels;
++
++ // (calculated) number of characters in both directions
++ int xchars, ychars;
++
++ // all buffers are dirty, i.e. update all
++ int all_dirty;
++
++ // freetype library handle
++ FT_Library ft_library;
++
++ // handle for the normal font
++ FT_Face ft_normal_font;
++
++ // handle for charset convertions
++ iconv_t iconv_handle;
++};
++
++// Forward declarations for 'clients'
++
++int lcdgraphic_init(struct lcdgraphic *lcdgr,
++ struct lcdgraphic_settings *settings,
++ struct lcdgraphic_functions *functions);
++
++int lcdgraphic_width(struct lcdgraphic *lcdgr);
++int lcdgraphic_height(struct lcdgraphic *lcdgr);
++void lcdgraphic_destroy(struct lcdgraphic *lcdgr);
++void lcdgraphic_clear(struct lcdgraphic *lcdgr);
++void lcdgraphic_flush(struct lcdgraphic *lcdgr);
++void lcdgraphic_draw_string(struct lcdgraphic *lcdgr, int x, int y, char *str);
++void lcdgraphic_draw_char(struct lcdgraphic *lcdgr, int x, int y, char c);
++void lcdgraphic_draw_num(struct lcdgraphic *lcdgr, int x, int num);
++int lcdgraphic_icon(struct lcdgraphic *lcdgr, int x, int y, int icon);
++
++void lcdgraphic_hbar(struct lcdgraphic *lcdgr,
++ int x,
++ int y,
++ int len,
++ int promille,
++ int options);
++
++void lcdgraphic_vbar(struct lcdgraphic *lcdgr,
++ int x,
++ int y,
++ int len,
++ int promille,
++ int options);
++
++#endif /* LCDGRAPHIC_H */
++
++// vim: set sw=4 ts=4 et:
+--- /dev/null
++++ b/server/drivers/serdisplib.c
+@@ -0,0 +1,379 @@
++// Description:
++
++/* Copyright (C) 2007 Bernhard Walle <bernhard.walle@gmx.de>
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 */
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <termios.h>
++#include <fcntl.h>
++#include <string.h>
++#include <errno.h>
++#include <limits.h>
++#include <syslog.h>
++
++#include <serdisplib/serdisp.h>
++
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++#include "lcd.h"
++#include "report.h"
++#include "timing.h"
++#include "lcdgraphic.h"
++
++/* Vars for the server core */
++MODULE_EXPORT char *api_version = API_VERSION;
++MODULE_EXPORT int stay_in_foreground = 0;
++MODULE_EXPORT int supports_multiple = 1;
++MODULE_EXPORT char *symbol_prefix = "serdisplib_";
++
++///////////////////////////////////////////////////////////////////////////////
++// constants
++//
++#define SERDISPLIB_MAX_DISPLAYNAME 32
++#define SERDISPLIB_MAX_DEVICENAME PATH_MAX
++
++///////////////////////////////////////////////////////////////////////////////
++// private data types
++//
++typedef struct {
++
++ // the name of the display driver in serdisplib, e.g. 'ctinclud'
++ char display_name[SERDISPLIB_MAX_DISPLAYNAME];
++
++ // the name of the device in serdisplib, e.g. /dev/parport0
++ char display_device[SERDISPLIB_MAX_DEVICENAME];
++
++ // the serdisplib connection handle
++ serdisp_CONN_t* serdisplib_conn;
++
++ // the serdisplib handle
++ serdisp_t *serdisplib;
++
++ // invert the display
++ int invert;
++
++ // the lcdgraphic handle
++ struct lcdgraphic *lcdgraphic;
++
++} PrivateData;
++
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Callback functions
++//
++
++static void callback_setpixel(Driver *drvthis, int x, int y, int pixel)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ serdisp_setcolour(p->serdisplib, x, y, pixel ? SD_COL_BLACK : SD_COL_WHITE);
++}
++
++static void callback_clear(Driver *drvthis)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ serdisp_clearbuffer(p->serdisplib);
++}
++
++static void callback_flush(Driver *drvthis)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ serdisp_update(p->serdisplib);
++}
++
++struct lcdgraphic_functions lcdgraphic_functions = {
++ .setpixel = callback_setpixel,
++ .clear = callback_clear,
++ .flush = callback_flush
++};
++
++///////////////////////////////////////////////////////////////////////////////
++// Init the driver and display
++//
++MODULE_EXPORT int
++serdisplib_init(Driver *drvthis)
++{
++ PrivateData *p;
++ int ret;
++ struct lcdgraphic_settings settings;
++ const char *s;
++
++ // Alocate and store private data
++ p = (PrivateData *) malloc(sizeof(PrivateData));
++ if (!p)
++ return -1;
++ if (drvthis->store_private_ptr(drvthis, p))
++ return -1;
++ memset(p, 0, sizeof(PrivateData));
++
++ // get the display name
++ s = drvthis->config_get_string(drvthis->name, "display_name", 0, NULL);
++ if (!s) {
++ report(RPT_ERR, "You must specify display_name in configuration");
++ goto out;
++ }
++ strncpy(p->display_name, s, SERDISPLIB_MAX_DISPLAYNAME);
++ p->display_name[SERDISPLIB_MAX_DISPLAYNAME-1] = 0;
++
++ // get the display device
++ s = drvthis->config_get_string(drvthis->name, "display_device", 0, NULL);
++ if (!s) {
++ report(RPT_ERR, "You must specify display_device in configuration");
++ goto out;
++ }
++ strncpy(p->display_device, s, SERDISPLIB_MAX_DEVICENAME);
++ p->display_device[SERDISPLIB_MAX_DEVICENAME-1] = 0;
++
++ // get the normal font
++ s = drvthis->config_get_string(drvthis->name, "normal_font", 0, NULL);
++ if (!s) {
++ report(RPT_ERR, "You must specify normal_font in configuration");
++ goto out;
++ }
++ strncpy(settings.normal_font, s, PATH_MAX);
++ settings.normal_font[PATH_MAX-1] = 0;
++
++ // character size
++ s = drvthis->config_get_string(drvthis->name, "char_size", 0, "6x10");
++ if (!s) {
++ report(RPT_ERR, "Could not retrieve char_size from configuration");
++ goto out;
++ }
++ if (sscanf(s, "%dx%d", &settings.cwidth, &settings.cheight) != 2) {
++ report(RPT_ERR, "Could not scan '%s' correctly", s);
++ goto out;
++ }
++
++ // border size
++ s = drvthis->config_get_string(drvthis->name, "border_size", 0, "0x0");
++ if (!s) {
++ report(RPT_ERR, "Could not retrieve border size from configuration");
++ goto out;
++ }
++ if (sscanf(s, "%dx%d", &settings.bwidth, &settings.bheight) != 2) {
++ report(RPT_ERR, "Could not scan '%s' correctly", s);
++ goto out;
++ }
++
++ // invert
++ p->invert = drvthis->config_get_bool(drvthis->name, "invert", 0, 1);
++
++
++ /* End of config file parsing */
++
++ // opening the output device */
++ p->serdisplib_conn = SDCONN_open(p->display_device);
++ if (!p->serdisplib_conn) {
++ report(RPT_ERR, "Could not open %s: %s", p->display_device,
++ sd_geterrormsg());
++ goto out;
++ }
++
++ // opening and initialising the display
++ p->serdisplib = serdisp_init(p->serdisplib_conn, p->display_name, "");
++ if (!p->serdisplib) {
++ report(RPT_ERR, "Error opening display %s: %s\n", p->display_name,
++ sd_geterrormsg());
++ goto out;
++ }
++
++ // invert settings
++ serdisp_setoption(p->serdisplib, "INVERT", p->invert
++ ? SD_OPTION_YES : SD_OPTION_NO);
++
++ // allocate lcdgraphic handle
++ p->lcdgraphic = (struct lcdgraphic *)malloc(sizeof(struct lcdgraphic));
++ if (!p->lcdgraphic) {
++ report(RPT_ERR, "Not enough memory to allocate struct lcdgraphic");
++ goto out;
++ }
++
++ // register at the lcdgraphic backend
++ settings.width = serdisp_getwidth(p->serdisplib);
++ settings.height = serdisp_getheight(p->serdisplib);
++ settings.drv = drvthis;
++
++ ret = lcdgraphic_init(p->lcdgraphic, &settings, &lcdgraphic_functions);
++ if (ret != 0) {
++ report(RPT_ERR, "Error registering at lcdgraphic subsystem");
++ goto out;
++ }
++
++ return 0;
++
++out:
++ if (p->serdisplib_conn && !p->serdisplib)
++ SDCONN_close(p->serdisplib_conn);
++ if (p->serdisplib)
++ serdisp_quit(p->serdisplib);
++ drvthis->store_private_ptr(drvthis, NULL);
++ free(p);
++
++ return -1;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Clean-up
++//
++MODULE_EXPORT void
++serdisplib_close(Driver *drvthis)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ if (p) {
++ if (p->serdisplib)
++ serdisp_quit(p->serdisplib);
++ if (p->lcdgraphic)
++ lcdgraphic_destroy(p->lcdgraphic);
++ }
++ drvthis->store_private_ptr(drvthis, NULL);
++ free(p);
++}
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Returns the display width
++//
++MODULE_EXPORT int
++serdisplib_width (Driver *drvthis)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ return lcdgraphic_width(p->lcdgraphic);
++}
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Returns the display height
++//
++MODULE_EXPORT int
++serdisplib_height (Driver *drvthis)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ return lcdgraphic_height(p->lcdgraphic);
++}
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Clear the framebuffer
++//
++MODULE_EXPORT void
++serdisplib_clear (Driver *drvthis)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ lcdgraphic_clear(p->lcdgraphic);
++}
++
++
++///////////////////////////////////////////////////////////////////////////////
++// Place a character in the framebuffer
++//
++MODULE_EXPORT void
++serdisplib_chr (Driver *drvthis, int x, int y, char ch)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ lcdgraphic_draw_char(p->lcdgraphic, x - 1, y - 1, ch);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Place a string in the framebuffer
++//
++MODULE_EXPORT void
++serdisplib_string (Driver *drvthis, int x, int y, char *s)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ lcdgraphic_draw_string(p->lcdgraphic, x - 1, y - 1, s);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Place a big number in the framebuffer
++//
++MODULE_EXPORT void
++serdisplib_num (Driver *drvthis, int x, int num)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ lcdgraphic_draw_num(p->lcdgraphic, x - 1, num);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Sets the backlight on or off
++//
++MODULE_EXPORT void
++serdisplib_backlight (Driver *drvthis, int on)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ serdisp_setoption(p->serdisplib, "BACKLIGHT", on ? SD_OPTION_YES : SD_OPTION_NO);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Flush the framebuffer to the display
++//
++MODULE_EXPORT void
++serdisplib_flush(Driver *drvthis)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ lcdgraphic_flush(p->lcdgraphic);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Set default icon into a userdef char
++//
++MODULE_EXPORT int
++serdisplib_icon(Driver *drvthis, int x, int y, int icon)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ return lcdgraphic_icon(p->lcdgraphic, x - 1, y - 1, icon);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws a horizontal bar
++//
++MODULE_EXPORT void
++serdisplib_hbar(Driver *drvthis, int x, int y, int len, int promille, int options)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ lcdgraphic_hbar(p->lcdgraphic, x - 1, y - 1, len, promille, options);
++}
++
++///////////////////////////////////////////////////////////////////////////////
++// Draws a vertical bar
++//
++MODULE_EXPORT void
++serdisplib_vbar(Driver *drvthis, int x, int y, int len, int promille, int options)
++{
++ PrivateData *p = (PrivateData *) drvthis->private_data;
++
++ lcdgraphic_vbar(p->lcdgraphic, x - 1, y - 1, len, promille, options);
++}
++
++
++// vim: set sw=4 ts=4 et:
+--- a/LCDd.conf
++++ b/LCDd.conf
+@@ -40,7 +40,8 @@
+ # EyeboxOne, g15, glcdlib, glk, hd44780, icp_a106, imon, IOWarrior,
+ # irman, joy, lb216, lcdm001, lcterm, lirc, MD8800, ms6931, mtc_s16209x,
+ # MtxOrb, NoritakeVFD, picolcd, pyramid, sed1330, sed1520, serialPOS,
+-# serialVFD, sli, stv5730, svga, t6963, text, tyan, ula200, xosd
++# serialVFD, sli, stv5730, svga, t6963, text, tyan, ula200, serdisplib,
++# xosd
+ Driver=curses
+
+ # Tells the driver to bind to the given interface
+@@ -931,6 +932,31 @@ Size=20x4
+ # KeyMap_E=Enter
+ # KeyMap_F=Escape
+
++## serdisplib meta-driver for dot-matrix displays ##
++[serdisplib]
++
++# the underlying serdisplib driver, e.g. ctinclud
++display_name=ctinclud
++
++# the display device, e.g. serraw:/dev/ttyS0, parport:/dev/parport0
++# or USB:07c0/1501 (vendor ID, device ID)
++display_device=USB:07c0/1501
++
++# the font which is used for rendering, this font must be monospace
++# and should contain some special Unicode characters like arrows
++# (Andale Mono is recommended and can be fetched at
++# http://corefonts.sf.net or from a Windows installation)
++normal_font=/usr/share/fonts/truetype/andalemo.ttf
++
++# invert the display (black => white, white => black)
++invert=0
++
++# the size of one characters, the number of characters is calculated
++# automatically from this and from border_size (see below)
++char_size=6x10
++
++# size of the border around the drawing area
++border_size=0
+
+
+ ## Wirz SLI LCD driver ##
diff --git a/abs/extra/libbonobo/PKGBUILD b/abs/extra/libbonobo/PKGBUILD
new file mode 100644
index 0000000..93e2538
--- /dev/null
+++ b/abs/extra/libbonobo/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 29425 2009-03-08 17:32:56Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libbonobo
+pkgver=2.24.1
+pkgrel=1
+pkgdesc="A set of language and system independant CORBA interfaces for creating reusable components"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+depends=('orbit2>=2.14.17' 'libxml2>=2.7.3' 'dbus-glib>=0.78')
+makedepends=('intltool' 'pkgconfig' 'flex')
+options=('!libtool')
+backup=('etc/bonobo-activation/bonobo-activation-config.xml')
+replaces=('bonobo-activation')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/libbonobo/2.24/libbonobo-${pkgver}.tar.bz2
+ bonobo-activation-config.xml)
+install=libbonobo.install
+md5sums=('8868b6083392964a6969547ceb8d7cd1'
+ '6392efaca30a26f826eafc4b8ccbc01f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --libexecdir=/usr/lib/bonobo || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+ install -m644 "${srcdir}/bonobo-activation-config.xml" "${pkgdir}/etc/bonobo-activation/" || return 1
+}
diff --git a/abs/extra/libbonobo/bonobo-activation-config.xml b/abs/extra/libbonobo/bonobo-activation-config.xml
new file mode 100644
index 0000000..65ee75f
--- /dev/null
+++ b/abs/extra/libbonobo/bonobo-activation-config.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+
+<oafconfig>
+
+<searchpath>
+ <!-- Examples: -->
+ <item>/usr/lib/bonobo/servers</item>
+ <item>/opt/gnome/lib/bonobo/servers</item>
+ <!-- <item>/usr/local/gnome2/lib/bonobo/servers</item> -->
+ <!-- <item>/usr/local/lib/bonobo/servers</item> -->
+ <!-- <item>/opt/gnome2/bonobo-activation/lib/bonobo/servers</item> -->
+</searchpath>
+
+</oafconfig>
diff --git a/abs/extra/libbonobo/libbonobo.install b/abs/extra/libbonobo/libbonobo.install
new file mode 100644
index 0000000..1794e4a
--- /dev/null
+++ b/abs/extra/libbonobo/libbonobo.install
@@ -0,0 +1,23 @@
+post_install() {
+ /bin/true
+}
+
+post_upgrade() {
+ ldconfig -r .
+ PID=`pidof bonobo-activation-server`
+ if [ ! -z "${PID}" ]; then
+ killall -HUP bonobo-activation-server 2>&1
+ fi
+}
+
+pre_remove() {
+ /bin/true
+}
+
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/libbonoboui/PKGBUILD b/abs/extra/libbonoboui/PKGBUILD
new file mode 100644
index 0000000..b008798
--- /dev/null
+++ b/abs/extra/libbonoboui/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 29428 2009-03-08 17:35:50Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libbonoboui
+pkgver=2.24.1
+pkgrel=1
+pkgdesc="User Interface library for Bonobo"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+depends=('libgnomecanvas>=2.20.1.1' 'libgnome>=2.24.1')
+makedepends=('perlxml' 'pkgconfig')
+options=('!libtool' '!emptydirs')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.24/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('9ff3ec1c7aefd0b1a15a5b21ecc7b4e4')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+ rm -f "${pkgdir}/usr/share/applications/bonobo-browser.desktop"
+}
diff --git a/abs/extra/libcdio/PKGBUILD b/abs/extra/libcdio/PKGBUILD
new file mode 100644
index 0000000..d3aaaa9
--- /dev/null
+++ b/abs/extra/libcdio/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 9268 2008-08-17 05:54:40Z allan $
+# Maintainer: damir <damir@archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+
+pkgname=libcdio
+pkgver=0.80
+pkgrel=3
+pkgdesc="GNU Compact Disc Input and Control Library"
+arch=("i686" "x86_64")
+license=('GPL')
+url="http://www.gnu.org/software/libcdio/"
+depends=('gcc-libs>=4.3.0' 'libcddb' 'ncurses')
+options=('!libtool')
+source=(http://ftp.gnu.org/gnu/libcdio/$pkgname-$pkgver.tar.gz)
+md5sums=('6495add276ed11b7ac8a88092799ab4f')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --disable-vcd-info || return 1
+ make || return 1
+ make DESTDIR=$startdir/pkg install || return 1
+ install -m644 libcdio_paranoia.pc libcdio_cdda.pc \
+ ${startdir}/pkg/usr/lib/pkgconfig/ || return 1
+ rm ${pkgdir}/usr/share/info/dir
+}
+
diff --git a/abs/extra/libdvdcss/PKGBUILD b/abs/extra/libdvdcss/PKGBUILD
new file mode 100644
index 0000000..9b5253e
--- /dev/null
+++ b/abs/extra/libdvdcss/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 14403 2008-10-06 08:19:39Z douglas $
+# Maintainer: arjan <arjan@archlinux.org>
+# Contributor Sarah Hay <sarahhay@mb.sympatico.ca>
+
+pkgname=libdvdcss
+pkgver=1.2.10
+pkgrel=1
+pkgdesc="libdvdcss is a cross-platform library for transparent DVD device access with on-the-fly CSS decryption."
+arch=('i686' 'x86_64')
+depends=('glibc')
+options=('!libtool')
+source=(http://download.videolan.org/pub/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2)
+url="http://www.videolan.org/libdvdcss/"
+
+md5sums=('ebd5370b79ac5a83e5c61b24a214cf74')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/libdvdnav/PKGBUILD b/abs/extra/libdvdnav/PKGBUILD
new file mode 100644
index 0000000..4e9e3ca
--- /dev/null
+++ b/abs/extra/libdvdnav/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 927 2008-04-24 21:34:43Z jgc $
+# Maintainer: arjan <arjan@archlinux.org>
+# contributor Sarah Hay <sarahhay@mb.sympatico.ca>
+
+pkgname=libdvdnav
+pkgver=0.1.10
+pkgrel=3
+pkgdesc="The library for xine-dvdnav plugin."
+arch=(i686 x86_64)
+license=('GPL')
+url="http://dvd.sourceforge.net/index.shtml"
+depends=('glibc')
+options=(!libtool)
+source=(http://downloads.sourceforge.net/sourceforge/dvd/${pkgname}-${pkgver}.tar.gz)
+md5sums=('c8ddee96ba1182d73447eaf0bb6fde81')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./autogen.sh --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/libebml/PKGBUILD b/abs/extra/libebml/PKGBUILD
new file mode 100644
index 0000000..d537999
--- /dev/null
+++ b/abs/extra/libebml/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: damir <damir@archlinux.org>
+# Contributor: 03/08/04 <lefungus@altern.org>
+
+pkgname=libebml
+pkgver=0.7.8
+pkgrel=1
+pkgdesc="Extensible Binary Meta Language library"
+arch=(i686 x86_64)
+url="http://dl.matroska.org/downloads/libebml/"
+depends=('gcc-libs')
+license=('LGPL')
+#source=(http://www.bunkus.org/videotools/mkvtoolnix/sources/$pkgname-$pkgver.tar.bz2)
+source=($url/$pkgname-$pkgver.tar.bz2)
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver/make/linux
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+}
+
+
+md5sums=('6278109f52e4f9d2c8a8dfc0d668b587')
diff --git a/abs/extra/libftdi/PKGBUILD b/abs/extra/libftdi/PKGBUILD
new file mode 100644
index 0000000..b435b9a
--- /dev/null
+++ b/abs/extra/libftdi/PKGBUILD
@@ -0,0 +1,19 @@
+# Contributor: Bernhard Walle <bernhard.walle@gmx.de>
+pkgname=libftdi
+pkgver=0.13
+pkgrel=0
+pkgdesc="Library to program and control the FTDI USB controller"
+url="http://www.intra2net.com/de/produkte/opensource/ftdi/"
+license="GPL"
+depends=(libusb)
+arch=(i686 x86_64)
+source=(http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/$pkgname-$pkgver.tar.gz)
+md5sums=('7b4a660fd644980f3d45873d156d021a')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make
+ make DESTDIR=$startdir/pkg install
+}
+# :mode=shellscript:
diff --git a/abs/extra/libgda/Changelog b/abs/extra/libgda/Changelog
new file mode 100644
index 0000000..88ba942
--- /dev/null
+++ b/abs/extra/libgda/Changelog
@@ -0,0 +1,2 @@
+4.0.2 5/2/09
+Added path for jni headers in configure.
diff --git a/abs/extra/libgda/PKGBUILD b/abs/extra/libgda/PKGBUILD
new file mode 100644
index 0000000..c4350b7
--- /dev/null
+++ b/abs/extra/libgda/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 36066 2009-04-19 20:31:09Z jgc $
+# Maintainer: tobias <tobias@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+
+pkgname=libgda
+pkgver=4.0.2
+pkgrel=4
+pkgdesc="data abstraction layer; with mysql, pgsql, ldap, xml, sqlite providers"
+arch=(i686 x86_64)
+license=('GPL')
+depends=('glib2>=2.20.1' 'libxslt' 'db>=4.7' 'ncurses>=5.7-2')
+makedepends=('intltool' 'pkgconfig' 'openjdk6')
+options=('!libtool')
+url="http://www.gnome-db.org"
+source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/4.0/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('cd79f6542cdd9477017b76b5f81c776f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --disable-static --with-jni=/usr/lib/jvm/java-1.6.0-openjdk/include/ --without-java || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/libgda/bdb43.patch b/abs/extra/libgda/bdb43.patch
new file mode 100644
index 0000000..3fe6e93
--- /dev/null
+++ b/abs/extra/libgda/bdb43.patch
@@ -0,0 +1,18 @@
+diff -r -u libgda-1.2.0.old/providers/bdb/gda-bdb-recordset.c libgda-1.2.0/providers/bdb/gda-bdb-recordset.c
+--- libgda-1.2.0.old/providers/bdb/gda-bdb-recordset.c 2003-12-17 11:27:02.000000000 +0000
++++ libgda-1.2.0/providers/bdb/gda-bdb-recordset.c 2005-02-19 15:43:12.000000000 +0000
+@@ -227,10 +227,14 @@
+
+ /* get the number of records in the database */
+ ret = dbp->stat (dbp,
++#if BDB_VERSION > 40300
++ NULL,
++#endif
+ &statp,
+ #if BDB_VERSION < 40000
+ NULL,
+ #endif
++
+ 0);
+ if (ret != 0) {
+ gda_connection_add_error (cnc, gda_bdb_make_error (ret));
diff --git a/abs/extra/libgda/libgda.install b/abs/extra/libgda/libgda.install
new file mode 100644
index 0000000..6420004
--- /dev/null
+++ b/abs/extra/libgda/libgda.install
@@ -0,0 +1,16 @@
+post_install() {
+ scrollkeeper-update -q -p var/lib/scrollkeeper
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/extra/libgdiplus/PKGBUILD b/abs/extra/libgdiplus/PKGBUILD
new file mode 100644
index 0000000..3b91775
--- /dev/null
+++ b/abs/extra/libgdiplus/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 15386 2008-10-13 16:29:55Z daniel $
+# Maintainer: daniel@archlinux.org
+
+pkgname=libgdiplus
+pkgver=2.2
+pkgrel=1
+pkgdesc="An Open Source Implementation of the GDI+ API"
+arch=(i686 x86_64)
+license=('MPL' 'LGPL')
+url="http://www.mono-project.com"
+depends=('libtiff' 'cairo>=1.6.4' 'giflib' 'glib2>=2.18.0' 'libexif')
+makedepends=('automake' 'pkgconfig')
+options=('!libtool')
+source=(http://go-mono.com/sources/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('4af9c8171e75f1408c3628a8f7937d9f')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --with-cairo=system
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/libgdiplus/system-cairo.patch b/abs/extra/libgdiplus/system-cairo.patch
new file mode 100644
index 0000000..b605a3e
--- /dev/null
+++ b/abs/extra/libgdiplus/system-cairo.patch
@@ -0,0 +1,67 @@
+diff -ur libgdiplus-1.1.15-old/Makefile.am libgdiplus-1.1.15/Makefile.am
+--- libgdiplus-1.1.15-old/Makefile.am 2006-04-14 10:04:55.000000000 -0700
++++ libgdiplus-1.1.15/Makefile.am 2006-04-21 18:06:49.000000000 -0700
+@@ -1,4 +1,4 @@
+-SUBDIRS = cairo src tests
++SUBDIRS = src tests
+ #libpixman
+
+ pkgconfigdir = $(libdir)/pkgconfig
+diff -ur libgdiplus-1.1.15-old/configure.in libgdiplus-1.1.15/configure.in
+--- libgdiplus-1.1.15-old/configure.in 2006-04-14 10:04:55.000000000 -0700
++++ libgdiplus-1.1.15/configure.in 2006-04-21 18:06:49.000000000 -0700
+@@ -18,32 +18,32 @@
+ AC_MSG_ERROR("Did not find Glib >= 2.2.3");
+ fi
+
+-AC_CONFIG_SUBDIRS(cairo)
+-CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
+-CAIRO_CFLAGS='-I$(top_builddir)/cairo/pixman/src -I$(top_srcdir)/cairo/pixman/src -I$(top_builddir)/cairo/src -I$(top_srcdir)/cairo/src'
+-AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus])
++#AC_CONFIG_SUBDIRS(cairo)
++#CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
++#CAIRO_CFLAGS='-I$(top_builddir)/cairo/pixman/src -I$(top_srcdir)/cairo/pixman/src -I$(top_builddir)/cairo/src -I$(top_srcdir)/cairo/src'
++#AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus])
+
+ # Activate this when we support linking to an already exiting Cairo installation
+-#default_cairo=included
+-#AC_ARG_WITH(cairo, [ --with-cairo=included,installed],[cairo_v=$with_cairo],[cairo_v=$default_cairo])
++default_cairo=included
++AC_ARG_WITH(cairo, [ --with-cairo=included,installed],[cairo_v=$with_cairo],[cairo_v=$default_cairo])
+ #
+-#if test $cairo_v = "included";
+-#then
++if test $cairo_v = "included";
++then
+ # #AC_CONFIG_SUBDIRS(libpixman)
+-# AC_CONFIG_SUBDIRS(cairo)
+-# CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
+-# CAIRO_CFLAGS='-I$(top_builddir)/cairo/pixman/src -I$(top_srcdir)/cairo/pixman/src -I$(top_builddir)/cairo/src -I$(top_srcdir)/cairo/src'
+-# AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus])
+-#else
+-# if pkg-config --exact-version 0.3.0 cairo; then
+-# echo Cairo installation OK
+-# else
+-# AC_MSG_ERROR("Did not find Cairo == 0.3.0");
+-# fi
+-#
+-# CAIRO_LIBS="`pkg-config --libs cairo`"
+-# CAIRO_CFLAGS="`pkg-config --cflags cairo`"
+-#fi
++ AC_CONFIG_SUBDIRS(cairo)
++ CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
++ CAIRO_CFLAGS='-I$(top_builddir)/cairo/pixman/src -I$(top_srcdir)/cairo/pixman/src -I$(top_builddir)/cairo/src -I$(top_srcdir)/cairo/src'
++ AC_DEFINE(USE_INCLUDED_CAIRO,1,[Use Cairo bundled in libgdiplus])
++else
++ if pkg-config --atleast-version 1.0.1 cairo; then
++ echo Cairo installation OK
++ else
++ AC_MSG_ERROR("Did not find Cairo == 1.0.1");
++ fi
++
++ CAIRO_LIBS="`pkg-config --libs cairo`"
++ CAIRO_CFLAGS="`pkg-config --cflags cairo`"
++fi
+
+ GDIPLUS_LIBS="$CAIRO_LIBS `pkg-config --libs glib-2.0 ` `pkg-config freetype2 fontconfig --libs`"
+ GDIPLUS_CFLAGS="$CAIRO_CFLAGS `pkg-config --cflags glib-2.0 ` `pkg-config freetype2 fontconfig --cflags`"
diff --git a/abs/extra/libgksu/PKGBUILD b/abs/extra/libgksu/PKGBUILD
new file mode 100644
index 0000000..5f18266
--- /dev/null
+++ b/abs/extra/libgksu/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 5570 2008-07-18 21:03:14Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libgksu
+pkgver=2.0.7
+pkgrel=1
+pkgdesc="gksu authorization library"
+arch=(i686 x86_64)
+url="http://www.nongnu.org/gksu/index.html"
+license=(GPL)
+depends=('gnome-keyring>=2.22.3' 'libgtop>=2.22.3'
+ 'libglade>=2.6.2' 'startup-notification>=0.9')
+makedepends=('gtk-doc' 'pkgconfig')
+options=('!libtool')
+install=libgksu.install
+source=(http://people.debian.org/~kov/gksu/${pkgname}-${pkgver}.tar.gz)
+md5sums=('2f2c6a21281370942ea2855553d3ad89')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${startdir}/pkg install || return 1
+ rm -f ${startdir}/pkg/usr/lib/*.a
+ install -m755 -d ${startdir}/pkg/usr/share/gconf/schemas
+ gconf-merge-schema ${startdir}/pkg/usr/share/gconf/schemas/${pkgname}.schemas ${startdir}/pkg/etc/gconf/schemas/*.schemas || return 1
+ rm -f ${startdir}/pkg/etc/gconf/schemas/*.schemas
+}
diff --git a/abs/extra/libgksu/libgksu.install b/abs/extra/libgksu/libgksu.install
new file mode 100644
index 0000000..89cf0cf
--- /dev/null
+++ b/abs/extra/libgksu/libgksu.install
@@ -0,0 +1,17 @@
+pkgname=libgksu
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+pre_upgrade() {
+ pre_remove
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
diff --git a/abs/extra/libglade/PKGBUILD b/abs/extra/libglade/PKGBUILD
new file mode 100644
index 0000000..95eff9b
--- /dev/null
+++ b/abs/extra/libglade/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 30217 2009-03-17 18:11:58Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libglade
+pkgver=2.6.4
+pkgrel=1
+pkgdesc="Allows you to load glade interface files in a program at runtime"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('gtk2>=2.16.0' 'libxml2>=2.7.3')
+makedepends=('python' 'pkgconfig')
+optdepends=('python: libglade-convert script')
+options=('!libtool')
+install=glade.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.6/${pkgname}-${pkgver}.tar.bz2
+ libglade-2.0.1-nowarning.patch)
+url="http://www.gnome.org"
+md5sums=('d1776b40f4e166b5e9c107f1c8fe4139'
+ '4f879c0ce550004905aa0fb24f25c353')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/libglade-2.0.1-nowarning.patch" || return 1
+ ./configure --sysconfdir=/etc --prefix=/usr --localstatedir=/var || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+ install -m755 libglade-convert "${pkgdir}/usr/bin/" || return 1
+}
diff --git a/abs/extra/libglade/glade.install b/abs/extra/libglade/glade.install
new file mode 100644
index 0000000..a7f05c5
--- /dev/null
+++ b/abs/extra/libglade/glade.install
@@ -0,0 +1,25 @@
+post_install() {
+ if [ ! -d etc/xml ]; then
+ mkdir -p etc/xml
+ fi
+ if [ ! -e etc/xml/catalog ]; then
+ xmlcatalog --noout --create etc/xml/catalog
+ fi
+ xmlcatalog --noout --add "system" \
+ "http://glade.gnome.org/glade-2.0.dtd" \
+ /usr/share/xml/libglade/glade-2.0.dtd etc/xml/catalog
+}
+
+pre_upgrade() {
+ post_remove
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+post_remove() {
+ xmlcatalog --noout --del \
+ /usr/share/xml/libglade/glade-2.0.dtd etc/xml/catalog
+}
diff --git a/abs/extra/libglade/libglade-2.0.1-nowarning.patch b/abs/extra/libglade/libglade-2.0.1-nowarning.patch
new file mode 100644
index 0000000..fd07121
--- /dev/null
+++ b/abs/extra/libglade/libglade-2.0.1-nowarning.patch
@@ -0,0 +1,39 @@
+--- libglade-2.0.1/glade/glade-gtk.c.nowarning 2003-08-29 14:50:10.000000000 -0400
++++ libglade-2.0.1/glade/glade-gtk.c 2003-08-29 14:58:41.000000000 -0400
+@@ -639,9 +639,8 @@
+ if (!strcmp (childinfo->properties[j].name, "label")) {
+ label = childinfo->properties[j].value;
+ break;
+- } else {
+- g_warning ("Unknown CList child property: %s", childinfo->properties[j].name);
+ }
++ /* Ignore all other properties */
+ }
+
+ if (label) {
+@@ -683,6 +682,7 @@
+ char *icon = NULL;
+ gboolean use_stock = FALSE, active = FALSE, new_group = FALSE;
+ gboolean use_underline = FALSE;
++ gboolean sensitive = TRUE;
+ GtkWidget *iconw = NULL;
+ int j;
+
+@@ -708,6 +708,8 @@
+ group_name = value;
+ } else if (!strcmp (name, "new_group")) {
+ new_group = BOOL (value);
++ } else if (!strcmp (name, "sensitive")) {
++ sensitive = BOOL (value);
+ } else if (!strcmp (name, "visible")) {
+ /* ignore for now */
+ } else if (!strcmp (name, "tooltip")) {
+@@ -785,6 +787,8 @@
+ gtk_label_set_use_underline (GTK_LABEL (toolbar_child->label),
+ TRUE);
+ }
++
++ gtk_widget_set_sensitive (child, sensitive);
+
+ glade_xml_set_common_params (xml, child, childinfo->child);
+ } else {
diff --git a/abs/extra/libgnome/PKGBUILD b/abs/extra/libgnome/PKGBUILD
new file mode 100644
index 0000000..9197e0f
--- /dev/null
+++ b/abs/extra/libgnome/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 30321 2009-03-18 21:50:51Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libgnome
+pkgver=2.26.0
+pkgrel=2
+pkgdesc="Common libraries for GNOME"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('gnome-vfs>=2.24.1-2' 'esound>=0.2.41' 'libbonobo>=2.24.1')
+makedepends=('pkgconfig' 'intltool')
+options=('!libtool' '!emptydirs')
+url="http://www.gnome.org"
+install=libgnome.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.26/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('a5634fe9ddc54bbb726cbaaa35abc0b9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain libgnome-2.0 ${pkgdir}/etc/gconf/schemas/*.schemas || return 1
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/abs/extra/libgnome/libgnome.install b/abs/extra/libgnome/libgnome.install
new file mode 100644
index 0000000..db4e04d
--- /dev/null
+++ b/abs/extra/libgnome/libgnome.install
@@ -0,0 +1,17 @@
+pkgname=libgnome
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
diff --git a/abs/extra/libgnomecanvas/PKGBUILD b/abs/extra/libgnomecanvas/PKGBUILD
new file mode 100644
index 0000000..7e419ed
--- /dev/null
+++ b/abs/extra/libgnomecanvas/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 30223 2009-03-17 18:18:11Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libgnomecanvas
+pkgver=2.26.0
+pkgrel=1
+pkgdesc="The GNOME Canvas library"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('libglade>=2.6.4' 'libart-lgpl>=2.3.20')
+makedepends=('pkgconfig' 'intltool')
+options=('!libtool')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.26/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('9bbc635e5ae70e63af071af74ba7e72f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --disable-static || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/libgnomekbd/PKGBUILD b/abs/extra/libgnomekbd/PKGBUILD
new file mode 100644
index 0000000..8aab901
--- /dev/null
+++ b/abs/extra/libgnomekbd/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 30447 2009-03-19 22:15:35Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libgnomekbd
+pkgver=2.26.0
+pkgrel=1
+pkgdesc="Gnome keyboard library"
+url="http://gswitchit.sourceforge.net"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('libxklavier>=3.9' 'gconf>=2.26.0-2' 'libglade>=2.6.4')
+makedepends=('perlxml' 'pkgconfig')
+options=('!libtool' '!emptydirs')
+install=libgnomekbd.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.26/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('aee58c088c4fd980e1bf813ea813c156')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain libgnomekbd ${pkgdir}/etc/gconf/schemas/*.schemas || return 1
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/abs/extra/libgnomekbd/libgnomekbd.install b/abs/extra/libgnomekbd/libgnomekbd.install
new file mode 100644
index 0000000..9fc9f55
--- /dev/null
+++ b/abs/extra/libgnomekbd/libgnomekbd.install
@@ -0,0 +1,17 @@
+pkgname=libgnomekbd
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}
diff --git a/abs/extra/libgnomeui/PKGBUILD b/abs/extra/libgnomeui/PKGBUILD
new file mode 100644
index 0000000..f52b649
--- /dev/null
+++ b/abs/extra/libgnomeui/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 29431 2009-03-08 17:37:38Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libgnomeui
+pkgver=2.24.1
+pkgrel=1
+pkgdesc="User Interface library for GNOME"
+arch=('i686' 'x86_64')
+license=('LGPL')
+depends=('libbonoboui>=2.24.1' 'gnome-keyring>=2.24.1')
+makedepends=('intltool' 'pkgconfig')
+options=('!libtool' 'force')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.24/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('8e7d36dd1decfcf5cc4d5cb93bc4d217')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --libexecdir=/usr/lib/libgnomeui || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/libgtkhtml/PKGBUILD b/abs/extra/libgtkhtml/PKGBUILD
new file mode 100644
index 0000000..f0753d7
--- /dev/null
+++ b/abs/extra/libgtkhtml/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 18537 2008-11-06 23:26:35Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+pkgname=libgtkhtml
+pkgver=2.11.1
+pkgrel=2
+pkgdesc="An HTML library for GTK"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('gtk2>=2.14.4' 'libxml2>=2.6.32')
+makedepends=('perlxml' 'pkgconfig')
+options=('!libtool')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.11/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('a1d1a197dcff8c4571659deef5495e24')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/libgtop/PKGBUILD b/abs/extra/libgtop/PKGBUILD
new file mode 100644
index 0000000..da34a59
--- /dev/null
+++ b/abs/extra/libgtop/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 35522 2009-04-13 20:24:53Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libgtop
+pkgver=2.26.1
+pkgrel=1
+pkgdesc="A library that read information about processes and the running system"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('glib2>=2.20.1' 'libxau' 'texinfo')
+install=libgtop.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.26/${pkgname}-${pkgver}.tar.bz2)
+options=('!libtool')
+url="http://www.gnome.org/"
+md5sums=('49fe5c91a6bbc103a0a05c6854a6cc11')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --with-libgtop-smp --with-libgtop-inodedb \
+ --with-linux-table || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+
+ rm -f "${pkgdir}/usr/share/info/dir"
+ gzip -9nf ${pkgdir}/usr/share/info/*
+}
diff --git a/abs/extra/libgtop/libgtop.install b/abs/extra/libgtop/libgtop.install
new file mode 100644
index 0000000..15690f1
--- /dev/null
+++ b/abs/extra/libgtop/libgtop.install
@@ -0,0 +1,13 @@
+info_dir=/usr/share/info
+
+post_install() {
+ install-info ${info_dir}/libgtop2.info.gz ${info_dir}/dir 2> /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ install-info --delete ${info_dir}/libgtop2.info.gz ${info_dir}/dir 2> /dev/null
+}
diff --git a/abs/extra/libidl2/PKGBUILD b/abs/extra/libidl2/PKGBUILD
new file mode 100644
index 0000000..488909a
--- /dev/null
+++ b/abs/extra/libidl2/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 30208 2009-03-17 17:59:14Z jgc $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Committer: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=libidl2
+pkgver=0.8.13
+pkgrel=1
+pkgdesc="A front-end for CORBA 2.2 IDL and Netscape's XPIDL"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('glib2>=2.20.0' 'texinfo')
+makedepends=('pkgconfig')
+install=libidl2.install
+options=('!libtool' '!emptydirs')
+source=(http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-${pkgver}.tar.bz2)
+url="http://www.gnome.org"
+md5sums=('b43b289a859eb38a710f70622c46e571')
+
+build() {
+ cd "${srcdir}/libIDL-${pkgver}"
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+
+ rm -f "${pkgdir}/usr/share/info/dir"
+ gzip -9nf "${pkgdir}/usr/share/info/"*
+}
diff --git a/abs/extra/libidl2/libidl2.install b/abs/extra/libidl2/libidl2.install
new file mode 100644
index 0000000..38b3d56
--- /dev/null
+++ b/abs/extra/libidl2/libidl2.install
@@ -0,0 +1,13 @@
+info_dir=/usr/share/info
+
+post_install() {
+ install-info ${info_dir}/libIDL2.info.gz ${info_dir}/dir 2> /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ install-info --delete ${info_dir}/libIDL2.info.gz ${info_dir}/dir 2> /dev/null
+}
diff --git a/abs/extra/libmikmod/PKGBUILD b/abs/extra/libmikmod/PKGBUILD
new file mode 100644
index 0000000..eb124f3
--- /dev/null
+++ b/abs/extra/libmikmod/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: arjan <arjan@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+pkgname=libmikmod
+pkgver=3.1.12
+pkgrel=1
+pkgdesc="A portable sound library"
+license=('GPL' 'LGPL')
+url="http://sourceforge.net/projects/mikmod/"
+arch=('i686' 'x86_64')
+depends=('glibc')
+source=(http://downloads.sourceforge.net/mikmod/${pkgname}-${pkgver}.tar.gz)
+md5sums=('9f3c740298260d5f88981fc0d51f6f16')
+options=('!libtool')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ missing_dir="`pwd`" ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
+
diff --git a/abs/extra/libmms/PKGBUILD b/abs/extra/libmms/PKGBUILD
new file mode 100644
index 0000000..81c7474
--- /dev/null
+++ b/abs/extra/libmms/PKGBUILD
@@ -0,0 +1,21 @@
+#$Id$
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libmms
+pkgver=0.4
+pkgrel=1
+pkgdesc="MMS stream protocol library"
+arch=(i686 x86_64)
+url="https://launchpad.net/libmms"
+license=(LGPL)
+depends=('glib2>=2.16.4')
+options=('!libtool')
+source=(http://launchpad.net/libmms/trunk/${pkgver}/+download/libmms-${pkgver}.tar.gz)
+md5sums=('4a681a815186fe26bb1b02ccea57fb75')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --disable-static || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/libmpcdec/PKGBUILD b/abs/extra/libmpcdec/PKGBUILD
new file mode 100644
index 0000000..feeaf8b
--- /dev/null
+++ b/abs/extra/libmpcdec/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libmpcdec
+pkgver=1.2.6
+pkgrel=1
+pkgdesc="Musepack decoding library"
+arch=(i686 x86_64)
+license=('custom')
+depends=('glibc')
+options=('!libtool')
+source=(http://files.musepack.net/source/${pkgname}-${pkgver}.tar.bz2)
+url="http://musepack.net/"
+md5sums=('7f7a060e83b4278acf4b77d7a7b9d2c0')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --disable-static
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+ install -Dm644 COPYING ${startdir}/pkg/usr/share/licenses/${pkgname}/COPYING
+}
diff --git a/abs/extra/libmrss/PKGBUILD b/abs/extra/libmrss/PKGBUILD
new file mode 100644
index 0000000..7d23508
--- /dev/null
+++ b/abs/extra/libmrss/PKGBUILD
@@ -0,0 +1,20 @@
+# Contributor: Bernhard Walle <bernhard.walle@gmx.de>
+pkgname=libmrss
+pkgver=0.19.2
+pkgrel=1
+pkgdesc="C library for parsing, writing and creating RSS/ATOM files or streams"
+url="http://www2.autistici.org/bakunin/libmrss/"
+license="LGPL"
+depends=(curl libnxml)
+arch=('i686' 'x86_64')
+options=('!libtool')
+source=(http://www2.autistici.org/bakunin/libmrss/$pkgname-$pkgver.tar.gz)
+md5sums=('a6f66b72898d27270e3a68007f90d62b')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
+# :mode=shellscript:
diff --git a/abs/extra/libnl/PKGBUILD b/abs/extra/libnl/PKGBUILD
new file mode 100644
index 0000000..4a6465a
--- /dev/null
+++ b/abs/extra/libnl/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 930 2008-04-24 22:14:40Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+pkgname=libnl
+pkgver=1.1
+pkgrel=2
+pkgdesc="Library for applications dealing with netlink sockets"
+arch=('i686' 'x86_64')
+url="http://people.suug.ch/~tgr/libnl"
+license=('GPL')
+depends=('glibc')
+source=(http://people.suug.ch/~tgr/${pkgname}/files/${pkgname}-${pkgver}.tar.gz ulong_max.patch)
+md5sums=('ae970ccd9144e132b68664f98e7ceeb1' '255bb3740149d518766032675810c590')
+
+build() {
+ cd ${startdir}/src/libnl-${pkgver}
+ patch -p1 < ../ulong_max.patch
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/libnl/ulong_max.patch b/abs/extra/libnl/ulong_max.patch
new file mode 100644
index 0000000..d9ef218
--- /dev/null
+++ b/abs/extra/libnl/ulong_max.patch
@@ -0,0 +1,11 @@
+--- libnl-1.1/include/netlink-local.h.orig 2008-06-08 19:09:20.000000000
++0200
++++ libnl-1.1/include/netlink-local.h 2008-06-08 19:09:33.000000000 +0200
+@@ -26,6 +26,7 @@
+ #include <sys/socket.h>
+ #include <inttypes.h>
+ #include <assert.h>
++#include <limits.h>
+
+ #include <arpa/inet.h>
+ #include <netdb.h>
diff --git a/abs/extra/libnotify/PKGBUILD b/abs/extra/libnotify/PKGBUILD
new file mode 100644
index 0000000..3b8d12f
--- /dev/null
+++ b/abs/extra/libnotify/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 19585 2008-11-27 18:06:47Z hugo $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libnotify
+pkgver=0.4.5
+pkgrel=1
+pkgdesc="Desktop notification library"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('dbus-glib>=0.76' 'gtk2>=2.14.4')
+makedepends=('pkgconfig')
+options=('!libtool')
+source=(http://www.galago-project.org/files/releases/source/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+url="http://www.galago-project.org/"
+md5sums=('472e2c1f808848365572a9b024d9e8f5')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --disable-static || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/libnxml/PKGBUILD b/abs/extra/libnxml/PKGBUILD
new file mode 100644
index 0000000..0c4f9cb
--- /dev/null
+++ b/abs/extra/libnxml/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD,v 1.1 2008/09/27 07:05:31 allan Exp $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Bernhard Walle <bernhard.walle@gmx.de>
+
+pkgname=libnxml
+pkgver=0.18.3
+pkgrel=1
+pkgdesc="C library for parsing, writing and creating XML 1.0 and 1.1 files or streams"
+url="http://www2.autistici.org/bakunin//libnxml/"
+license=('LGPL')
+depends=('curl')
+arch=('i686' 'x86_64')
+options=('!libtool')
+source=(http://www2.autistici.org/bakunin//libnxml/$pkgname-$pkgver.tar.gz)
+md5sums=('857f43970e7f0724d28f4ddc87085daf')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$pkgdir install
+}
diff --git a/abs/extra/libsamplerate/ChangeLog b/abs/extra/libsamplerate/ChangeLog
new file mode 100644
index 0000000..b76b041
--- /dev/null
+++ b/abs/extra/libsamplerate/ChangeLog
@@ -0,0 +1,14 @@
+2009-04-08 Eric Belanger <eric@archlinux.org>
+
+ * libsamplerate 0.1.7-1
+ * Upstream update
+
+2009-01-30 Eric Belanger <eric@archlinux.org>
+
+ * libsamplerate 0.1.6-1
+ * Upstream update
+
+2008-07-10 Eric Belanger <eric@archlinux.org>
+
+ * libsamplerate 0.1.4-1
+ * Upstream update
diff --git a/abs/extra/libsamplerate/PKGBUILD b/abs/extra/libsamplerate/PKGBUILD
new file mode 100644
index 0000000..dc0f0fa
--- /dev/null
+++ b/abs/extra/libsamplerate/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 34235 2009-04-08 11:01:52Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Jason Chu <jchu@xentac.net>
+
+pkgname=libsamplerate
+pkgver=0.1.7
+pkgrel=1
+pkgdesc="Secret Rabbit Code - aka Sample Rate Converter for audio"
+arch=('i686' 'x86_64')
+url="http://www.mega-nerd.com/SRC/index.html"
+license=('GPL')
+depends=('libsndfile' 'flac>=1.1.4')
+options=('!libtool')
+source=(http://www.mega-nerd.com/SRC/libsamplerate-${pkgver}.tar.gz)
+md5sums=('ad093e60ec44f0a60de8e29983ddbc0f')
+sha1sums=('98a52392eb97f9ba724ca024b3af29a8a0cc0206')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+}
diff --git a/abs/extra/libxfce4util/PKGBUILD b/abs/extra/libxfce4util/PKGBUILD
new file mode 100644
index 0000000..46e2539
--- /dev/null
+++ b/abs/extra/libxfce4util/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 28199 2009-02-28 10:49:12Z andyrtr $
+# Maintainer: tobias <tobias funnychar archlinux.org>
+
+pkgname=libxfce4util
+pkgver=4.6.0
+pkgrel=1
+pkgdesc="Basic utility non-GUI functions for Xfce"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.xfce.org/"
+groups=('xfce4')
+depends=("glib2>=2.18.3")
+makedepends=('pkgconfig')
+options=('!libtool')
+source=(http://www.xfce.org/archive/xfce-${pkgver}/src/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('2b0b7cdb4516704940eedf11edc94d5e')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
+ --localstatedir=/var --disable-static
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ rm -rf ${pkgdir}/usr/share/gtk-doc
+}
diff --git a/abs/extra/libxklavier/PKGBUILD b/abs/extra/libxklavier/PKGBUILD
new file mode 100644
index 0000000..02ca7e3
--- /dev/null
+++ b/abs/extra/libxklavier/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 20594 2008-12-05 21:38:46Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Arjan Timmerman <arjan@archlinux.org>
+
+pkgname=libxklavier
+pkgver=3.8
+pkgrel=1
+pkgdesc="High-level API for X Keyboard Extension"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('libxkbfile>=1.0.5' 'libxml2>=2.6.32' 'glib2>=2.18.3' 'xkeyboard-config>=1.4' 'iso-codes')
+makedepends=('pkgconfig')
+options=('!libtool' '!emptydirs')
+url="http://gswitchit.sourceforge.net"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('e4f1b9e600c4159f39d38ab94d56cf9b')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr \
+ --with-xkb-base=/usr/share/X11/xkb --disable-static || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/libxp/PKGBUILD b/abs/extra/libxp/PKGBUILD
new file mode 100644
index 0000000..1812082
--- /dev/null
+++ b/abs/extra/libxp/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 4458 2008-07-07 16:34:45Z jgc $
+#Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libxp
+pkgver=1.0.0
+pkgrel=2
+pkgdesc="X11 X Print Library"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('libxext' 'printproto')
+makedepends=('pkgconfig')
+options=('!libtool')
+source=(${url}/releases/individual/lib/libXp-${pkgver}.tar.bz2)
+md5sums=('0f4ac39108c1ae8c443cdfac259b58fa')
+
+build() {
+ cd ${srcdir}/libXp-${pkgver}
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname}
+ install -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
+}
diff --git a/abs/extra/lm_sensors/PKGBUILD b/abs/extra/lm_sensors/PKGBUILD
new file mode 100644
index 0000000..487a6fe
--- /dev/null
+++ b/abs/extra/lm_sensors/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 8687 2008-08-15 15:06:46Z andyrtr $
+# Maintainer: aurelien <aurelien@archlinux.org>
+# Contributor: Aurelien Foret <orelien@chez.com>
+pkgname=lm_sensors
+pkgver=3.0.2
+pkgrel=2
+pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring."
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('perl' 'sysfsutils')
+makedepends=('bison' 'flex' 'rrdtool')
+optdepends=('rrdtool: for logging with sensord')
+backup=(etc/sensors3.conf)
+install=sensors.install
+source=(http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-$pkgver.tar.bz2
+ sensors.rc
+ fancontrol.rc
+ sensors-detect.patch)
+url="http://www.lm-sensors.org/"
+md5sums=('5b210ba9cc01f00161c438fd618484e5'
+ 'c9f7f38964963ae3ced4dff3f1f0b7b9'
+ 'f14e335a8eea27388892c36af8099782'
+ '6fd30ed1e5ac739b8a27f3913ba706f4')
+
+build() {
+ cd ${srcdir}/$pkgname-$pkgver
+ patch -Np0 -i ${srcdir}/sensors-detect.patch || return 1
+
+ make PREFIX=/usr PROG_EXTRA:=sensord user || return 1
+ make user_install PREFIX=/usr DESTDIR=${pkgdir}
+ install -DT -m755 ${srcdir}/$pkgname-$pkgver/prog/sensord/sensord ${pkgdir}/usr/sbin/sensord
+
+ install -DT -m755 ${srcdir}/sensors.rc ${pkgdir}/etc/rc.d/sensors
+ install -DT -m755 ${srcdir}/fancontrol.rc ${pkgdir}/etc/rc.d/fancontrol
+
+ # remove the static lib
+ rm -rf ${pkgdir}/usr/lib/libsensors.a
+
+ # FIXME: avoid conflicts with glibc headers
+ rm -rf ${pkgdir}/usr/include/linux
+}
diff --git a/abs/extra/lm_sensors/fancontrol.rc b/abs/extra/lm_sensors/fancontrol.rc
new file mode 100644
index 0000000..7fc1bbf
--- /dev/null
+++ b/abs/extra/lm_sensors/fancontrol.rc
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting fancontrol"
+ /usr/sbin/fancontrol >/dev/null 2>&1 &
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon fancontrol
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping fancontrol"
+ [ -f /var/run/fancontrol.pid ] && kill `cat /var/run/fancontrol.pid`
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon fancontrol
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/lm_sensors/sensors-detect.patch b/abs/extra/lm_sensors/sensors-detect.patch
new file mode 100644
index 0000000..981ed3d
--- /dev/null
+++ b/abs/extra/lm_sensors/sensors-detect.patch
@@ -0,0 +1,61 @@
+--- prog/detect/sensors-detect.orig 2008-02-07 20:59:25.125302226 +0100
++++ prog/detect/sensors-detect 2008-02-07 21:06:53.821929489 +0100
+@@ -5879,21 +5879,21 @@
+ }
+ }
+
+- my $have_sysconfig = -d '/etc/sysconfig';
+- printf "Do you want to \%s /etc/sysconfig/lm_sensors? (\%s): ",
+- (-e '/etc/sysconfig/lm_sensors' ? 'overwrite' : 'generate'),
++ my $have_sysconfig = -d '/etc/conf.d';
++ printf "Do you want to \%s /etc/conf.d/lm_sensors? (\%s): ",
++ (-e '/etc/conf.d/lm_sensors' ? 'overwrite' : 'generate'),
+ ($have_sysconfig ? 'YES/no' : 'yes/NO');
+ $_ = <STDIN>;
+ if (($have_sysconfig and not m/^\s*n/i) or m/^\s*y/i) {
+ unless ($have_sysconfig) {
+- mkdir '/etc/sysconfig', 0777
+- or die "Sorry, can't create /etc/sysconfig ($!)";
++ mkdir '/etc/conf.d', 0777
++ or die "Sorry, can't create /etc/conf.d ($!)";
+ }
+- open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors")
+- or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)";
++ open(local *SYSCONFIG, ">/etc/conf.d/lm_sensors")
++ or die "Sorry, can't create /etc/conf.d/lm_sensors ($!)";
+ print SYSCONFIG <<'EOT';
+-# /etc/sysconfig/lm_sensors - Defines modules loaded by
+-# /etc/init.d/lm_sensors
++# /etc/conf.d/lm_sensors - Defines modules loaded by
++# /etc/rc.d/sensors
+ # Copyright (c) 1998 - 2001 Frodo Looijaard <frodol@dds.nl>
+ #
+ # This program is free software; you can redistribute it and/or modify
+@@ -5914,8 +5914,8 @@
+ # See also the lm_sensors homepage at:
+ # http://www.lm-sensors.org/
+ #
+-# This file is used by /etc/init.d/lm_sensors and defines the modules to
+-# be loaded/unloaded. This file is sourced into /etc/init.d/lm_sensors.
++# This file is used by /etc/rc.d/sensors and defines the modules to
++# be loaded/unloaded. This file is sourced into /etc/rc.d/sensors.
+ #
+ # The format of this file is a shell script that simply defines the modules
+ # in order as normal variables with the special names:
+@@ -5952,12 +5952,12 @@
+ print SYSCONFIG $sysconfig;
+ close(SYSCONFIG);
+
+- print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n".
++ print "Copy prog/init/lm_sensors.init to /etc/rc.d/sensors\n".
+ "for initialization at boot time.\n"
+- unless -f "/etc/init.d/lm_sensors";
++ unless -f "/etc/rc.d/sensors";
+
+- if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
+- system("/sbin/insserv", "/etc/init.d/lm_sensors");
++ if (-x "/sbin/insserv" && -f "/etc/rc.d/sensors") {
++ system("/sbin/insserv", "/etc/rc.d/sensors");
+ } elsif (-x "/sbin/chkconfig" && -f "/etc/init.d/lm_sensors") {
+ system("/sbin/chkconfig", "lm_sensors", "on");
+ if (-x "/sbin/service") {
diff --git a/abs/extra/lm_sensors/sensors.install b/abs/extra/lm_sensors/sensors.install
new file mode 100644
index 0000000..d593f84
--- /dev/null
+++ b/abs/extra/lm_sensors/sensors.install
@@ -0,0 +1,12 @@
+post_install() {
+ echo ">>> to control the lm_sensors daemon type"
+ echo ">>> \"/etc/rc.d/sensors start|stop|restart\" "
+ echo ">>> --------------------------------------"
+ echo ">>> before you can use the fancontrol daemon"
+ echo ">>> first create a fancontrol config file, use \"pwmconfig\""
+ echo ">>> then type \"/etc/rc.d/fancontrol start|stop|restart\" "
+ echo ">>> --------------------------------------"
+ echo ">>> to decode memory SPD timings modprobe eeprom module"
+ echo ">>> and get this perl script from"
+ echo ">>> \"http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eeprom/decode-dimms.pl\""
+}
diff --git a/abs/extra/lm_sensors/sensors.rc b/abs/extra/lm_sensors/sensors.rc
new file mode 100644
index 0000000..aa086eb
--- /dev/null
+++ b/abs/extra/lm_sensors/sensors.rc
@@ -0,0 +1,127 @@
+#!/bin/bash
+#
+# chkconfig: 2345 26 74
+# description: sensors is used for monitoring motherboard sensor values.
+# config: /etc/sysconfig/sensors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# See also the lm_sensors homepage at:
+# http://www2.lm-sensors.nu/~lm78/index.html
+
+# It uses a config file /etc/sysconfig/sensors that contains the modules to
+# be loaded/unloaded. That file is sourced into this one.
+
+# The format of that file a shell script that simply defines the modules
+# in order as normal shell variables with the special names:
+# MODULE_1, MODULE_2, MODULE_3, etc.
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+if grep -q sysfs /proc/mounts; then
+ WITHSYS=1
+else
+ WITHSYS=0
+fi
+
+CONFIG=/etc/conf.d/lm_sensors
+PSENSORS=/usr/bin/sensors
+if [ ! -x $PSENSORS ]; then
+ PSENSORS=/usr/bin/sensors
+fi
+
+case "$1" in
+ start)
+ stat_busy "Starting Up Sensors"
+
+ if [ $WITHSYS == "0" ]; then
+ # If sensors isn't supported by the kernel, try loading the module...
+ [ -e /proc/sys/dev/sensors ] || /sbin/modprobe i2c-proc &>/dev/null
+
+ # Don't bother if /proc/sensors still doesn't exist, kernel doesn't have
+ # support for sensors.
+ [ -e /proc/sys/dev/sensors ] || exit 0
+
+ # If sensors was not already running, unload the module...
+ [ -e /var/lock/subsys/lm_sensors ] || /sbin/modprobe -r i2c-proc &>/dev/null
+ fi
+
+
+ if [ -r "$CONFIG" ]; then
+ . "$CONFIG"
+ modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '`
+ i=0
+ while [ $i -lt $modules ] ; do
+ module=`eval echo '$'MODULE_$i`
+ #echo starting module __${module}__ #debug
+ /sbin/modprobe $module &>/dev/null
+ i=`expr $i + 1`
+ done
+ fi
+ $PSENSORS -s
+
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon sensors
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Shutting Down Sensors"
+
+ if [ -r "$CONFIG" ]; then
+ . "$CONFIG"
+ modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '`
+ i=`expr $modules`
+ while [ $i -ge 0 ] ; do
+ module=`eval echo '$'MODULE_$i`
+ /sbin/modprobe -r $module &>/dev/null
+ i=`expr $i - 1`
+ done
+ fi
+
+ if [ $WITHSYS == "0" ]; then
+ /sbin/modprobe -r i2c-proc &>/dev/null
+ fi
+
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon sensors
+ stat_done
+ fi
+ ;;
+
+ dostatus)
+ $PSENSORS
+ RETVAL=$?
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ condrestart)
+ [ -e /var/lock/subsys/lm_sensors ] && restart || :
+ ;;
+
+ *)
+ echo "Usage: sensors.init {start|stop|status|restart|reload|condrestart}"
+esac
diff --git a/abs/extra/lynx/PKGBUILD b/abs/extra/lynx/PKGBUILD
new file mode 100644
index 0000000..326e3ee
--- /dev/null
+++ b/abs/extra/lynx/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 9279 2008-08-17 05:59:10Z allan $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+pkgname=lynx
+pkgver=2.8.6
+pkgrel=2
+pkgdesc="A text browser for the World Wide Web"
+url="http://lynx.isc.org/"
+arch=(i686 x86_64)
+license=('GPL')
+depends=('ncurses' 'openssl')
+source=(http://lynx.isc.org/release/${pkgname}${pkgver}.tar.gz)
+url="http://lynx.isc.org"
+backup=('etc/lynx.cfg')
+md5sums=('c1346198ae99302cc26763d89f89a239')
+
+build() {
+ cd $startdir/src/${pkgname}2-8-6
+ ./configure --prefix=/usr --sysconfdir=/etc --with-ssl --enable-nls \
+ --mandir=/usr/share/man
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/make/PKGBUILD b/abs/extra/make/PKGBUILD
new file mode 100644
index 0000000..a908e6e
--- /dev/null
+++ b/abs/extra/make/PKGBUILD
@@ -0,0 +1,20 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: judd <jvinet@zeroflux.org>
+pkgname=make
+pkgver=3.81
+pkgrel=4
+pkgdesc="GNU make utility to maintain groups of programs"
+arch=(i686 x86_64)
+url="http://www.gnu.org/software/make"
+license=('GPL')
+groups=('base-devel')
+depends=('glibc' 'bash')
+source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz)
+md5sums=('a4e9494ac6dc3f6b0c5ff75c5d52abba')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/mc/PKGBUILD b/abs/extra/mc/PKGBUILD
new file mode 100644
index 0000000..e8b6b2f
--- /dev/null
+++ b/abs/extra/mc/PKGBUILD
@@ -0,0 +1,55 @@
+# $Id: PKGBUILD 3023 2008-06-18 02:32:22Z eric $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Committer: Judd Vinet <jvinet@zeroflux.org>
+# Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl>
+pkgname=mc
+pkgver=4.6.1
+pkgrel=5
+pkgdesc="A filemanager/shell that emulates Norton Commander"
+arch=('i686' 'x86_64')
+url="http://www.ibiblio.org/mc/"
+license=('GPL')
+depends=('e2fsprogs' 'glib2' 'pcre' 'gpm>=1.20.4' 'slang')
+makedepends=('libxt' 'libx11')
+conflicts=('mc-utf8')
+replaces=('mc-utf8')
+options=('!emptydirs' '!makeflags')
+source=(http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/${pkgname}-${pkgver}.tar.gz \
+ ftp://ftp.archlinux.org/other/mc/mc-4.6.1-utf8-r2.patch.bz2 \
+ mc-4.6.1-bash-all.patch mc-4.6.1-find.patch mc-4.6.1-invalid-mtime.patch \
+ mc-4.6.1-largefile.patch mc-4.6.1-nonblock.patch)
+md5sums=('18b20db6e40480a53bac2870c56fc3c4' 'f90bffe7f51883e818143dc2077eb98f'\
+ 'd0c5d1f7258daf2a86b41b185524dced' '3c950491cdf44091df216cfa709d133a'\
+ '81930cce827fe93639dcd6bff630a1a4' '80b45ecf38d9b5df6d368c83d14fd89d'\
+ '00e89cfc43fe6026b61f52b218a65907')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p1 < ../mc-4.6.1-find.patch || return 1
+ patch -p1 < ../mc-4.6.1-largefile.patch || return 1
+ patch -p1 < ../mc-4.6.1-invalid-mtime.patch || return 1
+ patch -p1 < ../mc-4.6.1-utf8-r2.patch || return 1
+ patch -p1 < ../mc-4.6.1-nonblock.patch || return 1
+ patch -p1 < ../mc-4.6.1-bash-all.patch || return 1
+
+# Prevent lazy bindings in cons.saver binary.
+# - not using bindnow-flags() because cons.saver is only built on GNU/Linux
+ sed -i -e "s:^\(cons_saver_LDADD = .*\):\1 -Wl,-z,now:" src/Makefile.in
+
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --without-gnome --without-debug --with-screen=slang --without-included-gettext \
+ -enable-largefile --with-subshell --with-edit --with-vfs --with-samba --with-mmap \
+ --with-x --with-gpm-mouse --enable-charset
+ make || return 1
+ make DESTDIR=${pkgdir} install
+
+ iconv -f koi8-r -t utf8 ${pkgdir}/usr/share/mc/mc.hint.ru > ${pkgdir}/usr/share/mc/mc.hint.ru.tmp || return 1
+ mv ${pkgdir}/usr/share/mc/mc.hint.ru.tmp ${pkgdir}/usr/share/mc/mc.hint.ru
+
+ iconv -f koi8-r -t utf8 ${pkgdir}/usr/share/mc/mc.hlp.ru > ${pkgdir}/usr/share/mc/mc.hlp.ru.tmp || return 1
+ mv ${pkgdir}/usr/share/mc/mc.hlp.ru.tmp ${pkgdir}/usr/share/mc/mc.hlp.ru
+
+ # convert man pages to utf8
+ cd ${pkgdir}/usr/share/man/ru
+ find -type f | xargs -i123 -- sh -c "mv 123 123.old && iconv -f koi8-r -t utf8 123.old >123 && rm 123.old" || return 1
+}
diff --git a/abs/extra/mc/mc-4.6.1-bash-all.patch b/abs/extra/mc/mc-4.6.1-bash-all.patch
new file mode 100644
index 0000000..e3e2afc
--- /dev/null
+++ b/abs/extra/mc/mc-4.6.1-bash-all.patch
@@ -0,0 +1,33 @@
+--- /src/subshell.c.000 2006-05-08 23:11:48.000000000 +0200
++++ /src/subshell.c 2006-10-28 15:40:46.000000000 +0200
+@@ -745,29 +745,13 @@ subshell_name_quote (const char *s)
+ memcpy (d, cmd_start, len);
+ d += len;
+
+- /*
+- * Print every character in octal format with the leading backslash.
+- * tcsh and zsh may require 4-digit octals, bash < 2.05b doesn't like them.
+- */
+- if (subshell_type == BASH) {
+ for (; *s; s++) {
+- /* Must quote numbers, so that they are not glued to octals */
+ if (isalpha ((unsigned char) *s)) {
+ *d++ = (unsigned char) *s;
+ } else {
+- sprintf (d, "\\%03o", (unsigned char) *s);
+- d += 4;
+- }
+- }
+- } else {
+- for (; *s; s++) {
+- if (isalnum ((unsigned char) *s)) {
+- *d++ = (unsigned char) *s;
+- } else {
+ sprintf (d, "\\0%03o", (unsigned char) *s);
+ d += 5;
+ }
+- }
+ }
+
+ memcpy (d, common_end, sizeof (common_end));
+
diff --git a/abs/extra/mc/mc-4.6.1-find.patch b/abs/extra/mc/mc-4.6.1-find.patch
new file mode 100644
index 0000000..f44a6ac
--- /dev/null
+++ b/abs/extra/mc/mc-4.6.1-find.patch
@@ -0,0 +1,155 @@
+diff -Naur mc-4.6.1.orig/src/cmd.c mc-4.6.1/src/cmd.c
+--- mc-4.6.1.orig/src/cmd.c 2005-05-27 16:19:18.000000000 +0200
++++ mc-4.6.1/src/cmd.c 2006-03-19 12:57:00.000000000 +0100
+@@ -510,7 +510,7 @@
+ continue;
+ }
+ c = regexp_match (reg_exp_t, current_panel->dir.list[i].fname,
+- match_file);
++ match_file, 0);
+ if (c == -1) {
+ message (1, MSG_ERROR, _(" Malformed regular expression "));
+ g_free (reg_exp);
+diff -Naur mc-4.6.1.orig/src/dir.c mc-4.6.1/src/dir.c
+--- mc-4.6.1.orig/src/dir.c 2005-05-27 16:19:18.000000000 +0200
++++ mc-4.6.1/src/dir.c 2006-03-19 12:58:56.000000000 +0100
+@@ -405,7 +405,7 @@
+ *stale_link = 1;
+ }
+ if (!(S_ISDIR (buf1->st_mode) || *link_to_dir) && filter
+- && !regexp_match (filter, dp->d_name, match_file))
++ && !regexp_match (filter, dp->d_name, match_file, 0))
+ return 0;
+
+ /* Need to grow the *list? */
+diff -Naur mc-4.6.1.orig/src/ext.c mc-4.6.1/src/ext.c
+--- mc-4.6.1.orig/src/ext.c 2005-05-27 16:19:18.000000000 +0200
++++ mc-4.6.1/src/ext.c 2006-03-19 13:00:43.000000000 +0100
+@@ -394,7 +394,7 @@
+ }
+
+ if (content_string[0]
+- && regexp_match (ptr, content_string + content_shift, match_regex)) {
++ && regexp_match (ptr, content_string + content_shift, match_regex, 0)) {
+ found = 1;
+ }
+
+@@ -534,11 +534,11 @@
+ /* Do not transform shell patterns, you can use shell/ for
+ * that
+ */
+- if (regexp_match (p, filename, match_regex))
++ if (regexp_match (p, filename, match_regex, 0))
+ found = 1;
+ } else if (!strncmp (p, "directory/", 10)) {
+ if (S_ISDIR (mystat.st_mode)
+- && regexp_match (p + 10, filename, match_regex))
++ && regexp_match (p + 10, filename, match_regex, 0))
+ found = 1;
+ } else if (!strncmp (p, "shell/", 6)) {
+ p += 6;
+diff -Naur mc-4.6.1.orig/src/find.c mc-4.6.1/src/find.c
+--- mc-4.6.1.orig/src/find.c 2005-05-27 16:19:18.000000000 +0200
++++ mc-4.6.1/src/find.c 2006-03-19 13:04:10.000000000 +0100
+@@ -575,6 +575,7 @@
+ struct stat tmp_stat;
+ static int pos;
+ static int subdirs_left = 0;
++ int flags = 0;
+
+ if (!h) { /* someone forces me to close dirp */
+ if (dirp) {
+@@ -586,6 +587,10 @@
+ dp = 0;
+ return 1;
+ }
++
++ if (!(case_sense->state & C_BOOL))
++ flags |= REG_ICASE;
++
+ do_search_begin:
+ while (!dp){
+
+@@ -662,7 +667,7 @@
+ g_free (tmp_name);
+ }
+
+- if (regexp_match (find_pattern, dp->d_name, match_file)){
++ if (regexp_match (find_pattern, dp->d_name, match_file, flags)){
+ if (content_pattern) {
+ if (search_content (h, directory, dp->d_name)) {
+ return 1;
+diff -Naur mc-4.6.1.orig/src/user.c mc-4.6.1/src/user.c
+--- mc-4.6.1.orig/src/user.c 2005-07-01 17:47:07.000000000 +0200
++++ mc-4.6.1/src/user.c 2006-03-19 13:05:00.000000000 +0100
+@@ -412,18 +412,18 @@
+ break;
+ case 'f': /* file name pattern */
+ p = extract_arg (p, arg, sizeof (arg));
+- *condition = panel && regexp_match (arg, panel->dir.list [panel->selected].fname, match_file);
++ *condition = panel && regexp_match (arg, panel->dir.list [panel->selected].fname, match_file, 0);
+ break;
+ case 'y': /* syntax pattern */
+ if (edit_widget && edit_widget->syntax_type) {
+ p = extract_arg (p, arg, sizeof (arg));
+ *condition = panel &&
+- regexp_match (arg, edit_widget->syntax_type, match_normal);
++ regexp_match (arg, edit_widget->syntax_type, match_normal, 0);
+ }
+ break;
+ case 'd':
+ p = extract_arg (p, arg, sizeof (arg));
+- *condition = panel && regexp_match (arg, panel->cwd, match_file);
++ *condition = panel && regexp_match (arg, panel->cwd, match_file, 0);
+ break;
+ case 't':
+ p = extract_arg (p, arg, sizeof (arg));
+diff -Naur mc-4.6.1.orig/src/util.c mc-4.6.1/src/util.c
+--- mc-4.6.1.orig/src/util.c 2005-05-27 16:19:18.000000000 +0200
++++ mc-4.6.1/src/util.c 2006-03-19 13:06:58.000000000 +0100
+@@ -563,27 +563,30 @@
+ return g_strdup (pattern);
+ }
+
+-int regexp_match (const char *pattern, const char *string, int match_type)
++int regexp_match (const char *pattern, const char *string, int match_type, int flags)
+ {
+ static regex_t r;
+ static char *old_pattern = NULL;
+ static int old_type;
++ static int old_flags;
+ int rval;
+ char *my_pattern;
+
+- if (!old_pattern || STRCOMP (old_pattern, pattern) || old_type != match_type){
++ if (!old_pattern || STRCOMP (old_pattern, pattern) || old_type != match_type || old_flags != flags){
+ if (old_pattern){
+ regfree (&r);
+ g_free (old_pattern);
+ old_pattern = NULL;
+ }
+ my_pattern = convert_pattern (pattern, match_type, 0);
+- if (regcomp (&r, my_pattern, REG_EXTENDED|REG_NOSUB|MC_ARCH_FLAGS)) {
++
++ if (regcomp (&r, my_pattern, REG_EXTENDED|REG_NOSUB|MC_ARCH_FLAGS|flags)) {
+ g_free (my_pattern);
+ return -1;
+ }
+ old_pattern = my_pattern;
+ old_type = match_type;
++ old_flags = flags;
+ }
+ rval = !regexec (&r, string, 0, NULL, 0);
+ return rval;
+diff -Naur mc-4.6.1.orig/src/util.h mc-4.6.1/src/util.h
+--- mc-4.6.1.orig/src/util.h 2005-01-13 20:20:47.000000000 +0100
++++ mc-4.6.1/src/util.h 2006-03-19 13:07:16.000000000 +0100
+@@ -116,7 +116,7 @@
+
+ extern int easy_patterns;
+ char *convert_pattern (const char *pattern, int match_type, int do_group);
+-int regexp_match (const char *pattern, const char *string, int match_type);
++int regexp_match (const char *pattern, const char *string, int match_type, int flags);
+
+ /* Error pipes */
+ void open_error_pipe (void);
diff --git a/abs/extra/mc/mc-4.6.1-invalid-mtime.patch b/abs/extra/mc/mc-4.6.1-invalid-mtime.patch
new file mode 100644
index 0000000..07b1f6d
--- /dev/null
+++ b/abs/extra/mc/mc-4.6.1-invalid-mtime.patch
@@ -0,0 +1,30 @@
+
+ Invalid timestamps on files caused mc to segfault by passing a null
+ pointer to strftime. Avoid trying to print the time in this case.
+
+ Reported by Maxim Britov <maxim@office.modum.by>
+ at http://bugs.gentoo.org/184296
+
+--- mc-4.6.1/src/util.c
++++ mc-4.6.1/src/util.c
+@@ -717,6 +717,7 @@
+ static size_t i18n_timelength = 0;
+ static const char *fmtyear, *fmttime;
+ const char *fmt;
++ struct tm *whentm;
+
+ if (i18n_timelength == 0){
+ i18n_timelength = i18n_checktimelength() + 1;
+@@ -740,7 +741,11 @@
+ else
+ fmt = fmttime;
+
+- strftime (timebuf, i18n_timelength, fmt, localtime(&when));
++ whentm = localtime(&when);
++ if (whentm == NULL)
++ return "(invalid)";
++
++ strftime (timebuf, i18n_timelength, fmt, whentm);
+ return timebuf;
+ }
+
diff --git a/abs/extra/mc/mc-4.6.1-largefile.patch b/abs/extra/mc/mc-4.6.1-largefile.patch
new file mode 100644
index 0000000..de30715
--- /dev/null
+++ b/abs/extra/mc/mc-4.6.1-largefile.patch
@@ -0,0 +1,194 @@
+diff -Naur mc-4.6.1.orig/intl/loadmsgcat.c mc-4.6.1/intl/loadmsgcat.c
+--- mc-4.6.1.orig/intl/loadmsgcat.c 2005-07-23 18:52:57.000000000 +0200
++++ mc-4.6.1/intl/loadmsgcat.c 2006-03-19 17:11:14.000000000 +0100
+@@ -1002,7 +1002,7 @@
+ /* The magic number is wrong: not a message catalog file. */
+ #ifdef HAVE_MMAP
+ if (use_mmap)
+- munmap ((caddr_t) data, size);
++ munmap ((void *) data, size);
+ else
+ #endif
+ free (data);
+@@ -1271,7 +1271,7 @@
+ free (domain->malloced);
+ #ifdef HAVE_MMAP
+ if (use_mmap)
+- munmap ((caddr_t) data, size);
++ munmap ((void *) data, size);
+ else
+ #endif
+ free (data);
+@@ -1306,7 +1306,7 @@
+
+ # ifdef _POSIX_MAPPED_FILES
+ if (domain->use_mmap)
+- munmap ((caddr_t) domain->data, domain->mmap_size);
++ munmap ((void *) domain->data, domain->mmap_size);
+ else
+ # endif /* _POSIX_MAPPED_FILES */
+ free ((void *) domain->data);
+diff -Naur mc-4.6.1.orig/src/view.c mc-4.6.1/src/view.c
+--- mc-4.6.1.orig/src/view.c 2005-05-27 16:19:18.000000000 +0200
++++ mc-4.6.1/src/view.c 2006-03-19 17:10:34.000000000 +0100
+@@ -76,6 +76,12 @@
+ #define vwidth (view->widget.cols - (view->have_frame ? 2 : 0))
+ #define vheight (view->widget.lines - (view->have_frame ? 2 : 0))
+
++#if GLIB_MAJOR_VERSION >= 2
++# define my_g_malloc g_try_malloc
++#else
++# define my_g_malloc g_malloc
++#endif
++
+ /* Offset in bytes into a file */
+ typedef unsigned long offset_type;
+ #define INVALID_OFFSET ((offset_type) -1)
+@@ -560,8 +566,8 @@
+ view->data = mc_mmap (0, view->s.st_size, PROT_READ,
+ MAP_FILE | MAP_SHARED, view->file, 0);
+ else
+- view->data = (caddr_t) -1;
+- if ((caddr_t) view->data != (caddr_t) - 1) {
++ view->data = (void *) -1;
++ if (view->data != (void *)-1) {
+ /* mmap worked */
+ view->first = 0;
+ view->bytes_read = view->s.st_size;
+@@ -573,6 +579,9 @@
+ /* For the OSes that don't provide mmap call, try to load all the
+ * file into memory (alex@bcs.zaporizhzhe.ua). Also, mmap can fail
+ * for any reason, so we use this as fallback (pavel@ucw.cz) */
++
++ /* If large file support is enabled, st_size is a 64 bit value and
++ * will thus on 32 bit platforms possibly be beyond the range of gulong */
+
+ /* Make sure view->s.st_size is not truncated when passed to g_malloc */
+ if ((gulong) view->s.st_size == view->s.st_size)
+diff -Naur mc-4.6.1.orig/vfs/local.c mc-4.6.1/vfs/local.c
+--- mc-4.6.1.orig/vfs/local.c 2004-09-25 01:00:18.000000000 +0200
++++ mc-4.6.1/vfs/local.c 2006-03-19 17:00:45.000000000 +0100
+@@ -243,8 +243,8 @@
+ }
+
+ #ifdef HAVE_MMAP
+-caddr_t
+-local_mmap (struct vfs_class *me, caddr_t addr, size_t len, int prot, int flags, void *data, off_t offset)
++void *
++local_mmap (struct vfs_class *me, void *addr, size_t len, int prot, int flags, void *data, off_t offset)
+ {
+ int fd = * (int *)data;
+
+@@ -252,7 +252,7 @@
+ }
+
+ int
+-local_munmap (struct vfs_class *me, caddr_t addr, size_t len, void *data)
++local_munmap (struct vfs_class *me, void *addr, size_t len, void *data)
+ {
+ return munmap (addr, len);
+ }
+diff -Naur mc-4.6.1.orig/vfs/local.h mc-4.6.1/vfs/local.h
+--- mc-4.6.1.orig/vfs/local.h 2004-08-17 11:17:43.000000000 +0200
++++ mc-4.6.1/vfs/local.h 2006-03-19 17:01:35.000000000 +0100
+@@ -13,9 +13,9 @@
+ extern int local_errno (struct vfs_class *me);
+ extern int local_lseek (void *data, off_t offset, int whence);
+ #ifdef HAVE_MMAP
+-extern caddr_t local_mmap (struct vfs_class *me, caddr_t addr, size_t len,
++extern void *local_mmap (struct vfs_class *me, void *addr, size_t len,
+ int prot, int flags, void *data, off_t offset);
+-extern int local_munmap (struct vfs_class *me, caddr_t addr, size_t len, void *data);
++extern int local_munmap (struct vfs_class *me, void *addr, size_t len, void *data);
+ #endif
+
+ #endif
+diff -Naur mc-4.6.1.orig/vfs/samba/lib/util.c mc-4.6.1/vfs/samba/lib/util.c
+--- mc-4.6.1.orig/vfs/samba/lib/util.c 2005-05-27 16:19:19.000000000 +0200
++++ mc-4.6.1/vfs/samba/lib/util.c 2006-03-19 17:06:39.000000000 +0100
+@@ -1836,7 +1836,7 @@
+
+ /* Look up the host address in the address list we just got. */
+ for (i = 0; hp->h_addr_list[i]; i++) {
+- if (memcmp(hp->h_addr_list[i], (caddr_t) & addr, sizeof(addr)) == 0)
++ if (memcmp(hp->h_addr_list[i], &addr, sizeof(addr)) == 0)
+ return True;
+ }
+
+diff -Naur mc-4.6.1.orig/vfs/vfs.c mc-4.6.1/vfs/vfs.c
+--- mc-4.6.1.orig/vfs/vfs.c 2005-05-27 16:19:19.000000000 +0200
++++ mc-4.6.1/vfs/vfs.c 2006-03-19 17:03:48.000000000 +0100
+@@ -740,27 +740,27 @@
+
+ #ifdef HAVE_MMAP
+ static struct mc_mmapping {
+- caddr_t addr;
++ void *addr;
+ void *vfs_info;
+ struct vfs_class *vfs;
+ struct mc_mmapping *next;
+ } *mc_mmaparray = NULL;
+
+-caddr_t
+-mc_mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
++void *
++mc_mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
+ {
+ struct vfs_class *vfs;
+- caddr_t result;
++ void *result;
+ struct mc_mmapping *mcm;
+
+ if (fd == -1)
+- return (caddr_t) -1;
++ return (void *) -1;
+
+ vfs = vfs_op (fd);
+- result = vfs->mmap ? (*vfs->mmap)(vfs, addr, len, prot, flags, vfs_info (fd), offset) : (caddr_t)-1;
+- if (result == (caddr_t)-1){
++ result = vfs->mmap ? (*vfs->mmap)(vfs, addr, len, prot, flags, vfs_info (fd), offset) : (void *)-1;
++ if (result == (void *)-1){
+ errno = ferrno (vfs);
+- return (caddr_t)-1;
++ return (void *)-1;
+ }
+ mcm =g_new (struct mc_mmapping, 1);
+ mcm->addr = result;
+@@ -772,7 +772,7 @@
+ }
+
+ int
+-mc_munmap (caddr_t addr, size_t len)
++mc_munmap (void *addr, size_t len)
+ {
+ struct mc_mmapping *mcm, *mcm2 = NULL;
+
+diff -Naur mc-4.6.1.orig/vfs/vfs.h mc-4.6.1/vfs/vfs.h
+--- mc-4.6.1.orig/vfs/vfs.h 2004-11-16 17:16:08.000000000 +0100
++++ mc-4.6.1/vfs/vfs.h 2006-03-19 17:05:57.000000000 +0100
+@@ -49,8 +49,8 @@
+ int mc_ctl (int fd, int ctlop, void *arg);
+ int mc_setctl (const char *path, int ctlop, void *arg);
+ #ifdef HAVE_MMAP
+-caddr_t mc_mmap (caddr_t, size_t, int, int, int, off_t);
+-int mc_munmap (caddr_t addr, size_t len);
++void *mc_mmap (void *, size_t, int, int, int, off_t);
++int mc_munmap (void *addr, size_t len);
+ #endif /* HAVE_MMAP */
+
+ /* Operations for mc_ctl - on open file */
+diff -Naur mc-4.6.1.orig/vfs/vfs-impl.h mc-4.6.1/vfs/vfs-impl.h
+--- mc-4.6.1.orig/vfs/vfs-impl.h 2004-09-02 15:57:59.000000000 +0200
++++ mc-4.6.1/vfs/vfs-impl.h 2006-03-19 17:12:01.000000000 +0100
+@@ -72,9 +72,9 @@
+ int (*setctl) (struct vfs_class *me, const char *path, int ctlop,
+ void *arg);
+ #ifdef HAVE_MMAP
+- caddr_t (*mmap) (struct vfs_class *me, caddr_t addr, size_t len,
++ void *(*mmap) (struct vfs_class *me, void *addr, size_t len,
+ int prot, int flags, void *vfs_info, off_t offset);
+- int (*munmap) (struct vfs_class *me, caddr_t addr, size_t len,
++ int (*munmap) (struct vfs_class *me, void *addr, size_t len,
+ void *vfs_info);
+ #endif
+ };
diff --git a/abs/extra/mc/mc-4.6.1-nonblock.patch b/abs/extra/mc/mc-4.6.1-nonblock.patch
new file mode 100644
index 0000000..eca34aa
--- /dev/null
+++ b/abs/extra/mc/mc-4.6.1-nonblock.patch
@@ -0,0 +1,11 @@
+--- mc-4.6.1/src/cons.saver.c.old 2006-04-30 20:45:11.725128977 +0200
++++ mc-4.6.1/src/cons.saver.c 2006-04-30 20:45:55.545063247 +0200
+@@ -134,7 +134,7 @@
+
+ if (seteuid (uid) < 0)
+ die ();
+- console_fd = open (tty_name, O_RDONLY);
++ console_fd = open (tty_name, O_RDONLY | O_NONBLOCK);
+ if (console_fd < 0)
+ die ();
+ if (fstat (console_fd, &st) < 0 || ! S_ISCHR (st.st_mode))
diff --git a/abs/extra/mdbtools/PKGBUILD b/abs/extra/mdbtools/PKGBUILD
new file mode 100644
index 0000000..c7a562d
--- /dev/null
+++ b/abs/extra/mdbtools/PKGBUILD
@@ -0,0 +1,24 @@
+# Contributor: TDY <tdy@gmx.com>
+# Contributor: Eduard "bekks" Warkentin <eduard.warkentin@gmail.com>
+pkgname=mdbtools
+pkgver=0.5
+pkgrel=8
+pkgdesc="Utilities for viewing data and exporting schema from Microsoft Access Database files"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/mdbtools/"
+license=('LGPL' 'GPL')
+depends=('libgnomeui')
+makedepends=('bison' 'flex')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ gmdb2.desktop)
+md5sums=('4a18bf96e67161101cade64526756d22'
+ '289f236ca91d73510e842922b5776999')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
+ make || return 1
+ make DESTDIR="$pkgdir" install
+ install -Dm644 ../gmdb2.desktop "$pkgdir/usr/share/applications/gmdb2.desktop"
+}
diff --git a/abs/extra/mdbtools/gmdb2.desktop b/abs/extra/mdbtools/gmdb2.desktop
new file mode 100644
index 0000000..8b40dc2
--- /dev/null
+++ b/abs/extra/mdbtools/gmdb2.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=MDB Tools
+Comment=View data and export schema from MDB files
+TryExec=/usr/bin/gmdb2
+Exec=gmdb2
+Icon=/usr/share/gmdb/glade/logo.xpm
+Categories=System;FileTools;
diff --git a/abs/extra/mediaserv/PKGBUILD b/abs/extra/mediaserv/PKGBUILD
new file mode 100644
index 0000000..0ed43fa
--- /dev/null
+++ b/abs/extra/mediaserv/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=mediaserv
+pkgver=0.05
+pkgrel=5
+pkgdesc="On-demand transcoding server for videos, targetting the Nokia Internet Tablets."
+arch=('i686' 'x86_64')
+license=('ARTISTIC')
+depends=('tablet-encode' 'perl-xml-rss')
+backup=(/myth/mediaserv/config)
+install=(mediaserv.install)
+url="http://mediautils.garage.maemo.org/tablet-encode.html"
+source=(https://garage.maemo.org/frs/download.php/2632/mediaserv-0.05.tar.gz linhes-mediaserv.tar.bz2 mediaserv.no_daemon.patch run finish)
+
+build() {
+ cd ${srcdir}/mediaserv
+ patch -Np1 -i ${startdir}/src/mediaserv.no_daemon.patch || return 1
+ mkdir -p $startdir/pkg/usr/bin
+ mkdir -p $startdir/pkg/etc/sv/mediaserv/supervise
+ mkdir -p $startdir/pkg/usr/share/doc/mediaserv
+ mkdir -p $startdir/pkg/myth/mediaserv
+ mkdir -p $startdir/pkg/myth/mediaserv/media
+ install -D -m755 mediaserv $startdir/pkg/usr/bin
+ cp README.txt $startdir/pkg/usr/share/doc/mediaserv
+ cp -a ${srcdir}/.mediaserv/* ${pkgdir}/myth/mediaserv
+ install -D -m755 ${srcdir}/run ${srcdir}/finish $startdir/pkg/etc/sv/mediaserv
+}
diff --git a/abs/extra/mediaserv/finish b/abs/extra/mediaserv/finish
new file mode 100644
index 0000000..f424494
--- /dev/null
+++ b/abs/extra/mediaserv/finish
@@ -0,0 +1,8 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Stopping mediaserv"
+#wait
+exec /usr/bin/killall mediaserv
diff --git a/abs/extra/mediaserv/linhes-mediaserv.tar.bz2 b/abs/extra/mediaserv/linhes-mediaserv.tar.bz2
new file mode 100644
index 0000000..7630679
--- /dev/null
+++ b/abs/extra/mediaserv/linhes-mediaserv.tar.bz2
Binary files differ
diff --git a/abs/extra/mediaserv/mediaserv.install b/abs/extra/mediaserv/mediaserv.install
new file mode 100644
index 0000000..7a26077
--- /dev/null
+++ b/abs/extra/mediaserv/mediaserv.install
@@ -0,0 +1,26 @@
+# arg 1: the new package version
+post_install() {
+ ln -s /myth/mediaserv /home/mythtv/.mediaserv
+ ln -s /myth/pretty /myth/mediaserv/media/tv
+ ln -s /myth/video /myth/mediaserv/media/video
+ chown -R mythtv.mythtv /myth/mediaserv
+ add_service.sh mediaserv
+ sv start mediaserv
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+post_remove() {
+ sv stop mediaserv
+ remove_service.sh mediaserv
+ rm -fr /home/mythtv/.mediaserv
+ rm -fr /myth/mediaserv
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/mediaserv/mediaserv.no_daemon.patch b/abs/extra/mediaserv/mediaserv.no_daemon.patch
new file mode 100644
index 0000000..b659354
--- /dev/null
+++ b/abs/extra/mediaserv/mediaserv.no_daemon.patch
@@ -0,0 +1,17 @@
+--- mediaserv/mediaserv.orig 2009-06-15 03:16:53.000000000 +0000
++++ mediaserv/mediaserv 2009-06-15 03:17:29.000000000 +0000
+@@ -608,10 +608,10 @@
+ # daemonize - daemonize the parent/control app
+ #
+ sub daemonize {
+- my $pid = fork; # Fork off the main process
+- defined ($pid) or die "Cannot start daemon: $!";
+- print "Parent daemon running.\n" if $pid; # If we have a PID, the parent daemonized okay
+- exit if $pid; # Return control to the user
++# my $pid = fork; # Fork off the main process
++# defined ($pid) or die "Cannot start daemon: $!";
++ print "Parent daemon running.\n" ; # If we have a PID, the parent daemonized okay
++# exit if $pid; # Return control to the user
+
+ # Now we're a daemonized parent process!
+
diff --git a/abs/extra/mediaserv/run b/abs/extra/mediaserv/run
new file mode 100644
index 0000000..82a1705
--- /dev/null
+++ b/abs/extra/mediaserv/run
@@ -0,0 +1,8 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting mediaserv"
+exec su mythtv -c "/usr/bin/mediaserv"
+wait
diff --git a/abs/extra/mednafen/PKGBUILD b/abs/extra/mednafen/PKGBUILD
new file mode 100755
index 0000000..69e127f
--- /dev/null
+++ b/abs/extra/mednafen/PKGBUILD
@@ -0,0 +1,21 @@
+# Maintainer: Daenyth <Daenyth+Arch [at] gmail [dot] com>
+# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+# Contributor: kagan <juanynie@mi.madritel.es>
+pkgname=mednafen
+pkgver=0.8.C
+pkgrel=1
+pkgdesc="A command-line multi-system gaming emulator"
+url="http://mednafen.sourceforge.net/"
+license=(GPL)
+arch=('i686' 'x86_64')
+depends=('libcdio>=0.80-3' 'libsamplerate' 'libogg' 'libvorbis' 'sdl' 'sdl_net' 'libsndfile' 'zlib')
+makedepends=('pkgconfig')
+source=(http://downloads.sourceforge.net/mednafen/$pkgname-$pkgver.tar.bz2)
+md5sums=('e8f4b6ba7ed2eca399b02578e1803831')
+
+build() {
+ cd $srcdir/$pkgname
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$pkgdir install
+}
diff --git a/abs/extra/mercurial/ChangeLog b/abs/extra/mercurial/ChangeLog
new file mode 100644
index 0000000..cea6101
--- /dev/null
+++ b/abs/extra/mercurial/ChangeLog
@@ -0,0 +1,21 @@
+
+2009-03-05 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 1.2
+
+2009-01-03 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 1.1.2
+
+2008-12-02 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 1.1
+
+2008-08-17 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 1.0.2
+
+2008-07-10 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 1.0.1
+
diff --git a/abs/extra/mercurial/PKGBUILD b/abs/extra/mercurial/PKGBUILD
new file mode 100644
index 0000000..08d38e3
--- /dev/null
+++ b/abs/extra/mercurial/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 29080 2009-03-05 10:10:06Z douglas $
+# Contributor: Jeff Mickey <jeff@archlinux.org>
+# Contributor: Giovanni Scafora <linuxmania@gmail.com>
+# Contributor: David 'SleepyDog' <goodluv@gmail.com>
+# Maintainer: Douglas Soares de Andrade <douglas@archlinux.org>
+
+pkgname=mercurial
+pkgver=1.2
+pkgrel=1
+pkgdesc="A scalable distributed SCM tool"
+url="http://www.selenic.com/mercurial"
+license=("GPL")
+depends=('python>=2.6')
+source=(http://www.selenic.com/mercurial/release/$pkgname-$pkgver.tar.gz)
+arch=('i686' 'x86_64')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ python setup.py install --root $startdir/pkg
+
+ install -d $startdir/pkg/usr/share/man/{man1,man5}
+ install -m644 doc/hg.1 $startdir/pkg/usr/share/man/man1
+ install -m644 doc/{hgrc.5,hgignore.5} $startdir/pkg/usr/share/man/man5
+ install -m755 contrib/hgk $startdir/pkg/usr/bin
+ install -m644 -D contrib/zsh_completion $startdir/pkg/usr/share/zsh/site-functions/_hg
+ install -m644 -D contrib/bash_completion $startdir/pkg/etc/bash_completion.d/hg
+ install -d $startdir/pkg/usr/share/emacs/site-lisp
+ install -m644 contrib/{mq.el,mercurial.el} $startdir/pkg/usr/share/emacs/site-lisp
+ install -m644 -D contrib/vim/HGAnnotate.vim $startdir/pkg/usr/share/vim/syntax/HGAnnotate.vim
+
+ # Autoloading plugins to vim = no good.
+ # install -d $startdir/pkg/usr/share/vim/plugin
+ # install -m644 contrib/vim/{hg-menu.vim,hgcommand.vim,patchreview.vim} $startdir/pkg/usr/share/vim/plugin
+}
+md5sums=('ac9d16b078f99f7a89d6865421570f05')
diff --git a/abs/extra/mingetty/PKGBUILD b/abs/extra/mingetty/PKGBUILD
new file mode 100644
index 0000000..d24a8b5
--- /dev/null
+++ b/abs/extra/mingetty/PKGBUILD
@@ -0,0 +1,30 @@
+# Contributor: stonecrest <stonecrestATgmailDOTcom>
+pkgname=mingetty
+pkgver=1.08
+pkgrel=2
+pkgdesc="Designed to be a minimal getty and allows automatic logins."
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/mingetty"
+license=('GPL')
+depends=('glibc')
+makedepends=('gcc' 'make')
+provides=('mingetty')
+conflicts=('mingetty')
+md5sums=('2a75ad6487ff271424ffc00a64420990'
+ 'b1bcb0668c34d4981e3acddc3990dfdb')
+source=(http://downloads.sourceforge.net/sourceforge/mingetty/$pkgname-$pkgver.tar.gz
+ mingetty-utf8.patch)
+
+build() {
+ patch $startdir/src/$pkgname-$pkgver/mingetty.c mingetty-utf8.patch || return 1
+
+ mkdir -p $startdir/pkg/sbin || return 1
+ mkdir -p $startdir/pkg/usr/man/man8 || return 1
+
+ cd $startdir/src || return 1
+ cd $startdir/src/$pkgname-$pkgver || return 1
+
+ LDFLAGS="-s" make || return 1
+ install -m 0755 mingetty $startdir/pkg/sbin || return 1
+ install -m 0644 mingetty.8 $startdir/pkg/usr/man/man8 || return 1
+}
diff --git a/abs/extra/mingetty/mingetty-utf8.patch b/abs/extra/mingetty/mingetty-utf8.patch
new file mode 100644
index 0000000..c269039
--- /dev/null
+++ b/abs/extra/mingetty/mingetty-utf8.patch
@@ -0,0 +1,158 @@
+diff -Nru mingetty-1.07.orig/mingetty.c mingetty-1.07/mingetty.c
+--- mingetty-1.07.orig/mingetty.c 2004-01-03 15:15:56.000000000 +0200
++++ mingetty-1.07/mingetty.c 2006-11-22 22:13:26.967910100 +0200
+@@ -16,10 +16,15 @@
+ * - autologin only at first login
+ * - /etc/mingetty.conf that can be used instead of /etc/inittab for
+ * command line options
+- * - Can UTF-8 setup be done within mingetty?
++ * - Can UTF-8 setup be done within mingetty? Let's try now :-) (VinzC)
+ * - Also add /bin/login-type functionality in here?
+ */
+
++/* Additional comments: Vincent Cadet <vcadet@hotmail.com> (2006-11-21)
++ * - Attempt to make mingetty support UTF-8. Modifications were imported
++ * from Suse migetty.c 0.9.6s.
++ */
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -39,6 +44,19 @@
+ #include <syslog.h>
+ #include <sys/utsname.h>
+ #include <time.h>
++#include <locale.h>
++#include <iconv.h>
++#include <wctype.h>
++#include <sys/kd.h>
++#include <sys/ttydefaults.h>
++
++#ifndef IUTF8
++# ifndef ASM_IUTF8
++# error ASM_IUTF8 input flag not defined - Cannot define IUTF8
++# else
++# define IUTF8 ASM_IUTF8
++# endif
++#endif
+
+ /* name of this program (argv[0]) */
+ static char *progname;
+@@ -74,6 +92,8 @@
+ static char *autologin = NULL;
+ /* try to read a char before dropping to login prompt */
+ static int loginpause = 0;
++/* terminal mode */
++static int mode = K_RAW;
+
+ /* error() - output error messages */
+ static void error (const char *fmt, ...)
+@@ -187,10 +207,21 @@
+ if (fd > 2)
+ close (fd);
+
++ /* Detect mode of current keyboard setup, e.g. for UTF-8 */
++ if (ioctl(0, KDGKBMODE, &mode) < 0)
++ mode = K_RAW;
++
+ /* Write a reset string to the terminal. This is very linux-specific
+ and should be checked for other systems. */
+ if (noclear == 0)
+- write (0, "\033c", 2);
++ /* don't write a full reset (ESC c) because this leaves the
++ unicode mode again if the terminal was in unicode mode
++ and also undos the ESC sequences in CONSOLE_MAGIC which
++ are needed for some languages/console-fonts.
++ Just put the cursor to the home position (ESC [ H),
++ erase everything below the cursor (ESC [ J), and set the
++ scrolling region to the full window (ESC [ r) */
++ write (0, "\033[r\033[H\033[J", 9);
+
+ sigaction (SIGHUP, &sa_old, NULL);
+ }
+@@ -292,32 +323,75 @@
+
+ static char *get_logname (void)
+ {
+- static char logname[40];
++ static char logname[4*UT_NAMESIZE];
+ char *bp;
+ unsigned char c;
++ int ascii;
++ iconv_t ic;
+
+ tcflush (0, TCIFLUSH); /* flush pending input */
++
++ /* Check for UTF-8 mode */
++ switch(mode) {
++ case K_UNICODE:
++ ascii = 0;
++ setlocale(LC_CTYPE, "en_US.UTF-8");
++ break;
++ case K_RAW:
++ case K_MEDIUMRAW:
++ case K_XLATE:
++ default:
++ ascii = 1;
++ setlocale(LC_CTYPE, "POSIX");
++ break;
++ }
++
+ for (*logname = 0; *logname == 0;) {
+ do_prompt (1);
+ for (bp = logname;;) {
+ if (read (0, &c, 1) < 1) {
+- if (errno == EINTR || errno == EIO
+- || errno == ENOENT)
++ if (errno == EINTR || errno == EAGAIN) {
++ usleep(1000);
++ continue;
++ }
++ if (errno == EIO || errno == ENOENT)
+ exit (EXIT_SUCCESS);
+ error ("%s: read: %s", tty, strerror (errno));
+ }
+ if (c == '\n' || c == '\r') {
+ *bp = 0;
+ break;
+- } else if (!isprint (c))
+- error ("%s: invalid character 0x%x in login"
+- " name", tty, c);
++ }
++
++ if (ascii && !isprint (c))
++ error ("%s: invalid character 0x%x in login name", tty, c);
+ else if ((size_t)(bp - logname) >= sizeof (logname) - 1)
+ error ("%s: too long login name", tty);
+- else
+- *bp++ = c;
++
++ *bp++ = c;
+ }
+ }
++
++ if (!ascii && (ic = iconv_open("WCHAR_T", "UTF-8"))) {
++ char tmpbuf[4*sizeof(logname)], *op, *lp;
++ size_t len = bp - logname;
++ size_t out = sizeof(tmpbuf) - 1;
++ size_t wcl;
++ wint_t *wcp;
++
++ op = tmpbuf;
++ lp = logname;
++ if ((wcl = iconv(ic , &lp, &len, &op, &out)) == (size_t)-1)
++ error ("%s: invalid character conversion for login name", tty);
++ iconv_close(ic);
++
++ wcp = (wint_t*)tmpbuf;
++ wcp[wcl] = (wint_t)0;
++ while (*wcp) {
++ if (!iswprint(*wcp++))
++ error ("%s: invalid character for login name found", tty);
++ }
++ }
+ return logname;
+ }
+
+
+
diff --git a/abs/extra/miro/ChangeLog b/abs/extra/miro/ChangeLog
new file mode 100644
index 0000000..223b1de
--- /dev/null
+++ b/abs/extra/miro/ChangeLog
@@ -0,0 +1,34 @@
+2008-01-30 Eric Belanger <eric@archlinux.org>
+ * miro-1.1-2
+ * rebuilt against xulrunner 1.8.1.11
+
+2008-01-16 Varun Acharya <varun@archlinux.org>
+
+ * upgpkg miro-1.1
+
+2008-01-03 Varun Acharya <varun@archlinux.org>
+
+ * Adopted and moved to extra, miro-1.0-2
+
+2007-11-26 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * miro-1.0-2
+ * changed url
+ * added sqlite3 as dep (fix FS#8636)
+
+2007-11-13 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * miro-1.0-1
+ * version bump
+
+2007-09-09 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * miro-0.9.9-1
+ * version bump
+
+2007-08-08 Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+ * miro-0.9.8.1-1
+ * initial commit
+
+
diff --git a/abs/extra/miro/Changelog b/abs/extra/miro/Changelog
new file mode 100644
index 0000000..40505f2
--- /dev/null
+++ b/abs/extra/miro/Changelog
@@ -0,0 +1,2 @@
+Miro 2.0.4-3 4/30/09
+Upgrade miro.install to add remove miro from is.xml.
diff --git a/abs/extra/miro/Miro-xulrunner.patch b/abs/extra/miro/Miro-xulrunner.patch
new file mode 100644
index 0000000..b8f4db3
--- /dev/null
+++ b/abs/extra/miro/Miro-xulrunner.patch
@@ -0,0 +1,64 @@
+diff -up Miro-1.2.3/platform/gtk-x11/platform/mozsetup.py.old Miro-1.2.3/platform/gtk-x11/platform/mozsetup.py
+--- Miro-1.2.3/platform/gtk-x11/platform/mozsetup.py.old 2008-04-22 17:17:01.000000000 +0200
++++ Miro-1.2.3/platform/gtk-x11/platform/mozsetup.py 2008-04-28 12:51:46.000000000 +0200
+@@ -106,8 +106,8 @@ def setupMozillaEnvironment():
+ set_profile_path = gtkmozembed.gtk_moz_embed_set_profile_path
+
+ set_profile_path(config.get(prefs.SUPPORT_DIRECTORY), 'mozilla')
+- if hasattr(gtkmozembed, 'set_comp_path'):
+- set_comp_path = gtkmozembed.set_comp_path
++ if hasattr(gtkmozembed, 'set_path'):
++ set_comp_path = gtkmozembed.set_path
+ elif hasattr(gtkmozembed, 'set_path'):
+ set_comp_path = gtkmozembed.set_path
+ else:
+diff -up Miro-1.2.3/platform/gtk-x11/setup.py.old Miro-1.2.3/platform/gtk-x11/setup.py
+--- Miro-1.2.3/platform/gtk-x11/setup.py.old 2008-04-22 17:17:01.000000000 +0200
++++ Miro-1.2.3/platform/gtk-x11/setup.py 2008-04-28 13:14:27.000000000 +0200
+@@ -209,6 +209,7 @@ def parsePkgConfig(command, components,
+ options_dict = {
+ 'include_dirs' : [],
+ 'library_dirs' : [],
++ 'runtime_dirs' : [],
+ 'libraries' : [],
+ 'extra_compile_args' : []
+ }
+@@ -224,6 +225,11 @@ def parsePkgConfig(command, components,
+ options_dict['libraries'].append(rest)
+ else:
+ options_dict['extra_compile_args'].append(comp)
++
++ commandLine = "%s --variable=libdir %s" % (command, components)
++ output = getCommandOutput(commandLine).strip()
++ options_dict['runtime_dirs'].append(output)
++
+ return options_dict
+
+ #### The fasttypes extension ####
+@@ -279,6 +285,8 @@ mozilla_browser_options = parsePkgConfig
+ "gtk+-2.0 glib-2.0 pygtk-2.0 --define-variable=includetype=unstable %s %s" % (gtkmozembed, xpcom))
+ mozilla_lib_path = parsePkgConfig('pkg-config',
+ '%s' % gtkmozembed)['library_dirs']
++runtime_lib_path = parsePkgConfig('pkg-config',
++ '%s' % gtkmozembed)['runtime_dirs']
+ # Find the base mozilla directory, and add the subdirs we need.
+ def allInDir(directory, subdirs):
+ for subdir in subdirs:
+@@ -334,7 +342,7 @@ mozilla_browser_ext = Extension("miro.pl
+ os.path.join(platform_html_frontend_dir,'DragAndDrop.cc'),
+ os.path.join(platform_html_frontend_dir,'XPCOMUtil.cc'),
+ ],
+- runtime_library_dirs=mozilla_lib_path,
++ runtime_library_dirs=runtime_lib_path,
+ **mozilla_browser_options)
+ #### Xlib Extension ####
+ xlib_ext = \
+@@ -434,7 +442,7 @@ class install_data (distutils.command.in
+ BUILD_MACHINE="%s@%s" % (getlogin(),
+ os.uname()[1]),
+ BUILD_TIME=str(time.time()),
+- MOZILLA_LIB_PATH=mozilla_lib_path[0])
++ MOZILLA_LIB_PATH=runtime_lib_path[0])
+ self.outfiles.append(dest)
+
+ locale_dir = os.path.join (resource_dir, "locale")
diff --git a/abs/extra/miro/PKGBUILD b/abs/extra/miro/PKGBUILD
new file mode 100644
index 0000000..1411c43
--- /dev/null
+++ b/abs/extra/miro/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 35621 2009-04-14 18:07:17Z ronald $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+
+pkgname=miro
+pkgver=2.0.4
+pkgrel=9
+pkgdesc="The free and open source internet TV platform"
+arch=('i686' 'x86_64')
+url="http://www.getmiro.com"
+license=('GPL2')
+depends=('xine-lib>=1.1.16.1' 'boost>=1.37.0' 'gnome-python-extras>=2.25.3'
+ 'dbus-python>=0.82.4' 'pyrex' 'xulrunner>=1.9.0.1' 'gtk2' 'nspr'
+ 'desktop-file-utils')
+makedepends=('pkgconfig' 'pm-utils' 'qt3')
+optdepends=('gstreamer0.10-python: gstreamer backend (potentially unstable)' 'gstreamer0.10: gstreamer backend (potentially unstable')
+install=miro.install
+conflicts=('democracy')
+replaces=('democracy')
+provides=('democracy')
+source=(http://ftp.osuosl.org/pub/pculture.org/miro/src/Miro-${pkgver}.tar.gz
+ miro.exec.patch)
+md5sums=('e6cf48252496b2bddd290f375fc0ca33'
+ '355648eac790d52c51ccb014736f90fc')
+
+build() {
+ cd ${srcdir}/Miro-${pkgver}/platform/gtk-x11
+ python setup.py install --root=${pkgdir} || return 1
+
+ # Fix FS#14196
+ cd ${pkgdir}
+ patch -Np0 -i ${srcdir}/miro.exec.patch || return 1
+}
diff --git a/abs/extra/miro/boost_1.36.0_fix.patch b/abs/extra/miro/boost_1.36.0_fix.patch
new file mode 100644
index 0000000..b3b5a48
--- /dev/null
+++ b/abs/extra/miro/boost_1.36.0_fix.patch
@@ -0,0 +1,32 @@
+--- Miro-1.2.7/portable/libtorrent/src/torrent_info.cpp.old 2008-09-21 13:47:00.122974031 +0200
++++ Miro-1.2.7/portable/libtorrent/src/torrent_info.cpp 2008-09-21 13:48:54.812965713 +0200
+@@ -352,7 +352,7 @@
+ fs::path tmp = m_name;
+ if (tmp.is_complete()) throw std::runtime_error("torrent contains "
+ "a file with an absolute path: '" + m_name + "'");
+- if (tmp.has_branch_path()) throw std::runtime_error(
++ if (!tmp.branch_path().empty()) throw std::runtime_error(
+ "torrent contains name with directories: '" + m_name + "'");
+
+ // extract file list
+@@ -556,7 +556,7 @@
+ {
+ // TORRENT_ASSERT(file.begin() != file.end());
+
+- if (!file.has_branch_path())
++ if (file.branch_path().empty())
+ {
+ // you have already added at least one file with a
+ // path to the file (branch_path), which means that
+
+--- Miro-1.2.7/portable/libtorrent/include/libtorrent/disk_io_thread.hpp.old 2008-09-21 13:57:05.433330334 +0200
++++ Miro-1.2.7/portable/libtorrent/include/libtorrent/disk_io_thread.hpp 2008-09-21 13:57:29.060304305 +0200
+@@ -41,6 +41,7 @@
+ #include <boost/bind.hpp>
+ #include <boost/pool/pool.hpp>
+ #include <boost/noncopyable.hpp>
++#include <boost/thread/condition.hpp>
+ #include "libtorrent/config.hpp"
+
+ namespace libtorrent
+
diff --git a/abs/extra/miro/miro-xine.patch b/abs/extra/miro/miro-xine.patch
new file mode 100644
index 0000000..5abf5f1
--- /dev/null
+++ b/abs/extra/miro/miro-xine.patch
@@ -0,0 +1,12 @@
+--- usr/bin/miro.old 2009-02-22 21:49:26.332356738 +0100
++++ usr/bin/miro 2009-02-22 21:50:39.169010435 +0100
+@@ -21,7 +21,7 @@
+ exit;
+ fi
+
+- LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9 $GDB -ex 'set breakpoint pending on' -ex 'break gdk_x_error' -ex 'run' --args $PYTHON ./miro.real --sync "$@"
++ LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9 $GDB -ex 'set breakpoint pending on' -ex 'break gdk_x_error' -ex 'run' --args $PYTHON ./miro.real --set xine-driver=opengl --sync "$@"
+ else
+- LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9 miro.real "$@"
++ LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9 miro.real --set xine-driver=opengl "$@"
+ fi
diff --git a/abs/extra/miro/miro.exec.patch b/abs/extra/miro/miro.exec.patch
new file mode 100644
index 0000000..4b012af
--- /dev/null
+++ b/abs/extra/miro/miro.exec.patch
@@ -0,0 +1,9 @@
+--- usr/bin/miro.old 2009-04-14 19:40:09.578785938 +0200
++++ usr/bin/miro 2009-04-14 19:40:34.445435006 +0200
+@@ -23,5 +23,5 @@
+
+ LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9 $GDB -ex 'set breakpoint pending on' -ex 'run' --args $PYTHON ./miro.real --sync "$@"
+ else
+- LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9 miro.real "$@"
++ MOZILLA_FIVE_HOME="/usr/lib/xulrunner-1.9/" LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9 miro.real "$@"
+ fi
diff --git a/abs/extra/miro/miro.install b/abs/extra/miro/miro.install
new file mode 100644
index 0000000..db52df4
--- /dev/null
+++ b/abs/extra/miro/miro.install
@@ -0,0 +1,54 @@
+# arg 1: the new package version
+post_install() {
+ update-desktop-database -q
+ mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
+ sed -e '/\#Miro/,/\#Miro/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
+ mv /usr/share/mythtv/is.xml /tmp
+ grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp
+ echo "<!--#Miro-->" >> /tmp/is.xml.tmp
+ echo " <button>" >> /tmp/is.xml.tmp
+ echo " <type>STREAM</type>" >> /tmp/is.xml.tmp
+ echo " <text>Miro Player</text>" >> /tmp/is.xml.tmp
+ echo " <action>EXEC /usr/bin/miro --set xine-xvhack=false --set renderer=xine</action>" >> /tmp/is.xml.tmp
+ echo " </button>" >> /tmp/is.xml.tmp
+ echo "<!--#Miro-->" >> /tmp/is.xml.tmp
+ echo "" >> /tmp/is.xml.tmp
+ echo "</mythmenu>" >> /tmp/is.xml.tmp
+ mv /tmp/is.xml.tmp /usr/share/mythtv/is.xml
+ if [ -d /myth/democracy ]
+ then
+ ln -s /myth/democracy /home/mythtv/.miro
+ ln -s /myth/miro/Movies /myth/video/Miro
+ exit 1
+ else
+ if [ -d /myth/miro ]
+ then
+ ln -s /myth/miro /home/mythtv/.miro
+ ln -s /myth/miro/Movies /myth/video/Miro
+ exit 1
+ else
+ if [ ! -d /myth/miro -o /myth/democracy ]
+ then
+ mkdir -p /myth/miro/Movies
+ ln -s /myth/miro /home/mythtv/.miro
+ ln -s /myth/miro/Movies /home/mythtv/Movies
+ ln -s /myth/miro/Movies /myth/video/Miro
+ fi
+ fi
+ fi
+}
+
+post_update() {
+ post_install $1
+}
+
+post_remove() {
+ update-desktop-database -q
+ rm -fr /home/mythtv/.miro /myth/video/Miro /myth/miro /myth/democracy
+ mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
+ sed -e '/\#Miro/,/\#Miro/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/miro/miro_python26.patch b/abs/extra/miro/miro_python26.patch
new file mode 100644
index 0000000..f404a4e
--- /dev/null
+++ b/abs/extra/miro/miro_python26.patch
@@ -0,0 +1,16 @@
+--- miro.real 2008-10-24 19:49:17.000000000 +0200
++++ miro.real.new 2008-11-12 08:51:17.649458321 +0100
+@@ -6,8 +6,12 @@
+ if xlibhelper.XInitThreads() == 0:
+ print "WARNING: XInitThreads() failed!"
+
+-import os.path
++import miro.feedparser
++import miro.storedatabase
+ import sys
++sys.modules['feedparser'] = miro.feedparser
++sys.modules['storedatabase'] = miro.storedatabase
++import os.path
+ import optparse
+
+ import pygtk
diff --git a/abs/extra/miro/missing-headers.patch b/abs/extra/miro/missing-headers.patch
new file mode 100644
index 0000000..7dc42b8
--- /dev/null
+++ b/abs/extra/miro/missing-headers.patch
@@ -0,0 +1,33 @@
+diff -ur a/portable/libtorrent/include/libtorrent/peer_id.hpp b/portable/libtorrent/include/libtorrent/peer_id.hpp
+--- a/portable/libtorrent/include/libtorrent/peer_id.hpp 2008-04-22 10:17:04.000000000 -0500
++++ b/portable/libtorrent/include/libtorrent/peer_id.hpp 2008-05-07 01:51:09.000000000 -0500
+@@ -38,6 +38,7 @@
+ #include <cctype>
+ #include <algorithm>
+ #include <string>
++#include <cstring>
+
+ #include "libtorrent/config.hpp"
+ #include "libtorrent/assert.hpp"
+diff -ur a/portable/libtorrent/src/entry.cpp b/portable/libtorrent/src/entry.cpp
+--- a/portable/libtorrent/src/entry.cpp 2008-04-22 10:17:04.000000000 -0500
++++ b/portable/libtorrent/src/entry.cpp 2008-05-07 02:16:14.000000000 -0500
+@@ -33,6 +33,7 @@
+ #include "libtorrent/pch.hpp"
+
+ #include <algorithm>
++#include <iostream>
+ #include <iomanip>
+ #include "libtorrent/entry.hpp"
+ #include "libtorrent/config.hpp"
+diff -ur a/portable/libtorrent/src/file.cpp b/portable/libtorrent/src/file.cpp
+--- a/portable/libtorrent/src/file.cpp 2008-04-22 10:17:04.000000000 -0500
++++ b/portable/libtorrent/src/file.cpp 2008-05-07 01:53:04.000000000 -0500
+@@ -68,6 +68,7 @@
+ #include <boost/filesystem/operations.hpp>
+ #include "libtorrent/file.hpp"
+ #include <sstream>
++#include <cstring>
+
+ #ifndef O_BINARY
+ #define O_BINARY 0
diff --git a/abs/extra/mkvtoolnix/PKGBUILD b/abs/extra/mkvtoolnix/PKGBUILD
new file mode 100644
index 0000000..21681a9
--- /dev/null
+++ b/abs/extra/mkvtoolnix/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 41916 2009-06-07 23:34:29Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: 03/08/04 <lefungus@altern.org>
+
+pkgname=mkvtoolnix
+pkgver=2.9.8
+pkgrel=1
+pkgdesc="Set of tools to create, edit and inspect Matroska files"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.bunkus.org/videotools/mkvtoolnix/index.html"
+depends=('libmatroska>=0.8.1' 'flac>=1.1.4' 'libvorbis' 'wxgtk>=2.8.0.1' 'file' 'boost' 'lzo2')
+source=("http://www.bunkus.org/videotools/${pkgname}/sources/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('7b049aa43c6b39dfcb19f5a46d5574ac')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}/
+ ./configure --prefix=/usr \
+ --with-boost-libdir=/usr/lib
+ make || return 1
+ make DESTDIR=${pkgdir}/ install
+}
diff --git a/abs/extra/mono/PKGBUILD b/abs/extra/mono/PKGBUILD
new file mode 100644
index 0000000..94ad05a
--- /dev/null
+++ b/abs/extra/mono/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 25123 2009-01-23 17:05:04Z daniel $
+# Maintainer: Daniel Isenmann <daniel@archlinux.org>
+# Contributor: Brice Carpentier <brice@dlfp.org>
+
+pkgname=mono
+pkgver=2.2
+pkgrel=1
+pkgdesc="Free implementation of the .NET platform including runtime and compiler"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL2' 'MPL' 'custom:MITX11')
+url="http://www.mono-project.com/"
+depends=('zlib' 'libgdiplus>=2.2')
+makedepends=('pkgconfig' 'bison')
+options=('!libtool' '!makeflags')
+provides=('monodoc')
+conflicts=('monodoc')
+source=(http://www.go-mono.com/sources/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ mono.rc.d)
+md5sums=('da147e24d14a73d8ad52775dd4a3d165'
+ '8315e46c6a6e9625502521fc0ad1a322')
+
+build() {
+ # get rid of that .wapi errors; thanks to brice
+ export MONO_SHARED_DIR=${startdir}/src/weird
+ mkdir -p "${MONO_SHARED_DIR}"
+ mkdir -p ${startdir}/pkg/usr/share/licenses/$pkgname
+ # build mono
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ rm -f libgc/libtool.m4
+ autoreconf --force --install
+ autoreconf --force --install libgc
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --with-libgdiplus=installed --with-icu=no \
+ --with-tls=pthread --with-jit=yes --with-preview=yes \
+ --with-sigaltstack=yes --enable-nunit-tests \
+ --with-moonlight=yes
+ make || return 1
+ sed -i "/NO_INSTALL = yes/d" mcs/nunit20/nunit-console/Makefile
+ make DESTDIR=${startdir}/pkg install
+
+ # install daemons and pathes
+ mkdir -p ${startdir}/pkg/etc/rc.d
+ install -m755 ${startdir}/src/mono.rc.d $startdir/pkg/etc/rc.d/mono
+
+ #install license
+ install -m644 mcs/MIT.X11 ${startdir}/pkg/usr/share/licenses/$pkgname/
+}
diff --git a/abs/extra/mono/__changelog b/abs/extra/mono/__changelog
new file mode 100644
index 0000000..254c863
--- /dev/null
+++ b/abs/extra/mono/__changelog
@@ -0,0 +1 @@
+add bison as a make depends
diff --git a/abs/extra/mono/bug434892.patch b/abs/extra/mono/bug434892.patch
new file mode 100644
index 0000000..d4f46f6
--- /dev/null
+++ b/abs/extra/mono/bug434892.patch
@@ -0,0 +1,11 @@
+--- trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs 2008/07/01 20:17:46 107006
++++ trunk/mcs/class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs 2008/10/28 09:32:46 117243
+@@ -177,7 +177,7 @@
+ foreach (OperationMessage om in op.Messages) {
+ Message msg = ctx.Services.GetMessage (om.Message);
+ foreach (MessagePart part in msg.Parts)
+- parts.Add (part,part);
++ parts [part] = part; // do not use Add() - there could be the same MessagePart instance.
+ }
+ }
+
diff --git a/abs/extra/mono/mono.rc.d b/abs/extra/mono/mono.rc.d
new file mode 100644
index 0000000..548cc2d
--- /dev/null
+++ b/abs/extra/mono/mono.rc.d
@@ -0,0 +1,35 @@
+#!/bin/bash
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Registering .NET IL binaries with mono"
+ if [ ! -d /proc/sys/fs/binfmt_misc ]; then
+ stat_die "You need support for \"misc binaries\" in your kernel!"
+ fi
+ mount | grep -q binfmt_misc
+ if [ $? != 0 ]; then
+ mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
+ if [ $? != 0 ]; then
+ stat_die
+ fi
+ fi
+ echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
+ stat_done
+ ;;
+ stop)
+
+ stat_busy "Unregistering .NET IL binaries"
+ if [ -f /proc/sys/fs/binfmt_misc/CLR ]; then
+ echo '-1' > /proc/sys/fs/binfmt_misc/CLR
+ fi
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/abs/extra/mozilla-common/PKGBUILD b/abs/extra/mozilla-common/PKGBUILD
new file mode 100644
index 0000000..563ebf4
--- /dev/null
+++ b/abs/extra/mozilla-common/PKGBUILD
@@ -0,0 +1,17 @@
+# $Id: PKGBUILD 3686 2008-06-29 10:43:22Z jgc $
+# Maintainer: dale <dale@archlinux.org>
+
+pkgname=mozilla-common
+pkgver=1.2
+pkgrel=1
+pkgdesc="Common Initialization Profile for Mozilla.org products"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.mozilla.org/"
+source=(mozilla-common.sh)
+md5sums=('2ecf5090ce1170c7e280e8d726952f8a')
+
+build() {
+ install -m755 -d ${startdir}/pkg/etc/profile.d
+ install -m755 ${startdir}/src/mozilla-common.sh ${startdir}/pkg/etc/profile.d/ || return 1
+}
diff --git a/abs/extra/mozilla-common/mozilla-common.sh b/abs/extra/mozilla-common/mozilla-common.sh
new file mode 100755
index 0000000..4b73259
--- /dev/null
+++ b/abs/extra/mozilla-common/mozilla-common.sh
@@ -0,0 +1 @@
+export MOZ_PLUGIN_PATH="/usr/lib/mozilla/plugins:/opt/mozilla/lib/plugins"
diff --git a/abs/extra/myt2xvid3/PKGBUILD b/abs/extra/myt2xvid3/PKGBUILD
new file mode 100755
index 0000000..9d88ce9
--- /dev/null
+++ b/abs/extra/myt2xvid3/PKGBUILD
@@ -0,0 +1,18 @@
+pkgname=myt2xvid3
+pkgver=0.1
+pkgrel=7
+arch=("i686")
+pkgdesc="A multimedia framework based on the MPEG-4 Systems standard"
+url="http://www.knoppmythwiki.org/index.php?page=XvidEncoding"
+depends=('nuvexport')
+install="myt2xvid3.install"
+source=( myt2xvid3 myt2xvid3-userjob.sh archive.php)
+
+
+build() {
+ cd $startdir/src
+ install -D -m 755 myt2xvid3 $startdir/pkg/usr/bin/myt2xvid3
+ install -D -m 755 myt2xvid3-userjob.sh $startdir/pkg/usr/bin/myt2xvid3-userjob.sh
+ mkdir -m777 -p $startdir/pkg/myth/video/archive/
+ install -D -m 755 archive.php $startdir/pkg/myth/video/archive/
+}
diff --git a/abs/extra/myt2xvid3/archive.php b/abs/extra/myt2xvid3/archive.php
new file mode 100644
index 0000000..f970868
--- /dev/null
+++ b/abs/extra/myt2xvid3/archive.php
@@ -0,0 +1,159 @@
+<?
+//archive.php
+// based on m2iweb.php by http://anthony.lusby.us/m2iweb/
+//release 0.1
+//10/05/07
+?>
+
+<html>
+<head>
+ <title>MythWeb - Archive Recordings</title>
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+ <script type="text/javascript" src="/mythweb/js/init.js"></script>
+ <script type="text/javascript" src="/mythweb/js/browser.js"></script>
+ <script type="text/javascript" src="/mythweb/js/utils.js"></script>
+
+ <script type="text/javascript" src="/mythweb/js/mouseovers.js"></script>
+ <script type="text/javascript" src="/mythweb/js/visibility.js"></script>
+ <script type="text/javascript" src="/mythweb/js/ajax.js"></script>
+
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/style.css" />
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/header.css" />
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/menus.css" />
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/programming.css" />
+
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/status.css" />
+
+</head>
+
+<body>
+
+<div id="page_header" class="clearfix">
+ <div id="logo_box">
+ <a id="mythtv_logo" href="/mythweb/">
+ <img src="/mythweb/skins/default/img/mythtv-logo.png"
+width="174" height="48" border="0" alt="MythTV" class="alpha_png">
+ </a>
+
+ </div>
+ <div id="sections">
+ <a id="tv_link" href="/mythweb/tv" onmouseover="return help_text('TV functions, including recorded programs.')" onmouseout="return help_text()">
+ <img src="/mythweb/skins/default/img/tv.png" width="48" height="48" class="alpha_png" alt="MythTV"/>
+ </a>
+ <a id="video_link" href="/mythweb/video" onmouseover="return help_text('MythVideo on the web.')" onmouseout="return help_text()">
+ <img src="/mythweb/skins/default/img/video.png" width="48" height="48" class="alpha_png" alt="MythVideo" />
+ </a>
+ <a id="weather_link" href="/mythweb/weather" onmouseover="return help_text('MythWeb Weather.')" onmouseout="return help_text()">
+ <img src="/mythweb/skins/default/img/weather.png" width="48" height="48" class="alpha_png" alt="MythWeather" />
+ </a>
+ <a id="settings_link" href="/mythweb/settings" onmouseover="return help_text('Edit MythWeb and some MythTV settings.')" onmouseout="return help_text()">
+ <img src="/mythweb/skins/default/img/settings.png" width="48" height="48" class="alpha_png" alt="Settings" />
+ </a>
+ </div>
+ <div id="extra_header">
+ <div id="help_wrapper">
+ <div id="help_box">
+
+ <div id="help_text_default">
+ MythWeb: Mon May 16, 2006, 09:09 PM </div>
+ <div id="help_text">
+ </div>
+ </div>
+ </div>
+ <div id="search" >
+ <form action="/mythweb/tv/search" method="post">
+
+ <div id="simple_search">
+ <input id="search_text" type="text" name="searchstr" size="15" value="">
+ <input id="search_submit" type="submit" class="submit" value="Search"> (<a href="/mythweb/tv/search">Advanced</a>)
+ </div>
+ <div id="search_options">
+ </div>
+ </form>
+
+ </div>
+ </div>
+</div>
+
+
+<table width="100%" border="0" cellspacing="2" cellpadding="0">
+<tr>
+
+ <td colspan="2" class="menu menu_border_t menu_border_b"><table class="body" width="100%" border="0"
+
+cellspacing="2" cellpadding="2">
+ <tr>
+ <td><div id="command_choices">
+ <a href="/mythweb/" id="category_legend" onmouseover="popup('category_legend'); return true;">MythTV:</a> &nbsp; &nbsp;
+
+ <a href="/mythweb/tv/list">Listings</a>
+ &nbsp; | &nbsp;
+ <a href="/mythweb/tv/searches">Searches</a>
+ &nbsp; | &nbsp;
+ <a href="/mythweb/tv/schedules">Recording Schedules</a>
+ (<a href="/mythweb/tv/schedules/manual">Manual</a>,
+ <a href="/mythweb/tv/schedules/custom">Custom</a>)
+ &nbsp; | &nbsp;
+ <a href="/mythweb/tv/upcoming">Upcoming Recordings</a>
+ &nbsp; | &nbsp;
+ <a href="/mythweb/tv/recorded">Recorded Programs</a>
+ &nbsp; | &nbsp;
+ <a href="/ipodfeed/m2iweb.php">Myth2iPod</a>
+ &nbsp; | &nbsp;
+ <a href="/archive/archive.php">Myt2XviD3</a>
+ &nbsp; | &nbsp;
+ <a href="/mythweb/status">Backend Status</a>
+ </div></td>
+ </tr>
+ </table></td>
+
+</tr>
+</table>
+
+<table width="100%" border="0" cellpadding="4" cellspacing="2" class="list small">
+<tr><td colspan="10" class="list_separator">View and delete recordings transcoded to XviD via Myt2XviD3.</td></tr>
+<?php
+if (isset($_REQUEST['delete'])){
+ $delete = $_REQUEST['delete'];
+ if ($delete AND substr($delete, -9) == ".XviD.xml") {
+ echo '<tr><td colspan="10" class="list_separator">
+ <font color="red">';
+ echo $delete;
+ unlink($delete) or print(" failed to be ");
+ echo ' has been deleted, ';
+ $deletetoo = substr($delete, 0, -3)."avi";
+ echo $deletetoo;
+ unlink($deletetoo) or print(" failed to be ");
+ echo ' has been deleted.';
+ echo'</td></tr>';
+ }
+}
+ $i=1;
+ foreach (glob("*.XviD.xml") as $file) {
+ $lines = file($file);
+ echo '<tr class="recorded"><td class="list">&nbsp;</td><td>';
+ echo '<font color="';
+ if (!file_exists(substr($file, 0, -3)."avi")) {
+ echo "red";
+ }
+ echo '">'.$i.'</font>';
+ echo "</td></td><td><a href=".'"'.substr($file, 0, -3)."avi".'"'."style='color:white'>".strip_tags($lines[1])."</a></td><td>".strip_tags($lines[7])."</td><td>".strip_tags($lines[6])."</td><td nowrap>".filesizeparse(filesize(substr($file, 0, -3)."avi"))."</td><td>".'<a href="?delete='.$file.'" onclick="return confirm('."'Are you sure you want to delete?'".')">Delete</a>'."</td>".'<td class="list">&nbsp;</td>'."</tr>";
+ $i++;
+ }
+//}
+
+function filesizeparse($size){
+ $i=0;
+ $iec = array(" B", " KB", " MB", " GB", " TB");
+ while (($size/1024)>1) {
+ $size=$size/1024;
+ $i++;
+ }
+ return substr($size,0,strpos($size,'.')+3).$iec[$i];
+}
+?>
+</table>
+</body>
+</html>
diff --git a/abs/extra/myt2xvid3/myt2xvid3 b/abs/extra/myt2xvid3/myt2xvid3
new file mode 100755
index 0000000..af65188
--- /dev/null
+++ b/abs/extra/myt2xvid3/myt2xvid3
@@ -0,0 +1,310 @@
+#!/usr/bin/perl -w
+# VERSION: 1.0b2 - myth2ipod
+# Get the latest version, and change log at myth2ipod.com
+# Author: Chris aka Wififun - email: wififun@myth2ipod.com
+# Contributions and testing by Paul Egli
+# modified to use nuvexport by starv at juniks dot org
+
+# Includes
+use DBI;
+use Getopt::Long;
+use File::Path;
+
+# User variables
+my $portable = "XviD";
+my $feedfile = "/myth/video/archive/feed.php";
+my $feedpath = "/myth/video/archive/";
+my $wwwloc = "/data/srv/httpd/htdocs";
+my $feedurl = "http://REPLACEME/archive/";
+my $nuvoptions ="--mode=XviD --nice=19 --cutlist --nodenoise --nodeinterlace --crop --multipass";
+
+# Some variables
+our ($dest, $format, $usage);
+our ($db_host, $db_user, $db_name, $db_pass, $video_dir);
+our ($hostname, $db_handle, $sql, $statement, $row_ref);
+our ($chanid, $start, $nuvfile, @nuvarray);
+my $rebuild = '0';
+my $encode = '0';
+my $debug = '0';
+my $setup = '0';
+my $cut = '0';
+my( $rightnow ) = `date`;
+
+GetOptions ("rebuild" => \$rebuild,
+ "encode" => \$encode,
+ "debug" => \$debug,
+ "setup" => \$setup,
+ "cut" => \$cut);
+
+if ($setup == 1){
+ system("clear");
+ print "Setup will do everything needed to run this script.\n";
+ print "This has only been tested on KnoppMyth R5A22.\n";
+ print "make sure you have edited the variables for your conguration.\n";
+ my $cksetup = &promptUser("\nAre you sure you want to procceed?","n");
+ if ($cksetup =~ "y") {
+ DoSetup();
+ exit;
+ }
+ print "Setup exited. Nothing done.\n";
+ exit;
+}
+elsif ($rebuild == 1){
+ GenerateRSSFeed();
+ print "Rebuilding of RSS feed is complete.\n";
+ exit;
+}
+else {
+ Encode4Portable();
+ print "$title is ready for your $portable\n";
+
+ # Check to see if the feed file exists; if not, create it.
+ if (! -e $feedfile) {
+ print "No feed file found. I will make one for you.\n";
+ GenerateRSSFeed();
+ print "All done.\n";
+ }
+}
+
+sub Encode4Portable{
+ if ($#ARGV != 1) {
+ print "Encoding requires options.\nusage: myth2ipod <options> DIRECTORY FILE\n";
+ exit;
+ }
+
+ # Get the show information
+ $directory = $ARGV[0];
+ $file = $ARGV[1];
+ @file = split(/_/, $file);
+ $chanid = $file[0];
+ $start = substr $file[1],0,14;
+ if($debug == 1){ print "$chanid\n$start\n"};
+ if (! -e $directory."/".$file){
+ print "Oops, the file ".$directory.$file." does not exist.\n";
+ exit;
+ }
+
+ # Connect to the database
+ PrepSQLRead();
+ $db_handle = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass)
+ or die "Cannot connect to database: $!\n\n";
+ $sql = "SELECT title, subtitle, description, category, starttime FROM recorded WHERE chanid = $chanid AND DATE_FORMAT(starttime,'%Y%m%d%H%i%s') = $start";
+
+ $statement = $db_handle->prepare($sql)
+ or die "Couldn't prepare query '$sql': $DBI::errstr\n";
+
+ $statement->execute()
+ or die "Couldn't execute query '$sql': $DBI::errstr\n";
+ $row_ref = $statement->fetchrow_hashref();
+ if($debug == 1){ print "$row_ref->{starttime}\n"};
+ $title = $row_ref->{title};
+ $subtitle = $row_ref->{subtitle};
+ $recorddate = $row_ref->{starttime};
+ $description = $row_ref->{description};
+ $category = $row_ref->{category};
+ $filename = $title."-".$subtitle."-".substr $start, 0, 8;
+ $filename =~ s/ /_/g;
+ $filename =~ s/&/+/g;
+ $filename =~ s/\047//g;
+ $filename =~ s/[^+0-9a-zA-Z_-]+/_/g;
+ $filename =~ s/_$//g;
+
+ printf("Starting nuvexport...\n");
+ EncodeIt();
+ printf("Nuvexport completed, starting xml generation...\n");
+ CreateItemXML();
+ printf("XML file created for \"$filename\" : Yipeee\n");
+ printf("Cleaning up temporary files\n");
+ $cmd = "rm -f $feedpath$chanid\_$start.temp.mp4";
+ print $cmd."\n";
+ if(system($cmd)) { print "Removing nuvexport temp file failed\n"; }
+
+ # remove the cutlist incase we added it.
+ if ($cut == 1){
+ printf("Generating cutlist\n");
+ $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --clearcutlist";
+ print $cmd."\n";
+ if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; }
+ }
+ return 0;
+}
+
+#
+# Encode for Portable
+#
+sub EncodeIt {
+ # Create cutlist from commercial flagging if -cut was passed to the script
+ if ($cut == 1){
+ printf("Generating cutlist\n");
+ $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --gencutlist";
+ print $cmd."\n";
+ if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; }
+ }
+
+ # Use nuvexport to do the work
+ $cmd = "/usr/bin/nuvexport --chanid=$chanid --start=$start $nuvoptions --filename=$chanid\_$start.$portable --path=$feedpath";
+ print $cmd."\n";
+ if(system($cmd)) { print "Nuvexport encoding seems to have failed\n"; }
+
+ # Now clean up the output so iPods with firmware 1.1 and above can use it
+ #$cmd = "/usr/local/bin/MP4Box -add $feedpath$chanid\_$start.temp.mp4 $feedpath$chanid\_$start.$portable.mp4";
+ #print $cmd."\n";
+ #if(system($cmd)) { print "MP4Box cleanup seems to have failed\n"; }
+ return 0;
+}
+
+#
+# Create XML with <ITEM> tag for this video file
+#
+sub CreateItemXML {
+ open(ITEM, ">$feedpath$chanid\_$start.$portable.xml");
+ print ITEM "<item>\n";
+ print ITEM "<title>".&encodeForXML($title." - ".$subtitle)."</title>\n";
+ print ITEM "<itunes:author>MythTV</itunes:author>\n";
+ print ITEM "<author>MythTV</author>\n";
+ print ITEM "<itunes:category text=\"TV Shows\"></itunes:category>\n";
+ print ITEM "<comments>".&encodeForXML($file)."</comments>\n";
+ print ITEM "<description>".&encodeForXML($description)."</description>\n";
+ print ITEM "<pubDate>".$recorddate."</pubDate>\n";
+ print ITEM "<enclosure url=\"".&encodeForXML("$feedurl$chanid\_$start.$portable.avi")."\" type=\"video/quicktime\" />\n";
+ print ITEM "<itunes:duration></itunes:duration>\n";
+ print ITEM "<itunes:keywords>".&encodeForXML($title." - ".$subtitle." - ".$category)."</itunes:keywords>\n";
+ print ITEM "<category>".&encodeForXML($category)."</category>\n";
+ print ITEM "</item>\n";
+ print "\"$filename\" has been added to the feed.\n";
+ close(ITEM);
+ return 0;
+}
+
+#
+# Generate the RSS feed by combining the ITEM XML Files
+#
+sub GenerateRSSFeed {
+
+ open(RSS, ">$feedfile");
+ print RSS "<?php\n";
+ print RSS "header(\"Content-Type: text/xml\");\n";
+ print RSS "echo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\"; ?>\n";
+ print RSS "<rss xmlns:itunes=\"http://www.itunes.com/DTDs/Podcast-1.0.dtd\" version=\"2.0\">\n";
+ print RSS "<channel>\n";
+ print RSS "<title>MythTV - <? if (\$_GET['title'] == \"\") { \$title = \"*\"; echo \"Recorded Programs\"; }\n";
+ print RSS "else { \$title = \$_GET['title']; echo str_replace(\"_\",\" \",\$_GET['title']); } ?> </title>\n";
+ print RSS "<itunes:author>MythTV - myth2ipod</itunes:author>\n";
+ print RSS "<link>".&encodeForXML($feedurl)."</link>\n";
+ print RSS "<itunes:subtitle>Transcoded recording for your iPod Video.</itunes:subtitle>\n";
+ print RSS "<itunes:summary>Myth TV Recorded Programs for the iPod v.1</itunes:summary>\n";
+ print RSS "<description>Myth TV Recorded Programs for the iPod v.1</description>\n";
+ print RSS "<itunes:owner>\n";
+ print RSS "<itunes:name>MythTV</itunes:name>\n";
+ print RSS "<itunes:email>mythtv\@localhost</itunes:email>\n";
+ print RSS "</itunes:owner>\n";
+ print RSS "<itunes:explicit>No</itunes:explicit>\n";
+ print RSS "<language>en-us</language>\n";
+ print RSS "<copyright>Copyright 2005.</copyright>\n";
+ print RSS "<webMaster>mythtv\@localhost</webMaster>\n";
+ print RSS "<itunes:image href=\"http://myth2ipod.com/mythipod_200.jpg\" />\n";
+ print RSS "<itunes:category text=\"TV Shows\"></itunes:category>\n";
+ print RSS "<category>TV Shows</category>\n";
+ print RSS "<itunes:image href=\"http://myth2ipod.com/mythipod_200.jpg\"/>";
+ print RSS "<image>";
+ print RSS "<url>http://myth2ipod.com/mythipod_200.jpg</url>\n";
+ print RSS "<title>MythTV 2 iPod</title>\n";
+ print RSS "<link>".&encodeForXML($feedurl)."</link>\n";
+ print RSS "<width>200</width>\n";
+ print RSS "<height>200</height>\n";
+ print RSS "</image>\n";
+ print RSS "<? foreach (glob(\$title\.\"*\.$portable\.xml\") as \$file) {include \$file;} ?>\n";
+ print RSS "</channel>\n";
+ print RSS "</rss>\n";
+ close(RSS);
+ if($debug == 1){ print "I created a feed file, was I supposed to?\n"};
+
+ return 0;
+}
+
+# substitute for XML entities
+sub encodeForXML {
+ local $result;
+ $result = $_[0];
+ $result =~ s/&/&amp;/g;
+ $result =~ s/</&lt;/g;
+ $result =~ s/>/&gt;/g;
+ $result;
+}
+
+
+#
+# This code taken from one of the mythlink.sh scripts to get MySQL information
+#
+sub PrepSQLRead{
+# Get the hostname of this machine
+ $hostname = `hostname`;
+ chomp($hostname);
+
+# Read the mysql.txt file in use by MythTV.
+# could be in a couple places, so try the usual suspects
+ my $found = 0;
+ my @mysql = ('/usr/local/share/mythtv/mysql.txt',
+ '/usr/share/mythtv/mysql.txt',
+ '/etc/mythtv/mysql.txt',
+ '/usr/local/etc/mythtv/mysql.txt',
+ "$ENV{HOME}/.mythtv/mysql.txt",
+ 'mysql.txt'
+ );
+ foreach my $file (@mysql) {
+ next unless (-e $file);
+ $found = 1;
+ open(CONF, $file) or die "Unable to open $file: $!\n\n";
+ while (my $line = <CONF>) {
+ # Cleanup
+ next if ($line =~ /^\s*#/);
+ $line =~ s/^str //;
+ chomp($line);
+ # Split off the var=val pairs
+ my ($var, $val) = split(/\=/, $line, 2);
+ next unless ($var && $var =~ /\w/);
+ if ($var eq 'DBHostName') {
+ $db_host = $val;
+ }
+ elsif ($var eq 'DBUserName') {
+ $db_user = $val;
+ }
+ elsif ($var eq 'DBName') {
+ $db_name = $val;
+ }
+ elsif ($var eq 'DBPassword') {
+ $db_pass = $val;
+ }
+ # Hostname override
+ elsif ($var eq 'LocalHostName') {
+ $hostname = $val;
+ }
+ }
+ close CONF;
+ }
+ die "Unable to locate mysql.txt: $!\n\n" unless ($found && $db_host);
+ return 0;
+}
+
+sub promptUser {
+ local($promptString,$defaultValue) = @_;
+ if ($defaultValue) {
+ print $promptString, "[", $defaultValue, "]: ";
+ } else {
+ print $promptString, ": ";
+ }
+
+ $| = 1; # force a flush after our print
+ $_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
+ chomp;
+ if ("$defaultValue") {
+ return $_ ? $_ : $defaultValue; # return $_ if it has a value
+ } else {
+ return $_;
+ }
+}
+
+sub DoSetup {
+ print "\nNot ready yet. How do you send the cd command from perl?\n";
+ return 0;
+}
diff --git a/abs/extra/myt2xvid3/myt2xvid3-userjob.sh b/abs/extra/myt2xvid3/myt2xvid3-userjob.sh
new file mode 100755
index 0000000..6bd46ea
--- /dev/null
+++ b/abs/extra/myt2xvid3/myt2xvid3-userjob.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+. /etc/profile
+#su mythtv -c "TERM=vt100 /usr/bin/myth2ipod "$1" "$2" >/tmp/logfile"
+su mythtv -c "TERM=vt100 /usr/bin/myt2xvid3 "$1" "$2" "
+#or to also use commercial flagging cutlist
+#su mythtv -c "TERM=vt100 /usr/bin/myth2ipod -cut "$1" "$2" >/tmp/logfile"
diff --git a/abs/extra/myt2xvid3/myt2xvid3.install b/abs/extra/myt2xvid3/myt2xvid3.install
new file mode 100755
index 0000000..b3767f3
--- /dev/null
+++ b/abs/extra/myt2xvid3/myt2xvid3.install
@@ -0,0 +1,38 @@
+
+pre_install() {
+ mkdir -p /myth/video/archive
+ chown mythtv:http /myth/video/archive
+}
+
+pre_upgrade() {
+ pre_install
+}
+
+pre_remove() {
+ pre_install
+}
+
+post_install() {
+ . /etc/systemconfig
+ ln -s /myth/video/archive /data/srv/httpd/htdocs/archive
+ ln -s /myth/video/archive/archive.php /myth/video/archive/index.php
+ sed -i -e "s/REPLACEME/$HOSTNAME/g" /usr/bin/myt2xvid3
+ chown -R mythtv:http /myth/video/archive
+ /usr/bin/myt2xvid3 -rebuild
+}
+
+post_upgrade() {
+ /usr/bin/myt2xvid3 -rebuild
+}
+
+post_remove() {
+ rm -fr /data/srv/http/htdocs/archive
+ rm -rf /myth/video/archive/index.php
+ rm -rf /myth/video/archive/archive.php
+ # don't delete content that the user may still want, so leave /myth/video/archive
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/extra/myth2ipod/PKGBUILD b/abs/extra/myth2ipod/PKGBUILD
new file mode 100755
index 0000000..1942f2b
--- /dev/null
+++ b/abs/extra/myth2ipod/PKGBUILD
@@ -0,0 +1,19 @@
+pkgname=myth2ipod
+pkgver=0.2
+pkgrel=28
+arch=("i686")
+pkgdesc="A multimedia framework based on the MPEG-4 Systems standard"
+url="myth2ipod.com"
+depends=('gpac' 'nuvexport' )
+install="myth2ipod.install"
+source=( myth2ipod iPod.pm myth2ipod-userjob.sh m2iweb.php)
+
+
+build() {
+ cd $startdir/src
+ install -D -m 755 myth2ipod $startdir/pkg/usr/bin/myth2ipod
+ install -D -m 755 myth2ipod-userjob.sh /$startdir/pkg/usr/bin/myth2ipod-userjob.sh
+ install -D -m755 iPod.pm $startdir/pkg/usr/share/nuvexport/export/ffmpeg/iPod.pm
+ mkdir -m755 -p $startdir/pkg/myth/ipodfeed
+ install -D -m755 m2iweb.php $startdir/pkg/myth/ipodfeed/
+}
diff --git a/abs/extra/myth2ipod/iPod.pm b/abs/extra/myth2ipod/iPod.pm
new file mode 100755
index 0000000..24eae99
--- /dev/null
+++ b/abs/extra/myth2ipod/iPod.pm
@@ -0,0 +1,184 @@
+#
+# $Date: 2006-01-18 00:15:31 -0800 (Wed, 18 Jan 2006) $
+# $Revision: 226 $
+# $Author: xris $
+#
+# export::ffmpeg::iPod
+#
+
+package export::ffmpeg::iPod;
+ use base 'export::ffmpeg';
+
+# Load the myth and nuv utilities, and make sure we're connected to the database
+ use nuv_export::shared_utils;
+ use nuv_export::cli;
+ use nuv_export::ui;
+ use mythtv::db;
+ use mythtv::recordings;
+
+# Load the following extra parameters from the commandline
+ add_arg('quantisation|q=i', 'Quantisation');
+ add_arg('a_bitrate|a=i', 'Audio bitrate');
+ add_arg('v_bitrate|v=i', 'Video bitrate');
+ add_arg('multipass!', 'Enably two-pass encoding.');
+
+ sub new {
+ my $class = shift;
+ my $self = {
+ 'cli' => qr/\bipod\b/i,
+ 'name' => 'Export to iPod',
+ 'enabled' => 1,
+ 'errors' => [],
+ 'defaults' => {},
+ };
+ bless($self, $class);
+
+ # Initialize the default parameters
+ $self->load_defaults();
+
+ # Verify any commandline or config file options
+ die "Audio bitrate must be > 0\n" unless (!defined $self->val('a_bitrate') || $self->{'a_bitrate'} > 0);
+ die "Video bitrate must be > 0\n" unless (!defined $self->val('v_bitrate') || $self->{'v_bitrate'} > 0);
+
+ # VBR, multipass, etc.
+ if ($self->val('multipass')) {
+ $self->{'vbr'} = 0;
+ }
+ elsif ($self->val('quantisation')) {
+ die "Quantisation must be a number between 1 and 31 (lower means better quality).\n" if ($self->{'quantisation'} < 1 || $self->{'quantisation'} > 31);
+ $self->{'vbr'} = 1;
+ }
+
+ # Initialize and check for ffmpeg
+ $self->init_ffmpeg();
+
+ # Can we even encode ipod?
+ # if (!$self->can_encode('mov')) {
+ # push @{$self->{'errors'}}, "Your ffmpeg installation doesn't support encoding to mov file formats.";
+ # }
+ if (!$self->can_encode('xvid')) {
+ push @{$self->{'errors'}}, "Your ffmpeg installation doesn't support encoding to xvid video.";
+ }
+ if (!$self->can_encode('aac')) {
+ push @{$self->{'errors'}}, "Your ffmpeg installation doesn't support encoding to aac audio.";
+ }
+ # Any errors? disable this function
+ $self->{'enabled'} = 0 if ($self->{'errors'} && @{$self->{'errors'}} > 0);
+ # Return
+ return $self;
+ }
+
+# Load default settings
+ sub load_defaults {
+ my $self = shift;
+ # Load the parent module's settings
+ $self->SUPER::load_defaults();
+ # Default bitrates
+ $self->{'defaults'}{'v_bitrate'} = 384;
+ $self->{'defaults'}{'a_bitrate'} = 64;
+ }
+
+# Gather settings from the user
+ sub gather_settings {
+ my $self = shift;
+ # Load the parent module's settings
+ $self->SUPER::gather_settings();
+ # Audio Bitrate
+ $self->{'a_bitrate'} = query_text('Audio bitrate?',
+ 'int',
+ $self->val('a_bitrate'));
+ # VBR options
+ if (!$is_cli) {
+ $self->{'vbr'} = query_text('Variable bitrate video?',
+ 'yesno',
+ $self->val('vbr'));
+ if ($self->{'vbr'}) {
+ $self->{'multipass'} = query_text('Multi-pass (slower, but better quality)?',
+ 'yesno',
+ $self->val('multipass'));
+ if (!$self->{'multipass'}) {
+ while (1) {
+ my $quantisation = query_text('VBR quality/quantisation (1-31)?',
+ 'float',
+ $self->val('quantisation'));
+ if ($quantisation < 1) {
+ print "Too low; please choose a number between 1 and 31.\n";
+ }
+ elsif ($quantisation > 31) {
+ print "Too high; please choose a number between 1 and 31\n";
+ }
+ else {
+ $self->{'quantisation'} = $quantisation;
+ last;
+ }
+ }
+ }
+ } else {
+ $self->{'multipass'} = 0;
+ }
+ # Ask the user what video bitrate he/she wants
+ $self->{'v_bitrate'} = query_text('Video bitrate?',
+ 'int',
+ $self->val('v_bitrate'));
+ }
+ }
+
+ sub export {
+ my $self = shift;
+ my $episode = shift;
+ # Force to 4:3 aspect ratio
+ $self->{'out_aspect'} = 1.3333;
+ $self->{'aspect_stretched'} = 1;
+ # PAL or NTSC?
+ my $standard = ($episode->{'finfo'}{'fps'} =~ /^2(?:5|4\.9)/) ? 'PAL' : 'NTSC';
+ $self->{'width'} = 320;
+ $self->{'height'} = ($standard eq 'PAL') ? '288' : '240';
+ $self->{'out_fps'} = ($standard eq 'PAL') ? 25 : 29.97;
+ # Embed the title
+ my $safe_title = shell_escape($episode->{'show_name'}.' - '.$episode->{'title'});
+ # Dual pass?
+ if ($self->{'multipass'}) {
+ # Build the common ffmpeg string
+ my $ffmpeg_xtra = ' -b ' . $self->{'v_bitrate'}
+ .' -bufsize 65535'
+ .' -vcodec xvid -acodec aac '
+ .' -ab ' . $self->{'a_bitrate'}
+ ." -f mp4 -title $safe_title";
+ # Add the temporary file to the list
+ push @tmpfiles, "/tmp/xvid.$$.log";
+ # Back up the path and use /dev/null for the first pass
+ my $path_bak = $self->{'path'};
+ $self->{'path'} = '/dev/null';
+ # Build the ffmpeg string
+ print "First pass...\n";
+ $self->{'ffmpeg_xtra'} = " -pass 1 -passlogfile '/tmp/divx.$$.log'"
+ .$ffmpeg_xtra;
+ $self->SUPER::export($episode, '');
+ # Restore the path
+ $self->{'path'} = $path_bak;
+ # Second Pass
+ print "Final pass...\n";
+ $self->{'ffmpeg_xtra'} = " -pass 2 -passlogfile '/tmp/divx.$$.log'"
+ .$ffmpeg_xtra;
+ }
+ # Single Pass
+ else {
+ $self->{'ffmpeg_xtra'} = ' -b ' . $self->{'v_bitrate'}
+ .(($self->{'vbr'})
+ ? ' -qmin '.$self->{'quantisation'}
+ .' -qmax 31 -minrate 32'
+ .' -maxrate '.(2*$self->{'v_bitrate'})
+ .' -bt 32'
+ : '')
+ .' -vcodec xvid -acodec aac '
+ .' -ab ' . $self->{'a_bitrate'}
+ ." -f mp4 -title $safe_title";
+ }
+ # Execute the (final pass) encode
+ $self->SUPER::export($episode, '.mp4');
+ }
+
+1; #return true
+
+# vim:ts=4:sw=4:ai:et:si:sts=4
+
diff --git a/abs/extra/myth2ipod/m2iweb.php b/abs/extra/myth2ipod/m2iweb.php
new file mode 100755
index 0000000..a8a9e4d
--- /dev/null
+++ b/abs/extra/myth2ipod/m2iweb.php
@@ -0,0 +1,157 @@
+<?
+//archive.php
+// based on m2iweb.php by http://anthony.lusby.us/m2iweb/
+//release 0.1
+//10/05/07
+?>
+
+<html>
+<head>
+ <title>MythWeb - Archive Recordings</title>
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+ <script type="text/javascript" src="/mythweb/js/init.js"></script>
+ <script type="text/javascript" src="/mythweb/js/browser.js"></script>
+ <script type="text/javascript" src="/mythweb/js/utils.js"></script>
+
+ <script type="text/javascript" src="/mythweb/js/mouseovers.js"></script>
+ <script type="text/javascript" src="/mythweb/js/visibility.js"></script>
+ <script type="text/javascript" src="/mythweb/js/ajax.js"></script>
+
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/style.css" />
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/header.css" />
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/menus.css" />
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/programming.css" />
+
+ <link rel="stylesheet" type="text/css" href="/mythweb/skins/default/status.css" />
+
+</head>
+
+<body>
+
+<div id="page_header" class="clearfix">
+ <div id="logo_box">
+ <a id="mythtv_logo" href="/mythweb/">
+ <img src="/mythweb/skins/default/img/mythtv-logo.png"
+width="174" height="48" border="0" alt="MythTV" class="alpha_png">
+ </a>
+
+ </div>
+ <div id="sections">
+ <a id="tv_link" href="/mythweb/tv" onmouseover="return help_text('TV functions, including recorded programs.')" onmouseout="return help_text()">
+ <img src="/mythweb/skins/default/img/tv.png" width="48" height="48" class="alpha_png" alt="MythTV"/>
+ </a>
+ <a id="video_link" href="/mythweb/video" onmouseover="return help_text('MythVideo on the web.')" onmouseout="return help_text()">
+ <img src="/mythweb/skins/default/img/video.png" width="48" height="48" class="alpha_png" alt="MythVideo" />
+ </a>
+ <a id="weather_link" href="/mythweb/weather" onmouseover="return help_text('MythWeb Weather.')" onmouseout="return help_text()">
+ <img src="/mythweb/skins/default/img/weather.png" width="48" height="48" class="alpha_png" alt="MythWeather" />
+ </a>
+ <a id="settings_link" href="/mythweb/settings" onmouseover="return help_text('Edit MythWeb and some MythTV settings.')" onmouseout="return help_text()">
+ <img src="/mythweb/skins/default/img/settings.png" width="48" height="48" class="alpha_png" alt="Settings" />
+ </a>
+ </div>
+ <div id="extra_header">
+ <div id="help_wrapper">
+ <div id="help_box">
+
+ <div id="help_text_default">
+ MythWeb: Mon May 16, 2006, 09:09 PM </div>
+ <div id="help_text">
+ </div>
+ </div>
+ </div>
+ <div id="search" >
+ <form action="/mythweb/tv/search" method="post">
+
+ <div id="simple_search">
+ <input id="search_text" type="text" name="searchstr" size="15" value="">
+ <input id="search_submit" type="submit" class="submit" value="Search"> (<a href="/mythweb/tv/search">Advanced</a>)
+ </div>
+ <div id="search_options">
+ </div>
+ </form>
+
+ </div>
+ </div>
+</div>
+
+
+<table width="100%" border="0" cellspacing="2" cellpadding="0">
+<tr>
+
+ <td colspan="2" class="menu menu_border_t menu_border_b"><table class="body" width="100%" border="0"
+
+cellspacing="2" cellpadding="2">
+ <tr>
+ <td><div id="command_choices">
+ <a href="/mythweb/" id="category_legend" onmouseover="popup('category_legend'); return true;">MythTV:</a> &nbsp; &nbsp;
+
+ <a href="/mythweb/tv/list">Listings</a>
+ &nbsp; | &nbsp;
+ <a href="/mythweb/tv/searches">Searches</a>
+ &nbsp; | &nbsp;
+ <a href="/mythweb/tv/schedules">Recording Schedules</a>
+ (<a href="/mythweb/tv/schedules/manual">Manual</a>,
+ <a href="/mythweb/tv/schedules/custom">Custom</a>)
+ &nbsp; | &nbsp;
+ <a href="/mythweb/tv/upcoming">Upcoming Recordings</a>
+ &nbsp; | &nbsp;
+ <a href="/mythweb/tv/recorded">Recorded Programs</a>
+ &nbsp; | &nbsp;
+ <a href="/ipodfeed/m2iweb.php">Myth2iPod</a>
+ &nbsp; | &nbsp;
+ <a href="/archive/archive.php">Myt2XviD3</a>
+ &nbsp; | &nbsp;
+ <a href="/mythweb/status">Backend Status</a>
+ </div></td>
+ </tr>
+ </table></td>
+
+</tr>
+</table>
+<table width="100%" border="0" cellpadding="4" cellspacing="2" class="list small">
+<tr><td colspan="10" class="list_separator">View information and delete myth2ipod recordings.</td></tr>
+<?php
+if (isset($_REQUEST['delete'])){
+$delete = $_REQUEST['delete'];
+if ($delete AND substr($delete, -9) == ".ipod.xml") {
+ echo '<br><font color="red">';
+ echo $delete;
+ unlink($delete) or print(" failed to be ");
+ echo 'deleted<br>';
+ $deletetoo = substr($delete, 0, -3)."mp4";
+ echo $deletetoo;
+ unlink($deletetoo) or print(" failed to be ");
+ echo 'deleted<br><br><a href="?">Home</a>';
+}
+}
+else {
+ $i=1;
+ foreach (glob("*.ipod.xml") as $file) {
+ $lines = file($file);
+ echo '<tr class="recorded"><td class="list">&nbsp;</td><td>';
+ echo '<font color="';
+ if (!file_exists(substr($file, 0, -3)."mp4")) {
+ echo "red";
+ }
+ echo '">'.$i.'</font>';
+ echo "</td></td><td><a href=".'"'.substr($file, 0, -3)."mp4".'"'."style='color:white'>".strip_tags($lines[1])."</a></td><td>".strip_tags($lines[7])."</td><td>".strip_tags($lines[6])."</td><td nowrap>".filesizeparse(filesize(substr($file, 0, -3)."mp4"))."</td><td>".'<a href="?delete='.$file.'" onclick="return confirm('."'Are you sure you want to delete?'".')">Delete</a>'."</td>".'<td class="list">&nbsp;</td>'."</tr>";
+ $i++;
+ }
+}
+function filesizeparse($size){
+ $i=0;
+ $iec = array(" B", " KB", " MB", " GB", " TB");
+ while (($size/1024)>1) {
+ $size=$size/1024;
+ $i++;
+ }
+ return substr($size,0,strpos($size,'.')+3).$iec[$i];
+}
+?>
+</table>
+</body>
+</html>
+</code>
diff --git a/abs/extra/myth2ipod/myth2ipod b/abs/extra/myth2ipod/myth2ipod
new file mode 100755
index 0000000..268a522
--- /dev/null
+++ b/abs/extra/myth2ipod/myth2ipod
@@ -0,0 +1,310 @@
+#!/usr/bin/perl -w
+# VERSION: 1.0b2 - myth2ipod
+# Get the latest version, and change log at myth2ipod.com
+# Author: Chris aka Wififun - email: wififun@myth2ipod.com
+# Contributions and testing by Paul Egli
+# modified to use nuvexport by starv at juniks dot org
+
+# Includes
+use DBI;
+use Getopt::Long;
+use File::Path;
+
+# User variables
+my $portable = "ipod";
+my $feedfile = "/myth/ipodfeed/feed.php";
+my $feedpath = "/myth/ipodfeed/";
+my $wwwloc = "/data/srv/httpd/htdocs";
+my $feedurl = "http://REPLACEME/ipodfeed/";
+my $nuvoptions ="--mode=iPod --nice=19 --cutlist --nodenoise --nodeinterlace --nomultipass";
+
+# Some variables
+our ($dest, $format, $usage);
+our ($db_host, $db_user, $db_name, $db_pass, $video_dir);
+our ($hostname, $db_handle, $sql, $statement, $row_ref);
+our ($chanid, $start, $nuvfile, @nuvarray);
+my $rebuild = '0';
+my $encode = '0';
+my $debug = '0';
+my $setup = '0';
+my $cut = '0';
+my( $rightnow ) = `date`;
+
+GetOptions ("rebuild" => \$rebuild,
+ "encode" => \$encode,
+ "debug" => \$debug,
+ "setup" => \$setup,
+ "cut" => \$cut);
+
+if ($setup == 1){
+ system("clear");
+ print "Setup will do everything needed to run this script.\n";
+ print "This has only been tested on KnoppMyth R5A22.\n";
+ print "make sure you have edited the variables for your conguration.\n";
+ my $cksetup = &promptUser("\nAre you sure you want to procceed?","n");
+ if ($cksetup =~ "y") {
+ DoSetup();
+ exit;
+ }
+ print "Setup exited. Nothing done.\n";
+ exit;
+}
+elsif ($rebuild == 1){
+ GenerateRSSFeed();
+ print "Rebuilding of RSS feed is complete.\n";
+ exit;
+}
+else {
+ Encode4Portable();
+ print "$title is ready for your $portable\n";
+
+ # Check to see if the feed file exists; if not, create it.
+ if (! -e $feedfile) {
+ print "No feed file found. I will make one for you.\n";
+ GenerateRSSFeed();
+ print "All done.\n";
+ }
+}
+
+sub Encode4Portable{
+ if ($#ARGV != 1) {
+ print "Encoding requires options.\nusage: myth2ipod <options> DIRECTORY FILE\n";
+ exit;
+ }
+
+ # Get the show information
+ $directory = $ARGV[0];
+ $file = $ARGV[1];
+ @file = split(/_/, $file);
+ $chanid = $file[0];
+ $start = substr $file[1],0,14;
+ if($debug == 1){ print "$chanid\n$start\n"};
+ if (! -e $directory."/".$file){
+ print "Oops, the file ".$directory.$file." does not exist.\n";
+ exit;
+ }
+
+ # Connect to the database
+ PrepSQLRead();
+ $db_handle = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass)
+ or die "Cannot connect to database: $!\n\n";
+ $sql = "SELECT title, subtitle, description, category, starttime FROM recorded WHERE chanid = $chanid AND DATE_FORMAT(starttime,'%Y%m%d%H%i%s') = $start";
+
+ $statement = $db_handle->prepare($sql)
+ or die "Couldn't prepare query '$sql': $DBI::errstr\n";
+
+ $statement->execute()
+ or die "Couldn't execute query '$sql': $DBI::errstr\n";
+ $row_ref = $statement->fetchrow_hashref();
+ if($debug == 1){ print "$row_ref->{starttime}\n"};
+ $title = $row_ref->{title};
+ $subtitle = $row_ref->{subtitle};
+ $recorddate = $row_ref->{starttime};
+ $description = $row_ref->{description};
+ $category = $row_ref->{category};
+ $filename = $title."-".$subtitle."-".substr $start, 0, 8;
+ $filename =~ s/ /_/g;
+ $filename =~ s/&/+/g;
+ $filename =~ s/\047//g;
+ $filename =~ s/[^+0-9a-zA-Z_-]+/_/g;
+ $filename =~ s/_$//g;
+
+ printf("Starting nuvexport...\n");
+ EncodeIt();
+ printf("Nuvexport completed, starting xml generation...\n");
+ CreateItemXML();
+ printf("XML file created for \"$filename\" : Yipeee\n");
+ printf("Cleaning up temporary files\n");
+ $cmd = "rm -f $feedpath$chanid\_$start.temp.mp4";
+ print $cmd."\n";
+ if(system($cmd)) { print "Removing nuvexport temp file failed\n"; }
+
+ # remove the cutlist incase we added it.
+ if ($cut == 1){
+ printf("Generating cutlist\n");
+ $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --clearcutlist";
+ print $cmd."\n";
+ if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; }
+ }
+ return 0;
+}
+
+#
+# Encode for Portable
+#
+sub EncodeIt {
+ # Create cutlist from commercial flagging if -cut was passed to the script
+ if ($cut == 1){
+ printf("Generating cutlist\n");
+ $cmd = "/usr/bin/mythcommflag --chanid $chanid --starttime $start --gencutlist";
+ print $cmd."\n";
+ if(system($cmd)) { print "It looks like I was not able to generate a cutlist.\n"; }
+ }
+
+ # Use nuvexport to do the work
+ $cmd = "/usr/bin/nuvexport --chanid=$chanid --start=$start $nuvoptions --filename=$chanid\_$start.temp --path=$feedpath";
+ print $cmd."\n";
+ if(system($cmd)) { print "Nuvexport encoding seems to have failed\n"; }
+
+ # Now clean up the output so iPods with firmware 1.1 and above can use it
+ $cmd = "/usr/bin/MP4Box -add $feedpath$chanid\_$start.temp.mp4 $feedpath$chanid\_$start.$portable.mp4";
+ print $cmd."\n";
+ if(system($cmd)) { print "MP4Box cleanup seems to have failed\n"; }
+ return 0;
+}
+
+#
+# Create XML with <ITEM> tag for this video file
+#
+sub CreateItemXML {
+ open(ITEM, ">$feedpath$chanid\_$start.$portable.xml");
+ print ITEM "<item>\n";
+ print ITEM "<title>".&encodeForXML($title." - ".$subtitle)."</title>\n";
+ print ITEM "<itunes:author>MythTV</itunes:author>\n";
+ print ITEM "<author>MythTV</author>\n";
+ print ITEM "<itunes:category text=\"TV Shows\"></itunes:category>\n";
+ print ITEM "<comments>".&encodeForXML($file)."</comments>\n";
+ print ITEM "<description>".&encodeForXML($description)."</description>\n";
+ print ITEM "<pubDate>".$recorddate."</pubDate>\n";
+ print ITEM "<enclosure url=\"".&encodeForXML("$feedurl$chanid\_$start.$portable.mp4")."\" type=\"video/quicktime\" />\n";
+ print ITEM "<itunes:duration></itunes:duration>\n";
+ print ITEM "<itunes:keywords>".&encodeForXML($title." - ".$subtitle." - ".$category)."</itunes:keywords>\n";
+ print ITEM "<category>".&encodeForXML($category)."</category>\n";
+ print ITEM "</item>\n";
+ print "\"$filename\" has been added to the feed.\n";
+ close(ITEM);
+ return 0;
+}
+
+#
+# Generate the RSS feed by combining the ITEM XML Files
+#
+sub GenerateRSSFeed {
+
+ open(RSS, ">$feedfile");
+ print RSS "<?php\n";
+ print RSS "header(\"Content-Type: text/xml\");\n";
+ print RSS "echo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\"; ?>\n";
+ print RSS "<rss xmlns:itunes=\"http://www.itunes.com/DTDs/Podcast-1.0.dtd\" version=\"2.0\">\n";
+ print RSS "<channel>\n";
+ print RSS "<title>MythTV - <? if (\$_GET['title'] == \"\") { \$title = \"*\"; echo \"Recorded Programs\"; }\n";
+ print RSS "else { \$title = \$_GET['title']; echo str_replace(\"_\",\" \",\$_GET['title']); } ?> </title>\n";
+ print RSS "<itunes:author>MythTV - myth2ipod</itunes:author>\n";
+ print RSS "<link>".&encodeForXML($feedurl)."</link>\n";
+ print RSS "<itunes:subtitle>Transcoded recording for your iPod Video.</itunes:subtitle>\n";
+ print RSS "<itunes:summary>Myth TV Recorded Programs for the iPod v.1</itunes:summary>\n";
+ print RSS "<description>Myth TV Recorded Programs for the iPod v.1</description>\n";
+ print RSS "<itunes:owner>\n";
+ print RSS "<itunes:name>MythTV</itunes:name>\n";
+ print RSS "<itunes:email>mythtv\@localhost</itunes:email>\n";
+ print RSS "</itunes:owner>\n";
+ print RSS "<itunes:explicit>No</itunes:explicit>\n";
+ print RSS "<language>en-us</language>\n";
+ print RSS "<copyright>Copyright 2005.</copyright>\n";
+ print RSS "<webMaster>mythtv\@localhost</webMaster>\n";
+ print RSS "<itunes:image href=\"http://myth2ipod.com/mythipod_200.jpg\" />\n";
+ print RSS "<itunes:category text=\"TV Shows\"></itunes:category>\n";
+ print RSS "<category>TV Shows</category>\n";
+ print RSS "<itunes:image href=\"http://myth2ipod.com/mythipod_200.jpg\"/>";
+ print RSS "<image>";
+ print RSS "<url>http://myth2ipod.com/mythipod_200.jpg</url>\n";
+ print RSS "<title>MythTV 2 iPod</title>\n";
+ print RSS "<link>".&encodeForXML($feedurl)."</link>\n";
+ print RSS "<width>200</width>\n";
+ print RSS "<height>200</height>\n";
+ print RSS "</image>\n";
+ print RSS "<? foreach (glob(\$title\.\"*\.$portable\.xml\") as \$file) {include \$file;} ?>\n";
+ print RSS "</channel>\n";
+ print RSS "</rss>\n";
+ close(RSS);
+ if($debug == 1){ print "I created a feed file, was I supposed to?\n"};
+
+ return 0;
+}
+
+# substitute for XML entities
+sub encodeForXML {
+ local $result;
+ $result = $_[0];
+ $result =~ s/&/&amp;/g;
+ $result =~ s/</&lt;/g;
+ $result =~ s/>/&gt;/g;
+ $result;
+}
+
+
+#
+# This code taken from one of the mythlink.sh scripts to get MySQL information
+#
+sub PrepSQLRead{
+# Get the hostname of this machine
+ $hostname = `hostname`;
+ chomp($hostname);
+
+# Read the mysql.txt file in use by MythTV.
+# could be in a couple places, so try the usual suspects
+ my $found = 0;
+ my @mysql = ('/usr/share/mythtv/mysql.txt',
+ '/usr/share/mythtv/mysql.txt',
+ '/etc/mythtv/mysql.txt',
+ '/usr/local/etc/mythtv/mysql.txt',
+ "$ENV{HOME}/.mythtv/mysql.txt",
+ 'mysql.txt'
+ );
+ foreach my $file (@mysql) {
+ next unless (-e $file);
+ $found = 1;
+ open(CONF, $file) or die "Unable to open $file: $!\n\n";
+ while (my $line = <CONF>) {
+ # Cleanup
+ next if ($line =~ /^\s*#/);
+ $line =~ s/^str //;
+ chomp($line);
+ # Split off the var=val pairs
+ my ($var, $val) = split(/\=/, $line, 2);
+ next unless ($var && $var =~ /\w/);
+ if ($var eq 'DBHostName') {
+ $db_host = $val;
+ }
+ elsif ($var eq 'DBUserName') {
+ $db_user = $val;
+ }
+ elsif ($var eq 'DBName') {
+ $db_name = $val;
+ }
+ elsif ($var eq 'DBPassword') {
+ $db_pass = $val;
+ }
+ # Hostname override
+ elsif ($var eq 'LocalHostName') {
+ $hostname = $val;
+ }
+ }
+ close CONF;
+ }
+ die "Unable to locate mysql.txt: $!\n\n" unless ($found && $db_host);
+ return 0;
+}
+
+sub promptUser {
+ local($promptString,$defaultValue) = @_;
+ if ($defaultValue) {
+ print $promptString, "[", $defaultValue, "]: ";
+ } else {
+ print $promptString, ": ";
+ }
+
+ $| = 1; # force a flush after our print
+ $_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
+ chomp;
+ if ("$defaultValue") {
+ return $_ ? $_ : $defaultValue; # return $_ if it has a value
+ } else {
+ return $_;
+ }
+}
+
+sub DoSetup {
+ print "\nNot ready yet. How do you send the cd command from perl?\n";
+ return 0;
+}
diff --git a/abs/extra/myth2ipod/myth2ipod-userjob.sh b/abs/extra/myth2ipod/myth2ipod-userjob.sh
new file mode 100755
index 0000000..9ed65b2
--- /dev/null
+++ b/abs/extra/myth2ipod/myth2ipod-userjob.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+. /etc/profile
+#su mythtv -c "TERM=vt100 /usr/bin/myth2ipod "$1" "$2" >/tmp/logfile"
+su mythtv -c "TERM=vt100 /usr/bin/myth2ipod "$1" "$2" "
+#or to also use commercial flagging cutlist
+#su mythtv -c "TERM=vt100 /usr/bin/myth2ipod -cut "$1" "$2" >/tmp/logfile"
diff --git a/abs/extra/myth2ipod/myth2ipod.install b/abs/extra/myth2ipod/myth2ipod.install
new file mode 100755
index 0000000..367d90f
--- /dev/null
+++ b/abs/extra/myth2ipod/myth2ipod.install
@@ -0,0 +1,38 @@
+
+pre_install() {
+ mkdir -p /myth/ipodfeed
+ chown mythtv:http /myth/ipodfeed
+}
+
+pre_upgrade() {
+ pre_install
+}
+
+pre_remove() {
+ pre_install
+}
+
+post_install() {
+ . /etc/systemconfig
+ ln -s /myth/ipodfeed /data/srv/httpd/htdocs/ipodfeed
+ ln -s /myth/ipodfeed/m2iweb.php /myth/ipodfeed/index.php
+ sed -i -e "s/REPLACEME/$hostname/g" /usr/bin/myth2ipod
+ chown -R mythtv:http /myth/ipodfeed
+ /usr/bin/myth2ipod -rebuild
+}
+
+post_upgrade() {
+ /usr/bin/myth2ipod -rebuild
+}
+
+post_remove() {
+ rm -fr /data/srv/httpd/htdocs/ipodfeed
+ rm -rf /myth/ipodfeed/m2iweb.php
+ rm -rf /myth/ipodfeed/index.php
+ # don't delete content that the user may still want, so leave /myth/ipodfeed
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/extra/mythappletrailers/PKGBUILD b/abs/extra/mythappletrailers/PKGBUILD
new file mode 100644
index 0000000..9c12971
--- /dev/null
+++ b/abs/extra/mythappletrailers/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=mythappletrailers
+pkgver=0.04.3
+pkgrel=35
+pkgdesc="Unofficial Add-on for MythTV to get Apple.com Movie Trailers."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.mythtv.org/wiki/index.php/Myth_Apple_Trailers"
+depends=('php' 'mythtv' 'mplayer-wrapper')
+install=mythappletrailers.install
+source=('myth_trailers_grabber' 'appletrailer.xml'
+'trailers' 'loading.sh' 'fix_aple_url.sh')
+
+build() {
+ mkdir -p $startdir/pkg/usr/bin
+ mkdir -p $startdir/pkg/etc/cron.daily
+ mkdir -p $startdir/pkg/home/mythtv/
+ mkdir -p $startdir/pkg/usr/share/mythtv/
+ cp appletrailer.xml $startdir/pkg/home/mythtv/appletrailer.xml
+ chown 1000:1000 $startdir/pkg/home/mythtv/appletrailer.xml
+ chmod 755 trailers
+ chmod 755 myth_trailers_grabber
+ chmod 755 loading.sh
+ cp myth_trailers_grabber $startdir/pkg/usr/bin/
+ cp loading.sh $startdir/pkg/usr/bin/
+ cp trailers $startdir/pkg/etc/cron.daily/
+ install -m755 $srcdir/fix_aple_url.sh $pkgdir/usr/bin
+}
diff --git a/abs/extra/mythappletrailers/appletrailer.xml b/abs/extra/mythappletrailers/appletrailer.xml
new file mode 100644
index 0000000..dc0c938
--- /dev/null
+++ b/abs/extra/mythappletrailers/appletrailer.xml
@@ -0,0 +1,722 @@
+<mythmenu name="TRAILERS">
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>2012</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/2012/2012-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>500 Days of Summer</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/500daysofsummer/500daysofsummer-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>9</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/focus_features/9/9-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Adam</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/adam/adam-tlra_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Alice In Wonderland</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/aliceinwonderland/aliceinwonderland-tsr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Aliens In the Attic</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/aliensintheattic/aliensintheattic-tlrg_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>All About Steve</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/allaboutsteve/allaboutsteve-tlrc_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Alvin and the Chipmunks: the Squeakquel</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/alvinandthechipmunks2/alvinsqueekquel-tlrd_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Amelia</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/amelia/amelia-tlra_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Amreeka</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/amreeka/amreeka_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Answer Man</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/magnolia_pictures/theanswerman/theanswerman_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Armored</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/armored/armored-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Astro Boy</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/astroboy/astroboy-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Avatar</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/avatar/avatar2009aug0820a-tsr_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Bandslam</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/bandslam/bandslam-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Beyond a Reasonable Doubt</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/beyondareasonabledoubt/beyondareasonabledoubt_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Big Fan</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/bigfan/bigfan_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Blind Side</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/theblindside/theblindside-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Blue Tooth Virgin</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/thebluetoothvirgin/thebluetoothvirgin_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Book of Eli</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/thebookofeli/thebookofeli-tlr1a_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Box</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/thebox/thebox-tlr1a_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Bright Star</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/brightstar/brightstar_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Brothers</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/brothers/brothers-tlr1a_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Burning Plain</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/magnolia_pictures/theburningplain/theburningplain_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Capitalism: a Love Story</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/capitalismalovestory/capitalismalovestory-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Carriers</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount_vantage/carriers/carriers-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Casi Divas</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/casidivas/casidivas_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Cloudy With a Chance of Meatballs</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/cloudywithachanceofmeatballs/cloudywithachance-tlr3_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Coco Before Chanel</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/cocobeforechanel/cocobeforechanel_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Cold Souls</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/samuel_goldwyn/coldsouls/coldsouls_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Collector</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/thecollector/thecollector_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Couples Retreat</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/couplesretreat/couplesretreat-tlr_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Cove</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/thecove/thecove_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Damned United</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/thedamnedunited/thedamnedunited_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Daybreakers</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/daybreakers/daybreakers-tlr1c_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Despicable Me</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/despicableme/despicableme-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>District 9</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/district9/district9-tlr4_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>An Education</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/aneducation/aneducation_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Extract</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/miramax/extract/extract-inttlr_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Fame</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/mgm/fame/fame-tlr2r_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Fantastic Mr. Fox</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/fantasticmrfox/fantasticmrfox-tlra_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Final Destination</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/newline/thefinaldestination/thefinaldestination-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Five Minutes of Heaven</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/ifc_films/fiveminutesofheaven/fiveminutesofheaven_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Funny People</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/funnypeople/funnypeople-tlr1r_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>G-Force</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/gforce/gforce-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>G.I. Joe: Rise of Cobra</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/gijoe/gijoetheriseofcobra-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Gamer</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/gamer/gamer-tlr2a_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Gentlemen Broncos</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/gentlemenbroncos/gentlemenbroncos_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Grace</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/grace/grace_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Halloween 2</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/weinstein/halloween2/halloweenii-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Hangover</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/thehangover/thehangover-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Hurt Locker</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/thehurtlocker/thehurtlocker_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>I Can Do Bad All by Myself</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/icandobadallbymyself/icandobadallbymyself-tlr2a_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>I Sell the Dead</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/ifc_films/isellthedead/isellthedead_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Ice Age: Dawn of the Dinosaurs</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/ice_age_iii/iceage3-tlrn_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>In the Loop</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/ifc_films/intheloop/intheloop_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Informant!</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/theinformant/theinformant-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Inglourious Basterds</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/weinstein/inglouriousbasterds/inglouriousbasterds-tlr4_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Invention of Lying</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/theinventionoflying/theinventionoflying-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>It Might Get Loud</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/itmightgetloud/itmightgetloud_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>It’s Complicated</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/itscomplicated/itscomplicated_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Jennifer’s Body</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/jennifersbody/jennifersbody-tlrc_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Julie Julia</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/julieandjulia/julieandjulia-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Last Airbender</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/thelastairbender/thelastairbender-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Law Abiding Citizen</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/lawabidingcitizen/lawabidingcitizen_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Legion</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/legion/legion-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Live Music</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/livemusic/livemusic_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Lorna’s Silence</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony/lornassilence/lornassilence_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Love Happens</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/lovehappens/lovehappens-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Lovely Bones</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/thelovelybones/thelovelybones_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Men Who Stare At Goats</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/overture/themenwhostareatgoats/themenwhostareatgoats_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>More Than a Game</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/morethanagame/morethanagame-tlr1a_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>My One and Only</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/myoneandonly/myoneandonly_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>New York, I Love You</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/newyorkiloveyou/newyorkiloveyou_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Night At the Museum: Battle of the Smithsonian</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox/nightatthemuseum2/nightatthemuseum2-tlro_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Nine</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/weinstein/nine/nine-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Ninja Assassin</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/ninjaassassin/ninjaassassin-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Oceans</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/oceans/oceans-tsr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Old Dogs</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/olddogs/olddogs_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Ong Bak 2</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/magnolia_pictures/ongbak2/ongbak2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Orphan</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/orphan/orphan-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Other Man</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/theotherman/theotherman_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Pandorum</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/pandorum/pandorum-tl1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Paper Heart</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/paperheart/paperheart_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Paris</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/ifc_films/paris/paris_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>A Perfect Getaway</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/universal/aperfectgetaway/aperfectgetaway_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Planet 51</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/planet51/planet51-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Play the Game</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/playthegame/playthegame_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Ponyo</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/ponyo/ponyo_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Post Grad</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/postgrad/postgrad-tlra_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Precious</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/precious/precious-tlr2a_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Princess and the Frog</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/princessandthefrog/princessandthefrog-tsr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Proposal</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/touchstone/theproposal/theproposal-tlr3_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Road</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/weinstein/theroad/theroad_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Saw VI</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/saw6/sawvi_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The September Issue</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/theseptemberissue/theseptemberissue_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Sherlock Holmes</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/sherlockholmes/sherlockholmes-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Shorts</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/shorts/shorts-tlr3_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Shrink</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/lionsgate/shrink/shrink-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Shutter Island</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/shutterisland/shutterisland-tlr1r2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Sorority Row</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/sororityrow/sororityrow-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Spread</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/spread/spread_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>St. Trinian’s</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/sttrinians/sttrinians_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Stepfather</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/thestepfather/thestepfather_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Surrogates</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/touchstone/surrogates/surrogates-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Surviving Crooked Lake</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/survivingcrookedlake/survivingcrookedlake_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Taking Woodstock</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/focus_features/takingwoodstock/takingwoodstock-tlr_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Time Traveler’s Wife</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/newline/timetravelerswife/timetravelerswife-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Toy Story 3</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/toystory3/toystory3-tsr_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Transformers: Revenge of the Fallen</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/paramount/transformers2/transformersrevengeofthefallen-tlr2r_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Twilight Saga: New Moon</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/summit/newmoon/newmoon-tsr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>The Ugly Truth</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/theuglytruth/theuglytruth-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Walt El Grupo</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/waltandelgrupo/waltandelgrupo_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Where the Wild Things Are</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/wherethewildthingsare/wtwta-tlr2_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Whip It</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/fox_searchlight/whipit/whipit_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>White On Rice</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/independent/whiteonrice/whiteonrice_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Whiteout</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/wb/whiteout/whiteout-tlr1_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>World’s Greatest Dad</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/magnolia_pictures/worldsgreatestdad/worldsgreatestdad_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>X Games 3D: the Movie</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/disney/xgames3d/xgames3d_h640w.mov</action>
+ </button>
+
+ <button>
+ <type>VIDEO_BROWSER</type>
+ <text>Zombieland</text>
+ <action>EXEC loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000 http://apple.com/movies/sony_pictures/zombieland/zombieland-tlr1_h640w.mov</action>
+ </button>
+
+</mythmenu>
diff --git a/abs/extra/mythappletrailers/fix_aple_url.sh b/abs/extra/mythappletrailers/fix_aple_url.sh
new file mode 100644
index 0000000..a08be65
--- /dev/null
+++ b/abs/extra/mythappletrailers/fix_aple_url.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cat /home/mythtv/appletrailer.xml | sed -e 's|http:/\/\movies.apple|http:\/\/apple|g' > /tmp/appletrailer.xml
+mv /tmp/appletrailer.xml /home/mythtv
diff --git a/abs/extra/mythappletrailers/loading.sh b/abs/extra/mythappletrailers/loading.sh
new file mode 100755
index 0000000..d1ef680
--- /dev/null
+++ b/abs/extra/mythappletrailers/loading.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo -e "Loading . . . " | osd_cat -p middle -s 5 -f"-adobe-courier-bold-*-*-*-34-*-*-*-*-*" -d 10 -A centre
diff --git a/abs/extra/mythappletrailers/myth_trailers_grabber b/abs/extra/mythappletrailers/myth_trailers_grabber
new file mode 100755
index 0000000..ae32e75
--- /dev/null
+++ b/abs/extra/mythappletrailers/myth_trailers_grabber
@@ -0,0 +1,214 @@
+<?php
+/**
+ * Copyright (C) 2007 Ben Leto <undertoe@chemlab.org>
+ *
+ * Description: Apple Trailer Grabber for mythtv
+ *
+ * Version 0.4.3
+ *
+ * Apple Trailer Grabber is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Apple Trailer Grabber is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Usage: read the INSTALL file
+ * Setup as a cron script to run as frequently as you want
+ *
+ *
+ */
+
+/************************************************************************/
+// CONFIGURATION
+
+// command to use when streaming content from the internet - cache 50% before displaying and use 32MB of memory
+$STREAMING_EXEC_CMD = 'loading.sh &amp;&amp; mplayer-wrapper.pl -fs -zoom -really-quiet -user-agent "QuickTime/7.6.2" -cache 16000';
+$APPLE_FEED = 'http://www.apple.com/trailers/home/xml/current.xml';
+/************************************************************************/
+// Shouldn't Need To modify anything beyond here
+
+
+define("PLAYERCMD", $STREAMING_EXEC_CMD);
+define("XMLFEED", $APPLE_FEED);
+
+/************************************************************************/
+
+init_main();
+
+// Function: returns null | init_main ()
+// Description: Outputs Apple Trailer XML feed to watchable movie urls in MythTV menu XML format
+function init_main()
+{
+
+ print "<mythmenu name=\"TRAILERS\">\n";
+
+ if(valid_url(XMLFEED)){
+
+ // Gather Array of Current Movie Trailers
+ //XML Data
+ $xml_data = url_to_string(XMLFEED);
+ //Creating Instance of the Class
+ $xmlObj = new XmlToArray($xml_data);
+ $arrayData = $xmlObj->createArray();
+
+ foreach($arrayData['records']['movieinfo'] as $Row){
+
+ $MovieTitle = $Row['info'][0]['title'];
+ $MovieLink = $Row['preview'][0]['large'];
+ $VideoPlayCMD = PLAYERCMD . ' ' . $MovieLink;
+
+ if(!valid_url($MovieLink)){
+ $MovieTitle = $MovieTitle . '*VIDEO ERROR*';
+ $VideoPlayCMD = '';
+ }
+
+ print "\t<button>\n";
+ print "\t\t<type>VIDEO_BROWSER</type>\n";
+ $MovieTitle = preg_replace('/ & /', ' &amp; ', $MovieTitle);
+ print "\t\t<text>$MovieTitle</text>\n";
+ print "\t\t<action>EXEC $VideoPlayCMD</action>\n";
+ print "\t</button>\n\n";
+
+ }
+ }else{
+ print "\t<button>\n";
+ print "\t\t<type>VIDEO_BROWSER</type>\n";
+ print "\t\t<text>Error Grabbing XML Feed</text>\n";
+ print "\t\t<action></action>\n";
+ print "\t</button>\n\n";
+ }
+
+ print "</mythmenu>\n";
+
+
+
+}
+
+
+// Function: returns boolean | valid_url ( var | url to check)
+// Description: Checks to see if a url is a valid page
+function valid_url($str)
+{
+ if(@fopen($str, "r")) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+// Function: returns string | all elements of XML ( var | url to feed)
+// Description: Converts each element in an XML feed to single line string
+// Notes: must have 'allow_url_fopen = On' in php.ini
+function url_to_string($url){
+ $lines = file($url);
+ foreach ($lines as $line) {
+ $lineR = trim($line);
+ }
+ $lineR = eregi_replace("<" . "large" . "[^>]*>", "<large>", $lineR); //hack for apple goofy xml
+ return $lineR;
+}
+
+// Class: returns (~) x array | elements of XML ( var | XML in string)
+// Description: Converts each element in an XML feed to an Array
+class XmlToArray
+{
+
+ var $xml='';
+
+ /**
+ * Default Constructor
+ * @param $xml = xml data
+ * @return none
+ */
+
+ function XmlToArray($xml)
+ {
+ $this->xml = $xml;
+ }
+
+ /**
+ * _struct_to_array($values, &$i)
+ *
+ * This is adds the contents of the return xml into the array for easier processing.
+ * Recursive, Static
+ *
+ * @access private
+ * @param array $values this is the xml data in an array
+ * @param int $i this is the current location in the array
+ * @return Array
+ */
+
+ function _struct_to_array($values, &$i)
+ {
+ $child = array();
+ if (isset($values[$i]['value'])) array_push($child, $values[$i]['value']);
+
+ while ($i++ < count($values)) {
+ switch ($values[$i]['type']) {
+ case 'cdata':
+ array_push($child, $values[$i]['value']);
+ break;
+
+ case 'complete':
+ $name = $values[$i]['tag'];
+ if(!empty($name)){
+ $child[$name]= ($values[$i]['value'])?($values[$i]['value']):'';
+ if(isset($values[$i]['attributes'])) {
+ $child[$name] = $values[$i]['attributes'];
+ }
+ }
+ break;
+
+ case 'open':
+ $name = $values[$i]['tag'];
+ $size = isset($child[$name]) ? sizeof($child[$name]) : 0;
+ $child[$name][$size] = $this->_struct_to_array($values, $i);
+ break;
+
+ case 'close':
+ return $child;
+ break;
+ }
+ }
+ return $child;
+ }//_struct_to_array
+
+ /**
+ * createArray($data)
+ *
+ * This is adds the contents of the return xml into the array for easier processing.
+ *
+ * @access public
+ * @param string $data this is the string of the xml data
+ * @return Array
+ */
+ function createArray()
+ {
+ $xml = $this->xml;
+ $values = array();
+ $index = array();
+ $array = array();
+ $parser = xml_parser_create();
+ xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
+ xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
+ xml_parse_into_struct($parser, $xml, $values, $index);
+ xml_parser_free($parser);
+ $i = 0;
+ $name = $values[$i]['tag'];
+ $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';
+ $array[$name] = $this->_struct_to_array($values, $i);
+ return $array;
+ }
+
+
+}
+
+?>
diff --git a/abs/extra/mythappletrailers/mythappletrailers.install b/abs/extra/mythappletrailers/mythappletrailers.install
new file mode 100644
index 0000000..0f6d8fa
--- /dev/null
+++ b/abs/extra/mythappletrailers/mythappletrailers.install
@@ -0,0 +1,37 @@
+# arg 1: the new package version
+post_install() {
+ ln -s /home/mythtv/appletrailer.xml /usr/share/mythtv/appletrailer.xml
+ mv /usr/share/mythtv/is.xml /tmp
+ grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp
+ echo "<!--#MythAppleTrailers-->" >> /tmp/is.xml.tmp
+ echo " <button>" >> /tmp/is.xml.tmp
+ echo " <type>STREAM</type>" >> /tmp/is.xml.tmp
+ echo " <text>Apple Trailers</text>" >> /tmp/is.xml.tmp
+ echo " <action>MENU appletrailer.xml</action>" >> /tmp/is.xml.tmp
+ echo " </button>" >> /tmp/is.xml.tmp
+ echo "<!--#MythAppleTrailers-->" >> /tmp/is.xml.tmp
+ echo "" >> /tmp/is.xml.tmp
+ echo "</mythmenu>" >> /tmp/is.xml.tmp
+ mv /tmp/is.xml.tmp /usr/share/mythtv/is.xml
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if [ -e /usr/share/mythtv/appletrailer.xml ]
+ then
+ exit
+ else
+ ln -s /home/mythtv/appletrailer.xml /usr/share/mythtv/appletrailer.xml
+ fi
+}
+
+# arg 1: the old package version
+post_remove() {
+ rm -fr /usr/share/mythtv/appletrailer.xml
+ mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
+ sed -e '/\#MythAp/,/\#MythAp/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/mythappletrailers/trailers b/abs/extra/mythappletrailers/trailers
new file mode 100755
index 0000000..241a60a
--- /dev/null
+++ b/abs/extra/mythappletrailers/trailers
@@ -0,0 +1,2 @@
+#!/bin/sh
+su mythtv -c '/usr/bin/php -q /usr/bin/myth_trailers_grabber > /home/mythtv/appletrailer.xml && /usr/bin/fix_aple_url.sh' 2>/dev/null
diff --git a/abs/extra/mythexport/PKGBUILD b/abs/extra/mythexport/PKGBUILD
new file mode 100644
index 0000000..3cd04f3
--- /dev/null
+++ b/abs/extra/mythexport/PKGBUILD
@@ -0,0 +1,17 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=mythexport
+pkgver=2.0.71
+pkgrel=5
+pkgdesc="Script to export recordings for portable devices."
+arch=('i686' 'x86_64')
+license=('GPL3')
+depends=('atomicparsley' 'perl-config-simple' 'perl-net-upnp' 'perl-proc-daemon' 'perl-proc-pid-file')
+url="http://linhes.org/"
+source=(ftp://ftp.knoppmyth.net/R6/sources/mythexport.tar.bz2)
+install=mythexport.install
+
+build() {
+ cp -a mythexport/* $startdir/pkg
+}
diff --git a/abs/extra/mythexport/mythexport.install b/abs/extra/mythexport/mythexport.install
new file mode 100644
index 0000000..edd60f5
--- /dev/null
+++ b/abs/extra/mythexport/mythexport.install
@@ -0,0 +1,10 @@
+# arg 1: the new package version
+post_install() {
+ mysql -u root mythconverg < /usr/share/mythtv/mythexport.sql
+ ln -s /usr/share/mythtv/mythexport /data/srv/httpd/htdocs/
+ ln -s /myth/archive /usr/share/mythtv/mythexport/video
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/mythfeed/PKGBUILD b/abs/extra/mythfeed/PKGBUILD
new file mode 100644
index 0000000..9f634df
--- /dev/null
+++ b/abs/extra/mythfeed/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=mythfeed
+pkgver=0.06c
+pkgrel=1
+pkgdesc="Unofficial MythTV plugin to allow selection of internet flash media sources"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.mythfeed.sourceforge.net"
+depends=('mythtv' 'firefox' 'flashplugin' 'python')
+makedepends=('qt')
+install=mythfeed.install
+source=('http://softlayer.dl.sourceforge.net/project/mythfeed/mythfeed/0.06c/mythfeed.06c.tar.gz')
+
+build() {
+ mkdir -p $startdir/pkg/usr/bin
+ mkdir -p $startdir/pkg/etc/cron.daily
+ mkdir -p $startdir/pkg/home/mythtv/
+ mkdir -p $startdir/pkg/usr/share/mythtv/
+ cp trailers $startdir/pkg/etc/cron.daily/
+}
diff --git a/abs/extra/mythfeed/mythfeed.install b/abs/extra/mythfeed/mythfeed.install
new file mode 100644
index 0000000..0f6d8fa
--- /dev/null
+++ b/abs/extra/mythfeed/mythfeed.install
@@ -0,0 +1,37 @@
+# arg 1: the new package version
+post_install() {
+ ln -s /home/mythtv/appletrailer.xml /usr/share/mythtv/appletrailer.xml
+ mv /usr/share/mythtv/is.xml /tmp
+ grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp
+ echo "<!--#MythAppleTrailers-->" >> /tmp/is.xml.tmp
+ echo " <button>" >> /tmp/is.xml.tmp
+ echo " <type>STREAM</type>" >> /tmp/is.xml.tmp
+ echo " <text>Apple Trailers</text>" >> /tmp/is.xml.tmp
+ echo " <action>MENU appletrailer.xml</action>" >> /tmp/is.xml.tmp
+ echo " </button>" >> /tmp/is.xml.tmp
+ echo "<!--#MythAppleTrailers-->" >> /tmp/is.xml.tmp
+ echo "" >> /tmp/is.xml.tmp
+ echo "</mythmenu>" >> /tmp/is.xml.tmp
+ mv /tmp/is.xml.tmp /usr/share/mythtv/is.xml
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if [ -e /usr/share/mythtv/appletrailer.xml ]
+ then
+ exit
+ else
+ ln -s /home/mythtv/appletrailer.xml /usr/share/mythtv/appletrailer.xml
+ fi
+}
+
+# arg 1: the old package version
+post_remove() {
+ rm -fr /usr/share/mythtv/appletrailer.xml
+ mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
+ sed -e '/\#MythAp/,/\#MythAp/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/mythnuv2mkv/PKGBUILD b/abs/extra/mythnuv2mkv/PKGBUILD
new file mode 100644
index 0000000..9a61d9a
--- /dev/null
+++ b/abs/extra/mythnuv2mkv/PKGBUILD
@@ -0,0 +1,16 @@
+pkgname=mythnuv2mkv
+pkgver=1.53
+pkgrel=1
+conflicts=()
+pkgdesc="Converts MythTV nuv or mpg files to mkv, mp4 or avi files. It can be run as a MythTV User Job or at command line to convert MythTV recordings or stand alone files."
+depends=(perl mplayer wget bc imagemagick lame x264 faac faad2 mkvtoolnix vorbis-tools gpac )
+arch=('i686')
+license=('GPL')
+source=(http://web.aanet.com.au/~auric/files2/V${pkgver}/mythnuv2mkv.sh)
+
+install=''
+build() {
+ mkdir -p $startdir/pkg/usr/bin
+ install -m 0755 mythnuv2mkv.sh $startdir/pkg/usr/bin/mythnuv2mkv.sh
+}
+
diff --git a/abs/extra/mythvodka/PKGBUILD b/abs/extra/mythvodka/PKGBUILD
new file mode 100644
index 0000000..0832093
--- /dev/null
+++ b/abs/extra/mythvodka/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=mythvodka
+pkgver=0.7
+pkgrel=11
+pkgdesc="MythVodka (Video On Demand Killer App) is a plugin for MythTV allowing streaming of BBC iPlayer, Hulu, HTTP and NZB content."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://code.google.com/p/mythvodka/"
+depends=('rtmpdump' 'perl-xml-dom' 'beautiful-soup')
+install=mythvodka.install
+source=('http://mythvodka.googlecode.com/files/mythvodka.07.tar.gz' 'mythvodka.diff' 'hulu_grabber.sh' 'http://ftp.knoppmyth/R6/sources/huludata.tar.bz2')
+
+build() {
+ patch -p0 < mythvodka.diff
+ cd $startdir/src/mythvodka/mythvodka
+ rm -fr Makefile
+ qmake mythvodka.pro
+ make
+ mkdir -p $startdir/pkg/usr/lib/mythtv/plugins/
+ cp libmythvodka.so $startdir/pkg/usr/lib/mythtv/plugins/
+ strip --strip-unneeded $startdir/pkg/usr/lib/mythtv/plugins/libmythvodka.so
+ mkdir -p $startdir/pkg/usr/share/mythtv/themes/default/
+ cp streams-ui.xml $startdir/pkg/usr/share/mythtv/themes/default/
+ mkdir -p $startdir/pkg/usr/share/mythtv/themes/default-wide/
+ cp theme-wide/streams-ui.xml $startdir/pkg/usr/share/mythtv/themes/default-wide/
+ mkdir -p $startdir/pkg/usr/local/bin
+ chmod a+x ../scripts/*
+ cp -p ../scripts/* $startdir/pkg/usr/local/bin
+ mkdir -p $startdir/pkg/etc/cron.daily/
+ chmod 755 ../../hulu_grabber.sh
+ cp ../../hulu_grabber.sh $startdir/pkg/etc/cron.daily/
+ mkdir -p $startdir/pkg/var/tmp
+ cp $startdir/src/huludata.xml $startdir/pkg/var/tmp
+}
diff --git a/abs/extra/mythvodka/hulu_grabber.sh b/abs/extra/mythvodka/hulu_grabber.sh
new file mode 100755
index 0000000..4840dc0
--- /dev/null
+++ b/abs/extra/mythvodka/hulu_grabber.sh
@@ -0,0 +1,16 @@
+#! /bin/bash
+log=/var/log/mythtv/hulu_grabber.log
+out=/var/tmp/huludata.xml
+rm -f $log
+echo "Start on `date`" >>$log 2>&1
+/usr/local/bin/gethulu.pl $out.new >>$log 2>&1
+stat=$?
+if [ $stat -ne 0 ]; then
+ echo "Bad status $stat from gethulu.pl" >>$log 2>&1
+ exit 1
+fi
+rm -f $out.old
+mv $out $out.old
+mv $out.new $out
+echo "Done on `date`" >>$log 2>&1
+ls -lh $out >>$log 2>&1
diff --git a/abs/extra/mythvodka/mythvodka.diff b/abs/extra/mythvodka/mythvodka.diff
new file mode 100644
index 0000000..5735a42
--- /dev/null
+++ b/abs/extra/mythvodka/mythvodka.diff
@@ -0,0 +1,3933 @@
+diff -ruaN mythvodka.orig/mythvodka/streamsui.cpp mythvodka/mythvodka/streamsui.cpp
+--- mythvodka.orig/mythvodka/streamsui.cpp 2009-01-06 00:18:35.000000000 +0000
++++ mythvodka/mythvodka/streamsui.cpp 2009-02-12 07:28:31.000000000 +0000
+@@ -646,7 +646,7 @@
+
+ MythProgressDialog *buffer_progress;
+ buffer_progress = new MythProgressDialog(
+- QObject::tr("If she kicks you in the balls, you have the ability and the right..."), bufferSize, true, this, SLOT(cancelPressed()));
++ QObject::tr("Buffering... Just a moment please."), bufferSize, true, this, SLOT(cancelPressed()));
+
+ QFile file(filename);
+
+@@ -729,7 +729,7 @@
+
+ MythProgressDialog *buffer_progress;
+ buffer_progress = new MythProgressDialog(
+- QObject::tr("Nascar Sucks / Hillary For President / Man Love Rules Ok"), bufferSize, true, this, SLOT(cancelPressed()));
++ QObject::tr("Your video is being loaded..."), bufferSize, true, this, SLOT(cancelPressed()));
+
+ QFile file(filename);
+
+@@ -822,7 +822,7 @@
+
+ MythProgressDialog *buffer_progress;
+ buffer_progress = new MythProgressDialog(
+- QObject::tr("RING RING... I FUCKED YOUR GRANDDAUGHTER"), bufferSizemov, true, this, SLOT(cancelPressed()));
++ QObject::tr("We seem to have hit some sort of problem..."), bufferSizemov, true, this, SLOT(cancelPressed()));
+
+ QFile filemov(filenamemov);
+
+diff -ruaN mythvodka.orig/scripts/get_iplayer mythvodka/scripts/get_iplayer
+--- mythvodka.orig/scripts/get_iplayer 2009-01-06 19:11:24.000000000 +0000
++++ mythvodka/scripts/get_iplayer 2009-02-12 07:27:44.000000000 +0000
+@@ -3,16 +3,17 @@
+ # get_iplayer
+ #
+ # Lists and downloads BBC iPlayer audio and video streams
+-#
++# + Downloads ITVplayer Catch-Up video streams
++#
+ # Author: Phil Lewis
+ # Email: iplayer (at sign) linuxcentre.net
+ # Web: http://linuxcentre.net/iplayer
+ # License: GPLv3 (see LICENSE.txt)
+ #
+ # Other credits:
+-# RTMP additions: Andrej Stepanchuk
++# RTMP additions: Andrej Stepanchuk
+ #
+-my $version = 1.04;
++my $version = 1.17;
+ #
+ # Help:
+ # ./get_iplayer --help
+@@ -29,13 +30,16 @@
+ # * Index/Download live radio streams w/schedule feeds to assist timing
+ # * Podcasts for 'local' stations are missing (only a handful). They use a number of different station ids which will involve reading html to determine rss feed.
+ # * Remove all rtsp/mplayer/lame/tee dross when realaudio streams become obselete (not quite yet)
+-# * Cope with radio via rtmp
+ # * Stdout mode with rtmp
+-#
++# * Do subtitle downloading after programme download so that rtmp auth doesn't timeout
++
+ # Known Issues:
+ # * In ActivePerl/windows downloaded iPhone video files do not get renamed (remain with .partial.mov)
+ # * vlc does not quit after downloading an rtsp N95 video stream (ctrl-c is required) - need a --play-and-quit option if such a thing exists
+-# * flv conversions from rtmp downloads aren't quite right yet. A/V sync issues?
++# * rtmpdump (v1.2) of flashaudio fails at end of stream => non-zero exit code
++# * if ffmpeg trys to convert flv to mp3 it succeeds but => non-zero exit code
++# * Some rtmpdump downloads always give a non-zero exit code regardless of success (using a min-filesize workaround for now)
++# * resuming a flashaudio download fails
+
+ use Env qw[@PATH];
+ use Fcntl;
+@@ -62,10 +66,17 @@
+ my %opt_cmdline = (); # a hash of which options came from the cmdline rather than the options files
+ my %opt_file = (); # a hash of which options came from the options files rather than the cmdline
+
+-# Print to STDERR if not quiet unless verbose or debug
++# Print to STDERR/STDOUT if not quiet unless verbose or debug
+ sub logger(@) {
+ # Make sure quiet can be overridden by verbose and debug options
+- print STDERR $_[0] if (! $opt{quiet}) || $opt{verbose} || $opt{debug};
++ if ( $opt{verbose} || $opt{debug} || ! $opt{quiet} ) {
++ # Only send messages to STDERR if pvr or stdout options are being used.
++ if ( $opt{stdout} || $opt{pvr} || $opt{stderr} ) {
++ print STDERR $_[0];
++ } else {
++ print STDOUT $_[0];
++ }
++ }
+ }
+
+ sub usage {
+@@ -74,7 +85,7 @@
+ Search Programmes: get_iplayer [<search options>] [<regex|index|pid|pidurl> ...]
+ Download files: get_iplayer --get [<search options>] <regex|index|pid|pidurl> ...
+ get_iplayer --pid <pid|pidurl> [<options>]
+-Stream Downloads: get_iplayer --stdout [<options>] <regex|index|pid|pidurl> | mplayer -cache 2048 -
++Stream Downloads: get_iplayer --stdout [<options>] <regex|index|pid|pidurl> | mplayer -cache 3072 -
+ Update get_iplayer: get_iplayer --update
+
+ Search Options:
+@@ -83,9 +94,10 @@
+ --channel <regex> Narrow search to matched channel(s)
+ --category <regex> Narrow search to matched categories
+ --versions <regex> Narrow search to matched programme version(s)
++ --exclude <regex> Narrow search to exclude matched programme names
+ --exclude-channel <regex> Narrow search to exclude matched channel(s)
+ --exclude-category <regex> Narrow search to exclude matched catogories
+- --type <radio|tv|podcast|all> Only search in these types of programmes (tv is default)
++ --type <type> Only search in these types of programmes: radio, tv, podcast, all, itv (tv is default)
+ --since <hours> Limit search to programmes added to the cache in the last N hours
+
+ Display Options:
+@@ -95,26 +107,25 @@
+ -i, --info Show full programme metadata (only if number of matches < 50)
+ --list <categories|channel> Show a list of available categories/channels for the selected type and exit
+ --hide Hide previously downloaded programmes
++ --streaminfo Returns all of the media stream urls of the programme(s)
+
+ Download Options:
+ -g, --get Download matching programmes
+ -x, --stdout Additionally stream to STDOUT (so you can pipe output to a player)
+ -p, --proxy <url> Web proxy URL spec
+ --partial-proxy Works around for some broken web proxies (try this extra option if your proxy fails)
+- --pid <pid|url> Download an arbitrary pid that does not appear in the index
++ --pid <pid|url> Download an arbitrary pid that does not appear in the index (itv:<pid> for itv programmes)
+ --force-download Ignore download history (unsets --hide option also)
+- --realaudio Use the RealAudio radio stream and not the MP3 stream
+- --mp3audio Use the MP3 radio stream for radio and dont fallback to the RealAudio stream
++ --amode <mode>,<mode>,... Audio Download mode(s): iphone,flashaudio,realaudio (default: iphone,flashaudio,realaudio)
++ --vmode <mode>,<mode>,... Video Download mode(s): iphone,rtmp,flashhigh,flashnormal,flashwii,n95_wifi (default: iphone,flashhigh,flashnormal)
+ --wav In radio realaudio mode output as wav and don't transcode to mp3
+- --raw In radio/realaudio or iPhone/video mode don't transcode or change the downloaded stream in any way
+- --n95 In TV mode download/stream low quality Nokia N95 H.264 stream (alpha)
+- --rtmp In TV mode download/stream high quality flash stream (alpha)
++ --raw Don't transcode or change the downloaded stream in any way (i.e. radio/realaudio, rtmp/flv, iphone/mov)
+ --bandwidth In radio realaudio mode specify the link bandwidth in bps for rtsp streaming (default 512000)
+ --subtitles In TV mode, download subtitles into srt/SubRip format if available
+ --suboffset <offset> Offset the subtitle timestamps by the specified number of milliseconds
+ --version-list <versions> Override the version of programme to download (e.g. '--version-list signed,default')
+ -t, --test Test only - no download (will show programme type)
+-
++
+ PVR Options:
+ --pvr Runs the PVR download using all saved PVR searches (intended to be run every hour from cron etc)
+ --pvradd <search name> Add the current search terms to the named PVR search
+@@ -139,18 +150,18 @@
+ -f, --flush, --refresh Refresh cache
+ -e, --expiry <secs> Cache expiry in seconds (default 4hrs)
+ --symlink <file> Create symlink to <file> once we have the header of the download
+- --fxd <file> Create Freevo FXD XML in specified file
+- --mythtv <file> Create Mythtv streams XML in specified file
++ --fxd <file> Create Freevo FXD XML of matching programmes in specified file
++ --mythtv <file> Create Mythtv streams XML of matching programmes in specified file
+ --xml-channels Create freevo/Mythtv menu of channels -> programme names -> episodes
+ --xml-names Create freevo/Mythtv menu of programme names -> episodes
+ --xml-alpha Create freevo/Mythtv menu sorted alphabetically by programme name
+- --html <file> Create basic HTML index of programmes in specified file
++ --html <file> Create basic HTML index of matching programmes in specified file
+ --mplayer <path> Location of mplayer binary
++ --ffmpeg <path> Location of ffmpeg binary
+ --lame <path> Location of lame binary
+ --id3v2 <path> Location of id3v2 binary
+ --rtmpdump <path> Location of rtmpdump binary
+- --vlc <path> Location of vlc binary
+- --streaminfo Returns all of the media stream urls of the programme(s)
++ --vlc <path> Location of vlc or cvlc binary
+ -v, --verbose Verbose
+ -u, --update Update get_iplayer if a newer one exists
+ -h, --help Help
+@@ -192,14 +203,17 @@
+ Getopt::Long::Configure ("bundling");
+ # cmdline opts take precedence
+ GetOptions(
++ "amode=s" => \$opt_cmdline{amode},
+ "bandwidth=n" => \$opt_cmdline{bandwidth},
+ "category=s" => \$opt_cmdline{category},
+ "channel=s" => \$opt_cmdline{channel},
+ "c|command=s" => \$opt_cmdline{command},
+ "debug" => \$opt_cmdline{debug},
++ "exclude=s" => \$opt_cmdline{exclude},
+ "exclude-category=s" => \$opt_cmdline{excludecategory},
+ "exclude-channel=s" => \$opt_cmdline{excludechannel},
+ "expiry|e=n" => \$opt_cmdline{expiry},
++ "ffmpeg=s" => \$opt_cmdline{ffmpeg},
+ "file-prefix|fileprefix=s" => \$opt_cmdline{fileprefix},
+ "flush|refresh|f" => \$opt_cmdline{flush},
+ "force-download" => \$opt_cmdline{forcedownload},
+@@ -238,7 +252,7 @@
+ "rtmpdump=s" => \$opt_cmdline{rtmpdump},
+ "save" => \$save,
+ "since=n" => \$opt_cmdline{since},
+- "stdout|stream|x" => \$opt_cmdline{stdout},
++ "stdout|x" => \$opt_cmdline{stdout},
+ "streaminfo" => \$opt_cmdline{streaminfo},
+ "subdirs|subdir|s" => \$opt_cmdline{subdir},
+ "suboffset=n" => \$opt_cmdline{suboffset},
+@@ -253,6 +267,7 @@
+ "versions=s" => \$opt_cmdline{versions},
+ "verbose|v" => \$opt_cmdline{verbose},
+ "vlc=s" => \$opt_cmdline{vlc},
++ "vmode=s" => \$opt_cmdline{vmode},
+ "wav" => \$opt_cmdline{wav},
+ "whitespace|ws|w" => \$opt_cmdline{whitespace},
+ "xml-channels|fxd-channels" => \$opt_cmdline{xmlchannels},
+@@ -269,7 +284,7 @@
+ save_options_file( $optfile ) if $save;
+
+
+-# Global vars
++### Global vars ###
+
+ # Programme data structure
+ # $prog{$pid} = {
+@@ -283,7 +298,7 @@
+ # 'thumbnail' => <programme thumbnail url>
+ # 'channel => <channel>
+ # 'categories' => <Comma separated list of categories>
+-# 'type' => <Type: tv, radio or podcast>
++# 'type' => <Type: tv, radio, itv or podcast>
+ # 'timeadded' => <timestamp when programme was added to cache>
+ # 'longname' => <Long name (only parsed in stage 1 download)>,
+ # 'version' => <selected version e.g default, signed, etc - only set before d/load>
+@@ -292,11 +307,35 @@
+ # 'fileprefix' => <Filename Prefix of saved file - set only while downloading>
+ # 'ext' => <Filename Extension of saved file - set only while downloading>
+ #};
++
++# Define cache file format
++my @cache_format = qw/index type name pid available episode versions duration desc channel categories thumbnail timeadded guidance/;
++
++# List of all types
++my @all_prog_types = qw/ tv radio podcast itv /;
++
++# Ranges of numbers used in the indicies for each programme type
++my %index_range;
++$index_range{tv}{min} = 1;
++$index_range{tv}{max} = 9999;
++$index_range{radio}{min} = 10001;
++$index_range{radio}{max} = 19999;
++$index_range{podcast}{min} = 20001;
++$index_range{podcast}{max} = 29999;
++$index_range{itv}{min} = 100001;
++$index_range{itv}{max} = 199999;
++# Set maximun index number
++my $max_index;
++for (@all_prog_types) {
++ $max_index = $index_range{$_}{max} if $index_range{$_}{max} > $max_index;
++}
+ my %prog;
++my %type;
+ my %pids_history;
+ my %index_pid; # Hash to obtain pid given an index
+ my $now;
+ my $childpid;
++my $min_download_size = 1000000;
+
+ # Static URLs
+ my $channel_feed_url = 'http://feeds.bbc.co.uk/iplayer'; # /$channel/list/limit/400
+@@ -396,6 +435,18 @@
+ 'bbc_radio_jersey' => 'radio|BBC Jersey',
+ };
+
++$channels{itv} = {
++ 'crime' => 'itv|TV Classics Crime Drama',
++ 'perioddrama' => 'itv|TV Classics Period Drama',
++ 'familydrama' => 'itv|TV Classics Family Drama',
++ 'documentary' => 'itv|TV Classics Documentaries',
++ 'comedy' => 'itv|TV Classics Comedy',
++ 'kids' => 'itv|TV Classics Children\'s TV',
++ 'soaps' => 'itv|TV Classics Soaps',
++ '/' => 'itv|TV Classics',
++};
++
++
+ # User Agents
+ my %user_agent = (
+ coremedia => 'Apple iPhone v1.1.1 CoreMedia v1.0.0.3A110a',
+@@ -410,6 +461,7 @@
+
+ # Other Non-option dependant vars
+ my %cachefile = (
++ 'itv' => "${profile_dir}/itv.cache",
+ 'tv' => "${profile_dir}/tv.cache",
+ 'radio' => "${profile_dir}/radio.cache",
+ 'podcast' => "${profile_dir}/podcast.cache",
+@@ -430,6 +482,7 @@
+ my $mplayer;
+ #my $mencoder;
+ my $ffmpeg;
++my $ffmpeg_opts;
+ my $rtmpdump;
+ my $mplayer_opts;
+ my $lame;
+@@ -480,7 +533,7 @@
+ # Display default options
+ display_default_options();
+ # For each PVR search
+- for my $name ( sort {$a <=> $b} keys %pvrsearches ) {
++ for my $name ( sort {lc $a cmp lc $b} keys %pvrsearches ) {
+ # Ignore if this search is disabled
+ if ( $pvrsearches{$name}{disable} ) {
+ logger "\nSkipping disabled PVR Search '$name'\n" if $opt{verbose};
+@@ -519,27 +572,29 @@
+ # Option dependant vars
+ %download_dir = (
+ 'tv' => $opt{outputtv} || $opt{output} || $ENV{IPLAYER_OUTDIR} || '.',
++ 'itv' => $opt{outputtv} || $opt{output} || $ENV{IPLAYER_OUTDIR} || '.',
+ 'radio' => $opt{outputradio} || $opt{output} || $ENV{IPLAYER_OUTDIR} || '.',
+ 'podcast' => $opt{outputpodcast} || $opt{output} || $ENV{IPLAYER_OUTDIR} || '.',
+ );
+- # Default to type=tv
+- $opt{type} = 'tv' if ! $opt{type};
+- # Expand 'all' to various prog types
+- $opt{type} = 'tv,radio,podcast' if $opt{type} =~ /(all|any)/i;
++
+ # Ensure lowercase
+- $opt{type} = lc( $opt{type} );
++ $opt{type} = lc( $opt{type} );
++ # Expand 'all' to comma separated list all prog types
++ $opt{type} = join(',', @all_prog_types) if $opt{type} =~ /(all|any)/i;
++ # Hash to store specified prog types
++ %type = ();
++ $type{$_} = 1 for split /,/, $opt{type};
++ # Default to type=tv if no type option is set
++ $type{tv} = 1 if keys %type == 0;
+ $cache_secs = $opt{expiry} || 14400;
+ $mplayer = $opt{mplayer} || 'mplayer';
+ $mplayer_opts = '-nolirc';
+ $mplayer_opts .= ' -really-quiet' if $opt{quiet};
+- # Assume mencoder/ffmpeg is in the same path as mplayer
+-# $mencoder = $mplayer;
+-# $mencoder =~ s|^(.*?)mplayer|$1mencoder|g;
+- $ffmpeg = $mplayer;
+- $ffmpeg =~ s|^(.*?)mplayer|$1ffmpeg|g;
++ $ffmpeg = $opt{ffmpeg} || 'ffmpeg';
++ $ffmpeg_opts = '';
+ $lame = $opt{lame} || 'lame';
+- $lame_opts = '-f ';
+- $lame_opts .= '--quiet ' if $opt{quiet};
++ $lame_opts = '-f';
++ $lame_opts .= ' --quiet ' if $opt{quiet};
+ $vlc = $opt{vlc} || 'cvlc';
+ $vlc_opts = '-vv';
+ $id3v2 = $opt{id3v2} || 'id3v2';
+@@ -562,11 +617,11 @@
+ exit 1;
+ }
+
+- # Disable rtmp mode if rtmpdump does not exist
+- if ( $opt{rtmp} && ! exists_in_path($rtmpdump)) {
+- logger "\nERROR: Required program $rtmpdump does not exist (see http://linuxcentre.net/getiplayer/installation and http://linuxcentre.net/getiplayer/download), falling back to iphone mode\n";
+- delete $opt{rtmp};
+- }
++ # Backward compatability options - to be removed eventually
++ $opt{vmode} = 'rtmp' if $opt{rtmp};
++ $opt{vmode} = 'n95_wifi' if $opt{n95};
++ $opt{amode} = 'realaudio' if $opt{realaudio};
++ $opt{amode} = 'iphone' if $opt{mp3audio};
+
+ # Web proxy
+ $proxy_url = $opt{proxy} || $ENV{HTTP_PROXY} || $ENV{http_proxy} || '';
+@@ -585,8 +640,21 @@
+ }
+ }
+
+- # Get arbitrary pid
++ # Get prog by arbitrary pid (then exit)
+ if ( $opt{pid} ) {
++
++ # Temporary hack to get 'ITV Catch-up' downloads specified as --pid itv:<pid>
++ $type{itv} = 1 if $opt{pid} =~ m{^itv:(.+?)$};
++ if ( $type{itv} ) {
++ exit 1 if ( ! $opt{streaminfo} ) && check_download_history( $opt{pid} );
++ # Remove leading itv: tag (backwards compat)
++ $opt{pid} =~ s/^itv:(.+?)$/$1/ig;
++ # Force prog type to itv
++ $prog{$opt{pid}}{type} = 'itv';
++ download_programme( $opt{pid} );
++ exit 0;
++ }
++
+ # Remove any url parts from the pid
+ $opt{pid} =~ s/^.*(b0[a-z,0-9]{6}).*$/$1/g;
+ # Retry loop
+@@ -594,21 +662,29 @@
+ my $retries = 3;
+ my $retcode;
+ exit 1 if ( ! $opt{streaminfo} ) && check_download_history( $opt{pid} );
+- while ( $count < $retries && ($retcode = download_programme( $opt{pid} )) eq 'retry' ) {
+- logger "WARNING: Retrying download for PID $opt{pid}\n";
+- $count++;
++ for ($count = 1; $count <= $retries; $count++) {
++ $retcode = download_programme( $opt{pid} );
++ return 0 if $retcode eq 'skip';
++ if ( $retcode eq 'retry' && $count < $retries ) {
++ logger "WARNING: Retrying download for PID $opt{pid}\n";
++ } else {
++ $retcode = 1 if $retcode eq 'retry';
++ last;
++ }
+ }
+ # Add to history, tag and Run post download command if download was successful
+ if ($retcode == 0) {
+ add_to_download_history( $opt{pid} );
+ tag_file( $opt{pid} );
+ run_user_command( $opt{pid}, $opt{command} ) if $opt{command};
+- }
++ } elsif (! $opt{test}) {
++ logger "ERROR: Failed to download PID $opt{pid}\n";
++ }
+ exit 0;
+ }
+
+ # Get stream links from BBC iplayer site or from cache (also populates all hashes) specified in --type option
+- get_links( $_ ) for split /,/, $opt{type};
++ get_links( $_ ) for keys %type;
+
+ # List elements (i.e. 'channel' 'categories') if required and exit
+ if ( $opt{list} ) {
+@@ -616,18 +692,13 @@
+ exit 0;
+ }
+
+- # Write HTML and XML files if required
+- create_html( sort {$a <=> $b} keys %index_pid ) if $opt{html};
+- create_xml( $opt{fxd}, sort {$a <=> $b} keys %index_pid ) if $opt{fxd};
+- create_xml( $opt{mythtv}, sort {$a <=> $b} keys %index_pid ) if $opt{mythtv};
+-
+ # Parse remaining args
+ my @match_list;
+ for ( @search_args ) {
+ chomp();
+-
+- # If Numerical value < 30000
+- if ( /^[\d]+$/ && $_ < 30000) {
++
++ # If Numerical value < $max_index
++ if ( /^[\d]+$/ && $_ <= $max_index) {
+ push @match_list, $_;
+
+ # If PID then find matching programmes with this PID
+@@ -649,24 +720,29 @@
+ # Go get the cached data for other programme types if the index numbers require it
+ my %require;
+ for ( @match_list ) {
+- $require{tv} = 1 if $_ >= 1 && $_ < 10000 && ( ! $require{tv} ) && $opt{type} !~ /tv/;
+- $require{radio} = 1 if $_ >= 10000 && $_ < 20000 && ( ! $require{radio} ) && $opt{type} !~ /radio/;
+- $require{podcast} = 1 if $_ >= 20000 && $_ < 30000 && ( ! $require{podcast} ) && $opt{type} !~ /podcast/;
++ for my $types ( @all_prog_types ) {
++ $require{$types} = 1 if $_ >= $index_range{$types}{min} && $_ <= $index_range{$types}{max} && ( ! $require{$types} ) && ( ! $type{$types} );
++ }
+ }
++
+ # Get extra required programme caches
+ logger "INFO: Additionally getting cached programme data for ".(join ', ', keys %require)."\n" if %require > 0;
+ # Get stream links from BBC iplayer site or from cache (also populates all hashes)
+ for (keys %require) {
+ # Get $_ stream links
+ get_links( $_ );
+- # Add new prog types to the type option
+- $opt{type} .= ",$_";
++ # Add new prog types to the type list
++ $type{$_} = 1;
+ }
+-
+ # Display list for download
+ logger "Matches:\n" if @match_list;
+ @match_list = list_progs( @match_list );
+
++ # Write HTML and XML files if required (with search options applied)
++ create_html( @match_list ) if $opt{html};
++ create_xml( $opt{fxd}, @match_list ) if $opt{fxd};
++ create_xml( $opt{mythtv}, @match_list ) if $opt{mythtv};
++
+ # Do the downloads based on list of index numbers if required
+ if ( $opt{get} || $opt{stdout} ) {
+ for (@match_list) {
+@@ -681,16 +757,27 @@
+ logger "ERROR: No PID for index $_ (try using --type option ?)\n";
+ next;
+ }
+- while ( $count < $retries && $pid && ($retcode = download_programme( $pid )) eq 'retry' ) {
+- logger "WARNING: Retrying download for '$prog{$pid}{name} - $prog{$pid}{episode}'\n";
+- $count++;
++ for ($count = 1; $count <= $retries; $count++) {
++ $retcode = download_programme( $pid );
++ last if $retcode eq 'skip';
++ if ( $retcode eq 'retry' && $count < $retries ) {
++ logger "WARNING: Retrying download for '$prog{$pid}{name} - $prog{$pid}{episode}'\n";
++ } else {
++ $retcode = 1 if $retcode eq 'retry';
++ last;
++ }
+ }
+ # Add to history, tag file, and run post download command if download was successful
+- if ($retcode eq '0') {
++ if ($retcode == 0) {
+ add_to_download_history( $pid );
+ tag_file( $pid );
+ run_user_command( $pid, $opt{command} ) if $opt{command};
+ pvr_report( $pid ) if $opt{pvr};
++ # Next match if 'skip' was returned
++ } elsif ( $retcode eq 'skip' ) {
++ last;
++ } elsif (! $opt{test}) {
++ logger "ERROR: Failed to download '$prog{$pid}{name} - $prog{$pid}{episode}'\n";
+ }
+ }
+ }
+@@ -702,16 +789,11 @@
+
+ # Lists progs given an array of index numbers, also returns an array with non-existent entries removed
+ sub list_progs {
+- my $ua;
++ my $ua = create_ua('desktop');
+ my @checked;
+ my %names;
+ # Setup user agent for a persistent connection to get programme metadata
+ if ( $opt{info} ) {
+- $ua = LWP::UserAgent->new;
+- $ua->timeout([$lwp_request_timeout]);
+- $ua->proxy( ['http'] => $proxy_url );
+- $ua->agent( $user_agent{desktop} );
+- $ua->conn_cache(LWP::ConnCache->new());
+ # Truncate array if were lisiting info and > $info_limit entries are requested - be nice to the beeb!
+ if ( $#_ >= $info_limit ) {
+ $#_ = $info_limit - 1;
+@@ -733,18 +815,7 @@
+ push @checked, $_;
+ if ( $opt{info} ) {
+ my %metadata = get_pid_metadata( $ua, $pid );
+- logger "\nPid:\t\t$metadata{pid}\n";
+- logger "Index:\t\t$metadata{index}\n";
+- logger "Type:\t\t$metadata{type}\n";
+- logger "Duration:\t$metadata{duration}\n";
+- logger "Channel:\t$metadata{channel}\n";
+- logger "Available:\t$metadata{available}\n";
+- logger "Expires:\t$metadata{expiry}\n";
+- logger "Versions:\t$metadata{versions}\n";
+- logger "Guidance:\t$metadata{guidance}\n";
+- logger "Categories:\t$metadata{categories}\n";
+- logger "Description:\t$metadata{desc}\n";
+- logger "Player:\t\t$metadata{player}\n";
++ display_metadata( \%metadata, qw/ pid index type duration channel available expiry versions guidance categories desc player / );
+ }
+ }
+ logger "\n";
+@@ -758,8 +829,9 @@
+ # Display a line containing programme info (using long, terse, and type options)
+ sub list_prog_entry {
+ my ( $pid, $prefix, $tree ) = ( @_ );
+- my $type = '';
+- $type = "$prog{$pid}{type}, " if $opt{type} !~ /^(tv|radio|podcast)$/i;
++ my $prog_type = '';
++ # Show the type field if >1 type has been specified
++ $prog_type = "$prog{$pid}{type}, " if keys %type > 1;
+ my $name;
+ # If tree view
+ if ( $opt{tree} ) {
+@@ -768,20 +840,21 @@
+ } else {
+ $name = "$prog{$pid}{name} - ";
+ }
+- # Remove some info depending on type
++ # Remove some info depending on prog_type
+ my $optional;
+ $optional = ", '$prog{$pid}{channel}', $prog{$pid}{categories}, $prog{$pid}{versions}" if $prog{$pid}{type} eq 'tv';
++ $optional = ", '$prog{$pid}{channel}'" if $prog{$pid}{type} eq 'itv';
+ $optional = ", '$prog{$pid}{channel}', $prog{$pid}{categories}" if $prog{$pid}{type} eq 'radio';
+ $optional = ", '$prog{$pid}{available}', '$prog{$pid}{channel}', $prog{$pid}{categories}" if $prog{$pid}{type} eq 'podcast';
+- logger "\n${type}$prog{$pid}{name}\n" if $opt{tree} && ! $tree;
++ logger "\n${prog_type}$prog{$pid}{name}\n" if $opt{tree} && ! $tree;
+ # Display based on output options
+ if ( $opt{long} ) {
+ my @time = gmtime( time() - $prog{$pid}{timeadded} );
+- logger "${prefix}$prog{$pid}{index}:\t${type}${name}$prog{$pid}{episode}${optional}, $time[7] days $time[2] hours ago - $prog{$pid}{desc}\n";
++ logger "${prefix}$prog{$pid}{index}:\t${prog_type}${name}$prog{$pid}{episode}${optional}, $time[7] days $time[2] hours ago - $prog{$pid}{desc}\n";
+ } elsif ( $opt{terse} ) {
+- logger "${prefix}$prog{$pid}{index}:\t${type}${name}$prog{$pid}{episode}\n";
++ logger "${prefix}$prog{$pid}{index}:\t${prog_type}${name}$prog{$pid}{episode}\n";
+ } else {
+- logger "${prefix}$prog{$pid}{index}:\t${type}${name}$prog{$pid}{episode}${optional}\n";
++ logger "${prefix}$prog{$pid}{index}:\t${prog_type}${name}$prog{$pid}{episode}${optional}\n";
+ }
+ return 0;
+ }
+@@ -795,6 +868,7 @@
+ my $channel_regex = $opt{channel} || '.*';
+ my $category_regex = $opt{category} || '.*';
+ my $versions_regex = $opt{versions} || '.*';
++ my $exclude_regex = $opt{exclude} || '^ROGUE$';
+ my $channel_exclude_regex = $opt{excludechannel} || '^ROGUE$';
+ my $category_exclude_regex = $opt{excludecategory} || '^ROGUE$';
+ my $since = $opt{since} || 99999;
+@@ -808,6 +882,7 @@
+ && $prog{$pid}{categories} =~ /$category_regex/i
+ && $prog{$pid}{versions} =~ /$versions_regex/i
+ && $prog{$pid}{channel} !~ /$channel_exclude_regex/i
++ && $prog{$pid}{name} !~ /$exclude_regex/i
+ && $prog{$pid}{categories} !~ /$category_exclude_regex/i
+ && $prog{$pid}{timeadded} >= $now - ($since * 3600)
+ ) {
+@@ -828,25 +903,22 @@
+ );
+ }
+ }
++
+ return sort {$a <=> $b} keys %download_hash;
+ }
+
+
+-# get_links_atom (%channels)
+-sub get_links_atom {
+- my $type = shift;
++# get_links_bbciplayer (%channels)
++sub get_links_bbciplayer {
++ my $prog_type = shift;
+ my %channels = %{$_[0]};
+
+ my $xml;
+ my $feed_data;
+ my $res;
+- logger "INFO: Getting $type Index Feeds\n";
++ logger "INFO: Getting $prog_type Index Feeds\n";
+ # Setup User agent
+- my $ua = LWP::UserAgent->new;
+- $ua->timeout([$lwp_request_timeout]);
+- $ua->proxy( ['http'] => $proxy_url );
+- $ua->agent( $user_agent{desktop} );
+- $ua->conn_cache(LWP::ConnCache->new());
++ my $ua = create_ua('desktop');
+
+ # Download index feed
+ # Sort feeds so that category based feeds are done last - this makes sure that the channels get defined correctly if there are dups
+@@ -909,7 +981,7 @@
+ # Discard first element == header
+ shift @entries;
+
+- my ( $name, $episode, $desc, $pid, $available, $channel, $duration, $thumbnail, $type, $versions );
++ my ( $name, $episode, $desc, $pid, $available, $channel, $duration, $thumbnail, $prog_type, $versions );
+ foreach my $entry (@entries) {
+
+ my $entry_flat = $entry;
+@@ -939,7 +1011,7 @@
+ }
+
+ # Extract channel and type
+- ($type, $channel) = (split /\|/, $channels{$_})[0,1];
++ ($prog_type, $channel) = (split /\|/, $channels{$_})[0,1];
+
+ logger "DEBUG: '$pid, $name - $episode, $channel'\n" if $opt{debug};
+
+@@ -980,7 +1052,7 @@
+ 'thumbnail' => "${thumbnail_prefix}/${pid}_150_84.jpg",
+ 'channel' => $channel,
+ 'categories' => join(',', @category),
+- 'type' => $type,
++ 'type' => $prog_type,
+ };
+ }
+ }
+@@ -996,13 +1068,8 @@
+
+ # Add index field based on alphabetical sorting by prog name
+ my %index;
+- $index{tv} = 1;
+-
+- # Start index counter at 10001 for radio progs
+- $index{radio} = 10001;
+-
+- # Start index counter at 20001 for podcast progs
+- $index{podcast} = 20001;
++ # Start index counter at 'min' for each prog type
++ $index{$_} = $index_range{$_}{min} for @all_prog_types;
+
+ my @prog_pid;
+
+@@ -1013,10 +1080,10 @@
+ for (sort @prog_pid) {
+ # Extract pid
+ my $pid = (split /\|/)[1];
+- my $type = $prog{$pid}{type};
+- $index_pid{ $index{$type} } = $pid;
+- $prog{$pid}{index} = $index{$type};
+- $index{$type}++;
++ my $prog_type = $prog{$pid}{type};
++ $index_pid{ $index{$prog_type} } = $pid;
++ $prog{$pid}{index} = $index{$prog_type};
++ $index{$prog_type}++;
+ }
+ return 0;
+ }
+@@ -1024,18 +1091,14 @@
+
+
+ # Uses: $podcast_index_feed_url
+-# get_podcast_links ()
+-sub get_podcast_links {
++# get_links_bbcpodcast ()
++sub get_links_bbcpodcast {
+
+ my $xml;
+ my $res;
+ logger "INFO: Getting podcast Index Feeds\n";
+ # Setup User agent
+- my $ua = LWP::UserAgent->new;
+- $ua->timeout([$lwp_request_timeout]);
+- $ua->proxy( ['http'] => $proxy_url );
+- $ua->agent( $user_agent{get_iplayer} );
+- $ua->conn_cache(LWP::ConnCache->new());
++ my $ua = create_ua('get_iplayer');
+
+ # Method
+ # $podcast_index_feed_url (gets list of rss feeds for each podcast prog) =>
+@@ -1224,6 +1287,302 @@
+
+
+
++# Uses:
++# get_links_itv ()
++sub get_links_itv {
++ my %channels = %{$_[0]};
++ my $xml;
++ my $res;
++ my %series_pid;
++ my %episode_pid;
++ logger "INFO: Getting itv Index Feeds\n";
++ # Setup User agent
++ my $ua = create_ua('desktop');
++
++ # Method
++ # http://www.itv.com/_data/xml/CatchUpData/CatchUp360/CatchUpMenu.xml (gets list of urls for each prog series) =>
++ # =>
++
++ # Download index feed
++ my $itv_index_shows_url = 'http://www.itv.com/ClassicTVshows/'; # $channel/default.html
++ my $itv_index_feed_url = 'http://www.itv.com/_data/xml/CatchUpData/CatchUp360/CatchUpMenu.xml';
++
++ # Sort feeds so that pages are done last - this makes sure that the channels get defined correctly if there are dups
++ my @channel_list;
++ push @channel_list, grep !/\//, keys %channels;
++ push @channel_list, grep /\//, keys %channels;
++ # ITV ClassicShows parsing
++ for my $channel ( @channel_list ) {
++ # <li class="first-child"><a href="http://www.itv.com/ClassicTVshows/comedy/ABitofaDo/default.html">A Bit of a Do</a><br></li>
++ # <li><a href="http://www.itv.com/ClassicTVshows/familydrama/achristmascarol/default.html">A Christmas Carol</a><br></li>
++ # Get page, search for relevent lines which contain series links and loop through each matching line
++ for my $s_line ( grep /(<li><a\s+href=".+?"><img\s+src=".+?"\s+alt=".+?"><\/a><h4>|<li.*?><a href=".+?">.+?<\/a><br><\/li>)/, ( split /\n/, request_url_retry($ua, $itv_index_shows_url.${channel}.'/default.html', 3, '.', "WARNING: Failed to get itv ${channel} index from site\n") ) ) {
++ my ($url, $name);
++ # Extract series url + series description
++ ($url, $name) = ($1, $2) if $s_line =~ m{<li><a\s+href="\s*(.+?)\s*"><img\s+src=".+?"\s+alt="\s*(.+?)\s*"><\/a><h4>};
++ ($url, $name) = ($1, $2) if $s_line =~ m{<li.*?><a href="\s*(.+?)\s*">\s*(.+?)\s*<\/a><br><\/li>};
++ chomp($url);
++ chomp($name);
++ next if ! ($url && $name);
++ logger "DEBUG: Channel: '$channel' Series: '$name' URL: '$url'\n" if $opt{verbose};
++
++ # Get list of episodes for this series
++ # e.g. <li class="first-child"><a title="Play" href="?vodcrid=crid://itv.com/993&amp;DF=0">Episode one</a><br>The Sun in a Bottle</li>
++ # <li><a title="Play" href="?vodcrid=crid://itv.com/994&amp;DF=0">Episode two</a><br>Castle Saburac</li>
++ # <li class="first-child"><a class="nsat" title="This programme contains strong language and violence  " href="?vodcrid=crid://itv.com/588&amp;G=10&amp;DF=0">Episode one</a><br>The Dead of Jericho</li>
++ #
++ # e.g. <li><a class="playVideo" title="Play" href="?vodcrid=crid://itv.com/1232&amp;DF=0"><img src="img/60x45/Crossroads-Rosemary-shoots-David-efeef7cd-8d41-416c-9e30-26ce1b3d625c.jpg" alt="Crossroads: Rosemary shoots David"><span>Play</span></a><h4>
++ # vodcrid=crid://itv.com/971&amp;DF=0"><img src="img/60x45/9d20fd47-5d4b-44f5-9188-856505de0d0f.jpg" alt="Emmerdale 2002 Louise kills Ray"
++ #
++ # e.g. <a class="playVideo" title="Play" href="?vodcrid=crid://itv.com/1854&amp;DF=1"><img src="img/157x104/140c456c-d8bd-49d5-90f8-f7cc6d86f132.jpg" alt="Soldier Soldier "><span>Play</span></a><h2>Soldier Soldier</h2>
++ #
++ for my $e_line ( grep /vodcrid=crid/, ( split /\n/, request_url_retry($ua, $url, 3, '.', "WARNING: Failed to get ${name} index from site\n") ) ) {
++ my ($guidance, $pid, $episode, $thumbnail);
++ logger "DEBUG: Match Line: $e_line\n" if $opt{debug};
++ # Extract episode data
++ ($guidance, $pid, $episode) = ($2, $3, $4) if $e_line =~ m{<li.*?><a\s+(class="nsat"\s+)?title="\s*(.+?)\s*"\s+href="\?vodcrid=crid://itv.com/(\d+?)&.+?>\s*(.+?)\s*<};
++ ($pid, $thumbnail, $episode) = ($1, $2, $3) if $e_line =~ m{vodcrid=crid://itv.com/(\d+?)&.+?><img\s+src="(.+?)"\s+alt="\s*(.+?)\s*"};
++ next if ! ($pid && $episode);
++ # Remove 'Play'
++ $guidance =~ s/^Play$//ig;
++ # Strip non-printables
++ $guidance =~ s/[\s\x00\xc2\xa0]+$//ig;
++ #$guidance =~ s|[^\w\s\-\!"£\$\\/%\^&\*\(\)\+=,\.\?':;@~\[\]]+||gi;
++ #$guidance =~ s/(\s\s)+//g;
++ logger "DEBUG: PID: '$pid' Episode: '$episode' Guidance: '$guidance'\n" if $opt{debug};
++
++ # Skip if this pid is a duplicate
++ if ( defined $prog{$pid} ) {
++ logger "WARNING: '$pid, $prog{$pid}{name} - $prog{$pid}{episode}, $prog{$pid}{channel}' already exists (this channel = $channel)\n" if $opt{verbose};
++ # Merge data (hack)
++ #$prog{$pid}{episode} .= ','.$episode;
++ my $oldname = $prog{$pid}{name};
++ $prog{$pid}{episode} = $episode if (! $prog{$pid}{episode}) || $prog{$pid}{episode} =~ /$oldname/i;
++ $prog{$pid}{thumbnail} = $thumbnail if ! $prog{$pid}{thumbnail};
++ $prog{$pid}{guidance} = $guidance if ! $prog{$pid}{guidance};
++ next;
++ }
++
++ # build data structure
++ $prog{$pid} = {
++ 'name' => $name,
++ 'versions' => 'default',
++ 'episode' => $episode,
++ 'channel' => (split /\|/, $channels{$channel})[1],
++ 'guidance' => $guidance,
++ 'categories' => (split /\|/, $channels{$channel})[1],
++ 'type' => 'itv',
++ };
++ }
++ }
++ }
++
++ my $xmlindex = request_url_retry($ua, $itv_index_feed_url, 3, '.', "WARNING: Failed to get itv index from site\n");
++ $xmlindex =~ s/[\n\r]//g;
++
++ # This gives a list of programme series (sometimes episodes)
++ # <ITVCatchUpProgramme>
++ # <ProgrammeId>50</ProgrammeId>
++ # <ProgrammeTitle>A CHRISTMAS CAROL</ProgrammeTitle>
++ # <ProgrammeMediaId>615915</ProgrammeMediaId>
++ # <ProgrammeMediaUrl>
++ # http://www.itv.com//img/150x113/A-Christmas-Carol-2f16d25a-de1d-4a3a-90cb-d47489eee98e.jpg</ProgrammeMediaUrl>
++ # <LastUpdated>2009-01-06T12:24:22.7419643+00:00</LastUpdated>
++ # <Url>
++ # http://www.itv.com/CatchUp/Video/default.html?ViewType=5&amp;Filter=32910</Url>
++ # <EpisodeCount>1</EpisodeCount>
++ # <VideoID>32910</VideoID>
++ # <DentonID>-1</DentonID>
++ # <DentonRating></DentonRating>
++ # <AdditionalContentUrl />
++ # <AdditionalContentUrlText />
++ # </ITVCatchUpProgramme>
++
++ for my $feedxml ( split /<ITVCatchUpProgramme>/, $xmlindex ) {
++ # Extract feed data
++ my ($episodecount, $viewtype, $videoid, $url);
++ my @entries;
++
++ logger "\n\nDEBUG: XML: $feedxml\n" if $opt{debug};
++
++ # <EpisodeCount>1</EpisodeCount>
++ $episodecount = $1 if $feedxml =~ m{<EpisodeCount>\s*(\d+)\s*<\/EpisodeCount>};
++
++ # <Url>http://www.itv.com/CatchUp/Video/default.html?ViewType=5&amp;Filter=32910</Url>
++ ($viewtype, $videoid) = ($1, $2) if $feedxml =~ m{<Url>\s*.+?ViewType=(\d+).+?Filter=(\d+)\s*<\/Url>}i;
++
++ ## <VideoID>32910</VideoID>
++ #$videoid = $1 if $feedxml =~ m{<VideoID>\s*(\d+)\s*<\/VideoID>};
++
++ # Skip if there is no feed data for channel
++ next if ($viewtype =~ /^0*$/ || $videoid =~ /^0*$/ );
++
++ logger "DEBUG: Got ViewType=$viewtype VideoId=$videoid EpisodeCount=$episodecount\n" if $opt{debug};
++
++ my $url = "http://www.itv.com/_app/Dynamic/CatchUpData.ashx?ViewType=${viewtype}&Filter=${videoid}";
++
++ # Add response from episode metadata url to list to be parsed if this is an episode link
++ if ( $viewtype == 5 ) {
++ next if $episode_pid{$videoid};
++ $episode_pid{$videoid} = 1;
++ # Get metadata pages for episode
++
++ my ( $name, $guidance, $channel, $episode, $desc, $pid, $available, $duration, $thumbnail );
++
++ $pid = $videoid;
++ $channel = 'ITV Catch-up';
++
++ # Skip if this pid is a duplicate
++ if ( defined $prog{$pid} ) {
++ logger "WARNING: '$pid, $prog{$pid}{name} - $prog{$pid}{episode}, $prog{$pid}{channel}' already exists (this channel = $channel)\n" if $opt{verbose};
++ next;
++ }
++
++ $name = $1 if $feedxml =~ m{<ProgrammeTitle>\s*(.+?)\s*<\/ProgrammeTitle>};
++ $guidance = $1 if $feedxml =~ m{<DentonRating>\s*(.+?)\s*<\/DentonRating>};
++ $thumbnail = $1 if $feedxml =~ m{<ProgrammeMediaUrl>\s*(.+?)\s*<\/ProgrammeMediaUrl>};
++ $episode = $pid;
++ # Strip non-printable chars
++ $guidance =~ s/[\s\x00\xc2\xa0]+$//ig;
++
++ # build data structure
++ $prog{$pid} = {
++ 'name' => $name,
++ 'versions' => 'default',
++ 'episode' => $episode,
++ 'guidance' => $guidance,
++ 'desc' => $desc,
++ 'available' => $available,
++ 'duration' => $duration,
++ 'thumbnail' => $thumbnail,
++ 'channel' => $channel,
++ 'categories' => 'TV',
++ 'type' => 'itv',
++ };
++
++
++
++
++
++ # Get next episode list and parse
++ # <div class="listItem highlight contain">
++ # <div class="floatLeft"><a href="http://www.itv.com/CatchUp/Video/default.html?ViewType=5&amp;Filter=33383"><img src="http://www.itv.com//img/157x88/P7-67e0b86f-b335-4f6b-8db
++ # <div class="content">
++ # <h3><a href="http://www.itv.com/CatchUp/Video/default.html?ViewType=5&amp;Filter=33383">Emmerdale</a></h3>
++ # <p class="date">Mon 05 Jan 2009</p>
++ # <p class="progDesc">Donna is stunned to learn Marlon has pointed the finger at Ross. Aaron defaces Tom King's grave.</p>
++ # <ul class="progDetails">
++ # <li>
++ # Duration: 30 min
++ # </li>
++ # <li class="days">
++ # Expires in
++ # <strong>29</strong>
++ # days
++ # </li>
++ # </ul>
++ # </div>
++ # </div>
++ # <div class="listItem contain">
++ # <div class="floatLeft"><a href="http://www.itv.com/CatchUp/Video/default.html?ViewType=5&amp;Filter=33245"><img src="http://www.itv.com//img/157x88/Marlon-Dingle-742c50b3-3b
++ # <div class="content">
++ # <h3><a href="http://www.itv.com/CatchUp/Video/default.html?ViewType=5&amp;Filter=33245">Emmerdale</a></h3>
++ # <p class="date">Fri 02 Jan 2009</p>
++ # <p class="progDesc">Marlon gets his revenge on Ross. The King brothers struggle to restart their business without Matthew. Scarlett is fed up with Victoria getting all Daz
++ # <ul class="progDetails">
++ # <li>
++ # Duration: 30 min
++ # </li>
++ # <li class="days">
++ # Expires in
++ # <strong>26</strong>
++ # days
++ # </li>
++ # </ul>
++ # </div>
++ # </div>
++ #
++ } elsif ( $viewtype == 1 ) {
++ # Make sure we don't duplicate parsing a series
++ next if $series_pid{$videoid};
++ $series_pid{$videoid} = 1;
++
++ # Get metadata pages for each series
++ logger "DEBUG: Getting series metadata $url\n" if $opt{debug};
++ $xml = request_url_retry($ua, $url, 2, '.', "WARNING: Failed to get itv series data for ${videoid} from itv site\n") if $opt{verbose};
++ $xml = request_url_retry($ua, $url, 2, '.', '') if ! $opt{verbose};
++
++ # skip if no data
++ next if ! $xml;
++
++ decode_entities($xml);
++ # Flatten entry
++ $xml =~ s/[\n\r]//g;
++
++ # Extract Filter (pids) from this list
++ # e.g. <h3><a href="http://www.itv.com/CatchUp/Video/default.html?ViewType=5&amp;Filter=32042">Emmerdale</a></h3>
++ my @videoids = (split /<h3><a href=.+?Filter=/, $xml);
++
++ # Get episode data for each videoid
++ $viewtype = 5;
++
++ my @episode_data = split/<h3><a href=.+?Filter=/, $xml;
++ # Ignore first entry
++ shift @episode_data;
++ logger "INFO: Got ".($#episode_data+1)." programmes\n" if $opt{verbose};
++
++ for my $xml (@episode_data) {
++ $videoid = $1 if $xml =~ m{^(\d+?)".+$}i;
++
++ # Make sure we don't duplicate parsing an episode
++ next if $episode_pid{$videoid};
++ $episode_pid{$videoid} = 1;
++
++ my ( $name, $guidance, $channel, $episode, $desc, $pid, $available, $duration, $thumbnail );
++
++ $pid = $videoid;
++ $channel = 'ITV Catch-up';
++
++ # Skip if this pid is a duplicate
++ if ( defined $prog{$pid} ) {
++ logger "WARNING: '$pid, $prog{$pid}{name} - $prog{$pid}{episode}, $prog{$pid}{channel}' already exists (this channel = $channel)\n" if $opt{verbose};
++ next;
++ }
++ $name = $1 if $feedxml =~ m{<ProgrammeTitle>\s*(.+?)\s*<\/ProgrammeTitle>};
++ $available = $1 if $xml =~ m{<p\s+class="date">(.+?)<\/p>}i;
++ $episode = $available;
++ $duration = $1 if $xml =~ m{<li>Duration:\s*(.+?)\s*<\/li>}i;
++ $desc = $1 if $xml =~ m{<p\s+class="progDesc">(.+?)\s*<\/p>};
++ $guidance = $1 if $feedxml =~ m{<DentonRating>\s*(.+?)\s*<\/DentonRating>};
++ $thumbnail = $1 if $feedxml =~ m{<ProgrammeMediaUrl>\s*(.+?)\s*<\/ProgrammeMediaUrl>};
++ $guidance =~ s/[\s\x00\xc2\xa0]+$//ig;
++
++ logger "DEBUG: name='$name' episode='$episode' pid=$pid available='$available' \n" if $opt{debug};
++
++ # build data structure
++ $prog{$pid} = {
++ 'name' => $name,
++ 'versions' => 'default',
++ 'episode' => $episode,
++ 'guidance' => $guidance,
++ 'desc' => $desc,
++ 'available' => $available,
++ 'duration' => $duration,
++ 'thumbnail' => $thumbnail,
++ 'channel' => $channel,
++ 'categories' => 'TV',
++ 'type' => 'itv',
++ };
++ }
++ }
++
++ }
++ logger "\n";
++ return 0;
++}
++
++
++
+ # Feed info:
+ # # Also see http://derivadow.com/2008/07/18/interesting-bbc-data-to-hack-with/
+ # # All podcasts menu (iphone)
+@@ -1261,14 +1620,14 @@
+ # http://www.bbc.co.uk/cbbc/programmes/genres/childrens/player
+ # http://www.bbc.co.uk/programmes/genres/childrens/schedules/upcoming.ics
+ #
+-# get_links( <radio|tv|podcast> )
++# get_links( <prog_type> )
+ sub get_links {
+ my @cache;
+ my $now = time();
+- my $type = shift;
++ my $prog_type = shift;
+
+ # Open cache file (need to verify we can even read this)
+- if ( open(CACHE, "< $cachefile{$type}") ) {
++ if ( open(CACHE, "< $cachefile{$prog_type}") ) {
+ # Get file contents less any comments
+ @cache = grep !/^[\#\s]/, <CACHE>;
+ close (CACHE);
+@@ -1281,47 +1640,40 @@
+ for (@cache) {
+ # Populate %prog from cache
+ chomp();
+- my ($index, $type, $name, $pid, $available, $episode, $versions, $duration, $desc, $channel, $categories, $thumbnail, $timeadded) = split /\|/;
+- # Create data structure with prog data
+- $prog_old{$pid} = {
+- 'index' => $index,
+- 'name' => $name,
+- 'episode' => $episode,
+- 'desc' => $desc,
+- 'available' => $available,
+- 'duration' => $duration,
+- 'versions' => $versions,
+- 'channel' => $channel,
+- 'categories' => $categories,
+- 'thumbnail' => $thumbnail,
+- 'type' => $type,
+- 'timeadded' => $timeadded,
+- };
+- $index_pid_old{$index} = $pid;
++ # Get cache line
++ my @record = split /\|/;
++ my %record_entries;
++ # Update fields in %prog hash for $pid
++ $record_entries{$_} = shift @record for @cache_format;
++ $prog_old{ $record_entries{pid} } = \%record_entries;
++ $index_pid_old{ $record_entries{index} } = $record_entries{pid};
+ }
+ }
+
+ # if a cache file doesn't exist/corrupted, flush option is specified or original file is older than $cache_sec then download new data
+- if ( (! @cache) || (! -f $cachefile{$type}) || $opt{flush} || ($now >= ( stat($cachefile{$type})->mtime + $cache_secs )) ) {
++ if ( (! @cache) || (! -f $cachefile{$prog_type}) || $opt{flush} || ($now >= ( stat($cachefile{$prog_type})->mtime + $cache_secs )) ) {
+
+- # Podcast only
+- get_podcast_links() if $type eq 'podcast';
++ # BBC Podcast only
++ get_links_bbcpodcast() if $prog_type eq 'podcast';
+
+- # Radio and TV
+- get_links_atom( $type, \%{$channels{$type}} ) if $type =~ /(tv|radio)/;
++ # ITV only
++ get_links_itv( \%{$channels{$prog_type}} ) if $prog_type eq 'itv';
++
++ # BBC Radio and TV
++ get_links_bbciplayer( $prog_type, \%{$channels{$prog_type}} ) if $prog_type =~ /^(tv|radio)$/;
+
+ # Sort indexes
+ sort_indexes();
+
+ # Open cache file for writing
+- unlink $cachefile{$type};
++ unlink $cachefile{$prog_type};
+ my $now = time();
+- if ( open(CACHE, "> $cachefile{$type}") ) {
+- print CACHE "#Index|Type|Name|Pid|Available|Episode|Versions|Duration|Desc|Channel|Categories|Thumbnail|TimeAdded\n";
++ if ( open(CACHE, "> $cachefile{$prog_type}") ) {
++ print CACHE "#".(join '|', @cache_format)."\n";
+ for (sort {$a <=> $b} keys %index_pid) {
+ my $pid = $index_pid{$_};
+ # Only write entries for correct prog type
+- if ($prog{$pid}{type} eq $type) {
++ if ($prog{$pid}{type} eq $prog_type) {
+ # Merge old and new data to retain timestamps
+ # if the entry was in old cache then retain timestamp from old entry
+ if ( $prog_old{$pid}{timeadded} ) {
+@@ -1332,12 +1684,17 @@
+ list_prog_entry( $pid, 'Added: ' );
+ }
+ # write to cache file
+- print CACHE "$_|$prog{$pid}{type}|$prog{$pid}{name}|$pid|$prog{$pid}{available}|$prog{$pid}{episode}|$prog{$pid}{versions}|$prog{$pid}{duration}|$prog{$pid}{desc}|$prog{$pid}{channel}|$prog{$pid}{categories}|$prog{$pid}{thumbnail}|$prog{$pid}{timeadded}\n";
++ $prog{$pid}{pid} = $pid;
++ # Write each field into cache line
++ for my $field (@cache_format) {
++ print CACHE $prog{$pid}{$field}.'|';
++ }
++ print CACHE "\n";
+ }
+ }
+ close (CACHE);
+ } else {
+- logger "WARNING: Couldn't open cache file '$cachefile{$type}' for writing\n";
++ logger "WARNING: Couldn't open cache file '$cachefile{$prog_type}' for writing\n";
+ }
+
+
+@@ -1354,172 +1711,434 @@
+ # Usage: download_programme (<pid>)
+ sub download_programme {
+ my $pid = shift;
++ my %streamdata;
++ my %version_pids;
++ my $return;
+
+ # Setup user-agent
+- # Switch off automatic redirects
+- my $ua = LWP::UserAgent->new( requests_redirectable => [] );
+- # Setup user agent
+- $ua->timeout([$lwp_request_timeout]);
+- $ua->proxy( ['http'] => $proxy_url );
+- $ua->cookie_jar( HTTP::Cookies->new( file => $cookiejar, autosave => 1, ignore_discard => 1 ) );
++ my $ua = create_ua('desktop');
+
+- my $dir = $download_dir{ $prog{$pid}{type} };
+- $prog{$pid}{ext} = 'mov';
++ # download depending on the prog type
++ logger "INFO: Attempting to Download $prog{$pid}{type}: $prog{$pid}{name} - $prog{$pid}{episode}\n";
+
+- # If were a podcast...
++ # ITV TV
++ if ( $prog{$pid}{type} eq 'itv' ) {
++ # stream data
++ # Display media stream data if required
++ if ( $opt{streaminfo} ) {
++ display_stream_info( $pid, undef, 'all' );
++ $opt{quiet} = 1;
++ return 'skip';
++ }
++ return download_programme_itv( $ua, $pid );
++ }
++
++ # BBC Podcasts
+ if ( $prog{$pid}{type} eq 'podcast' ) {
+- # Determine the correct filename and extension for this download
+- my $filename_orig = $pid;
+- $prog{$pid}{ext} = $pid;
+- $filename_orig =~ s|^.+/(.+?)\.\w+$|$1|g;
+- $prog{$pid}{ext} =~ s|^.*\.(\w+)$|$1|g;
+- $prog{$pid}{fileprefix} = generate_download_filename_prefix($pid, $dir, $opt{fileprefix} || "<longname> - <episode> $filename_orig");
+- $prog{$pid}{dir} = $dir;
+- logger "\rINFO: File name prefix = $prog{$pid}{fileprefix} \n";
+- my $file_done = "${dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
+- my $file = "${dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
+- $prog{$pid}{filename} = $file_done;
+- if ( -f $file_done ) {
+- logger "WARNING: File $file_done already exists\n\n";
+- return 1;
++ # stream data not available
++ return 'skip' if $opt{streaminfo};
++ return download_programme_podcast( $ua, $pid );
++ }
++
++ # For BBC Radio/TV we might have a pid with no prog_type - determine here first
++ ( $prog{$pid}{type}, $prog{$pid}{longname}, %version_pids ) = get_version_pids( $ua, $pid );
++
++ # BBC TV
++ if ( $prog{$pid}{type} eq 'tv' ) {
++
++ # Deal with BBC TV fallback modes
++ # Valid modes are iphone,rtmp,flashhigh,flashnormal,flashwii,n95_wifi
++ $opt{vmode} = 'flashhigh,flashnormal' if $opt{vmode} eq 'rtmp' || $opt{vmode} eq 'flash';
++ # Defaults
++ if ( $opt{vmode} eq 'auto' || ! $opt{vmode} ) {
++ if ( ! exists_in_path($rtmpdump) ) {
++ $opt{vmode} = 'iphone';
++ } else {
++ $opt{vmode} = 'iphone,flashhigh,flashnormal';
++ }
+ }
++ # Expand the modes into a loop
++ logger "INFO: $opt{vmode} modes will be tried\n";
++ for my $mode ( split /,/, $opt{vmode} ) {
++ chomp( $mode );
++ logger "INFO: Attempting to download using $mode mode\n";
++ $return = download_programme_tv( $ua, $pid, $mode, \%version_pids );
++ logger "DEBUG: Download using $mode mode return code: '$return'\n" if $opt{debug};
+
+- # Skip from here if we are only testing downloads
+- return 1 if $opt{test};
++ # Give up trying alternative download methods
++ return 2 if $return eq 'abort';
+
+- # Create symlink filename if required
+- my $file_symlink;
+- if ( $opt{symlink} ) {
+- # Substitute the fields for the pid
+- $file_symlink = substitute_fields( $pid, $opt{symlink} );
++ # Return to retry loop if successful or retry requested
++ return 'retry' if $return eq 'retry';
++
++ # Return to retry loop and do nothing
++ return 'skip' if $return eq 'skip';
++
++ # Return 0 if successful
++ return 0 if ! $return;
++
++ # Return failed if there is no 'next'
++ return 1 if $return ne 'next';
+ }
+-
+- return download_podcast_stream( $ua, $pid, $file, $file_done, $file_symlink );
+ }
+
+- logger "INFO: Attempting to Download: $prog{$pid}{name} - $prog{$pid}{episode}\n";
++ # BBC Radio
++ if ( $prog{$pid}{type} eq 'radio' ) {
++ # This will always be the pid version for radio
++ $prog{$pid}{version} = 'default';
++ # Display media stream data if required
++ if ( $opt{streaminfo} ) {
++ display_stream_info( $pid, $version_pids{default}, 'all' );
++ $opt{quiet} = 1;
++ return 'skip';
++ }
++
++ # Deal with radio fallback modes
++ # Valid modes are mp3|iphone,flash|rtmp,real|ra
++ # Defaults
++ $opt{amode} = 'iphone,flash,real' if $opt{amode} eq 'auto' || ! $opt{amode};
++
++ # Expand the modes into a loop
++ logger "INFO: $opt{amode} modes will be tried\n";
++ for my $mode ( split /,/, $opt{amode} ) {
++ chomp( $mode );
++ logger "INFO: Attempting to download using $mode mode\n";
++ # RealAudio
++ if ( $mode =~ /^(real|ra)/ ) {
++ $return = download_programme_radio_realaudio( $ua, $pid, \%version_pids );
++
++ # FlashAudio
++ } elsif ( $mode =~ /^(flash|rtmp)/ ) {
++ $return = download_programme_radio_flashaudio( $ua, $pid, $mode, \%version_pids );
++
++ # iPhone
++ } elsif ( $mode =~ /^(iphone|mp3)/ ) {
++ $return = download_programme_radio_iphone( $ua, $pid, \%version_pids );
++ }
++ logger "DEBUG: Download using $mode mode return code: '$return'\n" if $opt{debug};
+
+- # Get version => pid hash
+- my ( $type, $title, %version_pids ) = get_version_pids( $ua, $pid );
++ # Give up trying alternative download methods
++ return 2 if $return eq 'abort';
+
+- # Extract Long Name, e.g.: iplayer.episode.setTitle("DIY SOS: Series 16: Swansea");
+- $prog{$pid}{longname} = $title;
++ # Not going to allow retries here until rtmpdump/flashaudio exits correctly - so just just skip to next mode for now
++ $return = 'next' if $return eq 'retry';
++ ## Return to retry loop if successful or retry requested
++ #return 'retry' if $return eq 'retry';
+
+- # Strip off the episode name
+- $prog{$pid}{longname} =~ s/^(.+):.*?$/$1/g;
++ # Return to retry loop and do nothing
++ return 'skip' if $return eq 'skip';
+
+- # Detect if this content is for radio
+- my $usemp3 = 0;
+- if ( $type eq 'radio' ) {
++ # Return 0 if successful
++ return 0 if ! $return;
+
+- # Display media stream data if required
+- if ( $opt{streaminfo} ) {
+- get_media_stream_data( $pid, $version_pids{'default'}, 'all' );
+- return 1;
++ # Return failed if there is no 'next'
++ return 1 if $return ne 'next';
+ }
++ }
+
+- # Type is definitely radio
+- $prog{$pid}{type} = 'radio';
+- $dir = $download_dir{ $prog{$pid}{type} };
+-
+- # Check for mp3 stream - unless realaudio option is specified
+- if ( ! $opt{realaudio} ) {
+- # Check for iphone mp3 radio stream
+- if ( get_media_stream_data( $pid, $version_pids{default}, 'iphone' ) ) {
+- $usemp3 = 1;
+- $prog{$pid}{ext} = 'mp3';
+- logger "INFO: MP3 stream media is available\n" if $opt{verbose};
+-
+- # if mp3audio option is specified do not fallback to realaudio
+- } elsif ( $opt{mp3audio} ) {
+- logger "ERROR: No MP3 stream media is available - not falling back to RealAudio\n";
+- return 1;
++ # If we get here then we have failed
++ return 1;
++}
+
+- # if not then force realaudio option as fallback
+- } else {
+- $opt{realaudio} = 1;
+- logger "INFO: No MP3 stream media is available - falling back to RealAudio\n" if $opt{verbose};
+- }
+- }
+
+- # Use realplayer stream
+- if ( $opt{realaudio} ) {
+
+- # Check dependancies for radio programme transcoding / streaming
+- # Check if we need 'tee'
+- if ( (! exists_in_path($tee)) && $opt{stdout} && (! $opt{nowrite}) ) {
+- logger "\nERROR: $tee does not exist in path, skipping\n";
+- return 20;
+- }
+- # Check if we have mplayer and lame
+- if ( (! $opt{wav}) && (! $opt{raw}) && (! exists_in_path($lame)) ) {
+- logger "\nWARNING: Required $lame does not exist, falling back to wav mode\n";
+- $opt{wav} = 1;
+- }
+- if (! exists_in_path($mplayer)) {
+- logger "\nERROR: Required $mplayer does not exist, skipping\n";
+- return 20;
+- }
++sub download_programme_itv {
++ my ( $ua, $pid ) = ( @_ );
++ my %streamdata;
++
++ # Check for mplayer (required)
++ if (! exists_in_path($mplayer)) {
++ logger "\nERROR: Required $mplayer does not exist, skipping\n";
++ return 21;
++ }
+
+- my $url_2 = get_media_stream_data( $pid, $version_pids{default}, 'realaudio' );
++ $prog{$pid}{dir} = $download_dir{ $prog{$pid}{type} };
++ $prog{$pid}{pid} = $pid;
++ $prog{$pid}{ext} = 'mp4';
++ $prog{$pid}{ext} = 'asf' if $opt{raw};
+
+- logger "INFO: Version = $prog{$pid}{version}\n" if $opt{verbose};
+- logger "INFO: Stage 2 URL = $url_2\n" if $opt{verbose};
++ my @url_list = %{get_media_stream_data( $pid, undef, 'itv')}->{streamurl};
+
+- # Report error if no versions are available
+- if ( ! $url_2 ) {
+- logger "ERROR: No Stage 2 URL\n" if $opt{verbose};
+- return 15;
+- }
++ # Get and set more meta data - Set the %prog values from metadata if they aren't already set
++ my %metadata = get_pid_metadata($ua, $pid);
++ for ( qw/ name episode available duration thumbnail desc guidance / ) {
++ $prog{$pid}{$_} = $metadata{$_} if ! $prog{$pid}{$_};
++ }
+
+- # Determine the correct filenames for this download
+- $prog{$pid}{ext} = 'mp3';
+- $prog{$pid}{ext} = 'ra' if $opt{raw};
+- $prog{$pid}{ext} = 'wav' if $opt{wav};
+- $prog{$pid}{fileprefix} = generate_download_filename_prefix( $pid, ${dir}, $opt{fileprefix} || "<longname> - <episode> <pid>" );
+- logger "\rINFO: File name prefix = $prog{$pid}{fileprefix} \n";
+- $prog{$pid}{dir} = $dir;
+- my $file_done = "${dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
+- my $file = "${dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
+- $prog{$pid}{filename} = $file_done;
+- if ( -f $file_done ) {
+- logger "WARNING: File $file_done already exists\n\n";
+- return 1;
+- }
++ $prog{$pid}{fileprefix} = generate_download_filename_prefix( $pid, $prog{$pid}{dir}, $opt{fileprefix} || "<name> <pid>" );
++ logger "\rINFO: File name prefix = $prog{$pid}{fileprefix} \n";
++ # Create a subdir if there are multiple parts
++ if ($#url_list > 0) {
++ $prog{$pid}{dir} .= "/$prog{$pid}{fileprefix}";
++ logger "INFO: Creating subdirectory $prog{$pid}{dir} for programme\n" if $opt{verbose};
++ mkpath $prog{$pid}{dir} if ! -d $prog{$pid}{dir};
++ }
++ my $file_done = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
++ my $file = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
++ $prog{$pid}{filename} = $file_done;
+
+- # Skip from here if we are only testing downloads
+- return 1 if $opt{test};
++ # Display metadata
++ display_metadata( $prog{$pid}, qw/ pid index name duration available expiry desc / );
+
+- # Create symlink filename if required
+- my $file_symlink;
+- if ( $opt{symlink} ) {
+- # Substitute the fields for the pid
+- $file_symlink = substitute_fields( $pid, $opt{symlink} );
+- }
++ # Skip from here if we are only testing downloads
++ return 1 if $opt{test};
+
+- # Do the audio download
+- return download_rtsp_stream( $ua, $url_2, $file, $file_done, $file_symlink, $pid );
+- }
++ return download_stream_mms_video( $ua, (join '|', @url_list), $file, $file_done, $pid );
++}
++
++
++
++sub download_programme_podcast {
++ my ( $ua, $pid ) = ( @_ );
++ my %streamdata;
++
++ $prog{$pid}{dir} = $download_dir{ $prog{$pid}{type} };
++
++ # Determine the correct filename and extension for this download
++ my $filename_orig = $pid;
++ $prog{$pid}{ext} = $pid;
++ $filename_orig =~ s|^.+/(.+?)\.\w+$|$1|g;
++ $prog{$pid}{ext} =~ s|^.*\.(\w+)$|$1|g;
++ $prog{$pid}{fileprefix} = generate_download_filename_prefix($pid, $prog{$pid}{dir}, $opt{fileprefix} || "<longname> - <episode> $filename_orig");
++ logger "\rINFO: File name prefix = $prog{$pid}{fileprefix} \n";
++ my $file_done = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
++ my $file = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
++ $prog{$pid}{filename} = $file_done;
++ if ( -f $file_done && stat($file_done)->size > $min_download_size ) {
++ logger "WARNING: File $file_done already exists\n\n";
++ return 1;
++ }
++
++ # Skip from here if we are only testing downloads
++ return 1 if $opt{test};
++
++ # Create symlink filename if required
++ my $file_symlink;
++ if ( $opt{symlink} ) {
++ # Substitute the fields for the pid
++ $file_symlink = substitute_fields( $pid, $opt{symlink} );
++ }
++
++ return download_stream_podcast( $ua, $pid, $file, $file_done, $file_symlink );
++}
++
++
++
++sub download_programme_radio_realaudio {
++ my $ua = shift;
++ my $pid = shift;
++ my %version_pids = %{@_[0]};
++ my %streamdata;
++
++ # Check dependancies for radio programme transcoding / streaming
++ # Check if we need 'tee'
++ if ( (! exists_in_path($tee)) && $opt{stdout} && (! $opt{nowrite}) ) {
++ logger "\nERROR: $tee does not exist in path, skipping\n";
++ return 'abort';
++ }
++ if (! exists_in_path($mplayer)) {
++ logger "\nWARNING: Required $mplayer does not exist\n";
++ return 'next';
++ }
++ # Check if we have mplayer and lame
++ if ( (! $opt{wav}) && (! $opt{raw}) && (! exists_in_path($lame)) ) {
++ logger "\nWARNING: Required $lame does not exist, will save file in wav format\n";
++ $opt{wav} = 1;
++ }
++
++ $prog{$pid}{dir} = $download_dir{ $prog{$pid}{type} };
++ $prog{$pid}{ext} = 'mp3';
++ $prog{$pid}{ext} = 'ra' if $opt{raw};
++ $prog{$pid}{ext} = 'wav' if $opt{wav};
+
++ my $url_2 = %{get_media_stream_data( $pid, $version_pids{default}, 'realaudio')}->{streamurl};
++
++ # Report error if no versions are available
++ if ( ! $url_2 ) {
++ logger "WARNING: RealAudio version not available\n";
++ return 'next';
+ } else {
+- # Type is definitely tv
+- $prog{$pid}{type} = 'tv';
+- $dir = $download_dir{ $prog{$pid}{type} };
++ logger "INFO: Stage 2 URL = $url_2\n" if $opt{verbose};
++ }
++
++ # Determine the correct filenames for this download
++ $prog{$pid}{fileprefix} = generate_download_filename_prefix( $pid, $prog{$pid}{dir}, $opt{fileprefix} || "<longname> - <episode> <pid>" );
++ logger "\rINFO: File name prefix = $prog{$pid}{fileprefix} \n";
++ my $file_done = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
++ my $file = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
++ $prog{$pid}{filename} = $file_done;
++ if ( -f $file_done ) {
++ logger "WARNING: File $file_done already exists\n\n";
++ return 'abort';
+ }
+
++ # Skip from here if we are only testing downloads
++ return 'abort' if $opt{test};
+
+- # iPhone mp3/h.264 stream downloading...
++ # Create symlink filename if required
++ my $file_symlink;
++ if ( $opt{symlink} ) {
++ # Substitute the fields for the pid
++ $file_symlink = substitute_fields( $pid, $opt{symlink} );
++ }
+
+- # Check if we have vlc - if not use iPhone mode
+- if ( $opt{n95} && (! exists_in_path($vlc)) ) {
+- logger "\nWARNING: Required $vlc does not exist, falling back to iPhone mode\n";
+- $opt{n95} = 0;
+- }
++ # Do the audio download
++ return download_stream_rtsp( $ua, $url_2, $file, $file_done, $file_symlink, $pid );
++}
+
+
++
++sub download_programme_radio_iphone {
++ my $ua = shift;
++ my $pid = shift;
++ my %version_pids = %{@_[0]};
++ my %streamdata;
++ my $url_2;
++
++ $prog{$pid}{dir} = $download_dir{ $prog{$pid}{type} };
++ $prog{$pid}{ext} = 'mp3';
++
++ my $url_2 = %{get_media_stream_data( $pid, $version_pids{ $prog{$pid}{version} }, 'iphone')}->{streamurl};
++
++ # Report error if no versions are available
++ if ( ! $url_2 ) {
++ logger "WARNING: iPhone stream media not available\n";
++ return 'next';
++ } else {
++ logger "INFO: Stage 2 URL = $url_2\n" if $opt{verbose};
++ }
++
++ # Determine the correct filenames for this download
++ $prog{$pid}{fileprefix} = generate_download_filename_prefix( $pid, $prog{$pid}{dir}, $opt{fileprefix} || "<longname> - <episode> <pid> <version>" );
++ logger "\rINFO: File name prefix = $prog{$pid}{fileprefix} \n";
++ my $file_done = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
++ my $file = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
++ $prog{$pid}{filename} = $file_done;
++ if ( -f $file_done ) {
++ logger "WARNING: File $file_done already exists\n\n";
++ return 'abort';
++ }
++
++ # Skip from here if we are only testing downloads
++ return 'abort' if $opt{test};
++
++ # Create symlink filename if required
++ my $file_symlink;
++ if ( $opt{symlink} ) {
++ # Substitute the fields for the pid
++ $file_symlink = substitute_fields( $pid, $opt{symlink} );
++ }
++
++ my $return;
++ # Disable proxy here if required
++ $ua->proxy( ['http'] => undef ) if $opt{partialproxy};
++ $return = download_stream_iphone( $ua, $url_2, $pid, $file, $file_done, $file_symlink, 0 );
++ # Re-enable proxy here if required
++ $ua->proxy( ['http'] => $proxy_url ) if $opt{partialproxy};
++
++ return $return;
++}
++
++
++
++sub download_programme_radio_flashaudio {
++ my $ua = shift;
++ my $pid = shift;
++ my $mode = shift;
++ my %version_pids = %{@_[0]};
++ my %streamdata;
++ my $url_2;
++
++ # Force raw mode if ffmpeg is not installed
++ if ( ! exists_in_path($ffmpeg) ) {
++ logger "\nWARNING: $ffmpeg does not exist - not converting flv file\n";
++ $opt{raw} = 1;
++ }
++ # Disable rtmp modes if rtmpdump does not exist
++ if ( ! exists_in_path($rtmpdump) ) {
++ logger "\nERROR: Required program $rtmpdump does not exist (see http://linuxcentre.net/getiplayer/installation and http://linuxcentre.net/getiplayer/download)\n";
++ return 'next';
++ }
++
++ $prog{$pid}{dir} = $download_dir{ $prog{$pid}{type} };
++ $prog{$pid}{ext} = 'mp3';
++ $prog{$pid}{ext} = 'flv' if $opt{raw};
++
++ logger "INFO: Trying to get media stream metadata for flashaudio RTMP mode\n" if $opt{verbose};
++ %streamdata = %{ get_media_stream_data( $pid, $version_pids{ $prog{$pid}{version} }, 'flashaudio') };
++ $url_2 = $streamdata{streamurl};
++ if ( ! $url_2 ) {
++ logger "WARNING: No flashaudio version available\n";
++ return 'next';
++ }
++
++ # Determine the correct filenames for this download
++ $prog{$pid}{fileprefix} = generate_download_filename_prefix( $pid, $prog{$pid}{dir}, $opt{fileprefix} || "<longname> - <episode> <pid> <version>" );
++ logger "\rINFO: File name prefix = $prog{$pid}{fileprefix} \n";
++ my $file_done = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
++ my $file = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
++ $prog{$pid}{filename} = $file_done;
++ if ( -f $file_done ) {
++ logger "WARNING: File $file_done already exists\n\n";
++ return 'abort';
++ }
++
++ # Skip from here if we are only testing downloads
++ return 'abort' if $opt{test};
++
++ # Create symlink filename if required
++ my $file_symlink;
++ if ( $opt{symlink} ) {
++ # Substitute the fields for the pid
++ $file_symlink = substitute_fields( $pid, $opt{symlink} );
++ }
++
++ # Do the RTMP flashaudio download
++ return download_stream_rtmp( $ua, $streamdata{streamurl}, $pid, $mode, $streamdata{application}, $streamdata{tcurl}, $streamdata{authstring}, $streamdata{swfurl}, $file, $file_done, $file_symlink );
++}
++
++
++
++# Usage: download_programme_tv (<pid>)
++sub download_programme_tv {
++ my $ua = shift;
++ my $pid = shift;
++ my $mode = shift;
++ my %version_pids = %{@_[0]};
++ my %streamdata;
+ my $url_2;
+ my $got_url;
+
++ # Check if we have vlc - if not use iPhone mode
++ if ( $opt{vmode} eq 'n95' && (! exists_in_path($vlc)) ) {
++ logger "\nWARNING: Required $vlc does not exist\n";
++ return 'next';
++ }
++ # if rtmpdump does not exist
++ if ( $mode =~ /^(rtmp|flash)/ && ! exists_in_path($rtmpdump)) {
++ logger "WARNING: Required program $rtmpdump does not exist (see http://linuxcentre.net/getiplayer/installation and http://linuxcentre.net/getiplayer/download)\n";
++ return 'next';
++ }
++ # Force raw mode if ffmpeg is not installed
++ if ( $mode =~ /^(flash|rtmp)/ && ! exists_in_path($ffmpeg)) {
++ logger "\nWARNING: $ffmpeg does not exist - not converting flv file\n";
++ $opt{raw} = 1;
++ }
++
++ $prog{$pid}{dir} = $download_dir{ $prog{$pid}{type} };
++ $prog{$pid}{ext} = 'mov';
++ # Lookup table to determine which ext to use for different download methods
++ my %stream_ext = (
++ iphone => 'mov',
++ flashhigh => 'mp4',
++ flashnormal => 'avi',
++ flashwii => 'avi',
++ n95_wifi => '3gp',
++ n95_3g => '3gp',
++ );
++ $prog{$pid}{ext} = $stream_ext{$mode} if not $opt{raw};
++ $prog{$pid}{ext} = 'flv' if $mode =~ /^(flash|rtmp)/ && $opt{raw};
++
+ # Do this for each version tried in this order (if they appeared in the content)
+ for my $version ( @version_search_list ) {
+
+@@ -1528,52 +2147,41 @@
+ logger "INFO: Checking existence of $version version\n";
+ $prog{$pid}{version} = $version;
+ logger "INFO: Version = $prog{$pid}{version}\n" if $opt{verbose};
+- if( ! $opt{rtmp} ) {
+- $url_2 = get_iphone_stream_download_url( $ua, $version_pids{$version} );
+- } else {
+- $url_2 = get_media_stream_data( $pid, $version_pids{ $prog{$pid}{version} }, 'flashhigh' );
+- }
+- $got_url = 1;
++ # Try to get stream data
++ %streamdata = %{ get_media_stream_data( $pid, $version_pids{ $prog{$pid}{version} }, $mode) };
++ $url_2 = $streamdata{streamurl};
+ }
+ # Break out of loop if we have an actual URL
+- last if $got_url && $url_2;
+- }
+-
+- # Report error if no versions are available
+- if ( ! $got_url ) {
+- logger "ERROR: No versions exist for download\n";
+- return 14;
++ last if $url_2;
+ }
+
+ # Display media stream data if required
+ if ( $opt{streaminfo} ) {
+- get_media_stream_data( $pid, $version_pids{'default'}, 'all' );
+- return 1;
++ display_stream_info( $pid, $version_pids{ $prog{$pid}{version} }, 'all' );
++ $opt{quiet} = 1;
++ return 'skip';
+ }
+
+- # Report error if failed to get URL for version
+- if ( $got_url && ! $url_2 ) {
+- logger "ERROR: No Stage 2 URL\n" if $opt{verbose};
+- # If mp3 audio stream does not exist force realaudio mode and retry
+- if ( $usemp3 && ! $opt{mp3audio}) {
+- $opt{realaudio} = 1;
+- return 'retry';
+- }
+- return 15;
++ # Report error if no versions are available
++ if ( ! $url_2 ) {
++ logger "WARNING: No $mode versions available\n";
++ return 'next';
+ }
+-
++
+ # Determine the correct filenames for this download
+- $prog{$pid}{fileprefix} = generate_download_filename_prefix( $pid, $dir, $opt{fileprefix} || "<longname> - <episode> <pid> <version>" );
++ $prog{$pid}{fileprefix} = generate_download_filename_prefix( $pid, $prog{$pid}{dir}, $opt{fileprefix} || "<longname> - <episode> <pid> <version>" );
+ logger "\rINFO: File name prefix = $prog{$pid}{fileprefix} \n";
+- $prog{$pid}{dir} = $dir;
+- my $file_done = "${dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
+- my $file = "${dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
++ my $file_done = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.$prog{$pid}{ext}";
++ my $file = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.partial.$prog{$pid}{ext}";
+ $prog{$pid}{filename} = $file_done;
+ if ( -f $file_done ) {
+- logger "WARNING: File $file_done already exists\n\n";
+- return 1;
++ logger "ERROR: File $file_done already exists\n\n";
++ return 'abort';
+ }
+
++ # Skip from here if we are only testing downloads
++ return 'abort' if $opt{test};
++
+ # Create symlink filename if required
+ my $file_symlink;
+ if ( $opt{symlink} ) {
+@@ -1581,53 +2189,34 @@
+ $file_symlink = substitute_fields( $pid, $opt{symlink} );
+ }
+
+- # Skip from here if we are only testing downloads
+- return 1 if $opt{test};
+-
+- # Get subtitles if they exist and are required
++ # Get subtitles if they exist and are required
++ # best to do this before d/l of file so that the subtitles can be enjoyed while download progresses
+ my $subfile_done;
+ my $subfile;
+ if ( $opt{subtitles} ) {
+- $subfile_done = "${dir}/$prog{$pid}{fileprefix}.srt";
+- $subfile = "${dir}/$prog{$pid}{fileprefix}.partial.srt";
+- download_subtitles( $ua, $subfile, $version_pids{ $prog{$pid}{version} } );
++ $subfile_done = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.srt";
++ $subfile = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}.partial.srt";
++ $ua->proxy( ['http'] => undef ) if $opt{partialproxy};
++ download_stream_subtitles( $ua, $subfile, $version_pids{ $prog{$pid}{version} } );
++ $ua->proxy( ['http'] => $proxy_url ) if $opt{partialproxy};
+ }
+
+ my $return;
+ # Do rtmp download
+- if ( $opt{rtmp} ) {
+- # Get player url
+- my %metadata = get_pid_metadata( $ua, $pid );
+- # get this redirected page and find out where it is redirected to
+- my ($ub, $request, $response, $prog_url);
+- $ub = new LWP::UserAgent;
+- $request = new HTTP::Request HEAD => $metadata{player};
+- $response = $ub->request($request);
+- $prog_url = $response->request->url;
+- $return = download_h264_rtmp_stream( $ua, $url_2, $prog_url, $file, $file_done, $file_symlink );
++ if ( $mode =~ /^(rtmp|flash)/ ) {
++ $return = download_stream_rtmp( $ua, $streamdata{streamurl}, $pid, $mode, $streamdata{application}, $streamdata{tcurl}, $streamdata{authstring}, $streamdata{swfurl}, $file, $file_done, $file_symlink );
+
+ # Do the N95 h.264 download
+- } elsif ( $opt{n95} ) {
+- my $url = get_media_stream_data( $pid, $version_pids{ $prog{$pid}{version} }, 'n95_wifi' );
+- $return = download_h264_low_stream( $ua, $url, $file, $file_done );
++ } elsif ( $mode =~ /^n95/ ) {
++ $return = download_stream_h264_low( $ua, $url_2, $file, $file_done, $pid, $mode );
+
+ # Do the iPhone h.264 download
+- } elsif ( $prog{$pid}{type} eq 'tv' ) {
+- # Disable proxy here if required
+- $ua->proxy( ['http'] => undef ) if $opt{partialproxy};
+- $return = download_iphone_stream( $ua, $url_2, $file, $file_done, $file_symlink, 1 );
+- # Re-enable proxy here if required
+- $ua->proxy( ['http'] => $proxy_url ) if $opt{partialproxy};
+-
+- # Do the iPhone mp3 download
+- } elsif ( $prog{$pid}{type} eq 'radio' ) {
++ } else {
+ # Disable proxy here if required
+ $ua->proxy( ['http'] => undef ) if $opt{partialproxy};
+- $return = download_iphone_stream( $ua, $url_2, $file, $file_done, $file_symlink, 0 );
++ $return = download_stream_iphone( $ua, $url_2, $pid, $file, $file_done, $file_symlink, 1 );
+ # Re-enable proxy here if required
+ $ua->proxy( ['http'] => $proxy_url ) if $opt{partialproxy};
+- # If the iphone mp3 download fails then it's probably not ready yet so retry using realaudio
+- $opt{realaudio} = 1 if $return eq 'retry';
+ }
+
+ # Rename the subtitle file accordingly
+@@ -1647,13 +2236,12 @@
+
+
+ # Download Subtitles, convert to srt(SubRip) format and apply time offset
+-sub download_subtitles {
++sub download_stream_subtitles {
+ my ( $ua, $file, $verpid ) = @_;
+ my $suburl;
+ my $subs;
+ logger "INFO: Getting Subtitle metadata for $verpid\n" if $opt{verbose};
+- $suburl = get_media_stream_data( undef, $verpid, 'subtitles' );
+-
++ $suburl = %{get_media_stream_data( undef, $verpid, 'subtitles')}->{streamurl};
+ # Return if we have no url
+ if (! $suburl) {
+ logger "INFO: Subtitles not available\n";
+@@ -1793,12 +2381,12 @@
+
+ # Get title
+ # <title>Amazon with Bruce Parry: Episode 1</title>
+- my ( $title, $type );
++ my ( $title, $prog_type );
+ $title = $1 if $xml =~ m{<title>\s*(.+?)\s*<\/title>};
+
+ # Get type
+- $type = 'tv' if grep /kind="programme"/, $xml;
+- $type = 'radio' if grep /kind="radioProgramme"/, $xml;
++ $prog_type = 'tv' if grep /kind="programme"/, $xml;
++ $prog_type = 'radio' if grep /kind="radioProgramme"/, $xml;
+
+ # Split into <item kind="programme"> sections
+ for ( split /<item\s+kind="(radioProgramme|programme)"/, $xml ) {
+@@ -1812,310 +2400,389 @@
+ $version_pids{$version} = $verpid;
+ logger "INFO: Version: $version, VersionPid: $verpid\n" if $opt{verbose};
+ }
++
++ # Extract Long Name, e.g.: iplayer.episode.setTitle("DIY SOS: Series 16: Swansea"), Strip off the episode name
++ $title =~ s/^(.+):.*?$/$1/g;
++
+ # Add to prog hash
+ $prog{$pid}{versions} = join ',', keys %version_pids;
+- return ( $type, $title, %version_pids );
++ return ( $prog_type, $title, %version_pids );
+ }
+
+
+
+ # Gets media streams data for this version pid
+-# $media = all|flashhigh|flashnormal|iphone|flashwii|n95_wifi|n95_3g|mobile|flashaudio|realaudio|wma|subtitles
++# $media = all|itv|flashhigh|flashnormal|iphone|flashwii|n95_wifi|n95_3g|mobile|flashaudio|realaudio|wma|subtitles
+ sub get_media_stream_data {
+ my ( $pid, $verpid, $media ) = @_;
+- my %streams;
+- my $ua = LWP::UserAgent->new();
++ my %data;
++
+ # Setup user agent with redirection enabled
+- $ua->timeout([$lwp_request_timeout]);
+- $ua->proxy( ['http'] => $proxy_url );
+- $ua->cookie_jar( HTTP::Cookies->new( file => $cookiejar, autosave => 1, ignore_discard => 1 ) );
++ my $ua = create_ua('desktop');
+ $opt{quiet} = 0 if $opt{streaminfo};
+- logger "INFO: Getting media stream metadata for $prog{$pid}{name} - $prog{$pid}{episode}, $verpid\n" if $pid;
+- my $xml1 = request_url_retry($ua, $media_stream_data_prefix.$verpid, 3, '', '');
+- logger "\n$xml1\n" if $opt{debug};
+- # flatten
+- $xml1 =~ s/\n/ /g;
+
+- for my $xml ( split /<media/, $xml1 ) {
+- $xml = "<media".$xml;
++ # ITV streams
++ if ( $prog{$pid}{type} eq 'itv' ) {
++ my $prog_type = 'itv';
++ $data{$prog_type}{type} = 'ITV ASF Video stream';
++ $opt{quiet} = 1 if $opt{streaminfo};
++ $data{$prog_type}{streamurl} = join('|', get_stream_url_itv($ua, $pid) );
++ $opt{quiet} = 0 if $opt{streaminfo};
++
++ # BBC streams
++ } else {
++ my $xml1 = request_url_retry($ua, $media_stream_data_prefix.$verpid, 3, '', '');
++ logger "\n$xml1\n" if $opt{debug};
++ # flatten
++ $xml1 =~ s/\n/ /g;
++
++ for my $xml ( split /<media/, $xml1 ) {
++ $xml = "<media".$xml;
++ my $prog_type;
++
++ # h.264 high quality stream
++ # <media kind="video"
++ # width="640"
++ # height="360"
++ # type="video/mp4"
++ # encoding="h264" >
++ # <connection
++ # priority="10"
++ # application="bbciplayertok"
++ # kind="level3"
++ # server="bbciplayertokfs.fplive.net"
++ # identifier="mp4:b000zxf4-H26490898078"
++ # authString="d52f77fede048f1ffd6587fd47446dee"
++ # />
++ # application: bbciplayertok
++ # tcURL: rtmp://bbciplayertokfs.fplive.net:80/bbciplayertok
++ if ( $media =~ /^(flashhigh|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/mp4".+?encoding="h264".+?application="(.+?)".+?kind="level3"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?authString="(.+?)"} ) {
++ $prog_type = 'flashhigh';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{application}, $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{authstring} ) = ( $1, $2, $3, $4 );
++ $data{$prog_type}{type} = 'Flash RTMP H.264 high quality stream';
++ $data{$prog_type}{tcurl} = "rtmp://$data{$prog_type}{server}:80/$data{$prog_type}{application}";
++ $data{$prog_type}{swfurl} = "http://www.bbc.co.uk/emp/9player.swf?revision=7276";
++ $data{$prog_type}{streamurl} = "rtmp://$data{$prog_type}{server}:1935/ondemand?_fcs_vhost=$data{$prog_type}{server}&auth=$data{$prog_type}{authstring}&aifp=v001&slist=$data{$prog_type}{identifier}";
++ }
++
++ # h.264 normal quality stream
++ # <media kind="video"
++ # width="640"
++ # height="360"
++ # type="video/x-flv"
++ # encoding="vp6" >
++ # <connection
++ # priority="10"
++ # kind="akamai"
++ # server="cp41752.edgefcs.net"
++ # identifier="secure/b000zxf4-streaming90898078"
++ # authString="daEdSdgbcaibFa7biaobCaYdadyaTamazbq-biXsum-cCp-FqrECnEoGBwFvwG"
++ # />
++ # </media>
++ #
++ # application (e.g.): ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=daEcia8aQaRardxdwb_dCbvc0cPbLavc2cL-bjw5rj-cCp-JnlDCnzn.MEqHpxF&aifp=v001&slist=secure/b000gy717streaming103693754
++ # tcURL: rtmp://88.221.26.165:80/ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=daEcia8aQaRardxdwb_dCbvc0cPbLavc.2cL-bjw5rj-cCp-JnlDCnznMEqHpxF&aifp=v001&slist=secure/b000gy717streaming103693754
++ if ( $media =~ /^(flashnormal|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/x-flv".+?encoding="vp6".+?kind="akamai"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?authString="(.+?)"} ) {
++ $prog_type = 'flashnormal';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{authstring} ) = ( $1, $2, $3 );
++ $data{$prog_type}{application} = "ondemand?_fcs_vhost=$data{$prog_type}{server}&auth=$data{$prog_type}{authstring}&aifp=v001&slist=$data{$prog_type}{identifier}";
++ $data{$prog_type}{type} = 'Flash RTMP H.264 normal quality stream';
++ $data{$prog_type}{tcurl} = "rtmp://$data{$prog_type}{server}:80/$data{$prog_type}{application}";
++ $data{$prog_type}{swfurl} = "http://www.bbc.co.uk/emp/9player.swf?revision=7276";
++ $data{$prog_type}{streamurl} = "rtmp://$data{$prog_type}{server}:1935/ondemand?_fcs_vhost=$data{$prog_type}{server}&auth=$data{$prog_type}{authstring}&aifp=v001&slist=$data{$prog_type}{identifier}";
++ }
++
++ # Wii h.264 standard quality stream
++ #<media kind="video"
++ # width="512"
++ # height="288"
++ # type="video/x-flv"
++ # encoding="spark" >
++ # <connection
++ # priority="10"
++ # kind="akamai"
++ # server="cp41752.edgefcs.net"
++ # identifier="secure/5242138581547639062"
++ # authString="daEd8dLbGaPaZdzdNcwd.auaydJcxcHandp-biX5YL-cCp-BqsECnxnGEsHwyE"
++ # />
++ #</media>
++ # application (e.g.): ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=daEcpc6cYbhdIakdWduc6bJdPbydbazdmdp-bjxPBF-cCp-GptFAoDqJBnHvzC&aifp=v001&slist=secure/b000g884xstreaming101052333
++ # tcURL: rtmp: //88.221.26.173:1935/ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=daEcpc6cYbhdIakdWduc6bJdPbydbazdmdp-bjxPBF-cCp-GptFAoDqJBnHvzC&aifp=v001&slist=secure/b000g884xstreaming101052333
++ # swfUrl: http://www.bbc.co.uk/emp/iplayer/7player.swf?revision=3897
++ if ( $media =~ /^(flashwii|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/x-flv".+?encoding="spark".+?kind="akamai"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?authString="(.+?)"} ) {
++ $prog_type = 'flashwii';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{authstring} ) = ( $1, $2, $3 );
++ $data{$prog_type}{application} = "ondemand?_fcs_vhost=$data{$prog_type}{server}&auth=$data{$prog_type}{authstring}&aifp=v001&slist=$data{$prog_type}{identifier}";
++ $data{$prog_type}{type} = 'Flash RTMP H.264 Wii stream';
++ $data{$prog_type}{tcurl} = "rtmp://$data{$prog_type}{server}:1935/$data{$prog_type}{application}";
++ $data{$prog_type}{swfurl} = "http://www.bbc.co.uk/emp/iplayer/7player.swf?revision=3897";
++ $data{$prog_type}{streamurl} = "rtmp://$data{$prog_type}{server}:1935/ondemand?_fcs_vhost=$data{$prog_type}{server}&auth=$data{$prog_type}{authstring}&aifp=v001&slist=$data{$prog_type}{identifier}";
++ }
++
++ # iPhone h.264/mp3 stream
++ #<media kind="video"
++ # width="480"
++ # height="272"
++ # type="video/mp4"
++ # encoding="h264" >
++ # <connection
++ # priority="10"
++ # kind="sis"
++ # server="http://www.bbc.co.uk/mediaselector/3/auth/stream/"
++ # identifier="5242138581547639062"
++ # href="http://www.bbc.co.uk/mediaselector/3/auth/stream/5242138581547639062.mp4"
++ # />
++ #</media>
++ if ( $media =~ /^(iphone|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/mp4".+?encoding="h264".+?kind="sis"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
++ $prog_type = 'iphone';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{streamurl} ) = ( $1, $2, $3 );
++ $data{$prog_type}{type} = 'iPhone stream';
++ }
++
++ # Nokia N95 h.264 low quality stream (WiFi)
++ #<media kind="video"
++ # type="video/mpeg"
++ # encoding="h264" >
++ # <connection
++ # priority="10"
++ # kind="sis"
++ # server="http://www.bbc.co.uk/mediaselector/4/sdp/"
++ # identifier="b00108ld/iplayer_streaming_n95_wifi"
++ # href="http://www.bbc.co.uk/mediaselector/4/sdp/b00108ld/iplayer_streaming_n95_wifi"
++ # />
++ #</media>
++ if ( $media =~ /^(n95_wifi|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/mpeg".+?encoding="h264".+?kind="sis"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
++ $prog_type = 'n95_wifi';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{href} ) = ( $1, $2, $3 );
++ $data{$prog_type}{type} = 'Nokia N95 h.264 low quality WiFi stream';
++ $opt{quiet} = 1 if $opt{streaminfo};
++ chomp( $data{$prog_type}{streamurl} = request_url_retry($ua, $data{$prog_type}{href}, 2, '', '') );
++ $opt{quiet} = 0 if $opt{streaminfo};
++ }
++
++ # Nokia N95 h.264 low quality stream (3G)
++ #<media kind=""
++ # expires="2008-10-30T12:29:00+00:00"
++ # type="video/mpeg"
++ # encoding="h264" >
++ # <connection
++ # priority="10"
++ # kind="sis"
++ # server="http://www.bbc.co.uk/mediaselector/4/sdp/"
++ # identifier="b009tzxx/iplayer_streaming_n95_3g"
++ # href="http://www.bbc.co.uk/mediaselector/4/sdp/b009tzxx/iplayer_streaming_n95_3g"
++ # />
++ #</media>
++ if ( $media =~ /^(n95_3g|all)$/ && $xml =~ m{<media\s+kind="".+?type="video/mpeg".+?encoding="h264".+?kind="sis"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
++ $prog_type = 'n95_3g';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{href} ) = ( $1, $2, $3 );
++ $data{$prog_type}{type} = 'Nokia N95 h.264 low quality 3G stream';
++ $opt{quiet} = 1 if $opt{streaminfo};
++ chomp( $data{$prog_type}{streamurl} = request_url_retry($ua, $data{$prog_type}{href}, 2, '', '') );
++ $opt{quiet} = 0 if $opt{streaminfo};
++ }
++
++ # Mobile WMV DRM
++ #<media kind="video"
++ # expires="2008-10-20T21:59:00+01:00"
++ # type="video/wmv" >
++ # <connection
++ # priority="10"
++ # kind="licence"
++ # server="http://iplayldsvip.iplayer.bbc.co.uk/WMLicenceIssuer/LicenceDelivery.asmx"
++ # identifier="0A1CA43B-98A8-43EA-B684-DA06672C0575"
++ # href="http://iplayldsvip.iplayer.bbc.co.uk/WMLicenceIssuer/LicenceDelivery.asmx/0A1CA43B-98A8-43EA-B684-DA06672C0575"
++ # />
++ #<connection
++ # priority="10"
++ # kind="sis"
++ # server="http://directdl.iplayer.bbc.co.uk/windowsmedia/"
++ # identifier="AmazonwithBruceParry_Episode5_200810132100_mobile"
++ # href="http://directdl.iplayer.bbc.co.uk/windowsmedia/AmazonwithBruceParry_Episode5_200810132100_mobile.wmv"
++ # />
++ #</media>
++ if ( $media =~ /^(mobile|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/wmv".+?kind="sis"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
++ $prog_type = 'mobile';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{streamurl} ) = ( $1, $2, $3 );
++ $data{$prog_type}{type} = 'Mobile WMV DRM stream';
++ }
++
++ # Audio rtmp mp3
++ #<media kind="audio"
++ # type="audio/mpeg"
++ # encoding="mp3" >
++ # <connection
++ # priority="10"
++ # kind="akamai"
++ # server="cp48181.edgefcs.net"
++ # identifier="mp3:secure/radio1/RBN2_mashup_b00d67h9_2008_09_05_22_14_25"
++ # authString="daEbQa1c6cda6aHdudxagcCcUcVbvbncmdK-biXtzq-cCp-DnoFIpznNBqHnzF"
++ # />
++ #</media>
++ #app: ondemand?_fcs_vhost=cp48181.edgefcs.net&auth=daEasducLbidOancObacmc0amd6d7ana8c6-bjx.9v-cCp-JqlFHoEq.FBqGnxC&aifp=v001&slist=secure/radio1/RBN2_radio_1_-_wednesday_1000_b00g3xcj_2008_12_31_13_21_49
++ #swfUrl: http://www.bbc.co.uk/emp/9player.swf?revision=7276
++ #tcUrl: rtmp://92.122.210.173:1935/ondemand?_fcs_vhost=cp48181.edgefcs.net&auth=daEasducLbidOancObacmc0amd6d7ana8c6-bjx.9v-cCp-JqlFHoEqFBqGnxC&aifp=v001&slist=secure/radio1/RBN2_radio_1_-_wednesday_1.000_b00g3xcj_2008_12_31_13_21_49
++ #pageUrl: http://www.bbc.co.uk/iplayer/episode/b00g3xp7/Annie_Mac_31_12_2008/
++ if ( $media =~ /^(flashaudio|all)$/ && $xml =~ m{<media\s+kind="audio".+?type="audio/mpeg".+?encoding="mp3".+?kind="akamai"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?authString="(.+?)"} ) {
++ $prog_type = 'flashaudio';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{authstring} ) = ( $1, $2, $3 );
++ $data{$prog_type}{streamurl} = "rtmp://$data{$prog_type}{server}:1935/ondemand?_fcs_vhost=$data{$prog_type}{server}&auth=$data{$prog_type}{authstring}&aifp=v001&slist=$data{$prog_type}{identifier}";
++ # Remove offending mp3: at the start of the identifier (don't remove in stream url)
++ $data{$prog_type}{identifier} =~ s/^mp3://;
++ $data{$prog_type}{application} = "ondemand?_fcs_vhost=$data{$prog_type}{server}&auth=$data{$prog_type}{authstring}&aifp=v001&slist=$data{$prog_type}{identifier}";
++ $data{$prog_type}{type} = 'RTMP MP3 stream';
++ $data{$prog_type}{tcurl} = "rtmp://$data{$prog_type}{server}:1935/$data{$prog_type}{application}";
++ $data{$prog_type}{swfurl} = "http://www.bbc.co.uk/emp/9player.swf?revision=7276";
++ }
++
++ # RealAudio stream
++ #<media kind="audio"
++ # type="audio/real"
++ # encoding="real" >
++ # <connection
++ # priority="10"
++ # kind="sis"
++ # server="http://www.bbc.co.uk"
++ # identifier="/radio/aod/playlists/9h/76/d0/0b/2000_bbc_radio_one"
++ # href="http://www.bbc.co.uk/radio/aod/playlists/9h/76/d0/0b/2000_bbc_radio_one.ram"
++ # />
++ #</media>
++ # Realaudio for worldservice
++ #<media kind=""
++ #type="audio/real"
++ #encoding="real" >
++ #<connection
++ # priority="10"
++ # kind="edgesuite"
++ # server="http://http-ws.bbc.co.uk.edgesuite.net"
++ # identifier="/generatecssram.esi?file=/worldservice/css/nb/410060838.ra"
++ # href="http://http-ws.bbc.co.uk.edgesuite.net/generatecssram.esi?file=/worldservice/css/nb/410060838.ra"
++ #/>
++ #</media>
++ #</mediaSelection>
++ if ( $media =~ /^(realaudio|all)$/ && $xml =~ m{<media\s+kind="(audio|)".+?type="audio/real".+?encoding="real".+?kind="(sis|edgesuite)"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
++ $prog_type = 'realaudio';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{href} ) = ( $3, $4, $5 );
++ $data{$prog_type}{type} = 'RealAudio RTSP stream';
++ $opt{quiet} = 1 if $opt{streaminfo};
++ chomp( $data{$prog_type}{streamurl} = request_url_retry($ua, $data{$prog_type}{href}, 2, '', '') );
++ $data{$prog_type}{streamurl} =~ s/[\s\n]//g;
++ $opt{quiet} = 0 if $opt{streaminfo};
++ }
++
++ # Radio WMA (low quality)
++ #<mediaSelection xmlns="http://bbc.co.uk/2008/mp/mediaselection">
++ #<media kind=""
++ # type="audio/wma"
++ # encoding="wma" >
++ # <connection
++ # priority="10"
++ # kind="edgesuite"
++ # server="http://http-ws.bbc.co.uk.edgesuite.net"
++ # identifier="/generatecssasx.esi?file=/worldservice/css/nb/410060838"
++ # href="http://http-ws.bbc.co.uk.edgesuite.net/generatecssasx.esi?file=/worldservice/css/nb/410060838.wma"
++ # />
++ #</media>
++ if ( $media =~ /^(wma|all)$/ && $xml =~ m{<media\s+kind="(audio|)".+?type="audio/wma".+?encoding="wma".+?kind="(sis|edgesuite)"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
++ $prog_type = 'wma';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{href} ) = ( $3, $4, $5 );
++ $data{$prog_type}{type} = 'WMA MMS stream';
++ $opt{quiet} = 1 if $opt{streaminfo};
++ chomp( $data{$prog_type}{streamurl} = request_url_retry($ua, $data{$prog_type}{href}, 2, '', '') );
++ $data{$prog_type}{streamurl} =~ s/[\s\n]//g;
++ # HREF="mms://a1899.v394403.c39440.g.vm.akamaistream.net/7/1899/39440/1/bbcworldservice.download.akamai.com/39440//worldservice/css/nb/410060838.wma"
++ $data{$prog_type}{streamurl} =~ s/^.*href=\"(.+?)\".*$/$1/gi;
++ $opt{quiet} = 0 if $opt{streaminfo};
++ }
++
++ # Subtitles stream
++ #<media kind="captions"
++ # type="application/ttaf+xml" >
++ # <connection
++ # priority="10"
++ # kind="http"
++ # server="http://www.bbc.co.uk/iplayer/subtitles/"
++ # identifier="b0008dc8rstreaming89808204.xml"
++ # href="http://www.bbc.co.uk/iplayer/subtitles/b0008dc8rstreaming89808204.xml"
++ # />
++ #</media>
++ if ( $media =~ /^(subtitles|all)$/ && $xml =~ m{<media\s+kind="captions".+?type="application/ttaf\+xml".+?kind="http"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
++ $prog_type = 'subtitles';
++ logger "DEBUG: Processing $prog_type stream\n" if $opt{verbose};
++ ( $data{$prog_type}{server}, $data{$prog_type}{identifier}, $data{$prog_type}{streamurl} ) = ( $1, $2, $3 );
++ $data{$prog_type}{type} = 'Subtitles stream';
++ }
++ }
++ # Do iphone redirect check regardless of an xml entry for iphone - sometimes the iphone streams exist regardless
++ if ( my $streamurl = get_stream_url_iphone($ua, $verpid) ) {
++ my $prog_type = 'iphone';
++ $data{$prog_type}{type} = 'iPhone stream';
++ # Get iphone redirect
++ $data{$prog_type}{streamurl} = $streamurl;
++ } else {
++ logger "DEBUG: No iphone redirect stream\n" if $opt{verbose};
++ }
++
++ }
++ # Return a hash with media => url if 'all' is specified - otherwise just the specified url
++ if ( $media eq 'all' ) {
++ return %data;
++ } else {
++ # Make sure this hash exists before we pass it back...
++ $data{$media}{exists} = 0 if not defined $data{$media};
++ return $data{$media};
++ }
++}
++
+
+- my ($server, $authstring, $identifier, $href);
+
+- # h.264 high quality stream
+- # <media kind="video"
+- # width="640"
+- # height="360"
+- # type="video/mp4"
+- # encoding="h264" >
+- # <connection
+- # priority="10"
+- # application="bbciplayertok"
+- # kind="level3"
+- # server="bbciplayertokfs.fplive.net"
+- # identifier="mp4:b000zxf4-H26490898078"
+- # authString="d52f77fede048f1ffd6587fd47446dee"
+- # />
+- if ( $media =~ /^(flashhigh|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/mp4".+?encoding="h264".+?kind="level3"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?authString="(.+?)"} ) {
+- ( $server, $identifier, $authstring ) = ( $1, $2, $3 );
+- logger "INFO: RTMP h.264 high quality stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: authstring=$authstring\n" if $opt{verbose};
+- $streams{'flashhigh'} = "rtmp://${server}:1935/ondemand?_fcs_vhost=${server}&auth=${authstring}&aifp=v001&slist=${identifier}";
+- logger "INFO: RTMP high quality stream URL: $streams{'flashhigh'}\n";
+- }
+-
+- # h.264 normal quality stream
+- # <media kind="video"
+- # width="512"
+- # height="288"
+- # type="video/x-flv"
+- # encoding="vp6" >
+- # <connection
+- # priority="10"
+- # kind="akamai"
+- # server="cp41752.edgefcs.net"
+- # identifier="secure/b000zxf4-streaming90898078"
+- # authString="daEdSdgbcaibFa7biaobCaYdadyaTamazbq-biXsum-cCp-FqrECnEoGBwFvwG"
+- # />
+- # </media>
+- #
+- if ( $media =~ /^(flashnormal|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/x-flv".+?encoding="vp6".+?kind="akamai"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?authString="(.+?)"} ) {
+- ( $server, $identifier, $authstring ) = ( $1, $2, $3 );
+- logger "INFO: RTMP h.264 normal quality stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: authstring=$authstring\n" if $opt{verbose};
+- $streams{'flashnormal'} = "rtmp://${server}:1935/ondemand?_fcs_vhost=${server}&auth=${authstring}&aifp=v001&slist=${identifier}";
+- logger "INFO: RTMP normal quality stream URL: $streams{'flashnormal'}\n";
+- }
+-
+- # Wii h.264 standard quality stream
+- #<media kind="video"
+- # width="512"
+- # height="288"
+- # type="video/x-flv"
+- # encoding="spark" >
+- # <connection
+- # priority="10"
+- # kind="akamai"
+- # server="cp41752.edgefcs.net"
+- # identifier="secure/5242138581547639062"
+- # authString="daEd8dLbGaPaZdzdNcwd.auaydJcxcHandp-biX5YL-cCp-BqsECnxnGEsHwyE"
+- # />
+- #</media>
+- if ( $media =~ /^(flashwii|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/x-flv".+?encoding="spark".+?kind="akamai"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?authString="(.+?)"} ) {
+- ( $server, $identifier, $authstring ) = ( $1, $2, $3 );
+- logger "INFO: RTMP Wii normal quality stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: authstring=$authstring\n" if $opt{verbose};
+- $streams{'flashwii'} = "rtmp://${server}:1935/ondemand?_fcs_vhost=${server}&auth=${authstring}&aifp=v001&slist=${identifier}";
+- logger "INFO: RTMP Wii normal quality stream URL: $streams{'flashwii'}\n";
+- }
+-
+- # iPhone h.264/mp3 stream
+- #<media kind="video"
+- # width="480"
+- # height="272"
+- # type="video/mp4"
+- # encoding="h264" >
+- # <connection
+- # priority="10"
+- # kind="sis"
+- # server="http://www.bbc.co.uk/mediaselector/3/auth/stream/"
+- # identifier="5242138581547639062"
+- # href="http://www.bbc.co.uk/mediaselector/3/auth/stream/5242138581547639062.mp4"
+- # />
+- #</media>
+- if ( $media =~ /^(iphone|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/mp4".+?encoding="h264".+?kind="sis"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
+- ( $server, $identifier, $href ) = ( $1, $2, $3 );
+- logger "INFO: iPhone stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: href=$href\n" if $opt{verbose};
+- $streams{'iphone'} = "$href";
+- logger "INFO: iPhone stream URL: $streams{'iphone'}\n";
+- }
+-
+- # Nokia N95 h.264 low quality stream (WiFi)
+- #<media kind="video"
+- # type="video/mpeg"
+- # encoding="h264" >
+- # <connection
+- # priority="10"
+- # kind="sis"
+- # server="http://www.bbc.co.uk/mediaselector/4/sdp/"
+- # identifier="b00108ld/iplayer_streaming_n95_wifi"
+- # href="http://www.bbc.co.uk/mediaselector/4/sdp/b00108ld/iplayer_streaming_n95_wifi"
+- # />
+- #</media>
+- if ( $media =~ /^(n95_wifi|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/mpeg".+?encoding="h264".+?kind="sis"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
+- ( $server, $identifier, $href ) = ( $1, $2, $3 );
+- $opt{quiet} = 1 if $opt{streaminfo};
+- chomp( my $rtsp = request_url_retry($ua, $href, 2, '', '') );
+- $opt{quiet} = 0 if $opt{streaminfo};
+- logger "INFO: Nokia N95 h.264 low quality WiFi stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: href=$href\n" if $opt{verbose};
+- $streams{'n95_wifi'} = "$rtsp";
+- logger "INFO: Nokia N95 h.264 low quality WiFi stream URL: $streams{'n95_wifi'}\n";
+- }
+-
+- # Nokia N95 h.264 low quality stream (3G)
+- #<media kind=""
+- # expires="2008-10-30T12:29:00+00:00"
+- # type="video/mpeg"
+- # encoding="h264" >
+- # <connection
+- # priority="10"
+- # kind="sis"
+- # server="http://www.bbc.co.uk/mediaselector/4/sdp/"
+- # identifier="b009tzxx/iplayer_streaming_n95_3g"
+- # href="http://www.bbc.co.uk/mediaselector/4/sdp/b009tzxx/iplayer_streaming_n95_3g"
+- # />
+- #</media>
+- if ( $media =~ /^(n95_3g|all)$/ && $xml =~ m{<media\s+kind="".+?type="video/mpeg".+?encoding="h264".+?kind="sis"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
+- ( $server, $identifier, $href ) = ( $1, $2, $3 );
+- $opt{quiet} = 1 if $opt{streaminfo};
+- chomp( my $rtsp = request_url_retry($ua, $href, 2, '', '') );
+- $opt{quiet} = 0 if $opt{streaminfo};
+- logger "INFO: Nokia N95 h.264 low quality 3G stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: href=$href\n" if $opt{verbose};
+- $streams{'n95_3g'} = "$rtsp";
+- logger "INFO: Nokia N95 h.264 low quality 3G stream URL: $streams{'n95_3g'}\n";
+- }
+-
+-
+-
+- # Mobile WMV DRM
+- #<media kind="video"
+- # expires="2008-10-20T21:59:00+01:00"
+- # type="video/wmv" >
+- # <connection
+- # priority="10"
+- # kind="licence"
+- # server="http://iplayldsvip.iplayer.bbc.co.uk/WMLicenceIssuer/LicenceDelivery.asmx"
+- # identifier="0A1CA43B-98A8-43EA-B684-DA06672C0575"
+- # href="http://iplayldsvip.iplayer.bbc.co.uk/WMLicenceIssuer/LicenceDelivery.asmx/0A1CA43B-98A8-43EA-B684-DA06672C0575"
+- # />
+- #<connection
+- # priority="10"
+- # kind="sis"
+- # server="http://directdl.iplayer.bbc.co.uk/windowsmedia/"
+- # identifier="AmazonwithBruceParry_Episode5_200810132100_mobile"
+- # href="http://directdl.iplayer.bbc.co.uk/windowsmedia/AmazonwithBruceParry_Episode5_200810132100_mobile.wmv"
+- # />
+- #</media>
+- if ( $media =~ /^(mobile|all)$/ && $xml =~ m{<media\s+kind="video".+?type="video/wmv".+?kind="sis"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
+- ( $server, $identifier, $href ) = ( $1, $2, $3 );
+- logger "INFO: Mobile WMV DRM stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: href=$href\n" if $opt{verbose};
+- $streams{'mobile'} = "$href";
+- logger "INFO: Mobile WMV DRM stream URL: $streams{'mobile'}\n";
+- }
+-
+- # Audio rtmp mp3
+- #<media kind="audio"
+- # type="audio/mpeg"
+- # encoding="mp3" >
+- # <connection
+- # priority="10"
+- # kind="akamai"
+- # server="cp48181.edgefcs.net"
+- # identifier="mp3:secure/radio1/RBN2_mashup_b00d67h9_2008_09_05_22_14_25"
+- # authString="daEbQa1c6cda6aHdudxagcCcUcVbvbncmdK-biXtzq-cCp-DnoFIpznNBqHnzF"
+- # />
+- #</media>
+- if ( $media =~ /^(flashaudio|all)$/ && $xml =~ m{<media\s+kind="audio".+?type="audio/mpeg".+?encoding="mp3".+?kind="akamai"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?authString="(.+?)"} ) {
+- ( $server, $identifier, $authstring ) = ( $1, $2, $3 );
+- # Remove offending mp3: at the start of the identifier
+- $identifier =~ s/^mp3://;
+- logger "INFO: RTMP MP3 stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: authstring=$authstring\n" if $opt{verbose};
+- $streams{'flashaudio'} = "rtmp://${server}:1935/ondemand?_fcs_vhost=${server}&auth=${authstring}&aifp=v001&slist=${identifier}";
+- logger "INFO: RTMP stream URL: $streams{'flashaudio'}\n";
+- }
+-
+- # RealAudio stream
+- #<media kind="audio"
+- # type="audio/real"
+- # encoding="real" >
+- # <connection
+- # priority="10"
+- # kind="sis"
+- # server="http://www.bbc.co.uk"
+- # identifier="/radio/aod/playlists/9h/76/d0/0b/2000_bbc_radio_one"
+- # href="http://www.bbc.co.uk/radio/aod/playlists/9h/76/d0/0b/2000_bbc_radio_one.ram"
+- # />
+- #</media>
+- # Realaudio for worldservice
+- #<media kind=""
+- #type="audio/real"
+- #encoding="real" >
+- #<connection
+- # priority="10"
+- # kind="edgesuite"
+- # server="http://http-ws.bbc.co.uk.edgesuite.net"
+- # identifier="/generatecssram.esi?file=/worldservice/css/nb/410060838.ra"
+- # href="http://http-ws.bbc.co.uk.edgesuite.net/generatecssram.esi?file=/worldservice/css/nb/410060838.ra"
+- #/>
+- #</media>
+- #</mediaSelection>
+- if ( $media =~ /^(realaudio|all)$/ && $xml =~ m{<media\s+kind="(audio|)".+?type="audio/real".+?encoding="real".+?kind="(sis|edgesuite)"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
+- ( $server, $identifier, $href ) = ( $3, $4, $5 );
+- $opt{quiet} = 1 if $opt{streaminfo};
+- chomp( my $rtsp = request_url_retry($ua, $href, 2, '', '') );
+- $rtsp =~ s/[\s\n]//g;
+- $opt{quiet} = 0 if $opt{streaminfo};
+- logger "INFO: RealAudio RTSP stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: href=$href\n" if $opt{verbose};
+- $streams{'realaudio'} = "$rtsp";
+- logger "INFO: RealAudio RTSP stream URL: $streams{'realaudio'}\n";
+- }
+-
+-
+- # Radio WMA (low quality)
+- #<mediaSelection xmlns="http://bbc.co.uk/2008/mp/mediaselection">
+- #<media kind=""
+- # type="audio/wma"
+- # encoding="wma" >
+- # <connection
+- # priority="10"
+- # kind="edgesuite"
+- # server="http://http-ws.bbc.co.uk.edgesuite.net"
+- # identifier="/generatecssasx.esi?file=/worldservice/css/nb/410060838"
+- # href="http://http-ws.bbc.co.uk.edgesuite.net/generatecssasx.esi?file=/worldservice/css/nb/410060838.wma"
+- # />
+- #</media>
+- if ( $media =~ /^(wma|all)$/ && $xml =~ m{<media\s+kind="(audio|)".+?type="audio/wma".+?encoding="wma".+?kind="(sis|edgesuite)"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
+- ( $server, $identifier, $href ) = ( $3, $4, $5 );
+- $opt{quiet} = 1 if $opt{streaminfo};
+- chomp( my $mms = request_url_retry($ua, $href, 2, '', '') );
+- $mms =~ s/[\n]//g;
+- # HREF="mms://a1899.v394403.c39440.g.vm.akamaistream.net/7/1899/39440/1/bbcworldservice.download.akamai.com/39440//worldservice/css/nb/410060838.wma"
+- $mms =~ s/^.*href=\"(.+?)\".*$/$1/gi;
+- $opt{quiet} = 0 if $opt{streaminfo};
+- logger "INFO: WMA MMS stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: href=$href\n" if $opt{verbose};
+- $streams{'wma'} = "$mms";
+- logger "INFO: WMA MMS stream URL: $streams{'wma'}\n";
+- }
+-
+-
+- # Subtitles stream
+- #<media kind="captions"
+- # type="application/ttaf+xml" >
+- # <connection
+- # priority="10"
+- # kind="http"
+- # server="http://www.bbc.co.uk/iplayer/subtitles/"
+- # identifier="b0008dc8rstreaming89808204.xml"
+- # href="http://www.bbc.co.uk/iplayer/subtitles/b0008dc8rstreaming89808204.xml"
+- # />
+- #</media>
+- if ( $media =~ /^(subtitles|all)$/ && $xml =~ m{<media\s+kind="captions".+?type="application/ttaf\+xml".+?kind="http"\s+server="(.+?)"\s+?identifier="(.+?)"\s+?href="(.+?)"} ) {
+- ( $server, $identifier, $href ) = ( $1, $2, $3 );
+- logger "INFO: Subtitles stream:\nINFO: server=$server\nINFO: identifier=$identifier\nINFO: href=$href\n" if $opt{verbose};
+- $streams{'subtitles'} = "$href";
+- logger "INFO: Subtitles stream URL: $streams{'subtitles'}\n";
++sub display_stream_info {
++ my ($pid, $verpid, $media) = (@_);
++ logger "INFO: Getting media stream metadata for $prog{$pid}{name} - $prog{$pid}{episode}, $verpid\n" if $pid;
++ my %data = get_media_stream_data( $pid, $verpid, $media);
++ # Print out stream data
++ for my $prog_type (sort keys %data) {
++ logger "stream: $prog_type\n";
++ for my $entry ( sort keys %{ $data{$prog_type} } ) {
++ logger sprintf("%-11s %s\n", $entry.':', $data{$prog_type}{$entry} );
+ }
++ logger "\n";
+ }
+- logger "\n" if $opt{streaminfo};
+- $opt{quiet} = 1 if $opt{streaminfo};
++ return 0;
++}
+
+- # Return a hash with media => url if 'all' is specified - otherwise just the specified url
+- return %streams if $media eq 'all';
+- return $streams{$media};
++
++
++# Displays specified metadata from supplied hash
++# Usage: display_metadata( <hashref>, <array of elements to display> )
++sub display_metadata {
++ my %data = %{$_[0]};
++ shift;
++ my @keys = @_;
++ @keys = keys %data if $#_ < 0;
++ logger "\n";
++ for (@keys) {
++ logger sprintf "%-15s %s\n", ucfirst($_).':', $data{$_} if $data{$_};
++ }
++ return 0;
+ }
+
+
+
+ # Actually do the h.264/mp3 downloading
+ # ( $ua, $pid, $url_2, $file, $file_done, '0|1 == rearrange moov' )
+-sub download_iphone_stream {
+- my ( $ua, $url_2, $file, $file_done, $file_symlink, $rearrange ) = @_;
++sub download_stream_iphone {
++ my ( $ua, $url_2, $pid, $file, $file_done, $file_symlink, $rearrange ) = @_;
+
+ # Stage 3a: Download 1st byte to get exact file length
+ logger "INFO: Stage 3 URL = $url_2\n" if $opt{verbose};
+@@ -2132,53 +2799,44 @@
+ my $req = HTTP::Request->new ('GET', $url_2, $h);
+ my $res = $ua->request($req);
+ # e.g. Content-Range: bytes 0-1/181338136 (return if no content length returned)
+- my $file_len = $res->header("Content-Range");
+- if ( ! $file_len ) {
+- logger "ERROR: No Content-Range was obtained\n" if $opt{verbose};
++ my $download_len = $res->header("Content-Range");
++ if ( ! $download_len ) {
++ #logger "ERROR: No Content-Range was obtained\n" if $opt{verbose};
++ logger "WARNING: iphone version not available\n";
+ return 'retry'
+ }
+- $file_len =~ s|^bytes 0-1/(\d+).*$|$1|;
+- logger "INFO: Download File Length $file_len\n" if $opt{verbose};
++ $download_len =~ s|^bytes 0-1/(\d+).*$|$1|;
++ logger "INFO: Download File Length $download_len\n" if $opt{verbose};
+
+ # Only do this if we're rearranging QT streams
+ my $mdat_start = 0;
+- my $moov_start = $file_len + 1;
++ # default to this if we are not rearranging (tells the download chunk loop where to stop - i.e. EOF instead of end of mdat atom)
++ my $moov_start = $download_len + 1;
+ my $header;
+ if ($rearrange) {
+ # Get ftyp+wide header etc
+ $mdat_start = 0x1c;
+ my $buffer = download_block(undef, $url_2, $ua, 0, $mdat_start + 4);
+ # Get bytes upto (but not including) mdat atom start -> $header
+- $header = download_block(undef, $url_2, $ua, 0, $mdat_start - 1, $file_len);
+-
++ $header = substr($buffer, 0, $mdat_start);
++
+ # Detemine moov start
+- # Get mdat_end_offset_chars from downloaded block
+- my $mdat_end_offset_chars = substr($buffer, $mdat_start, 4);
+- my $mdat_end_offset = bytestring_to_int($mdat_end_offset_chars);
+- logger "DEBUG: mdat_end_offset = ".get_hex($mdat_end_offset_chars)." = $mdat_end_offset\n" if $opt{debug};
+- logger "DEBUG: mdat_end_offset (decimal) = $mdat_end_offset\n" if $opt{debug};
++ # Get mdat_length_chars from downloaded block
++ my $mdat_length_chars = substr($buffer, $mdat_start, 4);
++ my $mdat_length = bytestring_to_int($mdat_length_chars);
++ logger "DEBUG: mdat_length = ".get_hex($mdat_length_chars)." = $mdat_length\n" if $opt{debug};
++ logger "DEBUG: mdat_length (decimal) = $mdat_length\n" if $opt{debug};
+ # The MOOV box starts one byte after MDAT box ends
+- $moov_start = $mdat_start + $mdat_end_offset;
+-
+-
+- ## scan 2nd level atoms in moov atom until we get stco atom(s)
+- # We can skip first 8 bytes (moov atom header)
+- #my $i = 8;
+- #while( $i < $moov_length - 4 ) {
+- # my $atom_len = bytestring_to_int( substr($moovdata, $i, 4) );
+- # my $atom_name = substr($moovdata, $i+4, 4);
+- # logger "Parsing atom: $atom_name, length: $atom_len\n";
+- # # Increment $i by atom_len to get next atom
+- # $i += $atom_len;
+- #}
++ $moov_start = $mdat_start + $mdat_length;
+ }
+
+ # If we have partial content and wish to stream, resume the download & spawn off STDOUT from existing file start
+ # Sanity check - we cannot support downloading of partial content if we're streaming also.
+ if ( $opt{stdout} && (! $opt{nowrite}) && -f $file ) {
+ logger "WARNING: Partially downloaded file exists, streaming will start from the beginning of the programme\n";
+- # Don't do usual streaming code
+- $opt{stdout} = 0;
++ # Don't do usual streaming code - also force all messages to go to stderr
++ delete $opt{stdout};
++ $opt{stderr} = 1;
+ $childpid = fork();
+ if (! $childpid) {
+ # Child starts here
+@@ -2205,15 +2863,15 @@
+ my $fh = open_file_append($file);
+
+ # If the partial file already exists, then resume from the correct mdat/download offset
+- my $restart_offset = $mdat_start;
++ my $restart_offset = 0;
+ my $moovdata;
+ my $moov_length = 0;
+
+ if ($rearrange) {
+ # if cookie fails then trigger a retry after deleting cookiejar
+- # Determine moov atom length so we can work out if the partially downloaded file has the moov atom in it already
++ # Determine orginal moov atom length so we can work out if the partially downloaded file has the moov atom in it already
+ $moov_length = bytestring_to_int( download_block( undef, $url_2, $ua, $moov_start, $moov_start+3 ) );
+- logger "INFO: moov atom length = $moov_length \n" if $opt{verbose};
++ logger "INFO: original moov atom length = $moov_length \n" if $opt{verbose};
+ # Sanity check this moov length - chances are that were being served up a duff file if this is > 10% of the file size or < 64k
+ if ( $moov_length > (${moov_start}/9.0) || $moov_length < 65536 ) {
+ logger "WARNING: Bad file download, deleting cookie \n";
+@@ -2222,33 +2880,73 @@
+ unlink $file;
+ return 'retry';
+ }
+- }
+-
+- # If we have a too-small-sized file and not stdout and not no-write then this is a partial download
+- if (-f $file && (! $opt{stdout}) && (! $opt{nowrite}) && stat($file)->size > ($moov_length+$mdat_start) ) {
+- # Calculate new start offset (considering that we've put moov first in file)
+- $restart_offset = stat($file)->size - $moov_length;
+- logger "INFO: Resuming download from $restart_offset \n";
+- }
+
+- if ($rearrange) {
++ # we still need an accurate moovlength for the already downloaded moov atom for resume restart_offset.....
+ # If we have no existing file, a file which doesn't yet even have the moov atom, or using stdout (or no-write option)
+- if ( $opt{stdout} || $opt{nowrite} || stat($file)->size < ($moov_length+$mdat_start) ) {
++ # (allow extra 1k on moov_length for metadata when testing)
++ if ( $opt{stdout} || $opt{nowrite} || stat($file)->size < ($moov_length+$mdat_start+1024) ) {
+ # get moov chunk into memory
+- $moovdata = download_block( undef, $url_2, $ua, $moov_start, (${file_len}-1) );
++ $moovdata = download_block( undef, $url_2, $ua, $moov_start, (${download_len}-1) );
++
++ # Create new udta atom with child atoms for metadata
++ my $udta_new = create_qt_atom('udta',
++ create_qt_atom( chr(0xa9).'nam', $prog{$pid}{name}.' - '.$prog{$pid}{episode}, 'string' ).
++ create_qt_atom( chr(0xa9).'alb', $prog{$pid}{name}, 'string' ).
++ create_qt_atom( chr(0xa9).'trk', $prog{$pid}{episode}, 'string' ).
++ create_qt_atom( chr(0xa9).'aut', $prog{$pid}{channel}, 'string' ).
++ create_qt_atom( chr(0xa9).'ART', $prog{$pid}{channel}, 'string' ).
++ create_qt_atom( chr(0xa9).'des', $prog{$pid}{desc}, 'string' ).
++ create_qt_atom( chr(0xa9).'cmt', 'Downloaded with get_iplayer', 'string' ).
++ create_qt_atom( chr(0xa9).'req', 'QuickTime 6.0 or greater', 'string' ).
++ create_qt_atom( chr(0xa9).'day', (localtime())[5] + 1900, 'string' )
++ );
++ # Insert new udta atom over the old one and get the new $moov_length (and update moov atom size field)
++ replace_moov_udta_atom ( $udta_new, $moovdata );
++
+ # Process the moov data so that we can relocate it (change the chunk offsets that are absolute)
++ # Also update moov+_length to be accurate after metadata is added etc
+ $moov_length = relocate_moov_chunk_offsets( $moovdata );
+- # write moov atom to file next (yes - were rearranging the file - moov+header+mdat - not header+mdat+moov)
+- logger "INFO: Appending moov+ftype+wide atoms to $file\n" if $opt{verbose};
+- # Write moov atom
+- print $fh $moovdata if ! $opt{nowrite};
+- print STDOUT $moovdata if $opt{stdout};
++ logger "INFO: New moov atom length = $moov_length \n" if $opt{verbose};
++ # write moov atom to file next (yes - were rearranging the file - header+moov+mdat - not header+mdat+moov)
++ logger "INFO: Appending ftype+wide+moov atoms to $file\n" if $opt{verbose};
+ # Write header atoms (ftyp, wide)
+ print $fh $header if ! $opt{nowrite};
+ print STDOUT $header if $opt{stdout};
++ # Write moov atom
++ print $fh $moovdata if ! $opt{nowrite};
++ print STDOUT $moovdata if $opt{stdout};
++ # If were not resuming we want to only start the download chunk loop from mdat_start
++ $restart_offset = $mdat_start;
++ }
++
++ # Get accurate moov_length from file (unless stdout or nowrite options are specified)
++ # Assume header+moov+mdat atom layout
++ if ( (! $opt{stdout}) && (! $opt{nowrite}) && stat($file)->size > ($moov_length+$mdat_start) ) {
++ logger "INFO: Getting moov atom length from partially downloaded file $file\n" if $opt{verbose};
++ if ( ! open( MOOVDATA, "< $file" ) ) {
++ logger "ERROR: Cannot Read partially downloaded file\n";
++ return 4;
++ }
++ my $data;
++ seek(MOOVDATA, $mdat_start, 0);
++ if ( read(MOOVDATA, $data, 4, 0) != 4 ) {
++ logger "ERROR: Cannot Read moov atom length from partially downloaded file\n";
++ return 4;
++ }
++ close MOOVDATA;
++ # Get moov atom size from file
++ $moov_length = bytestring_to_int( substr($data, 0, 4) );
++ logger "INFO: moov atom length (from partially downloaded file) = $moov_length \n" if $opt{verbose};
+ }
+ }
+
++ # If we have a too-small-sized file (greater than moov_length+mdat_start) and not stdout and not no-write then this is a partial download
++ if (-f $file && (! $opt{stdout}) && (! $opt{nowrite}) && stat($file)->size > ($moov_length+$mdat_start) ) {
++ # Calculate new start offset (considering that we've put moov first in file)
++ $restart_offset = stat($file)->size - $moov_length;
++ logger "INFO: Resuming download from $restart_offset \n";
++ }
++
+ # Create symlink if required
+ if ( $opt{symlink} ) {
+ # remove old symlink
+@@ -2273,16 +2971,15 @@
+ $e = $s + $chunk_size - 1;
+ }
+ # Get block from URL and append to $file
+- if ( download_block($file, $url_2, $ua, $s, $e, $file_len, $fh ) ) {
++ if ( download_block($file, $url_2, $ua, $s, $e, $download_len, $fh ) ) {
+ logger "ERROR: Could not download block $s - $e from $file\n\n";
+- return 9;
++ return 'retry';
+ }
+ }
+
+ # end marker
+ my $end_time = time();
+
+- # Should now be able to concatenate header.block + mdat.block + moov.block to get movie!
+ # Calculate average speed, duration and total bytes downloaded
+ logger sprintf("INFO: Downloaded %.2fMB in %s at %5.0fkbps to %s\n",
+ ($moov_start - 1 - $restart_offset) / (1024.0 * 1024.0),
+@@ -2292,57 +2989,217 @@
+
+ # Moving file into place as complete (if not stdout)
+ move($file, $file_done) if ! $opt{stdout};
++
++ # Re-symlink file
++ if ( $opt{symlink} ) {
++ # remove old symlink
++ unlink $file_symlink if -l $file_symlink;
++ symlink $file_done, $file_symlink;
++ logger "INFO: Created symlink from '$file_symlink' -> '$file_done'\n" if $opt{verbose};
++ }
++ $prog{$pid}{mode} = 'iphone';
+ return 0;
+ }
+
+
+
+-sub download_h264_rtmp_stream {
+- my ( $ua, $url_2, $prog_url, $file, $file_done, $file_symlink ) = @_;
+- my $file_flv = $file; # .'.flv';
++# Actually do the RTMP stream downloading
++sub download_stream_rtmp {
++ my ( $ua, $url_2, $pid, $mode, $application, $tcurl, $authstring, $swfurl, $file, $file_done, $file_symlink ) = @_;
++ my $file_tmp;
++ my $cmd;
++
++ if ( $opt{raw} ) {
++ $file_tmp = $file;
++ } else {
++ $file_tmp = $file.'.flv'
++ }
+
+- logger "INFO: url: $url_2, prog_url: $prog_url, file: $file, file_done: $file_done\n" if $opt{verbose};
++ # Remove failed file download (below a certain size) - hack to get around rtmpdump not returning correct exit code
++ if ( -f $file_tmp && stat($file_tmp)->size < $min_download_size ) {
++ unlink( $file_tmp );
++ }
++
++ logger "INFO: RTMP_URL: $url_2, tcUrl: $tcurl, application: $application, authString: $authstring, swfUrl: $swfurl, file: $file, file_done: $file_done\n" if $opt{verbose};
+
+ # Create symlink if required
+ if ( $opt{symlink} ) {
+ # remove old symlink
+ unlink $file_symlink if -l $file_symlink;
+- symlink $file_flv, $file_symlink;
+- logger "INFO: Created symlink from '$file_symlink' -> '$file_flv'\n" if $opt{verbose};
++ symlink $file_tmp, $file_symlink;
++ logger "INFO: Created symlink from '$file_symlink' -> '$file_tmp'\n" if $opt{verbose};
+ }
++ $cmd = "$rtmpdump --resume --rtmp \"$url_2\" --auth \"$authstring\" --swfUrl \"$swfurl\" --tcUrl \"$tcurl\" --app \"$application\" -o \"$file_tmp\" >&2";
++ logger "\n\nINFO: Command: $cmd\n" if $opt{verbose};
++ my $return = system($cmd);
++ # Hack to get around rtmpdump prentending to fail on successful flash downloads
++ if ( (! -f $file_tmp) || ($return && -f $file_tmp && stat($file_tmp)->size < $min_download_size) ) {
++ logger "\n\nINFO: Command: $cmd\n" if $opt{verbose};
++ logger "\nWARNING: Failed to download file $file_tmp via RTMP\n";
++ unlink $file_tmp;
++ return 'next';
++ }
++
++ # Retain raw flv format if required
++ if ( $opt{raw} ) {
++ move($file_tmp, $file_done) if ! $opt{stdout};
++ return 0;
+
+- my $cmd = "$rtmpdump --rtmp \"$url_2\" --pageUrl \"$prog_url\" --swfUrl \"http://www.bbc.co.uk/emp/9player.swf?revision=6928_7030\" --tcUrl \"rtmp://bbciplayertokfs.fplive.net:80/bbciplayertok\" --app \"bbciplayertok\" -o \"$file_flv\" >&2";
+- #my $cmd2 = "$ffmpeg -i \"$file_flv\" -vcodec copy -acodec copy -f mp4 -y \"$file\" >&2";
+- #my $cmd2 = "$mencoder -oac copy -ovc copy -o \"$file\" \"$file_flv\" >&2";
++ # Convert flv to mp3 for flash audio
++ } elsif ( $mode eq 'flashaudio' ) {
++ # We could do id3 tagging here but id3v2 does this later anyway
++ $cmd = "$ffmpeg -i \"$file_tmp\" -vn -acodec copy -y \"$file\" >&2";
+
+- # logger "\n\nINFO: Command1: $cmd\nINFO: Command2: $cmd2\n\n" if $opt{verbose};
+- if ( system($cmd) ) {
+- logger "\nWARNING: Failed to download file $file via RTMP\n";
+- return 1;
++ # Convert video flv to mp4/avi if required
++ } else {
++ $cmd = "$ffmpeg $ffmpeg_opts -i \"$file_tmp\" -vcodec copy -acodec copy -f $prog{$pid}{ext} -y \"$file\" >&2";
++ }
++
++ logger "\n\nINFO: Command: $cmd\n\n" if $opt{verbose};
++ # Run flv conversion and delete source file on success
++ if ( (! system($cmd)) && -f $file && stat($file)->size > $min_download_size ) {
++ unlink( $file_tmp );
++
++ # If the ffmpeg conversion failed, remove the failed-converted file attempt - move the file as done anyway
++ } else {
++ logger "WARNING: flv conversion failed - retaining flv file\n";
++ unlink $file;
++ $file = $file_tmp;
++ $file_done = $file_tmp;
++ }
++ # Moving file into place as complete (if not stdout)
++ move($file, $file_done) if ! $opt{stdout};
++
++ # Re-symlink file
++ if ( $opt{symlink} ) {
++ # remove old symlink
++ unlink $file_symlink if -l $file_symlink;
++ symlink $file_done, $file_symlink;
++ logger "INFO: Created symlink from '$file_symlink' -> '$file_done'\n" if $opt{verbose};
++ }
++
++ logger "INFO: Downloaded $file_done\n";
++ $prog{$pid}{mode} = $mode;
++ return 0;
++}
++
++
++
++# Actually do the MMS video stream downloading
++sub download_stream_mms_video {
++ my ( $ua, $urls, $file, $file_done, $pid ) = @_;
++ my $file_tmp;
++ my $cmd;
++ my $null;
++ my @url_list = split /\|/, $urls;
++ my @file_tmp_list;
++ my %threadpid;
++
++ logger "INFO: MMS_URLs: ".(join ', ', @file_tmp_list).", file: $file, file_done: $file_done\n" if $opt{verbose};
++
++ # Start marker
++ my $start_time = time();
++ # Download each mms url (multi-threaded to download in parallel)
++ my $file_part_prefix = "$prog{$pid}{dir}/$prog{$pid}{fileprefix}_part";
++ for ( my $count = 0; $count <= $#url_list; $count++ ) {
++
++ # Create temp download filename
++ $file_tmp = $file_part_prefix.($count+1).".asf";
++ $file_tmp_list[$count] = $file_tmp;
++ $null = " 2>/dev/null " if (! $opt{verbose}) && (! $opt{debug});
++ $cmd = "$mplayer -dumpstream \"$url_list[$count]\" -dumpfile \"$file_tmp\" $null >&2 </dev/null";
++ logger "\n\nINFO: Command: $cmd\n" if $opt{verbose};
++
++ my $childpid = fork();
++ if (! $childpid) {
++ # Child starts here
++ logger "INFO: Downloading file $file_tmp\n";
++ if ( system($cmd) ) {
++ logger "\nWARNING: Failed to download file $file_tmp via MMS\n";
++ exit 1;
++ }
++ logger "INFO: Download thread has completed for file $file_tmp\n";
++ exit 0;
++ }
++ # Create a hash of process_id => 'count'
++ $threadpid{$childpid} = $count;
++ }
++ # Wait for all threads to complete
++ $| = 1;
++ # Autoreap zombies
++ $SIG{CHLD}='IGNORE';
++ my $done = 0;
++ while (keys %threadpid) {
++ my @sizes;
++ my $total_size = 0;
++ my $total_size_new = 0;
++ my $format = "Threads: ";
++ sleep 1;
++ #logger "DEBUG: ProcessIDs: ".(join ',', keys %threadpid)."\n";
++ for my $procid (sort keys %threadpid) {
++ my $size = 0;
++ # Is this child still alive?
++ if ( kill 0 => $procid ) {
++ logger "DEBUG Thread $threadpid{$procid} still alive ($file_tmp_list[$threadpid{$procid}])\n" if $opt{debug};
++ # Build the status string
++ $format .= "%d) %.3fMB ";
++ $size = stat($file_tmp_list[$threadpid{$procid}])->size if -f $file_tmp_list[$threadpid{$procid}];
++ push @sizes, $threadpid{$procid}+1, $size/(1024.0*1024.0);
++ $total_size_new += $size;
++ } else {
++ $size = stat($file_tmp_list[$threadpid{$procid}])->size if -f $file_tmp_list[$threadpid{$procid}];
++ # end marker
++ my $end_time = time();
++ # Calculate average speed, duration and total bytes downloaded
++ logger sprintf("INFO: Thread #%d Downloaded %.2fMB in %s at %5.0fkbps to %s\n",
++ ($threadpid{$procid}+1),
++ $size / (1024.0 * 1024.0),
++ sprintf("%02d:%02d:%02d", ( gmtime($end_time - $start_time))[2,1,0] ),
++ $size / ($end_time - $start_time) / 1024.0 * 8.0,
++ $file_tmp_list[$threadpid{$procid}] );
++ # Remove from thread test list
++ delete $threadpid{$procid};
++ }
++ }
++ $format .= " downloaded (%.0fkbps) \r";
++ logger sprintf $format, @sizes, ($total_size_new - $total_size) / (time() - $start_time) / 1024.0 * 8.0;
+ }
+- # Only convert to mp4 if we have mencoder in path
+- # Disable rtmp mode if rtmpdump does not exist
+- if ( ! exists_in_path($ffmpeg)) {
+- logger "\nWARNING: $ffmpeg does not exist - not converting flv file to mp4\n";
+- #} else {
+- # Run flv conversion and delete source file on success
+- #if ( ! system($cmd2) ) {
+- # unlink( $file_flv );
+- #} else {
+- # logger "ERROR: flv to mp4 conversion failed\n";
+- # return 2;
+- #}
+- # Moving file into place as complete (if not stdout)
+- #move($file, $file_done) if ! $opt{stdout};
++ logger "INFO: All download threads completed\n";
++ # Unset autoreap
++ delete $SIG{CHLD};
++ # Retain raw format if required
++ if ( $opt{raw} ) {
++ return 0;
+ }
++
++# # Convert video asf to mp4 if required - need to find a suitable converter...
++# } else {
++# # Create part of cmd that specifies each partial file
++# my $filestring;
++# $filestring .= " -i \"$_\" " for (@file_tmp_list);
++# $cmd = "$ffmpeg $ffmpeg_opts $filestring -vcodec copy -acodec copy -f $prog{$pid}{ext} -y \"$file\" >&2";
++# }
++#
++# logger "\n\nINFO: Command: $cmd\n\n" if $opt{verbose};
++# # Run asf conversion and delete source file on success
++# if ( ! system($cmd) ) {
++# unlink( @file_tmp_list );
++# } else {
++# logger "ERROR: asf conversion failed - retaining files ".(join ', ', @file_tmp_list)."\n";
++# return 2;
++# }
++# # Moving file into place as complete (if not stdout)
++# move($file, $file_done) if ! $opt{stdout};
++
++ $prog{$pid}{mode} = 'itv';
+ return 0;
+ }
+
+
+
+ # Actually do the N95 h.264 downloading
+-sub download_h264_low_stream {
+- my ( $ua, $url_2, $file, $file_done ) = @_;
++sub download_stream_h264_low {
++ my ( $ua, $url_2, $file, $file_done, $pid, $mode ) = @_;
+
+ # Change filename extension
+ $file =~ s/mov$/mpg/gi;
+@@ -2353,7 +3210,7 @@
+ logger "INFO: Downloading Low Quality H.264 stream\n";
+ my $cmd = "$vlc $vlc_opts --sout file/ts:${file} $url_2 1>&2";
+ if ( system($cmd) ) {
+- return 2;
++ return 'next';
+ }
+
+ # to STDOUT
+@@ -2361,19 +3218,21 @@
+ logger "INFO: Streaming Low Quality H.264 stream to stdout\n";
+ my $cmd = "$vlc $vlc_opts --sout file/ts:- $url_2 1>&2";
+ if ( system($cmd) ) {
+- return 2;
++ return 'next';
+ }
+ }
+ logger "INFO: Downloaded $file_done\n";
+ # Moving file into place as complete (if not stdout)
+ move($file, $file_done) if ! $opt{stdout};
++
++ $prog{$pid}{mode} = $mode;
+ return 0;
+ }
+
+
+
+ # Actually do the rtsp downloading
+-sub download_rtsp_stream {
++sub download_stream_rtsp {
+ my ( $ua, $url, $file, $file_done, $file_symlink, $pid ) = @_;
+ my $childpid;
+
+@@ -2389,7 +3248,7 @@
+ # Create ID3 tagging options for lame (escape " for shell)
+ my ( $id3_name, $id3_episode, $id3_desc, $id3_channel ) = ( $prog{$pid}{name}, $prog{$pid}{episode}, $prog{$pid}{desc}, $prog{$pid}{channel} );
+ $id3_name =~ s|"|\"|g for ($id3_name, $id3_episode, $id3_desc, $id3_channel);
+- $lame_opts .= "--ignore-tag-errors --ty ".( (localtime())[5] + 1900 )." --tl \"$id3_name\" --tt \"$id3_episode\" --ta \"$id3_channel\" --tc \"$id3_desc\" ";
++ $lame_opts .= " --ignore-tag-errors --ty ".( (localtime())[5] + 1900 )." --tl \"$id3_name\" --tt \"$id3_episode\" --ta \"$id3_channel\" --tc \"$id3_desc\" ";
+
+ # Use post-download transcoding using lame if namedpipes are not supported (i.e. ActivePerl/Windows)
+ # (Fallback if no namedpipe support and raw/wav not specified)
+@@ -2402,14 +3261,14 @@
+ logger "INFO: Downloading wav format (followed by transcoding)\n";
+ $cmd = "$mplayer $mplayer_opts -cache 128 -bandwidth $bandwidth -vc null -vo null -ao pcm:waveheader:fast:file=\"${file}.wav\" \"$url\" 1>&2";
+ if ( system($cmd) ) {
+- return 2;
++ return 'next';
+ }
+ # Transcode
+ logger "INFO: Transcoding ${file}.wav\n";
+ $cmd = "$lame $lame_opts \"${file}.wav\" \"${file}.mp3\" 1>&2";
+ logger "DEGUG: Running $cmd\n" if $opt{debug};
+- if ( system($cmd) ) {
+- return 2;
++ if ( system($cmd) || (-f "${file}.wav" && stat("${file}.wav")->size < $min_download_size) ) {
++ return 'next';
+ }
+ unlink "${file}.wav";
+ move "${file}.mp3", $file_done;
+@@ -2425,7 +3284,7 @@
+ my $cmd = "$mplayer $mplayer_opts -cache 128 -bandwidth $bandwidth -vc null -vo null -ao pcm:waveheader:fast:file=\"$file\" \"$url\" 1>&2";
+ logger "DEGUG: Running $cmd\n" if $opt{debug};
+ if ( system($cmd) ) {
+- return 2;
++ return 'next';
+ }
+ # Move file to done state
+ move $file, $file_done if ! $opt{nowrite};
+@@ -2438,7 +3297,7 @@
+ my $cmd = "$mplayer $mplayer_opts -cache 128 -bandwidth $bandwidth -dumpstream -dumpfile \"$file\" \"$url\" 1>&2";
+ logger "DEGUG: Running $cmd\n" if $opt{debug};
+ if ( system($cmd) ) {
+- return 2;
++ return 'next';
+ }
+ # Move file to done state
+ move $file, $file_done if ! $opt{nowrite};
+@@ -2498,7 +3357,7 @@
+ if ( system($cmd) ) {
+ # If we fail then kill off child processes
+ kill 9, $childpid;
+- return 2;
++ return 'next';
+ }
+ # WAV / mp3 mode
+ } else {
+@@ -2506,7 +3365,7 @@
+ if ( system($cmd) ) {
+ # If we fail then kill off child processes
+ kill 9, $childpid;
+- return 2;
++ return 'next';
+ }
+ }
+ # Wait for child processes to prevent zombies
+@@ -2522,13 +3381,14 @@
+ logger "INFO: Created symlink from '$file_symlink' -> '$file_done'\n" if $opt{verbose};
+ }
+
++ $prog{$pid}{mode} = 'realaudio';
+ return 0;
+ }
+
+
+
+ # Actually do the podcast downloading
+-sub download_podcast_stream {
++sub download_stream_podcast {
+ my ( $ua, $url_2, $file, $file_done, $file_symlink ) = @_;
+ my $start_time = time();
+
+@@ -2548,7 +3408,7 @@
+
+ if ( download_block($file, $url_2, $ua, $start, undef, undef, $fh) != 0 ) {
+ logger "ERROR: Download failed\n";
+- return 22;
++ return 'next';
+ } else {
+ # end marker
+ my $end_time = time();
+@@ -2569,111 +3429,98 @@
+ logger "INFO: Created symlink from '$file_symlink' -> '$file_done'\n" if $opt{verbose};
+ }
+ }
++
++ $prog{$url_2}{mode} = 'podcast';
+ return 0;
+ }
+
+
+
+ # Get streaming iphone URL
+-sub get_iphone_stream_download_url {
+- my $ua = shift;
+- my $pid = shift;
+-
+- # Create url with appended 6 digit random number
+- my $url_1 = ${iphone_download_prefix}.'/'.${pid}.'?'.(sprintf "%06.0f", 1000000*rand(0)).'%20';
+- logger "INFO: media stream download URL = $url_1\n" if $opt{verbose};
+-
+- # Stage 2: e.g. "Location: http://download.iplayer.bbc.co.uk/iplayer_streaming_http_mp4/121285241910131406.mp4?token=iVXexp1yQt4jalB2Hkl%2BMqI25nz2WKiSsqD7LzRmowrwXGe%2Bq94k8KPsm7pI8kDkLslodvHySUyU%0ApM76%2BxEGtoQTF20ZdFjuqo1%2B3b7Qmb2StOGniozptrHEVQl%2FYebFKVNINg%3D%3D%0A"
+- logger "\rGetting iplayer download URL " if ! $opt{verbose};
+- my $h = new HTTP::Headers(
+- 'User-Agent' => $user_agent{coremedia},
+- 'Accept' => '*/*',
+- 'Range' => 'bytes=0-1',
+- );
+- my $req = HTTP::Request->new ('GET', $url_1, $h);
+- # send request
+- my $res = $ua->request($req);
+- # Get resulting Location header (i.e. redirect URL)
+- my $url_2 = $res->header("location");
+- if ( ! $res->is_redirect ) {
+- logger "ERROR: Failed to get redirect from iplayer site\n\n";
+- return '';
+- }
+- # Extract redirection Location URL
+- $url_2 =~ s/^Location: (.*)$/$1/g;
+- # If we get a Redirection containing statuscode=404 then this prog is not yet ready
+- if ( $url_2 =~ /statuscode=404/ ) {
+- logger "\rERROR: Programme is not yet ready for download\n";
+- return '';
+- }
+-
+- return $url_2;
+-}
+-
+-
++sub get_stream_url_iphone {
++ my $ua = shift;
++ my $pid = shift;
+
+-# Get streaming audio URL (Real => rtsp)
+-#<media kind="audio"
+-# type="audio/real"
+-# encoding="real" >
+-# <connection
+-# priority="10"
+-# kind="sis"
+-# server="http://www.bbc.co.uk"
+-# identifier="/radio/aod/playlists/gs/5d/c0/0b/0900_bbc_radio_two"
+-# href="http://www.bbc.co.uk/radio/aod/playlists/gs/5d/c0/0b/0900_bbc_radio_two.ram"
+-# />
+-#</media>
+-# OR
+-#<media kind=""
+-# type="audio/real"
+-# encoding="real" >
+-# <connection
+-# priority="10"
+-# kind="edgesuite"
+-# server="http://http-ws.bbc.co.uk.edgesuite.net"
+-# identifier="/generatecssram.esi?file=/worldservice/css/nb/410591221152760.ra"
+-# href="http://http-ws.bbc.co.uk.edgesuite.net/generatecssram.esi?file=/worldservice/css/nb/410591221152760.ra"
+-# />
+-#</media>
+-#
+-sub get_audio_stream_download_url {
+- my $ua = shift;
+- my $url_1 = shift;
+- my $url_2;
++ # Create url with appended 6 digit random number
++ my $url_1 = ${iphone_download_prefix}.'/'.${pid}.'?'.(sprintf "%06.0f", 1000000*rand(0)).'%20';
++ logger "INFO: media stream download URL = $url_1\n" if $opt{verbose};
+
+- logger "\rGetting iplayer download URL " if ! $opt{verbose};
+- my $h = new HTTP::Headers(
+- 'User-Agent' => $user_agent{coremedia},
+- 'Accept' => '*/*',
+- 'Range' => 'bytes=0-',
+- );
+- my $req = HTTP::Request->new ('GET', $url_1, $h);
+- # send request
+- my $res = $ua->request($req);
+- # Get resulting content
+- my $content = $res->content;
+- # Flatten
+- $content =~ s/\n/ /g;
+- if ( ! $res->is_success ) {
+- logger "ERROR: Failed to get audio url from iplayer site\n\n";
+- return '';
+- }
+- # If we get a Redirection containing statuscode=404 then this prog is not yet ready
+- if ( $content =~ /statuscode=404/ ) {
+- logger "\rERROR: Programme is not yet ready for download\n";
+- return '';
+- }
+- # extract ram URL
+- $url_2 = $2 if $content =~ m{<media kind="(|audio)"\s*type="audio/real".*href="(.+?)"\s*};
+-
+- # If we cannot see 'encoding="real"...' then we don't have real audio transcoded format then skip
+- if ( ! $url_2 ) {
+- logger "\rERROR: Programme is not yet ready for download in RealAudio format\n";
+- return '';
+- }
+-
+- return $url_2;
++ # Stage 2: e.g. "Location: http://download.iplayer.bbc.co.uk/iplayer_streaming_http_mp4/121285241910131406.mp4?token=iVXexp1yQt4jalB2Hkl%2BMqI25nz2WKiSsqD7LzRmowrwXGe%2Bq94k8KPsm7pI8kDkLslodvHySUyU%0ApM76%2BxEGtoQTF20ZdFjuqo1%2B3b7Qmb2StOGniozptrHEVQl%2FYebFKVNINg%3D%3D%0A"
++ logger "\rGetting iplayer download URL " if (! $opt{verbose}) && ! $opt{streaminfo};
++ my $h = new HTTP::Headers(
++ 'User-Agent' => $user_agent{coremedia},
++ 'Accept' => '*/*',
++ 'Range' => 'bytes=0-1',
++ );
++ my $req = HTTP::Request->new ('GET', $url_1, $h);
++ # send request (use simple_request here because that will not allow redirects)
++ my $res = $ua->simple_request($req);
++ # Get resulting Location header (i.e. redirect URL)
++ my $url_2 = $res->header("location");
++ if ( ! $res->is_redirect ) {
++ logger "ERROR: Failed to get redirect from iplayer site\n\n";
++ return '';
++ }
++ # Extract redirection Location URL
++ $url_2 =~ s/^Location: (.*)$/$1/g;
++ # If we get a Redirection containing statuscode=404 then this prog is not yet ready
++ if ( $url_2 =~ /statuscode=404/ ) {
++ logger "\rERROR: Programme is not yet ready for download\n" if $opt{verbose};
++ return '';
++ }
++
++ return $url_2;
++}
++
++
++
++sub get_stream_url_itv {
++ my ( $ua, $pid ) = ( @_ );
++
++ my ( $response, $url_1, $url_2, $url_3, $url_4 );
++ my $part;
++ my $duration;
++ my $filename;
++ my @url_list;
++
++ # construct stage 1 request url
++ $url_1 = 'http://www.itv.com/_app/video/GetMediaItem.ashx?vodcrid=crid://itv.com/'.$pid.'&bitrate=384&adparams=SITE=ITV/AREA=CATCHUP.VIDEO/SEG=CATCHUP.VIDEO%20HTTP/1.1';
++
++ # Extract '<LicencePlaylist>(.+?) HTTP/1.1</LicencePlaylist>'
++ logger "INFO: ITV Video Stage 1 URL: $url_1\n" if $opt{verbose};
++ $response = request_url_retry($ua, $url_1, 2, '', '');
++ logger "DEBUG: Response data: $response\n" if $opt{debug};
++ $url_2 = $1 if $response =~ m{<LicencePlaylist>(.+?) HTTP/1.1</LicencePlaylist>};
++ # replace '&amp;' with '&' and append '%20HTTP/1.1'
++ $url_2 =~ s/&amp;/&/g;
++ $url_2 .= '%20HTTP/1.1';
++ logger "INFO: ITV Video Stage 2 URL: $url_2\n" if $opt{verbose};
++ $response = request_url_retry($ua, $url_2, 2, '', '');
++ logger "DEBUG: Response data: $response\n" if $opt{debug};
++
++ # Extract hrefs and names. There are multiple entries for parts of prog (due to ads):
++ # e.g. <asx><Title>Doctor Zhivago</Title><EntryRef href="HTTP://SAM.ITV.COM/XTSERVER/ACC_RANDOM=1231194223/SITE=ITV/AREA=CATCHUP.VIDEO/SEG=CATCHUP.VIDEO HTTP/1.1/SOURCE=CATCH.UP/GENRE=DRAMA/PROGNAME=DOCTOR.ZHIVAGO/PROGID=33105/SERIES=DOCTOR.ZHIVAGO/EPNUM=/EPTITLE=/BREAKNUM=0/ADPOS=1/PAGEID=01231194223/DENTON=0/CUSTOMRATING=/TOTDUR=90/PREDUR=0/POSDUR=905/GENERIC=6e0536bf-7883-4aaa-9230-94ecc4aea403/AAMSZ=VIDEO" /><EntryRef href="HTTP://SAM.ITV.COM/XTSERVER/ACC_RANDOM=1231194223/SITE=ITV/AREA=CATCHUP.VIDEO/SEG=CATCHUP.VIDEOHTTP/1.1/SOURCE=CATCH.UP/GENRE=DRAMA/PROGNAME=DOCTOR.ZHIVAGO/PROGID=33105/SERIES=DOCTOR.ZHIVAGO/EPNUM=/EPTITLE=/BREAKNUM=0/ADPOS=LAST/PAGEID=01231194223/DENTON=0/CUSTOMRATING=/TOTDUR=90/PREDUR=0/POSDUR=905/GENERIC=6e0536bf-7883-4aaa-9230-94ecc4aea403/AAMSZ=VIDEO" />
++ $prog{$pid}{name} = $1 if $response =~ m{<Title>(.+?)<\/Title>};
++ for my $entry (split /<Entry><ref\s+href=/, $response) {
++ logger "DEBUG: Entry data: $entry\n" if $opt{debug};
++ $entry .= '<Entry><ref href='.$entry;
++
++ ( $url_3, $part, $filename, $duration ) = ( $1, $2, $3, $4 ) if $entry =~ m{<Entry><ref\s+href="(.+?)"\s+\/><param\s+value="true"\s+name="Prebuffer"\s+\/>\s*<PARAM\s+NAME="PrgPartNumber"\s+VALUE="(.+?)"\s*\/><PARAM\s+NAME="FileName"\s+VALUE="(.+?)"\s*\/><PARAM\s+NAME="PrgLength"\s+VALUE="(.+?)"\s*\/>};
++ next if not $url_3;
++ # Replace '&amp;' with '&' in url
++ $url_3 =~ s/&amp;/&/g;
++ logger "INFO: ITV Video Name: $part\n";
++
++ logger "INFO: ITV Video Stage 3 URL: $url_3\n" if $opt{verbose};
++ $entry = request_url_retry($ua, $url_3, 2, '', '');
++ logger "DEBUG: Response data: $entry\n" if $opt{debug};
++
++ # Extract mms (replace 'http' with 'mms') url: e.g.: Ref1=http://itvbrdbnd.wmod.llnwd.net/a1379/o21/ucontent/2007/6/22/1549_384_1_2.wmv?MSWMExt=.asf
++ chomp( $url_4 = 'mms'.$1 ) if $entry =~ m{Ref1=http(.+?)[\r\n]+};
++ logger "INFO: ITV Video URL: $url_4\n" if $opt{verbose};
++ push @url_list, $url_4;
++ }
++ return @url_list;
+ }
+
+
+@@ -2711,7 +3558,7 @@
+ # Change all the chunk offsets in moov->stco atoms and add moov_length to them all
+ # get moov atom length
+ my $moov_length = bytestring_to_int( substr($moovdata, 0, 4) );
+- # Use index() to seatch for a string within a string
++ # Use index() to search for a string within a string
+ my $i = -1;
+ while (($i = index($moovdata, 'stco', $i)) > -1) {
+
+@@ -2725,10 +3572,11 @@
+ #logger "chunk_offset @ $i, $j = '".get_hex( substr($moovdata, $j, 4) )."', $chunk_offset + $moov_length = ";
+ $chunk_offset += $moov_length;
+ # write back bytes into $moovdata
+- substr($moovdata, $j+0, 1) = chr( ($chunk_offset >> 24) & 0xFF );
+- substr($moovdata, $j+1, 1) = chr( ($chunk_offset >> 16) & 0xFF );
+- substr($moovdata, $j+2, 1) = chr( ($chunk_offset >> 8) & 0xFF );
+- substr($moovdata, $j+3, 1) = chr( ($chunk_offset >> 0) & 0xFF );
++ #substr($moovdata, $j+0, 1) = chr( ($chunk_offset >> 24) & 0xFF );
++ #substr($moovdata, $j+1, 1) = chr( ($chunk_offset >> 16) & 0xFF );
++ #substr($moovdata, $j+2, 1) = chr( ($chunk_offset >> 8) & 0xFF );
++ #substr($moovdata, $j+3, 1) = chr( ($chunk_offset >> 0) & 0xFF );
++ write_msb_value_at_offset( $moovdata, $j, $chunk_offset );
+ #$chunk_offset = bytestring_to_int( substr($moovdata, $j, 4) );
+ #logger "$chunk_offset\n";
+ }
+@@ -2743,6 +3591,86 @@
+
+
+
++# Replace the moov->udta atom with a new user-supplied one and update the moov atom size
++# Usage: replace_moov_udta_atom ( $udta_new, $moovdata )
++sub replace_moov_udta_atom {
++ my $udta_new = $_[0];
++ my $moovdata = $_[1];
++
++ # get moov atom length
++ my $moov_length = bytestring_to_int( substr($moovdata, 0, 4) );
++
++ # Find the original udta atom start
++ # Use index() to search for a string within a string ($i will point at the beginning of the atom)
++ my $i = index($moovdata, 'udta', -1) - 4;
++
++ # determine length of atom (4 bytes preceding the name)
++ my $udta_len = bytestring_to_int( substr($moovdata, $i, 4) );
++ logger "INFO: Found udta atom at moov atom offset: $i length $udta_len\n" if $opt{verbose};
++
++ # Save the data before the udta atom
++ my $moovdata_before_udta = substr($moovdata, 0, $i);
++
++ # Save the remainder portion of data after the udta atom for later
++ my $moovdata_after_udta = substr($moovdata, $i, $moovdata - $i + $udta_len);
++
++ # Old udta atom should we need it
++ ### my $udta_old = substr($moovdata, $i, $udta_len);
++
++ # Create new moov atom
++ $moovdata = $moovdata_before_udta.$udta_new.$moovdata_after_udta;
++
++ # Recalculate the moov size and insert into moovdata
++ write_msb_value_at_offset( $moovdata, 0, length($moovdata) );
++
++ # Write $moovdata back to calling string
++ $_[1] = $moovdata;
++
++ return 0;
++}
++
++
++
++# Write the msb 4 byte $value starting at $offset into the passed string
++# Usage: write_msb_value($string, $offset, $value)
++sub write_msb_value_at_offset {
++ my $offset = $_[1];
++ my $value = $_[2];
++ substr($_[0], $offset+0, 1) = chr( ($value >> 24) & 0xFF );
++ substr($_[0], $offset+1, 1) = chr( ($value >> 16) & 0xFF );
++ substr($_[0], $offset+2, 1) = chr( ($value >> 8) & 0xFF );
++ substr($_[0], $offset+3, 1) = chr( ($value >> 0) & 0xFF );
++ return 0;
++}
++
++
++
++# Returns a string containing an QT atom
++# Usage: create_qt_atom(<atome name>, <atom data>, ['string'])
++sub create_qt_atom {
++ my ($name, $data, $prog_type) = (@_);
++ if (length($name) != 4) {
++ logger "ERROR: Inavlid QT atom name length '$name'\n";
++ exit 1;
++ }
++ # prepend string length if this is a string type
++ if ( $prog_type eq 'string' ) {
++ my $value = length($data);
++ $data = '1111'.$data;
++ # overwrite '1111' with total atom length in 2-byte MSB + 0x0 0x0
++ substr($data, 0, 1) = chr( ($value >> 8) & 0xFF );
++ substr($data, 1, 1) = chr( ($value >> 0) & 0xFF );
++ substr($data, 2, 1) = chr(0);
++ substr($data, 3, 1) = chr(0);
++ }
++ my $atom = '0000'.$name.$data;
++ # overwrite '0000' with total atom length in MSB
++ write_msb_value_at_offset( $atom, 0, length($name.$data) + 4 );
++ return $atom;
++}
++
++
++
+ # Usage download_block($file, $url_2, $ua, $start, $end, $file_len, $fh);
+ # ensure filehandle $fh is open in append mode
+ # or, $content = download_block(undef, $url_2, $ua, $start, $end, $file_len);
+@@ -2811,7 +3739,7 @@
+ $rate = sprintf("%5.0fkbps", (8.0 / 1024.0) * $rate_bps);
+ $time = sprintf("%02d:%02d:%02d", ( gmtime( ($file_len - $size) / $rate_bps ) )[2,1,0] );
+ }
+- printf STDERR "%8.2fMB / %.2fMB %s %5.1f%%, %s remaining \r",
++ logger sprintf "%8.2fMB / %.2fMB %s %5.1f%%, %s remaining \r",
+ $size / 1024.0 / 1024.0,
+ $file_len / 1024.0 / 1024.0,
+ $rate,
+@@ -2851,7 +3779,7 @@
+ $time = sprintf("%02d:%02d:%02d", ( gmtime( ($file_len - $size) / $rate_bps ) )[2,1,0] );
+ }
+ # time remaining
+- printf STDERR "%8.2fMB / %.2fMB %s %5.1f%%, %s remaining \r",
++ logger sprintf "%8.2fMB / %.2fMB %s %5.1f%%, %s remaining \r",
+ $size / 1024.0 / 1024.0,
+ $file_len / 1024.0 / 1024.0,
+ $rate,
+@@ -2865,7 +3793,7 @@
+ } else {
+ $rate = sprintf("%5.0fkbps", (8.0 / 1024.0) * $size / ($timecalled - $now) );
+ }
+- printf STDERR "%8.2fMB %s \r", $size / 1024.0 / 1024.0, $rate;
++ logger sprintf "%8.2fMB %s \r", $size / 1024.0 / 1024.0, $rate;
+ }
+ };
+
+@@ -2901,6 +3829,19 @@
+
+
+
++sub create_ua {
++ my $agent = shift;
++ my $ua = LWP::UserAgent->new;
++ $ua->timeout([$lwp_request_timeout]);
++ $ua->proxy( ['http'] => $proxy_url );
++ $ua->agent( $user_agent{$agent} );
++ $ua->conn_cache(LWP::ConnCache->new());
++ $ua->cookie_jar( HTTP::Cookies->new( file => $cookiejar, autosave => 1, ignore_discard => 1 ) );
++ return $ua;
++};
++
++
++
+ # Converts a string of chars to it's HEX representation
+ sub get_hex {
+ my $buf = shift || '';
+@@ -2985,11 +3926,7 @@
+ sub update_script {
+ # Get version URL
+ my $script_file = $0;
+- my $ua = LWP::UserAgent->new;
+- $ua->timeout([$lwp_request_timeout]);
+- $ua->proxy( ['http'] => $proxy_url );
+- $ua->agent( $user_agent{update} );
+- $ua->conn_cache(LWP::ConnCache->new());
++ my $ua = create_ua('update');
+ logger "INFO: Current version is $version\n";
+ logger "INFO: Checking for latest version from linuxcentre.net\n";
+ my $res = $ua->request( HTTP::Request->new( GET => $version_url ) );
+@@ -3070,10 +4007,8 @@
+ <video><url id=\"p1\">${pid}.mov<playlist/></url></video>
+ <info><description>${desc}</description></info>
+ </movie>\n" if $opt{fxd};
+- my $newtitle = ${title} ;
+- $newtitle =~ s/\&//g ;
+ print XML "<Stream>
+- <Name>\"$newtitle\"</Name>
++ <Name>\"${title}\"</Name>
+ <url>${pid}.mov</url>
+ <Subtitle></Subtitle>
+ <Synopsis>${desc}</Synopsis>
+@@ -3294,6 +4229,7 @@
+ my $pid = shift;
+ my $metadata;
+ my $entry3;
++ my ($name, $episode, $duration, $available, $channel, $expiry, $longdesc, $versions, $guidance, $prog_type, $categories, $player, $thumbnail);
+
+ # This URL works for all prog types:
+ # http://www.bbc.co.uk/iplayer/playlist/${pid}
+@@ -3307,97 +4243,162 @@
+ # This URL works for tv/radio prog types:
+ # $prog_feed_url = http://feeds.bbc.co.uk/iplayer/episode/$pid
+
+- if ( $prog{$pid}{type} =~ /(tv|radio)/i ) {
++ if ( $prog{$pid}{type} =~ /^(tv|radio)$/i ) {
+ $entry3 = request_url_retry($ua, $prog_feed_url.$pid, 3, '', '');
+ decode_entities($entry3);
+ logger "DEBUG: $prog_feed_url.$pid:\n$entry3\n\n" if $opt{debug};
+ # Flatten
+ $entry3 =~ s|\n| |g;
+- }
+
+- # Entry3 format
+- #<?xml version="1.0" encoding="utf-8"?>
+- #<?xml-stylesheet href="http://www.bbc.co.uk/iplayer/style/rss.css" type="text/css"?>
+- #<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-GB">
+- # <title>BBC iPlayer - Episode Detail: Edith Bowman: 22/09/2008</title>
+- # <subtitle>Sara Cox sits in for Edith with another Cryptic Randomizer.</subtitle>
+- # <updated>2008-09-29T10:59:45Z</updated>
+- # <id>tag:feeds.bbc.co.uk,2008:/iplayer/feed/episode/b00djtfh</id>
+- # <link rel="related" href="http://www.bbc.co.uk/iplayer" type="text/html" />
+- # <link rel="self" href="http://feeds.bbc.co.uk/iplayer/episode/b00djtfh" type="application/atom+xml" />
+- # <author>
+- # <name>BBC</name>
+- # <uri>http://www.bbc.co.uk</uri>
+- # </author>
+- # <entry>
+- # <title type="text">Edith Bowman: 22/09/2008</title>
+- # <id>tag:feeds.bbc.co.uk,2008:PIPS:b00djtfh</id>
+- # <updated>2008-09-15T01:28:36Z</updated>
+- # <summary>Sara Cox sits in for Edith with another Cryptic Randomizer.</summary>
+- # <content type="html">
+- # &lt;p&gt;
+- # &lt;a href=&quot;http://www.bbc.co.uk/iplayer/episode/b00djtfh?src=a_syn30&quot;&gt;
+- # &lt;img src=&quot;http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_150_84.jpg&quot; alt=&quot;Edith Bowman: 22/09/2008&quot; /&gt;
+- # &lt;/a&gt;
+- # &lt;/p&gt;
+- # &lt;p&gt;
+- # Sara Cox sits in for Edith with movie reviews and great new music, plus another Cryptic Randomizer.
+- # &lt;/p&gt;
+- # </content>
+- # <link rel="alternate" href="http://www.bbc.co.uk/iplayer/episode/b00djtfh?src=a_syn31" type="text/html" title="Edith Bowman: 22/09/2008">
+- # <media:content medium="audio" duration="10800">
+- # <media:title>Edith Bowman: 22/09/2008</media:title>
+- # <media:description>Sara Cox sits in for Edith with movie reviews and great new music, plus another Cryptic Randomizer.</media:description>
+- # <media:player url="http://www.bbc.co.uk/iplayer/episode/b00djtfh?src=a_syn31" />
+- # <media:category scheme="urn:bbc:metadata:cs:iPlayerUXCategoriesCS" label="Entertainment">9100099</media:category>
+- # <media:category scheme="urn:bbc:metadata:cs:iPlayerUXCategoriesCS" label="Music">9100006</media:category>
+- # <media:category scheme="urn:bbc:metadata:cs:iPlayerUXCategoriesCS" label="Pop &amp; Chart">9200069</media:category>
+- # <media:credit role="Production Department" scheme="urn:ebu">BBC Radio 1</media:credit>
+- # <media:credit role="Publishing Company" scheme="urn:ebu">BBC Radio 1</media:credit>
+- # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_86_48.jpg" width="86" height="48" />
+- # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_150_84.jpg" width="150" height="84" />
+- # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_178_100.jpg" width="178" height="100" />
+- # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_512_288.jpg" width="512" height="288" />
+- # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_528_297.jpg" width="528" height="297" />
+- # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_640_360.jpg" width="640" height="360" />
+- # <dcterms:valid>
+- # start=2008-09-22T15:44:20Z;
+- # end=2008-09-29T15:02:00Z;
+- # scheme=W3C-DTF
+- # </dcterms:valid>
+- # </media:content>
+- # </link>
+- # <link rel="self" href="http://feeds.bbc.co.uk/iplayer/episode/b00djtfh?format=atom" type="application/atom+xml" title="22/09/2008" />
+- # <link rel="related" href="http://www.bbc.co.uk/programmes/b006wks4/microsite" type="text/html" title="Edith Bowman" />
+- # <link rel="parent" href="http://feeds.bbc.co.uk/iplayer/programme_set/b006wks4" type="application/atom+xml" title="Edith Bowman" />
+- # </entry>
+- #</feed>
+-
+- my ($duration, $available, $channel, $expiry, $longdesc, $versions, $guidance, $type, $categories, $player, $thumbnail);
+-
+- $expiry = $1 if $entry3 =~ m{<dcterms:valid>\s*start=.+?;\s*end=(.*?);};
+- $available = $1 if $entry3 =~ m{<dcterms:valid>\s*start=(.+?);\s*end=.*?;};
+- $duration = $1 if $entry3 =~ m{duration=\"(\d+?)\"};
+- $type = $1 if $entry3 =~ m{medium=\"(\w+?)\"};
+- $longdesc = $1 if $entry3 =~ m{<media:description>\s*(.*?)\s*<\/media:description>};
+- $guidance = $1 if $entry3 =~ m{<media:rating scheme="urn:simple">(.+?)<\/media:rating>};
+- $player = $1 if $entry3 =~ m{<media:player\s*url=\"(.*?)\"\s*\/>};
+- $thumbnail = $1 if $entry3 =~ m{<media:thumbnail url="([^"]+?)"\s+width="150"\s+height="84"\s*/>};
+-
+- my @cats;
+- for (split /<media:category scheme=\".+?\"/, $entry3) {
+- push @cats, $1 if m{\s*label="(.+?)">\d+<\/media:category>};
+- }
+- $categories = join ',', @cats;
++ # Entry3 format
++ #<?xml version="1.0" encoding="utf-8"?>
++ #<?xml-stylesheet href="http://www.bbc.co.uk/iplayer/style/rss.css" type="text/css"?>
++ #<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-GB">
++ # <title>BBC iPlayer - Episode Detail: Edith Bowman: 22/09/2008</title>
++ # <subtitle>Sara Cox sits in for Edith with another Cryptic Randomizer.</subtitle>
++ # <updated>2008-09-29T10:59:45Z</updated>
++ # <id>tag:feeds.bbc.co.uk,2008:/iplayer/feed/episode/b00djtfh</id>
++ # <link rel="related" href="http://www.bbc.co.uk/iplayer" type="text/html" />
++ # <link rel="self" href="http://feeds.bbc.co.uk/iplayer/episode/b00djtfh" type="application/atom+xml" />
++ # <author>
++ # <name>BBC</name>
++ # <uri>http://www.bbc.co.uk</uri>
++ # </author>
++ # <entry>
++ # <title type="text">Edith Bowman: 22/09/2008</title>
++ # <id>tag:feeds.bbc.co.uk,2008:PIPS:b00djtfh</id>
++ # <updated>2008-09-15T01:28:36Z</updated>
++ # <summary>Sara Cox sits in for Edith with another Cryptic Randomizer.</summary>
++ # <content type="html">
++ # &lt;p&gt;
++ # &lt;a href=&quot;http://www.bbc.co.uk/iplayer/episode/b00djtfh?src=a_syn30&quot;&gt;
++ # &lt;img src=&quot;http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_150_84.jpg&quot; alt=&quot;Edith Bowman: 22/09/2008&quot; /&gt;
++ # &lt;/a&gt;
++ # &lt;/p&gt;
++ # &lt;p&gt;
++ # Sara Cox sits in for Edith with movie reviews and great new music, plus another Cryptic Randomizer.
++ # &lt;/p&gt;
++ # </content>
++ # <link rel="alternate" href="http://www.bbc.co.uk/iplayer/episode/b00djtfh?src=a_syn31" type="text/html" title="Edith Bowman: 22/09/2008">
++ # <media:content medium="audio" duration="10800">
++ # <media:title>Edith Bowman: 22/09/2008</media:title>
++ # <media:description>Sara Cox sits in for Edith with movie reviews and great new music, plus another Cryptic Randomizer.</media:description>
++ # <media:player url="http://www.bbc.co.uk/iplayer/episode/b00djtfh?src=a_syn31" />
++ # <media:category scheme="urn:bbc:metadata:cs:iPlayerUXCategoriesCS" label="Entertainment">9100099</media:category>
++ # <media:category scheme="urn:bbc:metadata:cs:iPlayerUXCategoriesCS" label="Music">9100006</media:category>
++ # <media:category scheme="urn:bbc:metadata:cs:iPlayerUXCategoriesCS" label="Pop &amp; Chart">9200069</media:category>
++ # <media:credit role="Production Department" scheme="urn:ebu">BBC Radio 1</media:credit>
++ # <media:credit role="Publishing Company" scheme="urn:ebu">BBC Radio 1</media:credit>
++ # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_86_48.jpg" width="86" height="48" />
++ # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_150_84.jpg" width="150" height="84" />
++ # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_178_100.jpg" width="178" height="100" />
++ # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_512_288.jpg" width="512" height="288" />
++ # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_528_297.jpg" width="528" height="297" />
++ # <media:thumbnail url="http://www.bbc.co.uk/iplayer/images/episode/b00djtfh_640_360.jpg" width="640" height="360" />
++ # <dcterms:valid>
++ # start=2008-09-22T15:44:20Z;
++ # end=2008-09-29T15:02:00Z;
++ # scheme=W3C-DTF
++ # </dcterms:valid>
++ # </media:content>
++ # </link>
++ # <link rel="self" href="http://feeds.bbc.co.uk/iplayer/episode/b00djtfh?format=atom" type="application/atom+xml" title="22/09/2008" />
++ # <link rel="related" href="http://www.bbc.co.uk/programmes/b006wks4/microsite" type="text/html" title="Edith Bowman" />
++ # <link rel="parent" href="http://feeds.bbc.co.uk/iplayer/programme_set/b006wks4" type="application/atom+xml" title="Edith Bowman" />
++ # </entry>
++ #</feed>
++
++ $expiry = $1 if $entry3 =~ m{<dcterms:valid>\s*start=.+?;\s*end=(.*?);};
++ $available = $1 if $entry3 =~ m{<dcterms:valid>\s*start=(.+?);\s*end=.*?;};
++ $duration = $1 if $entry3 =~ m{duration=\"(\d+?)\"};
++ $prog_type = $1 if $entry3 =~ m{medium=\"(\w+?)\"};
++ $longdesc = $1 if $entry3 =~ m{<media:description>\s*(.*?)\s*<\/media:description>};
++ $guidance = $1 if $entry3 =~ m{<media:rating scheme="urn:simple">(.+?)<\/media:rating>};
++ $player = $1 if $entry3 =~ m{<media:player\s*url=\"(.*?)\"\s*\/>};
++ $thumbnail = $1 if $entry3 =~ m{<media:thumbnail url="([^"]+?)"\s+width="150"\s+height="84"\s*/>};
++
++ my @cats;
++ for (split /<media:category scheme=\".+?\"/, $entry3) {
++ push @cats, $1 if m{\s*label="(.+?)">\d+<\/media:category>};
++ }
++ $categories = join ',', @cats;
++
++ # populate version pid metadata
++ get_version_pids($ua, $pid);
++
++ # ITV Catch-Up metadata
++ } elsif ( $prog{$pid}{type} eq 'itv' ) {
++ my $prog_metadata_url_itv = 'http://www.itv.com/_app/Dynamic/CatchUpData.ashx?ViewType=5&Filter='; # +<pid>
++ $entry3 = request_url_retry($ua, "${prog_metadata_url_itv}${pid}", 3, '', '');
++ decode_entities($entry3);
++ logger "DEBUG: ${prog_metadata_url_itv}${pid}:\n$entry3\n\n" if $opt{debug};
++ # Flatten
++ $entry3 =~ s|[\r\n]||g;
++
++ #div class="itvCatchUpPlayerPanel" xmlns:ms="urn:schemas-microsoft-com:xslt">
++ # <div class="cu-sponsor"><a href="http://sam.itv.com/accipiter/adclick/CID=000040d70000000000000000/acc_random=1/SITE=CLICKTRACK/AREAITVCATCHUP.VIDEO=CLICKTRACK..FREEVIEW.SPONSORBUTTON.OCT08/AAMSZ=120X60/pageid=1" title="ITV Player in assocation with Freeview"><img src="/_app/img/catchup/catchup_video_freeview2.jpg" alt="ITV Player is sponsored by Freeview"></a></div>
++ # <h2>Doctor Zhivago</h2>
++ # <p>Part 1 of 3. Dramatisation of the epic novel by Boris Pasternak. Growing up in Moscow with his uncle, aunt and cousin Tonya, Yury is captivated by a stunning young girl called ...</p>
++ # <p class="timings"><span class="date">Mon 29 Dec 2008</span><br /><br /><span>
++ #
++ # Duration: 1hr 30 min |
++ # Expires in
++ # <strong>22</strong>
++ # days
++ # </span></p>
++ # <p><a href="http://www.itv.com/CatchUp/Programmes/default.html?ViewType=1&amp;Filter=2352">3 Episodes Available
++ # </a><br></br></p>
++ # <p class="channelLogo"><img src="/_app/img/logos/itv3-black.gif" alt="ITV 4"></p>
++ # <div id="cu-2-0-VideoID">33105</div>
++ # <div id="cu-2-0-DentonId">17</div>
++ # <div id="cu-2-0-ItemMediaUrl">http://www.itv.com//img/480x272/Doctor-Zhivago-c47828f8-a1af-4cd2-b5a2-40c18eb7e63c.jpg</div>
++ #</div><script language="javascript" type="text/javascript" xmlns:ms="urn:schemas-microsoft-com:xslt">
++ # SetCatchUpModuleID(0);
++ # </script>
++ #
+
+- # populate version pid metadata
+- get_version_pids($ua, $pid);
++ #<div class="itvCatchUpPlayerPanel" xmlns:ms="urn:schemas-microsoft-com:xslt">
++ # <div class="cu-sponsor"><a href="http://sam.itv.com/accipiter/adclick/CID=000040d70000000000000000/acc_random=1/SITE=CLICKTRACK/AREAITVCATCHUP.VIDEO=CLICKTRACK..FREEVIEW.SPONSORBUTTON.OCT08/AAMSZ=120X60/pageid=1" title="ITV Player in assocation with Freeview"><img src="/_app/img/catchup/catchup_video_freeview2.jpg" alt="ITV Player is sponsored by Freeview"></a></div>
++ # <h2>Affinity</h2>
++ # <p>Victorian period drama with a murderous, pyschological twist.</p>
++ # <p class="timings"><span class="date">Sun 28 Dec 2008</span><br /><br /><span>
++ #
++ # Duration: 2hr 00 min |
++ # Expires in
++ # <strong>21</strong>
++ # days
++ # </span></p>
++ # <p class="channelLogo"><img src="/_app/img/logos/itv1-black.gif" alt="ITV 2"></p>
++ # <div class="guidance">
++ # <div><strong>ITV Video Guidance</strong><p>This programme contains strong language and scenes of a sexual nature  </p>
++ # </div>
++ # </div>
++ # <div id="cu-2-0-VideoID">33076</div>
++ # <div id="cu-2-0-DentonId">11</div>
++ # <div id="cu-2-0-ItemMediaUrl">http://www.itv.com//img/480x272/Affinity-9624033b-6e05-4784-85f7-114be0559b24.jpg</div>
++ #</div><script language="javascript" type="text/javascript" xmlns:ms="urn:schemas-microsoft-com:xslt">
++ # SetCatchUpModuleID(0);
++ # </script>
++ #
++
++ #$expiry = $1 if $entry3 =~ m{<dcterms:valid>\s*start=.+?;\s*end=(.*?);};
++ $available = $1 if $entry3 =~ m{<p\s+class="timings">\s*<span\s+class="date">(.+?)<\/span>};
++ $duration = $1 if $entry3 =~ m{Duration:\s*(.+?)\s+\|};
++ #$prog_type = $1 if $entry3 =~ m{medium=\"(\w+?)\"};
++ $longdesc = $1 if $entry3 =~ m{<p>(.+?)<\/p>}i;
++ $guidance = $1 if $entry3 =~ m{ITV Video Guidance<\/strong><p>\s*(.+?)[\W\s]*<\/p>};
++ #$player = $1 if $entry3 =~ m{<media:player\s*url=\"(.*?)\"\s*\/>};
++ $thumbnail = $1 if $entry3 =~ m{<div id="cu-2-0-ItemMediaUrl">(.+?)</div>};
++ $name = $1 if $entry3 =~ m{<h2>(.+?)</h2>};
++ }
+
+ # Fill in from cache if not got from metadata
+ my %metadata;
+ $metadata{pid} = $pid;
+ $metadata{index} = $prog{$pid}{index};
+- $metadata{type} = $type || $prog{$pid}{type};
++ $metadata{name} = $name || $prog{$pid}{name};
++ $metadata{episode} = $episode || $prog{$pid}{episode};
++ $metadata{type} = $prog_type || $prog{$pid}{type};
+ $metadata{duration} = $duration || $prog{$pid}{duration};
+ $metadata{channel} = $channel || $prog{$pid}{channel};
+ $metadata{available} = $available || $prog{$pid}{available};
+@@ -3492,7 +4493,7 @@
+ logger "WARNING: Cannot write or append to $historyfile\n\n";
+ return 1;
+ }
+- print HIST "$pid|$prog{$pid}{name}|$prog{$pid}{episode}|$prog{$pid}{type}|".time()."\n";
++ print HIST "$pid|$prog{$pid}{name}|$prog{$pid}{episode}|$prog{$pid}{type}|".time()."|$prog{$pid}{mode}\n";
+ close HIST;
+ return 0;
+ }
+@@ -3555,7 +4556,10 @@
+ # Add id3 tag to MP3 files if required
+ sub tag_file {
+ my $pid = shift;
++
+ if ( $prog{$pid}{ext} eq 'mp3' ) {
++ # Return if file does not exist
++ return if ! -f $prog{$pid}{filename};
+ # Create ID3 tagging options for external tagger program (escape " for shell)
+ my ( $id3_name, $id3_episode, $id3_desc, $id3_channel ) = ( $prog{$pid}{name}, $prog{$pid}{episode}, $prog{$pid}{desc}, $prog{$pid}{channel} );
+ $id3_name =~ s|"|\"|g for ($id3_name, $id3_episode, $id3_desc, $id3_channel);
+@@ -3580,9 +4584,16 @@
+ sub list_unique_element_counts {
+ my $element_name = shift;
+ my %elements;
+- logger "INFO: $opt{type} $element_name List:\n" if $opt{verbose};
++ logger "INFO: ".(join ',', keys %type)." $element_name List:\n" if $opt{verbose};
+ for my $pid (keys %prog) {
+- for my $element ( split /,/, $prog{$pid}{$element_name} ) {
++ my @element;
++ # Need to separate the categories
++ if ($element_name eq 'categories') {
++ @element = split /,/, $prog{$pid}{$element_name};
++ } else {
++ @element[0] = $prog{$pid}{$element_name};
++ }
++ for my $element (@element) {
+ $elements{ $element }++;
+ }
+ }
+@@ -3659,6 +4670,7 @@
+
+
+
++
+ # Save the options on the cmdline as a PVR search with the specified name
+ sub pvr_add {
+ my $name = shift;
+@@ -3670,7 +4682,7 @@
+ return 1;
+ }
+ # Parse valid options and create array (ignore options from the options files that have not been overriden on the cmdline)
+- for (grep /^(long|output.*|proxy|subdir|whitespace|versions|type|(exclude)?category|(exclude)?channel|command|realaudio|mp3audio|wav|raw|bandwidth|subtitles|suboffset|since|versionlist|verbose)$/, sort {$a <=> $b} keys %opt_cmdline) {
++ for (grep /^(amode|vmode|long|output.*|proxy|subdir|whitespace|versions|type|(exclude)?category|(exclude)?channel|command|realaudio|mp3audio|wav|raw|bandwidth|subtitles|suboffset|since|versionlist|verbose)$/, sort {lc $a cmp lc $b} keys %opt_cmdline) {
+ if ( defined $opt_cmdline{$_} ) {
+ push @options, "$_ $opt_cmdline{$_}";
+ logger "DEBUG: Adding option $_ = $opt_cmdline{$_}\n" if $opt{debug};
+@@ -3715,7 +4727,7 @@
+ pvr_load_list();
+ # Print out list
+ logger "All PVR Searches:\n\n";
+- for my $name ( sort {$a <=> $b} keys %pvrsearches ) {
++ for my $name ( sort {lc $a cmp lc $b} keys %pvrsearches ) {
+ # Report whether disabled
+ if ( $pvrsearches{$name}{disable} ) {
+ logger "(Disabled) PVR Search '$name':\n";
+diff -ruaN mythvodka.orig/scripts/gethulu.pl mythvodka/scripts/gethulu.pl
+--- mythvodka.orig/scripts/gethulu.pl 2009-01-06 19:26:30.000000000 +0000
++++ mythvodka/scripts/gethulu.pl 2009-02-12 07:27:44.000000000 +0000
+@@ -123,7 +123,8 @@
+ if($ephtml =~ m/thumbnail_url: "(.+?)"/) { $epimg=$1 } ;
+
+ print MYTHMENU "<Stream>\n";
+- print MYTHMENU "<Name>$eptitle</Name>\n";
++ print MYTHMENU "<Name>$title-$eptitle</Name>\n";
++ #print MYTHMENU "<Name>$eptitle</Name>\n";
+ print MYTHMENU "<Url>http://www.hulu.com/watch/$epid</Url>\n";
+ print MYTHMENU "<Subtitle>$season - $epno</Subtitle>\n";
+ print MYTHMENU "<Synopsis>$epdate - $epdesc</Synopsis>\n";
+diff -ruaN mythvodka.orig/scripts/hulu mythvodka/scripts/hulu
+--- mythvodka.orig/scripts/hulu 2009-01-04 15:25:24.000000000 +0000
++++ mythvodka/scripts/hulu 2009-02-12 07:27:44.000000000 +0000
+@@ -22,6 +22,7 @@
+ html=get_HTML(cid)
+ cidSoup=BeautifulStoneSoup(html)
+ pid=cidSoup.findAll('pid')[0].contents[0]
++logfile="/var/log/mythtv/hulu_quality.log"
+
+ smilURL = "http://releasegeo.hulu.com/content.select?pid=" + pid + "&mbr=true&format=smil"
+ print smilURL
+@@ -34,18 +35,58 @@
+ #label streams
+ i=0
+ quality=0
++qual_medium=-1; qual_high=-1; qual_h264=-1; command2="echo hulu done."
++os.system("rm -f "+logfile+".0")
++os.system("mv -f "+logfile+" "+logfile+".0")
++f=open(logfile,'w')
++os.system("chmod a+rw "+logfile)
++print >>f, "Debug debug"
++print >>f, "hulu ",url, " ", fileout
++#
++# Find the various quality choices that are available
++#
+ for stream in video:
+- if "480K" in stream['src'] or "480k" in stream['src']:
++ print >>f, stream
++ if "H264" in stream['src'] or "h264" in stream['src'] or "h264" in stream['profile'] or "H264" in stream['profile']:
++ streams.append(['H264',stream['src']])
++ qual_h264=i
++ print >>f, "DebugQual h264", i
++ print >>f, ""
++ elif "480K" in stream['src'] or "480k" in stream['src']:
+ streams.append(['Flash (480k)',stream['src']])
++ qual_medium=i
++ print >>f, "DebugQual medium", i
++ print >>f, ""
+ elif "700K" in stream['src'] or "700k" in stream['src']:
+ streams.append(['Flash (700k)',stream['src']])
+ quality=i
+- elif "H264" in stream['src'] or "h264" in stream['src']:
+- streams.append(['H264',stream['src']])
++ qual_high=i
++ print >>f, "DebugQual high", i
++ print >>f, ""
++ elif "medium" in stream['profile'] or "Medium" in stream['profile']:
++ streams.append(['Flash (Medium)',stream['src']])
++ if qual_medium==-1: qual_medium=i
++ print >>f, "DebugQual Medium", i, qual_medium
++ print >>f, ""
++ elif "high" in stream['profile'] or "High" in stream['profile']:
++ streams.append(['Flash (High)',stream['src']])
++ if qual_high==-1: qual_high=i
++ print >>f, "DebugQual High", i, qual_high
++ print >>f, ""
+ else:
+ streams.append(['unkown quality: '+stream['src'].split('/')[-1],stream['src']])
++ print >>f, "DebugQual Unknown", i
++ print >>f, ""
+ i=i+1
+
++if qual_high>-1:
++ quality=qual_high
++elif qual_medium>-1:
++ quality=qual_medium
++
++print >>f, "DebugQualVars: h264, high, medium, selected=",qual_h264,qual_high,qual_medium,quality
++
++
+ if quality!=-1:
+ print "stream url"
+ #generate random code
+@@ -104,4 +145,9 @@
+ command=command.replace(';','\\;')
+
+ print command
+- os.system(command)
++ print >>f,"Command is ",command
++ print >>f,"command2 is ",command2
++ f.close()
++ os.system(command + "; " + command2)
++else:
++ f.close()
+diff -ruaN mythvodka.orig/scripts/mythvodka_player.sh mythvodka/scripts/mythvodka_player.sh
+--- mythvodka.orig/scripts/mythvodka_player.sh 1970-01-01 00:00:00.000000000 +0000
++++ mythvodka/scripts/mythvodka_player.sh 2009-02-12 07:27:44.000000000 +0000
+@@ -0,0 +1,38 @@
++#! /bin/bash
++#
++log=/var/log/mythtv/mythvodka_player.log
++player_list="/usr/local/bin/mplayer_h264 /usr/local/bin/mplayer \
++ /usr/bin/mplayer /bin/mplayer"
++#
++player_list="/usr/local/bin/mplayer /usr/bin/mplayer /bin/mplayer"
++f="$1"
++shift
++rm -f $log
++echo "Request to play $f on `date`" >> $log
++player=""
++for player in $player_list; do
++ if [ -x "$player" ]; then
++ echo "Found player $player" >> $log
++ break
++ fi
++done
++if [ ! -x $player ]; then
++ echo "ERROR -- not able to find mplayer on your system. " >> $log
++ echo "I searched the following list" >> $log
++ echo " $player_list" >> $log
++ exit 1
++fi
++for pass in 1 2 4 8 10; do
++ size="0"
++ if [ -e $f ]; then
++ size=$( du --apparent-size -sD "$f" | awk '{ print $1 }' )
++ if [ $size -gt 1500 ]; then
++ break
++ fi
++ fi
++ echo "Pass $pass, filesize is $size kbytes, sleep $pass seconds" >> $log
++ sleep $pass
++done
++size=$( du --apparent-size -sD "$f" | awk '{ print $1 }' )
++echo "Reached $size kb on pass $pass `date`" >> $log
++$player -fs -vo xv $f
diff --git a/abs/extra/mythvodka/mythvodka.install b/abs/extra/mythvodka/mythvodka.install
new file mode 100644
index 0000000..4a9827e
--- /dev/null
+++ b/abs/extra/mythvodka/mythvodka.install
@@ -0,0 +1,47 @@
+# arg 1: the new package version
+post_install() {
+ mv /usr/share/mythtv/is.xml /tmp
+ grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp
+ echo "<!--#MythVodka-->" >> /tmp/is.xml.tmp
+ echo " <button>" >> /tmp/is.xml.tmp
+ echo " <type>STREAM</type>" >> /tmp/is.xml.tmp
+ echo " <text>Myth Vodka</text>" >> /tmp/is.xml.tmp
+ echo " <action>PLUGIN mythvodka</action>" >> /tmp/is.xml.tmp
+ echo " <depends>mythvodka</depends>" >> /tmp/is.xml.tmp
+ echo " </button>" >> /tmp/is.xml.tmp
+ echo "<!--#MythVodka-->" >> /tmp/is.xml.tmp
+ echo "" >> /tmp/is.xml.tmp
+ echo "</mythmenu>" >> /tmp/is.xml.tmp
+ mv /tmp/is.xml.tmp /usr/share/mythtv/is.xml
+
+ mv /usr/share/mythtv/media_settings.xml /tmp
+ grep -v -e /mythmenu /tmp/media_settings.xml > /tmp/ms.xml.tmp
+ echo "<!--#MythVodka-->" >> /tmp/ms.xml.tmp
+ echo " <button>" >> /tmp/ms.xml.tmp
+ echo " <type>SETTINGS MYTHVODKA</type>" >> /tmp/ms.xml.tmp
+ echo " <text>MythVodka Settings</text>" >> /tmp/ms.xml.tmp
+ echo " <action>CONFIGPLUGIN mythvodka</action>" >> /tmp/ms.xml.tmp
+ echo " <depends>mythvodka</depends>" >> /tmp/ms.xml.tmp
+ echo " </button>" >> /tmp/ms.xml.tmp
+ echo "<!--#MythVodka-->" >> /tmp/ms.xml.tmp
+ echo "" >> /tmp/ms.xml.tmp
+ echo "</mythmenu>" >> /tmp/ms.xml.tmp
+ mv /tmp/ms.xml.tmp /usr/share/mythtv/media_settings.xml
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
+ sed -e '/\#MythVodka/,/\#MythVodka/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
+ mv /usr/share/mythtv/media_settings.xml /tmp/ms.xml.tmp
+ sed -e '/\#MythVodka/,/\#MythVodka/d' < /tmp/ms.xml.tmp > /usr/share/mythtv/media_settings.xml
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/neon/PKGBUILD b/abs/extra/neon/PKGBUILD
new file mode 100644
index 0000000..4aa3802
--- /dev/null
+++ b/abs/extra/neon/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 10269 2008-08-25 13:23:04Z andyrtr $
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+
+# KEEP LIBTOOL FILES!
+pkgname=neon
+pkgver=0.28.3
+pkgrel=2
+pkgdesc="HTTP and WebDAV client library with a C interface"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL')
+depends=('openssl>=0.9.8g-4' 'heimdal>=1.2.1' 'zlib' 'expat>=2.0.1' 'db>=4.7.25')
+url="http://www.webdav.org/neon/"
+source=(http://www.webdav.org/neon/${pkgname}-${pkgver}.tar.gz)
+md5sums=('47599a328862ce64ac3c52726d6daa12')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --with-ssl --with-expat --enable-shared --disable-static
+ make || return 1
+ make DESTDIR=${pkgdir} install
+}
diff --git a/abs/extra/nspr/PKGBUILD b/abs/extra/nspr/PKGBUILD
new file mode 100644
index 0000000..453b515
--- /dev/null
+++ b/abs/extra/nspr/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id: PKGBUILD 18817 2008-11-09 12:29:50Z jgc $
+# Maintainer: Alexander Baldeck <alexander@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+pkgname=nspr
+pkgver=4.8
+pkgrel=2
+pkgdesc="Netscape Portable Runtime"
+arch=(i686 x86_64)
+url="http://www.mozilla.org/projects/nspr/"
+license=('MPL' 'GPL')
+depends=('glibc')
+makedepends=('zip')
+options=(!emptydirs)
+source=(ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${pkgver}/src/${pkgname}-${pkgver}.tar.gz
+ nspr.pc.in)
+md5sums=('e0916a72bcc6c427551ea262183fdb26'
+ 'bce1611f3117b53fc904cab549c09967')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ [ "$CARCH" = "x86_64" ] && confflags="--enable-64bit"
+ unset CFLAGS
+ unset CXXFLAGS
+ ./mozilla/nsprpub/configure \
+ --prefix=/usr \
+ --libdir=/usr/lib \
+ --includedir=/usr/include/nspr \
+ --enable-optimize \
+ --disable-debug ${confflags} || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+
+ NSPR_LIBS=`./config/nspr-config --libs`
+ NSPR_CFLAGS=`./config/nspr-config --cflags`
+ NSPR_VERSION=`./config/nspr-config --version`
+ install -m755 -d "${pkgdir}/usr/lib/pkgconfig" || return 1
+ sed "${srcdir}/nspr.pc.in" -e "s,%libdir%,/usr/lib," \
+ -e "s,%prefix%,/usr," \
+ -e "s,%exec_prefix%,/usr/bin," \
+ -e "s,%includedir%,/usr/include/nspr," \
+ -e "s,%NSPR_VERSION%,${NSPR_VERSION}," \
+ -e "s,%FULL_NSPR_LIBS%,${NSPR_LIBS}," \
+ -e "s,%FULL_NSPR_CFLAGS%,${NSPR_CFLAGS}," > "${pkgdir}/usr/lib/pkgconfig/nspr.pc" || return 1
+ chmod 644 "${pkgdir}/usr/lib/pkgconfig/nspr.pc" || return 1
+ ln -sf nspr.pc "${pkgdir}/usr/lib/pkgconfig/mozilla-nspr.pc" || return 1
+
+ chmod 644 ${pkgdir}/usr/lib/*.a || return 1
+
+ rm -rf "${pkgdir}/usr/bin/compile-et.pl" \
+ "${pkgdir}/usr/bin/prerr.properties" \
+ "${pkgdir}/usr/share/aclocal/nspr.m4" \
+ "${pkgdir}/usr/include/nspr/md"
+}
diff --git a/abs/extra/nspr/nspr.pc.in b/abs/extra/nspr/nspr.pc.in
new file mode 100644
index 0000000..1d8f4a0
--- /dev/null
+++ b/abs/extra/nspr/nspr.pc.in
@@ -0,0 +1,10 @@
+prefix=%prefix%
+exec_prefix=%exec_prefix%
+libdir=%libdir%
+includedir=%includedir%
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: %NSPR_VERSION%
+Libs: %FULL_NSPR_LIBS%
+Cflags: %FULL_NSPR_CFLAGS%
diff --git a/abs/extra/nss/PKGBUILD b/abs/extra/nss/PKGBUILD
new file mode 100644
index 0000000..8e7d434
--- /dev/null
+++ b/abs/extra/nss/PKGBUILD
@@ -0,0 +1,84 @@
+# $Id: PKGBUILD 22037 2008-12-21 11:44:41Z jgc $
+# Maintainer: Alexander Baldeck <alexander@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+pkgname=nss
+pkgver=3.12.3
+_pkgver=3_12_3
+_nssver=3.12.3.0
+pkgrel=2
+pkgdesc="Mozilla Network Security Services"
+arch=(i686 x86_64)
+url="http://www.mozilla.org/projects/security/pki/nss/"
+license=('MPL' 'GPL')
+_nsprver=4.8
+depends=("nspr>=${_nsprver}" 'sqlite3>=3.6.7')
+replaces=('nss-nspr')
+source=(https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_${_pkgver}_RTM/src/nss-${pkgver}.tar.bz2
+ nss-nolocalsql.patch
+ nss.pc.in
+ nss-config.in)
+md5sums=('ecb7079ba4ebcf29b7716775384f1f18'
+ '1837781eed35bfb6f826cfb3efcd6409'
+ 'c547b030c57fe1ed8b77c73bf52b3ded'
+ '46bee81908f1e5b26d6a7a2e14c64d9f')
+
+build() {
+ cd ${srcdir}/nss-${pkgver}
+ patch -Np0 -i "${srcdir}/nss-nolocalsql.patch" || return 1
+ unset CFLAGS
+ unset CXXFLAGS
+ export BUILD_OPT=1
+ export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
+ export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
+ export NSPR_INCLUDE_DIR=`pkg-config --cflags-only-I nspr | sed 's/-I//'`
+ export NSPR_LIB_DIR=`pkg-config --libs-only-L nspr | sed 's/-L.//'`
+
+ [ "$CARCH" = "x86_64" ] && export USE_64=1
+
+ make -j 1 -C mozilla/security/coreconf || return 1
+ make -j 1 -C mozilla/security/dbm || return 1
+ make -j 1 -C mozilla/security/nss || return 1
+
+ install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
+ install -m755 -d "${pkgdir}/usr/bin"
+ install -m755 -d "${pkgdir}/usr/include/nss"
+
+ NSS_VMAJOR=`grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
+ NSS_VMINOR=`grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
+ NSS_VPATCH=`grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
+
+ sed "${srcdir}/nss.pc.in" -e "s,%libdir%,/usr/lib,g" \
+ -e "s,%prefix%,/usr,g" \
+ -e "s,%exec_prefix%,/usr/bin,g" \
+ -e "s,%includedir%,/usr/include/nss,g" \
+ -e "s,%NSPR_VERSION%,${_nsprver},g" \
+ -e "s,%NSS_VERSION%,${_nssver},g" > \
+ "${pkgdir}/usr/lib/pkgconfig/nss.pc" || return 1
+ ln -sf nss.pc "${pkgdir}/usr/lib/pkgconfig/mozilla-nss.pc" || return 1
+ chmod 644 ${pkgdir}/usr/lib/pkgconfig/*.pc || return 1
+
+ sed "${srcdir}/nss-config.in" -e "s,@libdir@,/usr/lib,g" \
+ -e "s,@prefix@,/usr/bin,g" \
+ -e "s,@exec_prefix@,/usr/bin,g" \
+ -e "s,@includedir@,/usr/include/nss,g" \
+ -e "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" \
+ -e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \
+ -e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \
+ > "${pkgdir}/usr/bin/nss-config" || return 1
+ chmod 755 "${pkgdir}/usr/bin/nss-config" || return 1
+
+ for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so \
+ libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so
+ do
+ install -m755 mozilla/dist/*.OBJ/lib/${file} "${pkgdir}/usr/lib/" || return 1
+ done
+ for file in libcrmf.a libnssb.a libnssckfw.a; do
+ install -m644 mozilla/dist/*.OBJ/lib/${file} "${pkgdir}/usr/lib/" || return 1
+ done
+
+ for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
+ install -m755 mozilla/dist/*.OBJ/bin/${file} "${pkgdir}/usr/bin/" || return 1
+ done
+
+ install -m644 mozilla/dist/public/nss/*.h "${pkgdir}/usr/include/nss/" || return 1
+}
diff --git a/abs/extra/nss/nss-config.in b/abs/extra/nss/nss-config.in
new file mode 100644
index 0000000..f8f893e
--- /dev/null
+++ b/abs/extra/nss/nss-config.in
@@ -0,0 +1,145 @@
+#!/bin/sh
+
+prefix=@prefix@
+
+major_version=@MOD_MAJOR_VERSION@
+minor_version=@MOD_MINOR_VERSION@
+patch_version=@MOD_PATCH_VERSION@
+
+usage()
+{
+ cat <<EOF
+Usage: nss-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--includedir[=DIR]]
+ [--libdir[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Dynamic Libraries:
+ nss
+ nssutil
+ ssl
+ smime
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_ssl=yes
+lib_smime=yes
+lib_nss=yes
+lib_nssutil=yes
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --includedir=*)
+ includedir=$optarg
+ ;;
+ --includedir)
+ echo_includedir=yes
+ ;;
+ --libdir=*)
+ libdir=$optarg
+ ;;
+ --libdir)
+ echo_libdir=yes
+ ;;
+ --version)
+ echo ${major_version}.${minor_version}.${patch_version}
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ ssl)
+ lib_ssl=yes
+ ;;
+ smime)
+ lib_smime=yes
+ ;;
+ nss)
+ lib_nss=yes
+ ;;
+ nssutil)
+ lib_nssutil=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "$exec_prefix"; then
+ exec_prefix=`pkg-config --variable=exec_prefix nss`
+fi
+if test -z "$includedir"; then
+ includedir=`pkg-config --variable=includedir nss`
+fi
+if test -z "$libdir"; then
+ libdir=`pkg-config --variable=libdir nss`
+fi
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+if test "$echo_includedir" = "yes"; then
+ echo $includedir
+fi
+
+if test "$echo_libdir" = "yes"; then
+ echo $libdir
+fi
+
+if test "$echo_cflags" = "yes"; then
+ echo -I$includedir
+fi
+
+if test "$echo_libs" = "yes"; then
+ libdirs="-Wl,-rpath-link,$libdir -L$libdir"
+ if test -n "$lib_ssl"; then
+ libdirs="$libdirs -lssl${major_version}"
+ fi
+ if test -n "$lib_smime"; then
+ libdirs="$libdirs -lsmime${major_version}"
+ fi
+ if test -n "$lib_nss"; then
+ libdirs="$libdirs -lnss${major_version}"
+ fi
+ if test -n "$lib_nssutil"; then
+ libdirs="$libdirs -lnssutil${major_version}"
+ fi
+ echo $libdirs
+fi
+
diff --git a/abs/extra/nss/nss-nolocalsql.patch b/abs/extra/nss/nss-nolocalsql.patch
new file mode 100644
index 0000000..b72cc66
--- /dev/null
+++ b/abs/extra/nss/nss-nolocalsql.patch
@@ -0,0 +1,53 @@
+diff -up mozilla/security/nss/lib/Makefile.nolocalsql mozilla/security/nss/lib/Makefile
+--- mozilla/security/nss/lib/Makefile.nolocalsql 2007-11-06 15:12:37.000000000 +0100
++++ mozilla/security/nss/lib/Makefile 2007-11-06 15:13:35.000000000 +0100
+@@ -62,11 +62,11 @@ ifeq ($(OS_TARGET), WINCE)
+ DIRS := $(filter-out fortcrypt,$(DIRS))
+ endif
+
+-ifndef MOZILLA_CLIENT
+-ifndef NSS_USE_SYSTEM_SQLITE
+-DIRS := sqlite $(DIRS)
+-endif
+-endif
++#ifndef MOZILLA_CLIENT
++#ifndef NSS_USE_SYSTEM_SQLITE
++#DIRS := sqlite $(DIRS)
++#endif
++#endif
+
+ #######################################################################
+ # (5) Execute "global" rules. (OPTIONAL) #
+diff -up mozilla/security/nss/lib/softoken/legacydb/manifest.mn.nolocalsql mozilla/security/nss/lib/softoken/legacydb/manifest.mn
+--- mozilla/security/nss/lib/softoken/legacydb/manifest.mn.nolocalsql 2007-11-06 15:10:59.000000000 +0100
++++ mozilla/security/nss/lib/softoken/legacydb/manifest.mn 2007-11-06 15:11:07.000000000 +0100
+@@ -46,9 +46,9 @@ MAPFILE = $(OBJDIR)/nssdbm.def
+
+ DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" -DSOFTOKEN_LIB_NAME=\"$(notdir $(SHARED_LIBRARY))\"
+
+-ifdef MOZILLA_CLIENT
+-INCLUDES += -I$(DIST)/include/sqlite3
+-endif
++#ifdef MOZILLA_CLIENT
++#INCLUDES += -I$(DIST)/include/sqlite3
++#endif
+
+ CSRCS = \
+ dbmshim.c \
+diff -up mozilla/security/nss/lib/softoken/manifest.mn.nolocalsql mozilla/security/nss/lib/softoken/manifest.mn
+--- mozilla/security/nss/lib/softoken/manifest.mn.nolocalsql 2007-11-06 15:08:14.000000000 +0100
++++ mozilla/security/nss/lib/softoken/manifest.mn 2007-11-06 15:10:21.000000000 +0100
+@@ -47,9 +47,9 @@ MAPFILE = $(OBJDIR)/softokn.def
+
+ DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" -DSOFTOKEN_LIB_NAME=\"$(notdir $(SHARED_LIBRARY))\" -DSHLIB_VERSION=\"$(LIBRARY_VERSION)\"
+
+-ifdef MOZILLA_CLIENT
+-INCLUDES += -I$(DIST)/include/sqlite3
+-endif
++#ifdef MOZILLA_CLIENT
++#INCLUDES += -I$(DIST)/include/sqlite3
++#endif
+
+ EXPORTS = \
+ pkcs11.h \
+diff -up mozilla/security/nss/lib/softoken/config.mk.nolocalsql mozilla/security/nss/lib/softoken/config.mk
diff --git a/abs/extra/nss/nss.pc.in b/abs/extra/nss/nss.pc.in
new file mode 100644
index 0000000..d47b9e1
--- /dev/null
+++ b/abs/extra/nss/nss.pc.in
@@ -0,0 +1,11 @@
+prefix=%prefix%
+exec_prefix=%exec_prefix%
+libdir=%libdir%
+includedir=%includedir%
+
+Name: NSS
+Description: Network Security Services
+Version: %NSS_VERSION%
+Requires: nspr >= %NSPR_VERSION%
+Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
+Cflags: -I${includedir}
diff --git a/abs/extra/nvram-wake/PKGBUILD b/abs/extra/nvram-wake/PKGBUILD
new file mode 100755
index 0000000..d2d76b1
--- /dev/null
+++ b/abs/extra/nvram-wake/PKGBUILD
@@ -0,0 +1,16 @@
+pkgname=nvram-wake
+pkgver=0.99b
+pkgrel=1
+pkgdesc="set the wakeup time of the localpc"
+license="GPL"
+arch=(i686)
+url="http://sourceforge.net/projects/nvram-wakeup/"
+source=(http://superb-west.dl.sourceforge.net/sourceforge/nvram-wakeup/nvram-wakup-0.99b.tar.gz )
+
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+}
+
diff --git a/abs/extra/ocaml/PKGBUILD b/abs/extra/ocaml/PKGBUILD
new file mode 100644
index 0000000..1ca7fe5
--- /dev/null
+++ b/abs/extra/ocaml/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 28732 2009-03-01 22:25:49Z tpowa $
+#Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=ocaml
+pkgver=3.11.0
+pkgrel=1
+pkgdesc="Ocaml compiler - Ocaml is a functional language with OO extensions"
+arch=(i686 x86_64)
+license=('LGPL2' 'custom: QPL-1.0')
+url="http://caml.inria.fr/"
+depends=('gdbm')
+makedepends=('tk' 'ncurses>=5.6-7' 'libx11')
+optdepends=('ncurses=5.6-7: advanced ncurses features' 'tk: advanced tk features')
+source=(http://caml.inria.fr/distrib/ocaml-3.11/$pkgname-$pkgver.tar.gz)
+options=('!makeflags' '!emptydirs')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure -prefix /usr
+ make world.opt || return 1
+ make PREFIX=$pkgdir/usr install || return 1
+
+# Save >10MB with this one, makepkg only strips debug symbols.
+ find ${startdir}/pkg/usr/lib -type f -name '*.so.*' -exec strip --strip-unneeded {} \;
+
+# install license
+install -D -m 644 $startdir/src/$pkgname-$pkgver/LICENSE $startdir/pkg/usr/share/licenses/ocaml/LICENSE
+}
+md5sums=('be152066bdf09761ddf1c31291e5cb90')
diff --git a/abs/extra/openjdk6/PKGBUILD b/abs/extra/openjdk6/PKGBUILD
new file mode 100644
index 0000000..22ee813
--- /dev/null
+++ b/abs/extra/openjdk6/PKGBUILD
@@ -0,0 +1,155 @@
+# $Id: PKGBUILD 29222 2009-03-06 20:55:45Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+
+pkgname=openjdk6
+pkgver=1.5
+_icedteaver=1.5pre
+pkgrel=0.1
+_date=20090305
+pkgdesc='Free Java environment based on OpenJDK 6.0 with IcedTea6 replacing binary plugs.'
+url='http://icedtea.classpath.org'
+arch=('i686' 'x86_64')
+license=('GPL')
+_openjdk_version=b14
+_openjdk_date=25_nov_2008
+_hotspotver=fc6a5ae3fef5 # what it downlopads itself / remove from configure to get it
+depends=('gcc-libs' 'xdg-utils' 'hicolor-icon-theme')
+makedepends=('alsa-lib' 'libxtst' 'giflib' 'libxp' 'gtk2' 'nspr' 'zlib' 'freetype2' 'libjpeg' 'libx11' 'libcups' 'patch' 'xalan-java' 'xulrunner>=1.9.0.3' 'apache-ant>=1.7.0' 'autoconf' 'unzip' 'rhino' 'mercurial')
+conflicts=('java-environment' 'java-runtime')
+provides=('java-environment=6' 'java-runtime=6')
+options=(!emptydirs)
+install=openjdk6.install
+source=(http://download.java.net/openjdk/jdk6/promoted/${_openjdk_version}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz
+ #http://icedtea.classpath.org/download/source/icedtea6-${_icedteaver}.tar.gz
+ ftp://ftp.archlinux.org/other/openjdk6/icedtea6-${_date}.tar.bz2
+ http://hg.openjdk.java.net/jdk7/hotspot/hotspot/archive/${_hotspotver}.tar.gz
+ fix_jdk_cmds_path.diff
+ fix_corba_cmds_path.diff
+ gcjwebplugin_xulrunner.diff
+ aatext_by_default.diff
+ fontconfig-paths.diff
+ openjdk6.profile)
+noextract=(openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz ${_hotspotver}.tar.gz)
+md5sums=('9f9773a822156dd3d576d83d794364ce'
+ 'd57bf545dc50d41588b43112393dac26'
+ '1c3510387dccdb4907d0fd2f1c58e372'
+ '5da3e39fa60985576c4f37d1491efbe2'
+ 'f7e7a212e50abb56a6ef1a2b1bd27405'
+ 'ed2e808df2d2fc2ea7dae5139d475192'
+ 'ef60d567c0d9bad111212851220deafd'
+ '104380f0b900c840141e572a7fb70c27'
+ 'd0703088e10aa957c037644ab88d716d')
+
+build() {
+ # for hg checkout install mercurial and
+# mkdir ${srcdir}/icedtea6-${_date}
+# cd ${srcdir}/icedtea6-${_date}
+# hg clone http://icedtea.classpath.org/hg/icedtea6 || return 1
+# tar -cvjf ../../icedtea6-${_date}.tar.bz2 *
+# return 1
+
+ unset JAVA_HOME
+ unset CLASSPATH
+ if [ "${CARCH}" = "x86_64" ]; then
+ _arch=amd64
+ else
+ _arch=i586
+ fi
+ _javaver=1.6.0
+ _jvmdir=/usr/lib/jvm/java-${_javaver}-openjdk
+
+ cd ${srcdir}/icedtea6
+# cd ${srcdir}/icedtea6-${_icedteaver}
+ ln -s ${srcdir}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz .
+ ln -s ${srcdir}/${_hotspotver}.tar.gz .
+
+ # fix xulrunner linking
+ patch -Np0 -i ${srcdir}/gcjwebplugin_xulrunner.diff || return 1
+
+ cp ${srcdir}/*.diff ${srcdir}/icedtea6/patches/
+# cp ${srcdir}/*.diff ${srcdir}/icedtea6-${_icedteaver}/patches/
+ export DISTRIBUTION_PATCHES="patches/fix_jdk_cmds_path.diff patches/fix_corba_cmds_path.diff patches/aatext_by_default.diff patches/fontconfig-paths.diff"
+
+ ./autogen.sh
+ autoreconf # needed due to mercurial build
+
+ export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
+ export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
+ unset MAKEFLAGS
+
+ if [ -x ${_jvmdir}/bin/javac ]; then
+ JCONF="--with-openjdk --with-openjdk-home=${_jvmdir}"
+ elif [ -x /opt/java/bin/javac ]; then
+ JCONF="--with-openjdk --with-openjdk-home=/opt/java"
+ elif [ -x /usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/bin/javac ]; then
+ JCONF="--with-gcj-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0 --with-javac"
+ elif [ -x /usr/lib/java-${_javaver}-openjdk/bin/javac ]; then
+ JCONF="--with-openjdk --with-openjdk-home=/usr/lib/java-${_javaver}-openjdk"
+ # ^ only fallback to build with broken 1.2-3, can be removed later
+ else
+ echo "No supported java installation found, install either openjdk6, jdk or java-gcj-compat"
+ return 1
+ fi
+
+ ./configure --with-parallel-jobs=${HOTSPOT_BUILD_JOBS} \
+ --with-xalan2-jar=/usr/share/java/xalan.jar \
+ --with-hotspot-src-zip=${_hotspotver}.tar.gz \
+ --with-pkgversion=ArchLinux-${pkgver}-${pkgrel}-$CARCH $JCONF
+ LD_PRELOAD="" make || return 1
+
+ install -m755 -d ${pkgdir}/${_jvmdir}/jre
+
+ pushd ${srcdir}/icedtea6/openjdk/control/build/linux-${_arch}/j2sdk-image
+# pushd ${srcdir}/icedtea6-${_icedteaver}/openjdk/control/build/linux-${_arch}/j2sdk-image
+ # Install main files.
+ cp -a bin include lib src.zip ${pkgdir}/${_jvmdir}/ || return 1
+ cp -a jre/bin jre/lib ${pkgdir}/${_jvmdir}/jre/ || return 1
+
+ mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.properties.src \
+ ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.properties.src || return 1
+ mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.bfc \
+ ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.bfc || return 1
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.*.bfc
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.*.properties.src
+
+ # Install man pages.
+ install -m755 -d ${pkgdir}/usr/share/man/man1
+ install -m644 man/man1/*.1 ${pkgdir}/usr/share/man/man1/ || return 1
+
+ # Install demos and samples.
+ cp -a demo ${pkgdir}/${_jvmdir}/ || return 1
+ install -m755 -d sample/rmi
+ mv bin/java-rmi.cgi sample/rmi || return 1
+ cp -a sample ${pkgdir}/${_jvmdir}/ || return 1
+ popd
+
+ # Install icons and menu entries.
+ for s in 16 24 32 48 ; do
+ install -m755 -d ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps
+ install -m644 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
+ ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png || return 1
+ done
+
+ # Install desktop files.
+ install -m755 -d ${pkgdir}/usr/share/{applications,pixmaps}
+ install -m644 javaws.png ${pkgdir}/usr/share/pixmaps || return 1
+ install -m644 {javaws,jconsole,policytool}.desktop ${pkgdir}/usr/share/applications || return 1
+
+ # link the mozilla-plugin
+ install -m755 -d ${pkgdir}/usr/lib/mozilla/plugins/
+ ln -sf ${_jvmdir}/jre/lib/${_arch/i586/i386}/IcedTeaPlugin.so ${pkgdir}/usr/lib/mozilla/plugins/ || return 1
+
+ # link binaries into /usr/bin
+ install -m755 -d ${pkgdir}/usr/bin
+ pushd ${pkgdir}/${_jvmdir}/bin
+ for file in *; do
+ ln -sf ${_jvmdir}/bin/${file} \
+ ${pkgdir}/usr/bin || return 1
+ done
+ popd
+
+ # set some variables
+ install -m755 -d ${pkgdir}/etc/profile.d
+ install -m755 ${srcdir}/openjdk6.profile ${pkgdir}/etc/profile.d/openjdk6.sh || return 1
+}
diff --git a/abs/extra/openjdk6/aatext_by_default.diff b/abs/extra/openjdk6/aatext_by_default.diff
new file mode 100644
index 0000000..268ea99
--- /dev/null
+++ b/abs/extra/openjdk6/aatext_by_default.diff
@@ -0,0 +1,35 @@
+--- openjdk/jdk/src/share/classes/sun/awt/SunToolkit.java.old 2008-01-08 20:23:56.000000000 +0200
++++ openjdk/jdk/src/share/classes/sun/awt/SunToolkit.java 2008-02-24 12:39:19.000000000 +0200
+@@ -1875,7 +1875,6 @@
+ */
+ private static boolean useSystemAAFontSettings() {
+ if (!checkedSystemAAFontSettings) {
+- useSystemAAFontSettings = true; /* initially set this true */
+ String systemAAFonts = null;
+ Toolkit tk = Toolkit.getDefaultToolkit();
+ if (tk instanceof SunToolkit) {
+@@ -1883,20 +1882,10 @@
+ (String)AccessController.doPrivileged(
+ new GetPropertyAction("awt.useSystemAAFontSettings"));
+ }
+- if (systemAAFonts != null) {
+- useSystemAAFontSettings =
+- Boolean.valueOf(systemAAFonts).booleanValue();
+- /* If it is anything other than "true", then it may be
+- * a hint name , or it may be "off, "default", etc.
+- */
+- if (!useSystemAAFontSettings) {
+- desktopFontHints = getDesktopAAHintsByName(systemAAFonts);
+- }
+- }
+- /* If its still true, apply the extra condition */
+- if (useSystemAAFontSettings) {
+- useSystemAAFontSettings = lastExtraCondition;
+- }
++ if (systemAAFonts == null || Boolean.parseBoolean(systemAAFonts))
++ systemAAFonts = "on";
++ desktopFontHints = getDesktopAAHintsByName(systemAAFonts);
++ useSystemAAFontSettings = desktopFontHints != null;
+ checkedSystemAAFontSettings = true;
+ }
+ return useSystemAAFontSettings;
diff --git a/abs/extra/openjdk6/fix_corba_cmds_path.diff b/abs/extra/openjdk6/fix_corba_cmds_path.diff
new file mode 100644
index 0000000..8426578
--- /dev/null
+++ b/abs/extra/openjdk6/fix_corba_cmds_path.diff
@@ -0,0 +1,33 @@
+--- openjdk/corba/make/common/shared/Defs-utils.gmk.old 2008-04-13 13:26:12.000000000 +0300
++++ openjdk/corba/make/common/shared/Defs-utils.gmk 2008-04-14 15:35:13.000000000 +0300
+@@ -86,10 +86,10 @@
+ CHMOD = $(UTILS_COMMAND_PATH)chmod
+ CMP = $(UTILS_USR_BIN_PATH)cmp
+ COMM = $(UTILS_USR_BIN_PATH)comm
+-COMPRESS = $(UTILS_USR_BIN_PATH)compress
++COMPRESS = $(UTILS_COMMAND_PATH)compress
+ CP = $(UTILS_COMMAND_PATH)cp
+ CPIO = $(UTILS_COMMAND_PATH)cpio
+-CUT = $(UTILS_USR_BIN_PATH)cut
++CUT = $(UTILS_COMMAND_PATH)cut
+ DATE = $(UTILS_COMMAND_PATH)date
+ DF = $(UTILS_COMMAND_PATH)df
+ DIFF = $(UTILS_USR_BIN_PATH)diff
+@@ -136,7 +136,7 @@
+ TAR = $(UTILS_COMMAND_PATH)tar
+ TEST = $(UTILS_USR_BIN_PATH)test
+ TOUCH = $(UTILS_COMMAND_PATH)touch
+-TR = $(UTILS_USR_BIN_PATH)tr
++TR = $(UTILS_COMMAND_PATH)tr
+ TRUE = $(UTILS_COMMAND_PATH)true
+ UNAME = $(UTILS_COMMAND_PATH)uname
+ UNIQ = $(UTILS_USR_BIN_PATH)uniq
+@@ -186,7 +186,7 @@
+ # others have it in /usr/bin.
+ SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
+ $(wildcard $(UTILS_USR_BIN_PATH)sort))
+- NAWK = $(USRBIN_PATH)gawk
++ NAWK = $(UTILS_COMMAND_PATH)gawk
+ # Intrinsic unix command, with backslash-escaped character interpretation
+ ECHO = /bin/echo -e
+ # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
diff --git a/abs/extra/openjdk6/fix_jdk_cmds_path.diff b/abs/extra/openjdk6/fix_jdk_cmds_path.diff
new file mode 100644
index 0000000..7e16e17
--- /dev/null
+++ b/abs/extra/openjdk6/fix_jdk_cmds_path.diff
@@ -0,0 +1,33 @@
+--- openjdk/jdk/make/common/shared/Defs-utils.gmk.old 2008-04-13 13:33:23.000000000 +0300
++++ openjdk/jdk/make/common/shared/Defs-utils.gmk 2008-04-14 15:37:34.000000000 +0300
+@@ -76,10 +76,10 @@
+ CHMOD = $(UTILS_COMMAND_PATH)chmod
+ CMP = $(UTILS_USR_BIN_PATH)cmp
+ COMM = $(UTILS_USR_BIN_PATH)comm
+-COMPRESS = $(UTILS_USR_BIN_PATH)compress
++COMPRESS = $(UTILS_COMMAND_PATH)compress
+ CP = $(UTILS_COMMAND_PATH)cp
+ CPIO = $(UTILS_COMMAND_PATH)cpio
+-CUT = $(UTILS_USR_BIN_PATH)cut
++CUT = $(UTILS_COMMAND_PATH)cut
+ DATE = $(UTILS_COMMAND_PATH)date
+ DF = $(UTILS_COMMAND_PATH)df
+ DIFF = $(UTILS_USR_BIN_PATH)diff
+@@ -126,7 +126,7 @@
+ TAR = $(UTILS_COMMAND_PATH)tar
+ TEST = $(UTILS_USR_BIN_PATH)test
+ TOUCH = $(UTILS_COMMAND_PATH)touch
+-TR = $(UTILS_USR_BIN_PATH)tr
++TR = $(UTILS_COMMAND_PATH)tr
+ TRUE = $(UTILS_COMMAND_PATH)true
+ UNAME = $(UTILS_COMMAND_PATH)uname
+ UNIQ = $(UTILS_USR_BIN_PATH)uniq
+@@ -173,7 +173,7 @@
+ BASENAME=$(firstword $(wildcard $(UTILS_COMMAND_PATH)basename) \
+ $(wildcard $(UTILS_USR_BIN_PATH)basename))
+
+- NAWK = $(USRBIN_PATH)gawk
++ NAWK = $(UTILS_COMMAND_PATH)gawk
+ # Intrinsic unix command, with backslash-escaped character interpretation
+ ECHO = /bin/echo -e
+ # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
diff --git a/abs/extra/openjdk6/fontconfig-paths.diff b/abs/extra/openjdk6/fontconfig-paths.diff
new file mode 100644
index 0000000..77d3e03
--- /dev/null
+++ b/abs/extra/openjdk6/fontconfig-paths.diff
@@ -0,0 +1,43 @@
+--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig 2008-08-06 14:11:55.000000000 +0200
++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties 2008-08-06 14:15:36.000000000 +0200
+@@ -128,23 +128,23 @@
+
+ # Font File Names
+
+-filename.DejaVu_Sans=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
+-filename.DejaVu_Sans_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
+-filename.DejaVu_Sans_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
+-filename.DejaVu_Sans_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
++filename.DejaVu_Sans=/usr/share/fonts/TTF/DejaVuSans.ttf
++filename.DejaVu_Sans_Bold=/usr/share/fonts/TTF/DejaVuSans-Bold.ttf
++filename.DejaVu_Sans_Oblique=/usr/share/fonts/TTF/DejaVuSans-Oblique.ttf
++filename.DejaVu_Sans_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSans-BoldOblique.ttf
+
+-filename.DejaVu_Sans_Mono=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
+-filename.DejaVu_Sans_Mono_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
+-filename.DejaVu_Sans_Mono_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf
+-filename.DejaVu_Sans_Mono_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf
++filename.DejaVu_Sans_Mono=/usr/share/fonts/TTF/DejaVuSansMono.ttf
++filename.DejaVu_Sans_Mono_Bold=/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf
++filename.DejaVu_Sans_Mono_Oblique=/usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf
++filename.DejaVu_Sans_Mono_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSansMono-BoldOblique.ttf
+
+-filename.DejaVu_Serif=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
+-filename.DejaVu_Serif_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf
+-filename.DejaVu_Serif_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Oblique.ttf
+-filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldOblique.ttf
++filename.DejaVu_Serif=/usr/share/fonts/TTF/DejaVuSerif.ttf
++filename.DejaVu_Serif_Bold=/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf
++filename.DejaVu_Serif_Oblique=/usr/share/fonts/TTF/DejaVuSerif-Oblique.ttf
++filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSerif-BoldOblique.ttf
+
+-filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic-subst.ttf
+-filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho-subst.ttf
+-filename.AR_PL_ZenKai_Uni=/usr/share/fonts//truetype/arphic/ukai.ttf
+-filename.Baekmuk_Dotum=/usr/share/fonts/truetype/baekmuk/dotum.ttf
+-filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf
++filename.Kochi_Gothic=/usr/share/fonts/TTF/kochi-gothic-subst.ttf
++filename.Kochi_Mincho=/usr/share/fonts/TTF/kochi-mincho-subst.ttf
++filename.AR_PL_ZenKai_Uni=/usr/share/fonts/TTF/ukai.ttf
++filename.Baekmuk_Dotum=/usr/share/fonts/TTF/dotum.ttf
++filename.Baekmuk_Batang=/usr/share/fonts/TTF/batang.ttf
diff --git a/abs/extra/openjdk6/gcjwebplugin_xulrunner.diff b/abs/extra/openjdk6/gcjwebplugin_xulrunner.diff
new file mode 100644
index 0000000..0ed9209
--- /dev/null
+++ b/abs/extra/openjdk6/gcjwebplugin_xulrunner.diff
@@ -0,0 +1,11 @@
+--- Makefile.am 2008-07-21 15:12:07.000000000 +0000
++++ Makefile.am.new 2008-07-22 08:37:49.000000000 +0000
+@@ -1176,7 +1176,7 @@
+ # gcjwebplugin.so.
+ gcjwebplugin.so: gcjwebplugin.cc
+ $(CXX) $(CXXFLAGS) $(MOZILLA_CFLAGS) \
+- $(MOZILLA_LIBS) $(GLIB_CFLAGS) $(GLIB_LIBS) \
++ $(MOZILLA_LIBS) -Wl,-R/usr/lib/xulrunner-1.9 $(GLIB_CFLAGS) $(GLIB_LIBS) \
+ $(GTK_CFLAGS) $(GTK_LIBS) \
+ -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
+ -fpic -shared -o $@ $<
diff --git a/abs/extra/openjdk6/openjdk6.install b/abs/extra/openjdk6/openjdk6.install
new file mode 100644
index 0000000..3557847
--- /dev/null
+++ b/abs/extra/openjdk6/openjdk6.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+
+post_remove() {
+ post_install
+}
diff --git a/abs/extra/openjdk6/openjdk6.profile b/abs/extra/openjdk6/openjdk6.profile
new file mode 100644
index 0000000..4af417f
--- /dev/null
+++ b/abs/extra/openjdk6/openjdk6.profile
@@ -0,0 +1,4 @@
+export J2SDKDIR=/usr/lib/jvm/java-1.6.0-openjdk
+export J2REDIR=$J2SDKDIR/jre
+export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk
+#export CLASSPATH="${CLASSPATH:+$CLASSPATH:}$J2SDKDIR/lib:$J2REDIR/lib"
diff --git a/abs/extra/opera/PKGBUILD b/abs/extra/opera/PKGBUILD
new file mode 100644
index 0000000..b7342f8
--- /dev/null
+++ b/abs/extra/opera/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 28942 2009-03-03 08:21:13Z daniel $
+# Maintainer: Daniel Isenmann <daniel@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+
+pkgname=opera
+pkgver=9.64
+pkgrel=2
+pkgdesc="The Opera web browser"
+url="http://www.opera.com/"
+depends=('qt')
+license=('custom:opera')
+arch=('i686' 'x86_64')
+source=(http://ftp.opera.com/pub/opera/linux/${pkgver/./}/final/en/i386/opera-${pkgver}.gcc4-qt4.i386.tar.bz2 opera.desktop opera_logo48.png opera-qt4-theme.patch)
+md5sums=('bbfb1f77cc3091b3134b710b4719ba3e'
+ 'f99bef1a9200abe5a5cda78665cddc84'
+ 'a270c65b8d4f8e2e76439f417ea44265'
+ 'e977071ea5f09b36820367bf6e4dc3e1')
+
+[ "$CARCH" = "x86_64" ] && depends=('qt3')
+[ "$CARCH" = "x86_64" ] && source=(http://ftp.opera.com/pub/opera/linux/${pkgver/./}/final/en/x86_64/opera-${pkgver}.gcc4-shared-qt3.x86_64.tar.bz2 opera.desktop opera_logo48.png)
+[ "$CARCH" = "x86_64" ] && md5sums=('b4ca665855639a72fc0c3ae47b751fae'
+ 'f99bef1a9200abe5a5cda78665cddc84'
+ 'a270c65b8d4f8e2e76439f417ea44265')
+build() {
+if [ "$CARCH" = "x86_64" ]; then
+ cd ${startdir}/src/opera-${pkgver}-2480.gcc4-shared-qt3.x86_64
+ sed 's|/usr/X11R6/lib/mozilla/plugins=1|/usr/lib/mozilla/plugins=1|' -i usr/share/opera/ini/pluginpath.ini || return 1
+ else cd ${startdir}/src/opera-${pkgver}-2480.gcc4-qt4.i386
+ sed 's|/usr/X11R6/lib/mozilla/plugins=1|/usr/lib/mozilla/plugins=1|' -i usr/share/opera/ini/pluginpath.ini || return 1
+fi
+ ./install.sh DESTDIR=${startdir}/pkg
+ if [ "$CARCH" = "i686" ]; then
+ pushd ${startdir}/pkg/usr/bin
+ patch -Np0 -i ${startdir}/src/opera-qt4-theme.patch || return 1
+ popd
+ fi
+ install -D -m 644 ${startdir}/src/opera.desktop ${startdir}/pkg/usr/share/applications/opera.desktop
+ install -D -m 644 LICENSE ${startdir}/pkg/usr/share/licenses/opera/license.txt
+ install -D -m 644 ${startdir}/src/opera_logo48.png ${startdir}/pkg/usr/share/opera/images/opera_48x48.png
+}
diff --git a/abs/extra/opera/opera-qt4-theme.patch b/abs/extra/opera/opera-qt4-theme.patch
new file mode 100644
index 0000000..f00f2cd
--- /dev/null
+++ b/abs/extra/opera/opera-qt4-theme.patch
@@ -0,0 +1,11 @@
+--- opera.orig 2008-10-22 19:37:21.000000000 +0200
++++ opera 2008-10-22 19:38:13.000000000 +0200
+@@ -30,7 +30,7 @@
+ done
+ test -z "$toset" || die Missing parameter for $arg
+
+-test "${_QTSTYLE_FROM_CMDLINE_}" = 'NO' && test -f "$HOME/.qt/qtrc" && _OPERA_QTSTYLE=`sed -n 's/^style=//p' $HOME/.qt/qtrc` && test "$_OPERA_QTSTYLE" && set -- "$@" -style "$_OPERA_QTSTYLE"
++test "${_QTSTYLE_FROM_CMDLINE_}" = 'NO' && test -f "$HOME/.config/Trolltech.conf" && _OPERA_QTSTYLE=`sed -n 's/^style=//p' $HOME/.config/Trolltech.conf` && test "$_OPERA_QTSTYLE" && set -- "$@" -style "$_OPERA_QTSTYLE"
+
+
+ # Add ending path divider "/" if missing, so execution won't fail
diff --git a/abs/extra/opera/opera.desktop b/abs/extra/opera/opera.desktop
new file mode 100644
index 0000000..23fa418
--- /dev/null
+++ b/abs/extra/opera/opera.desktop
@@ -0,0 +1,91 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=opera %u
+Terminal=false
+Icon=/usr/share/opera/images/opera_48x48.png
+Type=Application
+MimeType=text/html
+Categories=Application;Network;
+Name=Opera
+Name[ar]=أوبرا
+Name[bn]=অপেরা
+Name[eo]=Opero
+Name[fa]=اپرا
+Name[hi]=ऑपेरा
+Name[ko]=오페ë¼
+Name[lo]=ໂອເປຣາ
+Name[pa]=ਓਪੇਰਾ
+Name[ta]=ஓபேரா
+Name[th]=โอเปรา
+GenericName=Web Browser
+GenericName[af]=Web Blaaier
+GenericName[ar]=متصÙØ­ ويب
+GenericName[az]=Veb Səyyahı
+GenericName[bg]=Браузър
+GenericName[bn]=ওয়েব বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°
+GenericName[br]=Furcher ar Gwiad
+GenericName[bs]=WWW Preglednik
+GenericName[ca]=Fullejador web
+GenericName[cs]=WWW prohlížeÄ
+GenericName[cy]=Porydd Gwe
+GenericName[da]=Browser
+GenericName[de]=Web-Browser
+GenericName[el]=ΠεÏιηγητής ΙστοÏ
+GenericName[eo]=TTT-legilo
+GenericName[es]=Navegador web
+GenericName[et]=Veebilehitseja
+GenericName[eu]=Web arakatzailea
+GenericName[fa]=مرورگر وب
+GenericName[fi]=WWW-selain
+GenericName[fo]=Alnótsfar
+GenericName[fr]=Navigateur web
+GenericName[fy]=Webblêder
+GenericName[ga]=Brabhsálaí Lín
+GenericName[gl]=Navegador Web
+GenericName[he]=דפדפן ×ינטרנט
+GenericName[hi]=वेब बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤°
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[is]=Vafri
+GenericName[it]=Browser Web
+GenericName[ja]=ウェブブラウザ
+GenericName[km]=កម្មវិធី​រុករក​បណ្ដាញ
+GenericName[ko]=웹 브ë¼ìš°ì €
+GenericName[lo]=ເວັບບຣາວເຊີ
+GenericName[lt]=Žiniatinklio naršyklė
+GenericName[lv]=TÄ«mekļa PÄrlÅ«ks
+GenericName[mk]=ПрелиÑтувач на Интернет
+GenericName[mn]=Веб-Хөтөч
+GenericName[ms]=Pelayar Web
+GenericName[nb]=Nettleser
+GenericName[nds]=Nettkieker
+GenericName[nl]=Webbrowser
+GenericName[nn]=Nettlesar
+GenericName[nso]=Seinyakisi sa Web
+GenericName[pa]=ਵੈਬ à¨à¨²à¨•à¨¾à¨°à¨¾
+GenericName[pl]=PrzeglÄ…darka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator de web
+GenericName[ru]=Веб-браузер
+GenericName[rw]=Mucukumbuzi Urubuga
+GenericName[se]=Fierpmádatlogan
+GenericName[sk]=Webový prehliadaÄ
+GenericName[sl]=Spletni brskalnik
+GenericName[sr]=Веб прегледач
+GenericName[sr@Latn]=Veb pregledaÄ
+GenericName[ss]=Ibrawuza yeWeb
+GenericName[sv]=Webbläsare
+GenericName[ta]=வலை உலாவி
+GenericName[tg]=ТафÑиргари вÑб
+GenericName[th]=เว็บบราวเซอร์
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Ðавігатор Тенет
+GenericName[uz]=Веб-браузер
+GenericName[ven]=Buronza ya Webu
+GenericName[vi]=Trình duyệt Web
+GenericName[wa]=Betchteu waibe
+GenericName[xh]=Umkhangeli zincwadi we Web
+GenericName[zh_CN]=Web æµè§ˆå™¨
+GenericName[zh_TW]=網é ç€è¦½å™¨
+GenericName[zu]=Umcingi we-Web
diff --git a/abs/extra/opera/opera_logo48.png b/abs/extra/opera/opera_logo48.png
new file mode 100644
index 0000000..be7e5ae
--- /dev/null
+++ b/abs/extra/opera/opera_logo48.png
Binary files differ
diff --git a/abs/extra/orbit2/PKGBUILD b/abs/extra/orbit2/PKGBUILD
new file mode 100644
index 0000000..a8e3337
--- /dev/null
+++ b/abs/extra/orbit2/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 29413 2009-03-08 16:43:13Z jgc $
+# Maintainer: Jan de Groot <jan@archlinux.org>
+
+pkgname=orbit2
+pkgver=2.14.17
+pkgrel=1
+pkgdesc="Thin/fast CORBA ORB"
+arch=(i686 x86_64)
+license=('LGPL' 'GPL')
+depends=('libidl2>=0.8.11')
+makedepends=('pkgconfig')
+options=('!libtool' '!makeflags')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/ORBit2/2.14/ORBit2-${pkgver}.tar.bz2)
+md5sums=('10bfb957fa4a8935a0b4afaee7d71df7')
+
+build() {
+ cd "${srcdir}/ORBit2-${pkgver}"
+ ./configure --prefix=/usr --disable-static || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/abs/extra/oss/PKGBUILD b/abs/extra/oss/PKGBUILD
new file mode 100644
index 0000000..d568ff3
--- /dev/null
+++ b/abs/extra/oss/PKGBUILD
@@ -0,0 +1,225 @@
+# $Id: PKGBUILD,v 1.8 2009/02/11 17:22:38 thotypous Exp $
+# Maintainer: Paulo Matias <matiasΘarchlinux-br·org>
+
+pkgname="oss"
+pkgver="4.1_1051"
+pkgrel=7
+pkgdesc="Open Sound System UNIX audio architecture"
+arch=('i686' 'x86_64')
+url="http://developer.opensound.com/"
+license=('GPL2')
+depends=('gcc' 'make' 'kernel-headers' 'module-init-tools' 'libtool' 'sed')
+makedepends=('pkgconfig' 'gawk' 'gtk2')
+conflicts=('oss-linux' 'oss-linux-free' 'oss-testing')
+install='oss.install'
+source=("http://www.4front-tech.com/developer/sources/stable/gpl/oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl.tar.bz2"
+ 'oss.rm-init-scripts.patch' 'oss.rc' 'oss.install' 'hg-latest-fixes.diff')
+
+
+optdepends=('gtk2: for graphical mixer (ossxmix)'
+ 'hal: for automatic USB audio configuration'
+ 'libflashsupport-oss: for Flash plugin support')
+
+build() {
+ _dir="oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl"
+
+ cd "$srcdir/$_dir"
+
+ # Apply patchs from hg.
+ msg "Applying latest fixes from hg."
+ patch -p1 < "$srcdir/hg-latest-fixes.diff" || return 1
+
+ cd "$srcdir"
+
+ # Avoid these flags conflicting with OSS build system.
+ unset CFLAGS
+ unset OSFLAGS
+ unset LIBRARIES
+
+ # Remove libflashsupport, as it belongs to a separate package.
+ rm -f "$srcdir/$_dir/oss/lib/flashsupport.c" &> /dev/null
+
+ msg "Preparing the build environment."
+
+ if [ ! -d build ]; then
+ # Create build directory and configure
+ mkdir build && cd build
+ "$srcdir/$_dir/configure" --enable-libsalsa=NO || return 1
+ else
+ # Change to existing build directory
+ cd build
+ fi
+
+ msg "Building OSS."
+ make build || return 1
+
+ msg "Patching init scripts."
+ cd "$srcdir/build/prototype"
+ rm usr/lib/oss/etc/S89oss
+ patch -b -p0 < "$srcdir/oss.rm-init-scripts.patch" || return 1
+
+ msg "Copying files."
+ cp -R * "$pkgdir"
+ install -D -m755 "$srcdir/oss.rc" "$pkgdir/etc/rc.d/oss"
+################################
+PREFIX=$startdir/pkg
+OSSLIBDIR=$PREFIX/usr/lib/oss
+UNAME=2.6.28-LinHES
+KERNELDIR=/lib/modules/$UNAME/build
+mkdir -p ${PREFIX}/lib/modules/$UNAME/kernel/oss
+
+cd $OSSLIBDIR/build
+rm -f $OSSLIBDIR/.cuckoo_installed
+ REGPARM=REGPARM
+ rm -rf $OSSLIBDIR/objects
+ ln -s $OSSLIBDIR/objects.regparm $OSSLIBDIR/objects
+ rm -rf $OSSLIBDIR/modules
+ ln -s $OSSLIBDIR/modules.regparm $OSSLIBDIR/modules
+
+echo OSS build environment set up for $REGPARM kernels
+
+if ! test -f $OSSLIBDIR/objects/osscore.o
+then
+ echo Error: OSS core module for $REGPARM kernel is not available in $OSSLIBDIR/objects
+ exit 1
+fi
+OK=1
+
+if ! test -d /lib/modules/$UNAME
+then
+ echo Error: Kernel directory /lib/modules/$UNAME does not exist
+ exit 1
+fi
+
+cp -f ../objects/osscore.o osscore_mainline.o
+
+ln -sf ../include/sys/*.h ../include/sys/ossddk .
+
+rm -f Makefile
+ln -s Makefile.osscore Makefile
+
+echo Building module osscore
+
+if ! make KERNELDIR=$KERNELDIR> build.list 2>&1
+then
+ echo Failed to compile OSS
+ cat build.list
+ exit 2
+fi
+
+if ! test -d /lib/modules/$UNAME/kernel/oss
+then
+ mkdir /lib/modules/$UNAME/kernel/oss
+fi
+
+if ! test -d /lib/modules/$UNAME/kernel/oss
+then
+ echo OSS module directory /lib/modules/$UNAME/kernel/oss does not exist.
+ exit 3
+fi
+
+if ! ld -r osscore.ko osscore_mainline.o -o /lib/modules/$UNAME/kernel/oss/osscore.ko
+then
+ echo Linking the osscore module failed
+ exit 5
+fi
+
+if test -f Module.symvers
+then
+ #Take generated symbol information and add it to module.inc
+ rm -f osscore_symbols.inc
+ echo "static const struct modversion_info ____versions[]" >> osscore_symbols.inc
+ echo " __attribute__((used))" >> osscore_symbols.inc
+ echo "__attribute__((section(\"__versions\"))) = {" >> osscore_symbols.inc
+ sed -e "s:^:{:" -e "s:\t:, \":" -e "s:\t\(.\)*:\"},:" < Module.symvers >> osscore_symbols.inc
+ echo "};" >> osscore_symbols.inc
+else
+ echo > osscore_symbols.inc
+fi
+
+#depmod -a
+
+for n in ../modules/*.o
+do
+ N=`basename $n .o`
+ echo Building module $N
+
+ rm -f $N_mainline.o Makefile
+
+ sed "s/MODNAME/$N/" < Makefile.tmpl > Makefile
+ ln -s $n $N_mainline.o
+
+ if ! make KERNELDIR=$KERNELDIR > build.list 2>&1
+ then
+ echo Compiling module $N failed
+ cat build.list
+ exit 4
+ fi
+
+ if ! ld -r $N.ko $N_mainline.o -o /lib/modules/$UNAME/kernel/oss/$N.ko
+ then
+ echo Linking $N module failed
+ exit 6
+ fi
+
+ rm -f $N_mainline.o
+ make clean
+
+done
+rm -f Makefile
+
+cp -rp /lib/modules/$UNAME/kernel/oss/* ${PREFIX}/lib/modules/$UNAME/kernel/oss/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
diff --git a/abs/extra/oss/hg-fix-devc.diff b/abs/extra/oss/hg-fix-devc.diff
new file mode 100644
index 0000000..8e8b4cf
--- /dev/null
+++ b/abs/extra/oss/hg-fix-devc.diff
@@ -0,0 +1,397 @@
+
+# HG changeset patch
+# User Hannu Savolainen <hannu@opensound.com>
+# Date 1227908228 -7200
+# Node ID 5a75f44925143c924a51dc474119035f4b08bf06
+# Parent e138663cd973a1e35950fddf299017bfefd16bdc
+Fixed devc=NULL problems left after changeset 502
+
+--- a/attic/drv/oss_allegro/oss_allegro.c Thu Nov 27 19:36:57 2008 +0200
++++ b/attic/drv/oss_allegro/oss_allegro.c Fri Nov 28 23:37:08 2008 +0200
+@@ -876,7 +876,7 @@ init_allegro (allegro_devc * devc)
+ &allegro_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/attic/drv/oss_als3xx/oss_als3xx.c Thu Nov 27 19:36:57 2008 +0200
++++ b/attic/drv/oss_als3xx/oss_als3xx.c Fri Nov 28 23:37:08 2008 +0200
+@@ -740,7 +740,7 @@ init_als300 (als300_devc * devc)
+ &als300_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/attic/drv/oss_als4k/oss_als4k.c Thu Nov 27 19:36:57 2008 +0200
++++ b/attic/drv/oss_als4k/oss_als4k.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1018,7 +1018,7 @@ init_als4000 (als4000_devc * devc)
+ &als4000_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/attic/drv/oss_maestro/oss_maestro.c Thu Nov 27 19:36:57 2008 +0200
++++ b/attic/drv/oss_maestro/oss_maestro.c Fri Nov 28 23:37:08 2008 +0200
+@@ -2181,7 +2181,7 @@ init_maestro (maestro_devc * devc)
+ &maestro_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/attic/drv/oss_neomagic/oss_neomagic.c Thu Nov 27 19:36:57 2008 +0200
++++ b/attic/drv/oss_neomagic/oss_neomagic.c Fri Nov 28 23:37:08 2008 +0200
+@@ -730,7 +730,7 @@ neomagic_install (neomagic_devc * devc,
+ devc->chip_name,
+ &neomagic_audio_driver,
+ sizeof (audiodrv_t),
+- 0, AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ 0, AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/attic/drv/oss_vortex/oss_vortex.c Thu Nov 27 19:36:57 2008 +0200
++++ b/attic/drv/oss_vortex/oss_vortex.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1449,7 +1449,7 @@ attach_channel (vortex_devc * devc, int
+ &vortex_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return;
+--- a/attic/drv/oss_vortex/oss_vortex2.c Thu Nov 27 19:36:57 2008 +0200
++++ b/attic/drv/oss_vortex/oss_vortex2.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1601,7 +1601,7 @@ attach_channel_vortex2 (vortex_devc * de
+ &vortex2_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return;
+--- a/kernel/drv/oss_ali5455/oss_ali5455.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_ali5455/oss_ali5455.c Fri Nov 28 23:37:08 2008 +0200
+@@ -835,7 +835,7 @@ init_ALI (ALI_devc * devc)
+ tmp_name,
+ &ALI_audio_driver,
+ sizeof (audiodrv_t), opts,
+- formats, NULL, -1)) < 0)
++ formats, devc, -1)) < 0)
+ {
+ my_dev = -1;
+ return 0;
+--- a/kernel/drv/oss_atiaudio/oss_atiaudio.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_atiaudio/oss_atiaudio.c Fri Nov 28 23:37:08 2008 +0200
+@@ -946,7 +946,7 @@ init_ATI (ATI_devc * devc)
+ tmp_name,
+ &ATI_audio_driver,
+ sizeof (audiodrv_t),
+- opts, formats, NULL, -1,
++ opts, formats, devc, -1,
+ devfile_name)) < 0)
+ {
+ my_dev = -1;
+--- a/kernel/drv/oss_audigyls/oss_audigyls.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_audigyls/oss_audigyls.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1470,7 +1470,7 @@ install_audio_devices (audigyls_devc * d
+ names[i],
+ &audigyls_audio_driver,
+ sizeof (audiodrv_t),
+- flags, fmts, NULL, -1)) < 0)
++ flags, fmts, devc, -1)) < 0)
+ {
+ return 0;
+ }
+@@ -1484,6 +1484,7 @@ install_audio_devices (audigyls_devc * d
+ audio_engines[adev]->rate_source = frontdev;
+ audio_engines[adev]->mixer_dev = devc->mixer_dev;
+ audio_engines[adev]->binding = bindings[i];
++ audio_engines[adev]->dmabuf_maxaddr = MEMLIMIT_ISA;
+ if (audio_engines[adev]->flags & ADEV_FIXEDRATE)
+ {
+ audio_engines[adev]->fixed_rate = DEFAULT_RATE;
+--- a/kernel/drv/oss_audiopci/oss_audiopci.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_audiopci/oss_audiopci.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1384,7 +1384,7 @@ init_apci (apci_devc * devc)
+ &apci_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/kernel/drv/oss_cmi878x/oss_cmi878x.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_cmi878x/oss_cmi878x.c Fri Nov 28 23:37:08 2008 +0200
+@@ -2396,7 +2396,7 @@ init_cmi8788 (cmi8788_devc * devc)
+ devc->osdev, tmp_name,
+ &cmi8788_audio_driver,
+ sizeof (audiodrv_t), caps, fmt,
+- NULL, -1)) < 0)
++ devc, -1)) < 0)
+ {
+ return 0;
+ }
+--- a/kernel/drv/oss_cmpci/oss_cmpci.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_cmpci/oss_cmpci.c Fri Nov 28 23:37:08 2008 +0200
+@@ -2212,7 +2212,7 @@ init_cmpci (cmpci_devc * devc)
+ sizeof (audiodrv_t),
+ caps,
+ AFMT_U8 | AFMT_S16_LE |
+- AFMT_AC3, NULL, -1)) < 0)
++ AFMT_AC3, devc, -1)) < 0)
+ {
+ return 0;
+ }
+--- a/kernel/drv/oss_cs4281/oss_cs4281.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_cs4281/oss_cs4281.c Fri Nov 28 23:37:08 2008 +0200
+@@ -909,7 +909,7 @@ init_cs4281 (cs4281_devc * devc)
+ &cs4281_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_S16_LE | AFMT_U8, NULL, -1)) < 0)
++ AFMT_S16_LE | AFMT_U8, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/kernel/drv/oss_cs461x/oss_cs461x.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_cs461x/oss_cs461x.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1719,7 +1719,7 @@ init_cs461x (cs461x_devc * devc)
+ &cs461x_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_S16_LE | AFMT_U8, NULL, -1)) < 0)
++ AFMT_S16_LE | AFMT_U8, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/kernel/drv/oss_emu10k1x/oss_emu10k1x.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_emu10k1x/oss_emu10k1x.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1038,7 +1038,7 @@ install_audio_devices (emu10k1x_devc * d
+ name,
+ &emu10k1x_audio_driver,
+ sizeof (audiodrv_t),
+- flags, AFMT_S16_LE | AFMT_AC3, NULL,
++ flags, AFMT_S16_LE | AFMT_AC3, devc,
+ -1)) < 0)
+ {
+ return;
+--- a/kernel/drv/oss_envy24/envy24_direct.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_envy24/envy24_direct.c Fri Nov 28 23:37:08 2008 +0200
+@@ -342,7 +342,7 @@ envy24d_install (envy24_devc * devc)
+ sizeof (audiodrv_t),
+ ADEV_NOVIRTUAL | ADEV_NOINPUT | ADEV_COLD
+ | ADEV_SPECIAL | ADEV_32BITONLY,
+- AFMT_S32_LE, NULL, -1,
++ AFMT_S32_LE, devc, -1,
+ "10ch_out")) >= 0)
+ {
+ portc = &devc->direct_portc_out;
+@@ -379,7 +379,7 @@ envy24d_install (envy24_devc * devc)
+ sizeof (audiodrv_t),
+ ADEV_NOVIRTUAL | ADEV_NOOUTPUT | ADEV_COLD
+ | ADEV_SPECIAL | ADEV_32BITONLY,
+- AFMT_S32_LE, NULL, -1,
++ AFMT_S32_LE, devc, -1,
+ "12ch_in")) >= 0)
+ {
+ portc = &devc->direct_portc_in;
+--- a/kernel/drv/oss_envy24/oss_envy24.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_envy24/oss_envy24.c Fri Nov 28 23:37:08 2008 +0200
+@@ -3114,7 +3114,7 @@ install_adev (envy24_devc * devc, char *
+ ADEV_AUTOMODE | ADEV_NOMMAP |
+ flags | ADEV_NOVIRTUAL,
+ fmts | AFMT_S16_LE | AFMT_S32_LE |
+- AFMT_S24_LE, NULL, -1,
++ AFMT_S24_LE, devc, -1,
+ devfile_name)) < 0)
+ {
+ dev = -1;
+--- a/kernel/drv/oss_fmedia/oss_fmedia.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_fmedia/oss_fmedia.c Fri Nov 28 23:37:08 2008 +0200
+@@ -925,7 +925,7 @@ init_fm801 (fm801_devc * devc)
+ &fm801_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 1;
+--- a/kernel/drv/oss_geode/oss_geode.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_geode/oss_geode.c Fri Nov 28 23:37:08 2008 +0200
+@@ -750,7 +750,7 @@ init_geode (geode_devc * devc)
+ tmp_name,
+ &geode_audio_driver,
+ sizeof (audiodrv_t),
+- caps, AFMT_S16_LE, NULL, -1)) < 0)
++ caps, AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/kernel/drv/oss_hdaudio/oss_hdaudio.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_hdaudio/oss_hdaudio.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1442,7 +1442,7 @@ install_outputdevs (hda_devc_t * devc)
+ tmp_name,
+ &hda_audio_driver,
+ sizeof (audiodrv_t),
+- opts, formats, NULL, -1,
++ opts, formats, devc, -1,
+ devfile_name)) < 0)
+ {
+ return;
+@@ -1564,7 +1564,7 @@ install_inputdevs (hda_devc_t * devc)
+ tmp_name,
+ &hda_audio_driver,
+ sizeof (audiodrv_t),
+- opts, formats, NULL, -1,
++ opts, formats, devc, -1,
+ devfile_name)) < 0)
+ {
+ return;
+--- a/kernel/drv/oss_sblive/oss_sblive.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_sblive/oss_sblive.c Fri Nov 28 23:37:08 2008 +0200
+@@ -3806,7 +3806,7 @@ oss_sblive_attach (oss_device_t * osdev)
+ tmp,
+ &sblive_audio_driver,
+ sizeof (audiodrv_t), caps,
+- fmts | AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ fmts | AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ portc->audiodev = -1;
+ return (i > 0);
+--- a/kernel/drv/oss_sbpci/oss_sbpci.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_sbpci/oss_sbpci.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1231,7 +1231,7 @@ init_apci97 (apci97_devc * devc, int dev
+ tmp_name,
+ &apci97_audio_driver,
+ sizeof (audiodrv_t),
+- caps, fmts, NULL, -1)) < 0)
++ caps, fmts, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/kernel/drv/oss_solo/oss_solo.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_solo/oss_solo.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1051,7 +1051,7 @@ init_solo (solo_devc * devc)
+ &solo_audio_driver,
+ sizeof (audiodrv_t),
+ caps,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/kernel/drv/oss_trident/oss_trident.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_trident/oss_trident.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1348,7 +1348,7 @@ init_trident (trident_devc * devc)
+ sizeof (audiodrv_t),
+ caps,
+ AFMT_U8 | AFMT_S16_LE | AFMT_AC3,
+- NULL, -1)) < 0)
++ devc, -1)) < 0)
+
+ {
+ adev = -1;
+--- a/kernel/drv/oss_userdev/oss_userdev.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_userdev/oss_userdev.c Fri Nov 28 23:37:08 2008 +0200
+@@ -268,6 +268,7 @@ attach_control_device(void)
+ * Create the control device files that are used to create client/server
+ * device pairs and to redirect access to them.
+ */
++ userdev_devc_t *devc = (userdev_devc_t*)0xdeadcafe; /* This should never get referenced */
+
+ if ((client_dev = oss_install_audiodev_with_devname (OSS_AUDIO_DRIVER_VERSION,
+ userdev_osdev,
+@@ -275,7 +276,7 @@ attach_control_device(void)
+ "User space audio device client side",
+ &userdev_client_control_driver,
+ sizeof (audiodrv_t),
+- ADEV_AUTOMODE, AFMT_S16_NE, NULL, -1,
++ ADEV_AUTOMODE, AFMT_S16_NE, devc, -1,
+ "client")) < 0)
+ {
+ return;
+@@ -289,7 +290,7 @@ attach_control_device(void)
+ "User space audio device server side",
+ &userdev_server_control_driver,
+ sizeof (audiodrv_t),
+- ADEV_AUTOMODE, AFMT_S16_NE, NULL, -1,
++ ADEV_AUTOMODE, AFMT_S16_NE, devc, -1,
+ "server")) < 0)
+ {
+ return;
+--- a/kernel/drv/oss_via823x/oss_via823x.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_via823x/oss_via823x.c Fri Nov 28 23:37:08 2008 +0200
+@@ -813,7 +813,7 @@ via8233_init (via8233_devc * devc)
+ sizeof (audiodrv_t),
+ opts,
+ AFMT_U8 | AFMT_S16_LE | AFMT_AC3,
+- NULL, -1)) < 0)
++ devc, -1)) < 0)
+ {
+ adev = -1;
+ return 1;
+--- a/kernel/drv/oss_via97/oss_via97.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_via97/oss_via97.c Fri Nov 28 23:37:08 2008 +0200
+@@ -742,7 +742,7 @@ init_via97 (via97_devc * devc)
+ &via97_audio_driver,
+ sizeof (audiodrv_t),
+ opts,
+- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0)
++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/kernel/drv/oss_ymf7xx/oss_ymf7xx.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/drv/oss_ymf7xx/oss_ymf7xx.c Fri Nov 28 23:37:08 2008 +0200
+@@ -1314,7 +1314,7 @@ init_ymf7xx (ymf7xx_devc * devc)
+ sizeof (audiodrv_t),
+ caps,
+ AFMT_U8 | AFMT_S16_LE | AFMT_AC3,
+- NULL, -1)) < 0)
++ devc, -1)) < 0)
+ {
+ adev = -1;
+ return 0;
+--- a/kernel/framework/audio/oss_audio_core.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/framework/audio/oss_audio_core.c Fri Nov 28 23:37:08 2008 +0200
+@@ -6242,6 +6242,12 @@ oss_install_audiodev_with_devname (int v
+ int chdev_flags = 0;
+ int devfile_num = 0;
+
++ if (devc == NULL)
++ {
++ cmn_err(CE_WARN, "devc==NULL for %s. Cannot install audio device\n", name);
++ return OSS_EINVAL;
++ }
++
+ if (name == NULL)
+ cmn_err (CE_CONT, "Name is really NULL\n");
+ if (master_osdev == NULL)
+--- a/kernel/framework/remux/oss_remux.c Thu Nov 27 19:36:57 2008 +0200
++++ b/kernel/framework/remux/oss_remux.c Fri Nov 28 23:37:08 2008 +0200
+@@ -508,7 +508,7 @@ remux_install (char *name, oss_device_t
+ sizeof (audiodrv_t),
+ ADEV_NOINPUT | ADEV_SPECIAL |
+ ADEV_DISABLE_VIRTUAL |
+- ADEV_NOSRC, AFMT_S16_NE, NULL,
++ ADEV_NOSRC, AFMT_S16_NE, devc,
+ -1)) < 0)
+ {
+ devc->audio_dev = -1;
+
diff --git a/abs/extra/oss/hg-latest-fixes.diff b/abs/extra/oss/hg-latest-fixes.diff
new file mode 100644
index 0000000..15da42d
--- /dev/null
+++ b/abs/extra/oss/hg-latest-fixes.diff
@@ -0,0 +1,104 @@
+--- a/kernel/drv/oss_hdaudio/.devices Fri Feb 06 00:36:29 2009 +0200
++++ b/kernel/drv/oss_hdaudio/.devices Fri Feb 06 17:00:26 2009 +0200
+@@ -13,6 +13,7 @@ oss_hdaudio pci10de,44a Nvidia High Defi
+ oss_hdaudio pci10de,44a Nvidia High Definition Audio (MCP65)
+ oss_hdaudio pci10de,55c Nvidia High Definition Audio (MCP67)
+ oss_hdaudio pci10de,774 Nvidia High Definition Audio (MCP78S)
++oss_hdaudio pci10de,ac0 Nvidia High Definition Audio (MCP79)
+ oss_hdaudio pci1002,437b ATI High Definition Audio (SB450)
+ oss_hdaudio pci1002,4383 ATI High Definition Audio (SB600)
+ oss_hdaudio pci1106,3288 VIA High Definition Audio
+--- a/kernel/drv/oss_hdaudio/oss_hdaudio.c Fri Feb 06 00:36:29 2009 +0200
++++ b/kernel/drv/oss_hdaudio/oss_hdaudio.c Fri Feb 06 17:00:26 2009 +0200
+@@ -30,6 +30,7 @@
+ #define NVIDIA_DEVICE_MCP65 0x044a
+ #define NVIDIA_DEVICE_MCP67 0x055c
+ #define NVIDIA_DEVICE_MCP78S 0x0774
++#define NVIDIA_DEVICE_MCP79 0x0ac0
+
+ #define ATI_VENDOR_ID 0x1002
+ #define ATI_DEVICE_SB450 0x437b
+@@ -1720,7 +1721,7 @@ oss_hdaudio_attach (oss_device_t * osdev
+ device != NVIDIA_DEVICE_MCP51 && device != NVIDIA_DEVICE_MCP55 &&
+ device != NVIDIA_DEVICE_MCP61 && device != NVIDIA_DEVICE_MCP61A &&
+ device != NVIDIA_DEVICE_MCP65 && device != NVIDIA_DEVICE_MCP67 &&
+- device != NVIDIA_DEVICE_MCP78S &&
++ device != NVIDIA_DEVICE_MCP78S && device != NVIDIA_DEVICE_MCP79 &&
+ device != VIA_DEVICE_HDA &&
+ device != SIS_DEVICE_HDA &&
+ device != ULI_DEVICE_HDA &&
+@@ -1776,6 +1777,7 @@ oss_hdaudio_attach (oss_device_t * osdev
+ case NVIDIA_DEVICE_MCP65:
+ case NVIDIA_DEVICE_MCP67:
+ case NVIDIA_DEVICE_MCP78S:
++ case NVIDIA_DEVICE_MCP79:
+ devc->chip_name = "nVidia HD Audio";
+ pci_read_config_byte (osdev, 0x4e, &btmp);
+ pci_write_config_byte (osdev, 0x4e, (btmp & 0xf0) | 0x0f);
+--- a/kernel/drv/oss_hdaudio/.devices Fri Feb 06 17:05:21 2009 +0200
++++ b/kernel/drv/oss_hdaudio/.devices Sat Feb 07 11:10:36 2009 +0200
+@@ -12,6 +12,7 @@ oss_hdaudio pci10de,3f0 Nvidia High Defi
+ oss_hdaudio pci10de,3f0 Nvidia High Definition Audio (MCP61)
+ oss_hdaudio pci10de,44a Nvidia High Definition Audio (MCP65)
+ oss_hdaudio pci10de,55c Nvidia High Definition Audio (MCP67)
++oss_hdaudio pci10de,7fc Nvidia High Definition Audio (MCP73)
+ oss_hdaudio pci10de,774 Nvidia High Definition Audio (MCP78S)
+ oss_hdaudio pci10de,ac0 Nvidia High Definition Audio (MCP79)
+ oss_hdaudio pci1002,437b ATI High Definition Audio (SB450)
+--- a/kernel/drv/oss_hdaudio/oss_hdaudio.c Fri Feb 06 17:05:21 2009 +0200
++++ b/kernel/drv/oss_hdaudio/oss_hdaudio.c Sat Feb 07 11:10:36 2009 +0200
+@@ -29,6 +29,7 @@
+ #define NVIDIA_DEVICE_MCP61A 0x03f0
+ #define NVIDIA_DEVICE_MCP65 0x044a
+ #define NVIDIA_DEVICE_MCP67 0x055c
++#define NVIDIA_DEVICE_MCP73 0x07fc
+ #define NVIDIA_DEVICE_MCP78S 0x0774
+ #define NVIDIA_DEVICE_MCP79 0x0ac0
+
+@@ -1721,7 +1722,8 @@ oss_hdaudio_attach (oss_device_t * osdev
+ device != NVIDIA_DEVICE_MCP51 && device != NVIDIA_DEVICE_MCP55 &&
+ device != NVIDIA_DEVICE_MCP61 && device != NVIDIA_DEVICE_MCP61A &&
+ device != NVIDIA_DEVICE_MCP65 && device != NVIDIA_DEVICE_MCP67 &&
+- device != NVIDIA_DEVICE_MCP78S && device != NVIDIA_DEVICE_MCP79 &&
++ device != NVIDIA_DEVICE_MCP73 && device != NVIDIA_DEVICE_MCP78S &&
++ device != NVIDIA_DEVICE_MCP79 &&
+ device != VIA_DEVICE_HDA &&
+ device != SIS_DEVICE_HDA &&
+ device != ULI_DEVICE_HDA &&
+@@ -1776,6 +1778,7 @@ oss_hdaudio_attach (oss_device_t * osdev
+ case NVIDIA_DEVICE_MCP61A:
+ case NVIDIA_DEVICE_MCP65:
+ case NVIDIA_DEVICE_MCP67:
++ case NVIDIA_DEVICE_MCP73:
+ case NVIDIA_DEVICE_MCP78S:
+ case NVIDIA_DEVICE_MCP79:
+ devc->chip_name = "nVidia HD Audio";
+--- a/kernel/framework/vmix_core/vmix_core.c Mon Feb 09 21:21:39 2009 +0200
++++ b/kernel/framework/vmix_core/vmix_core.c Mon Feb 09 19:52:22 2009 -0200
+@@ -1590,7 +1590,7 @@ create_vmix_engine (vmix_mixer_t * mixer
+ adev_t *adev, *master_adev;
+ int opts = ADEV_VIRTUAL | ADEV_DEFAULT | ADEV_VMIX;
+
+- n = mixer->num_clientdevs++;
++ n = mixer->num_clientdevs;
+
+ /*
+ * ADEV_HIDDEN is used for the VMIX devices because they should not be
+@@ -1611,7 +1611,7 @@ create_vmix_engine (vmix_mixer_t * mixer
+ if (mixer->masterdev == -1)
+ return OSS_ENXIO;
+
+- if (mixer->num_clientdevs >= MAX_CLIENTS) /* Cannot create more client engines */
++ if (n + 1 >= MAX_CLIENTS) /* Cannot create more client engines */
+ return OSS_EBUSY;
+
+ /*
+@@ -1628,6 +1628,8 @@ create_vmix_engine (vmix_mixer_t * mixer
+ }
+ memset (portc, 0, sizeof (*portc));
+ portc->open_pending = 1; /* Reserve this engine to the client it was created for */
++
++ mixer->num_clientdevs++;
+
+ portc->num = n;
+
diff --git a/abs/extra/oss/oss.install b/abs/extra/oss/oss.install
new file mode 100644
index 0000000..8c4bd0a
--- /dev/null
+++ b/abs/extra/oss/oss.install
@@ -0,0 +1,38 @@
+_MSG_LIBOSSDIR=" Please note that OSS stores some of its configuration files
+ at /usr/lib/oss. If you are upgrading from an older OSS
+ release and it doesn't work properly, try removing that
+ directory and reinstall this package."
+
+post_install() {
+ echo "Creating backup of alsa modules"
+ KER=`uname -r`
+ cd /lib/modules/$KER/kernel
+ tar -cvf /lib/modules/alsa-$KER.tar sound
+ rm -rf sound
+# /bin/sh /usr/lib/oss/build/install.sh &> /dev/null
+ depmod -a
+
+}
+
+post_upgrade() {
+ echo "Running OSS update script..."
+ KER=`uname -r`
+ cd /lib/modules/$KER/kernel
+ if [ -f sound/soundcore.ko ]
+ then
+ tar -cvf /lib/modules/alsa-$KER.tar sound
+ rm -rf sound
+ /bin/true
+ fi
+ depmod -a
+}
+
+pre_remove() {
+
+}
+
+post_remove() {
+
+ /bin/true
+}
+
diff --git a/abs/extra/oss/oss.rc b/abs/extra/oss/oss.rc
new file mode 100644
index 0000000..3f63378
--- /dev/null
+++ b/abs/extra/oss/oss.rc
@@ -0,0 +1,32 @@
+#!/bin/bash
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy 'Starting Open Sound System'
+ if /usr/sbin/soundon
+ then
+ add_daemon oss
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy 'Stopping Open Sound System'
+ if /usr/sbin/soundoff
+ then
+ rm_daemon oss
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+esac
diff --git a/abs/extra/oss/oss.rm-init-scripts.patch b/abs/extra/oss/oss.rm-init-scripts.patch
new file mode 100644
index 0000000..981ff60
--- /dev/null
+++ b/abs/extra/oss/oss.rm-init-scripts.patch
@@ -0,0 +1,52 @@
+--- usr/lib/oss/build/install.sh.orig 2008-09-25 11:41:47.180167692 -0300
++++ usr/lib/oss/build/install.sh 2008-09-25 11:41:47.180167692 -0300
+@@ -290,38 +290,6 @@
+ echo
+ fi
+
+-if ! test -d /etc/init.d
+-then
+- mkdir /etc/init.d
+-fi
+-
+-rm -f /etc/init.d/oss /etc/rc.d/rc3.d/S89oss /etc/rc3.d/S89oss
+-cp -f $OSSLIBDIR/etc/S89oss /etc/init.d/oss
+-
+-chmod 744 /etc/init.d/oss
+-
+-if test -x /sbin/chkconfig
+-then
+- /sbin/chkconfig oss on > /dev/null 2>&1
+-else
+- if test -x /usr/sbin/update-rc.d
+- then
+- /usr/sbin/update-rc.d oss defaults > /dev/null 2>&1
+- else
+- if test -d etc/rc.d/rc3.d
+- then
+- rm -f /etc/rc.d/rc3.d/S89oss
+- ln -s /etc/init.d/oss /etc/rc.d/rc3.d/S89oss
+- else
+- if test -d /etc/rc3.d
+- then
+- rm -f /etc/rc3.d/S89oss
+- ln -s /etc/init.d/oss /etc/rc3.d/S89oss
+- fi
+- fi
+- fi
+-fi
+-
+ # Install ALSA interface module (Cuckoo)
+ #(cd $OSSLIBDIR/cuckoo && make clean) > /dev/null 2>&1
+ #if (cd $OSSLIBDIR/cuckoo && make install) > /var/log/cuckoo.log 2>&1
+--- usr/lib/oss/scripts/restore_drv.sh.orig 2008-09-25 11:41:47.210168487 -0300
++++ usr/lib/oss/scripts/restore_drv.sh 2008-09-25 11:41:47.210168487 -0300
+@@ -18,8 +18,6 @@
+ fi
+ fi
+
+-rm -f /etc/init.d/oss
+-
+ if ! test -d /lib/modules/`uname -r`/kernel/sound
+ then
+ if test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2
diff --git a/abs/extra/perl-yaml/PKGBUILD b/abs/extra/perl-yaml/PKGBUILD
new file mode 100644
index 0000000..b2e093c
--- /dev/null
+++ b/abs/extra/perl-yaml/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Charles Mauch <cmauch@gmail.com>
+
+pkgname=perl-yaml
+_realname=YAML
+pkgver=0.66
+pkgrel=1
+pkgdesc="Perl/CPAN Module YAML : YAML Aint Markup Language tm"
+arch=(i686 x86_64)
+url="http://search.cpan.org/dist/${_realname}/"
+license=('GPL' 'PerlArtistic')
+depends=('perl>=5.10.0')
+options=(!emptydirs)
+source=(http://www.cpan.org/authors/id/I/IN/INGY/${_realname}-${pkgver}.tar.gz)
+md5sums=('33a0367cb343e1f0dce20f144d0167ba')
+
+build() {
+ cd ${startdir}/src/${_realname}-${pkgver}
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make install DESTDIR=${startdir}/pkg || return 1
+
+ # remove perllocal.pod and .packlist
+ find ${startdir}/pkg -name perllocal.pod -delete
+ find ${startdir}/pkg -name .packlist -delete
+}
diff --git a/abs/extra/phpmyadmin/PKGBUILD b/abs/extra/phpmyadmin/PKGBUILD
new file mode 100755
index 0000000..41999db
--- /dev/null
+++ b/abs/extra/phpmyadmin/PKGBUILD
@@ -0,0 +1,18 @@
+pkgname=phpmyadmin
+_dlversion=2.9.1.1
+pkgver=$(echo ${_dlversion} | sed 's/-//')
+pkgrel=35
+pkgdesc="A PHP and hence web-based tool to administrate MySQL over the WWW"
+arch=(i686 x86_64)
+url="http://www.phpmyadmin.net"
+depends=('php' 'mysql')
+backup=(data/srv/httpd/htdocs/phpMyAdmin/config.inc.php)
+source=(http://easynews.dl.sourceforge.net/sourceforge/${pkgname}/phpMyAdmin-${_dlversion}-all-languages.tar.bz2)
+
+build() {
+ _instdir=${startdir}/pkg/data/srv/httpd/htdocs/phpMyAdmin
+ mkdir -p ${_instdir}
+ cd ${_instdir}
+ cp -ra ${startdir}/src/phpMyAdmin-${_dlversion}-all-languages/* .
+
+}
diff --git a/abs/extra/pmount/PKGBUILD b/abs/extra/pmount/PKGBUILD
new file mode 100644
index 0000000..2270b07
--- /dev/null
+++ b/abs/extra/pmount/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 29588 2009-03-10 06:17:31Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=pmount
+pkgver=0.9.19
+pkgrel=2
+pkgdesc="mount removable devices as normal user"
+arch=(i686 x86_64)
+license=('GPL2')
+url="http://pmount.alioth.debian.org/"
+backup=('etc/pmount.allow')
+depends=('sysfsutils>=2.0.0-1' 'bash' 'hal>=0.5.11')
+makedepends=('intltool')
+source=(http://alioth.debian.org/frs/download.php/2867/${pkgname}-${pkgver}.tar.gz
+ pmount-dbus-close.patch)
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # we have a shared connection! patch it to work correct
+ patch -Np1 -i ${srcdir}/pmount-dbus-close.patch || return 1
+ ./configure --prefix=/usr --with-cryptsetup-prog=/usr/sbin/cryptsetup || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+}
+
+md5sums=('2fd9fe103375dbd0c91af2f302250a8c'
+ 'b7ea1afd82ffebf510dc89f74cd39f09')
diff --git a/abs/extra/pmount/pmount-dbus-close.patch b/abs/extra/pmount/pmount-dbus-close.patch
new file mode 100644
index 0000000..06ffa2b
--- /dev/null
+++ b/abs/extra/pmount/pmount-dbus-close.patch
@@ -0,0 +1,11 @@
+diff -ruN pmount-0.9.13/src/pmount-hal.c pmount-0.9.13-new/src/pmount-hal.c
+--- pmount-0.9.13/src/pmount-hal.c 2006-08-15 22:31:02.000000000 +0200
++++ pmount-0.9.13-new/src/pmount-hal.c 2007-02-05 12:01:09.000000000 +0100
+@@ -361,7 +361,6 @@
+ /* shut down hal connection */
+ libhal_ctx_shutdown( hal_ctx, &error );
+ libhal_ctx_free( hal_ctx );
+- dbus_connection_close( dbus_conn );
+ dbus_connection_unref( dbus_conn );
+
+ /* go */
diff --git a/abs/extra/policykit-gnome/PKGBUILD b/abs/extra/policykit-gnome/PKGBUILD
new file mode 100644
index 0000000..e6a7d9c
--- /dev/null
+++ b/abs/extra/policykit-gnome/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: onestep_ua <onestep@ukr.net>
+
+pkgname=policykit-gnome
+pkgver=0.9.2
+pkgrel=2
+pkgdesc="PolicyKit integration for the GNOME desktop"
+arch=('i686' 'x86_64')
+url="http://hal.freedesktop.org/docs/PolicyKit-gnome/"
+license=('GPL')
+depends=('gconf>=2.24.0')
+makedepends=('intltool' 'gtk-doc' 'gnome-doc-utils>=0.14.0')
+options=(!emptydirs !libtool)
+install=${pkgname}.install
+source=(http://hal.freedesktop.org/releases/PolicyKit-gnome-${pkgver}.tar.bz2)
+md5sums=('fc478b168d0c926a9766b0b415ff4bbf')
+
+build() {
+ cd "${srcdir}/PolicyKit-gnome-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib/PolicyKit \
+ --disable-gtk-doc \
+ --disable-examples || return 1
+ make || return 1
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
+
+ install -m 755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" ${pkgdir}/etc/gconf/schemas/*.schemas || return 1
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/abs/extra/policykit-gnome/policykit-gnome.install b/abs/extra/policykit-gnome/policykit-gnome.install
new file mode 100644
index 0000000..e2593d3
--- /dev/null
+++ b/abs/extra/policykit-gnome/policykit-gnome.install
@@ -0,0 +1,23 @@
+pkgname=policykit-gnome
+
+## arg 1: the new package version
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+pre_upgrade() {
+ pre_remove $1
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+## arg 1: the old package version
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}
diff --git a/abs/extra/policykit/PKGBUILD b/abs/extra/policykit/PKGBUILD
new file mode 100644
index 0000000..d7dd90e
--- /dev/null
+++ b/abs/extra/policykit/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=policykit
+pkgver=0.9
+pkgrel=9
+pkgdesc="Application development toolkit for controlling system-wide privileges"
+arch=(i686 x86_64)
+license=('custom')
+url="http://hal.freedesktop.org/docs/PolicyKit/"
+depends=('dbus-glib>=0.80' 'expat>=2.0.1' 'pam')
+makedepends=('intltool' 'docbook-xsl' 'gtk-doc')
+options=('!libtool')
+backup=('etc/PolicyKit/PolicyKit.conf')
+install=policykit.install
+source=(http://hal.freedesktop.org/releases/PolicyKit-${pkgver}.tar.gz
+ polkit.pam
+ pk-ck-api-change.patch
+ polkit-0.8-dbus-policy.patch
+ entry-leak.patch)
+md5sums=('802fd13ae41f73d79359e5ecb0a98716'
+ '6564f95878297b954f0572bc1610dd15'
+ '15b42b41e98410d8d7ec4f91d0cff190'
+ 'da5129eee9517d00985a354055d778a9'
+ '62adbf90657b17dae429fc92937af513')
+
+build() {
+ cd "${srcdir}/PolicyKit-${pkgver}"
+ patch -Np1 -i "${srcdir}/pk-ck-api-change.patch" || return 1
+ patch -Np1 -i "${srcdir}/polkit-0.8-dbus-policy.patch" || return 1
+ patch -Np1 -i "${srcdir}/entry-leak.patch" || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --libexecdir=/usr/lib/PolicyKit --disable-static \
+ --with-polkit-user=policykit --with-polkit-group=policykit || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
+
+ rm -rf "${pkgdir}/etc/profile.d"
+ install -m644 "${srcdir}/polkit.pam" "${pkgdir}/etc/pam.d/polkit" || return 1
+}
diff --git a/abs/extra/policykit/entry-leak.patch b/abs/extra/policykit/entry-leak.patch
new file mode 100644
index 0000000..f6b3295
--- /dev/null
+++ b/abs/extra/policykit/entry-leak.patch
@@ -0,0 +1,37 @@
+diff -up PolicyKit-0.9/src/polkit/polkit-policy-file-entry.c.entry-leak PolicyKit-0.9/src/polkit/polkit-policy-file-entry.c
+--- PolicyKit-0.9/src/polkit/polkit-policy-file-entry.c.entry-leak 2008-08-29 21:47:22.000000000 -0400
++++ PolicyKit-0.9/src/polkit/polkit-policy-file-entry.c 2008-08-29 21:50:13.000000000 -0400
+@@ -95,9 +95,11 @@ _polkit_policy_file_entry_new (const c
+ char *contents;
+ size_t contents_size;
+ PolKitPolicyFileEntry *pfe;
++ char **tokens;
+
+ path = NULL;
+ contents = NULL;
++ tokens = NULL;
+
+ kit_return_val_if_fail (action_id != NULL && polkit_action_validate_id (action_id), NULL);
+
+@@ -153,7 +155,6 @@ _polkit_policy_file_entry_new (const c
+ }
+
+ if (contents != NULL) {
+- char **tokens;
+ size_t num_tokens;
+ PolKitResult any;
+ PolKitResult inactive;
+@@ -183,11 +184,13 @@ _polkit_policy_file_entry_new (const c
+
+ kit_free (path);
+ kit_free (contents);
++ kit_strfreev (tokens);
+
+ return pfe;
+ error:
+ kit_free (path);
+ kit_free (contents);
++ kit_strfreev (tokens);
+ if (pfe != NULL)
+ polkit_policy_file_entry_unref (pfe);
+ return NULL;
diff --git a/abs/extra/policykit/pk-ck-api-change.patch b/abs/extra/policykit/pk-ck-api-change.patch
new file mode 100644
index 0000000..ae477f9
--- /dev/null
+++ b/abs/extra/policykit/pk-ck-api-change.patch
@@ -0,0 +1,83 @@
+diff --git a/src/polkit-dbus/polkit-dbus.c b/src/polkit-dbus/polkit-dbus.c
+index f7be03f..cad4a76 100644
+--- a/src/polkit-dbus/polkit-dbus.c
++++ b/src/polkit-dbus/polkit-dbus.c
+@@ -214,11 +214,17 @@ polkit_session_new_from_objpath (DBusConnection *con, const char *objpath, uid_t
+ dbus_message_unref (reply);
+ goto out;
+ }
++ /* GetUnixUser API Changed in CK 0.3.0 */
+ if (!dbus_message_get_args (reply, NULL,
+- DBUS_TYPE_INT32, &uid,
++ DBUS_TYPE_UINT32, &uid,
+ DBUS_TYPE_INVALID)) {
+- kit_warning ("Invalid GetUnixUser reply from CK");
+- goto out;
++ /* try the older API */
++ if (!dbus_message_get_args (reply, NULL,
++ DBUS_TYPE_INT32, &uid,
++ DBUS_TYPE_INVALID)) {
++ kit_warning ("Invalid GetUnixUser reply from CK");
++ goto out;
++ }
+ }
+ dbus_message_unref (message);
+ dbus_message_unref (reply);
+@@ -1326,16 +1332,21 @@ polkit_tracker_dbus_func (PolKitTracker *pk_tracker, DBusMessage *message)
+
+ dbus_error_init (&error);
+ seat_objpath = dbus_message_get_path (message);
+- if (!dbus_message_get_args (message, &error,
+- DBUS_TYPE_STRING, &session_objpath,
++ /* API fixed in CK 0.3 to match spec */
++ if (!dbus_message_get_args (message, &error,
++ DBUS_TYPE_OBJECT_PATH, &session_objpath,
+ DBUS_TYPE_INVALID)) {
++ if (!dbus_message_get_args (message, &error,
++ DBUS_TYPE_STRING, &session_objpath,
++ DBUS_TYPE_INVALID)) {
+
+- /* TODO: should be _pk_critical */
+- kit_warning ("The SessionAdded signal on the org.freedesktop.ConsoleKit.Seat "
+- "interface for object %s has the wrong signature! "
+- "Your system is misconfigured.", seat_objpath);
++ /* TODO: should be _pk_critical */
++ kit_warning ("The SessionAdded signal on the org.freedesktop.ConsoleKit.Seat "
++ "interface for object %s has the wrong signature! "
++ "Your system is misconfigured.", seat_objpath);
+
+- goto out;
++ goto out;
++ }
+ }
+
+ /* TODO: add to sessions - see polkit_tracker_is_authorization_relevant() */
+@@ -1353,16 +1364,21 @@ polkit_tracker_dbus_func (PolKitTracker *pk_tracker, DBusMessage *message)
+
+ dbus_error_init (&error);
+ seat_objpath = dbus_message_get_path (message);
+- if (!dbus_message_get_args (message, &error,
+- DBUS_TYPE_STRING, &session_objpath,
++ /* API fixed in CK 0.3 to match spec */
++ if (!dbus_message_get_args (message, &error,
++ DBUS_TYPE_OBJECT_PATH, &session_objpath,
+ DBUS_TYPE_INVALID)) {
++ if (!dbus_message_get_args (message, &error,
++ DBUS_TYPE_STRING, &session_objpath,
++ DBUS_TYPE_INVALID)) {
+
+- /* TODO: should be _pk_critical */
+- kit_warning ("The SessionRemoved signal on the org.freedesktop.ConsoleKit.Seat "
+- "interface for object %s has the wrong signature! "
+- "Your system is misconfigured.", seat_objpath);
++ /* TODO: should be _pk_critical */
++ kit_warning ("The SessionRemoved signal on the org.freedesktop.ConsoleKit.Seat "
++ "interface for object %s has the wrong signature! "
++ "Your system is misconfigured.", seat_objpath);
+
+- goto out;
++ goto out;
++ }
+ }
+
+ _remove_caller_by_session (pk_tracker, session_objpath);
diff --git a/abs/extra/policykit/policykit.install b/abs/extra/policykit/policykit.install
new file mode 100644
index 0000000..7bc653e
--- /dev/null
+++ b/abs/extra/policykit/policykit.install
@@ -0,0 +1,30 @@
+post_install() {
+ getent group policykit >/dev/null || usr/sbin/groupadd -g 102 policykit
+ getent passwd policykit >/dev/null || usr/sbin/useradd -c 'PolicyKit' -u 102 -g policykit -d '/' -s /sbin/nologin policykit
+ usr/bin/passwd -l policykit &>/dev/null
+
+ # set correct permissions
+ chgrp policykit var/{run,lib}/PolicyKit
+ chown policykit var/lib/PolicyKit-public
+ chown policykit:policykit var/lib/misc/PolicyKit.reload
+
+ chown policykit usr/lib/PolicyKit/polkit-set-default-helper
+ chmod u+s usr/lib/PolicyKit/polkit-set-default-helper
+
+ for i in polkit-read-auth-helper polkit-revoke-helper polkit-grant-helper polkit-explicit-grant-helper; do
+ chgrp policykit usr/lib/PolicyKit/$i
+ chmod g+s usr/lib/PolicyKit/$i
+ done
+
+ chgrp policykit usr/lib/PolicyKit/polkit-grant-helper-pam
+ chmod u+s usr/lib/PolicyKit/polkit-grant-helper-pam
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ usr/sbin/userdel policykit &>/dev/null
+ usr/sbin/groupdel policykit &>/dev/null
+}
diff --git a/abs/extra/policykit/polkit-0.8-dbus-policy.patch b/abs/extra/policykit/polkit-0.8-dbus-policy.patch
new file mode 100644
index 0000000..fa84936
--- /dev/null
+++ b/abs/extra/policykit/polkit-0.8-dbus-policy.patch
@@ -0,0 +1,12 @@
+--- PolicyKit-0.8.orig/polkitd/org.freedesktop.PolicyKit.conf.in 2008-12-08 10:55:12.000000000 -0500
++++ PolicyKit-0.8/polkitd/org.freedesktop.PolicyKit.conf.in 2008-12-08 12:05:33.000000000 -0500
+@@ -8,4 +8,9 @@
+ <policy user="@polkituser@">
+ <allow own="org.freedesktop.PolicyKit"/>
+ </policy>
++
++ <!-- any user can talk to the service (fd.o #18948) -->
++ <policy context="default">
++ <allow send_destination="org.freedesktop.PolicyKit"/>
++ </policy>
+ </busconfig>
diff --git a/abs/extra/policykit/polkit.pam b/abs/extra/policykit/polkit.pam
new file mode 100644
index 0000000..04f53e0
--- /dev/null
+++ b/abs/extra/policykit/polkit.pam
@@ -0,0 +1,7 @@
+auth requisite pam_nologin.so
+auth required pam_env.so
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_limits.so
+session required pam_unix.so
+password required pam_unix.so
diff --git a/abs/extra/postgresql-libs/PKGBUILD b/abs/extra/postgresql-libs/PKGBUILD
new file mode 100644
index 0000000..ac037c7
--- /dev/null
+++ b/abs/extra/postgresql-libs/PKGBUILD
@@ -0,0 +1,58 @@
+# $Id: PKGBUILD 27764 2009-02-25 16:30:54Z douglas $
+# Maintainer: Paul Mattal <paul@archlinux.org>
+
+pkgname=postgresql-libs
+pkgver=8.3.6
+pkgrel=1
+pkgdesc="Libraries for use with PostgreSQL"
+arch=(i686 x86_64)
+license=('BSD')
+url="http://www.postgresql.org/"
+depends=('openssl>=0.9.8b' 'zlib' 'readline')
+options=('!makeflags')
+source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2)
+
+build() {
+ cd $startdir/src/postgresql-$pkgver || return 1
+
+ # configure
+ ./configure --prefix=/usr --with-openssl --datadir=/usr/share/postgresql \
+ --with-pam \
+ || return 1
+
+ # make and install
+ for dir in src/interfaces src/bin/pg_config; do
+ pushd ${dir} || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+ popd
+ done
+
+ cd src/include || return 1
+ make || return 1
+
+ set -e
+ mkdir -p $startdir/pkg/usr/include/postgresql/{internal,internal/libpq} \
+ || return 1
+ mkdir -p $startdir/pkg/usr/include/libpq || return 1
+
+ # These headers are needed by the public headers of the interfaces.
+ install -m644 pg_config.h $startdir/pkg/usr/include/ || return 1
+ install -m644 pg_config_os.h $startdir/pkg/usr/include/ || return 1
+ install -m644 postgres_ext.h $startdir/pkg/usr/include/ || return 1
+ install -m644 libpq/libpq-fs.h $startdir/pkg/usr/include/libpq/ || return 1
+ install -m644 pg_config_manual.h $startdir/pkg/usr/include/ || return 1
+
+ # These headers are needed by the not-so-public headers of the interfaces.
+ install -m644 c.h $startdir/pkg/usr/include/postgresql/internal/ || return 1
+ install -m644 port.h $startdir/pkg/usr/include/postgresql/internal/ \
+ || return 1
+ install -m644 postgres_fe.h $startdir/pkg/usr/include/postgresql/internal/ \
+ || return 1
+ install -m644 libpq/pqcomm.h $startdir/pkg/usr/include/postgresql/internal/libpq/ || return 1
+
+ install -D -m644 ../../COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1
+
+ set +e
+}
+md5sums=('4f8c67d802bd03b5b844e268bba7d44a')
diff --git a/abs/extra/postgresql/PKGBUILD b/abs/extra/postgresql/PKGBUILD
new file mode 100644
index 0000000..1fda9a4
--- /dev/null
+++ b/abs/extra/postgresql/PKGBUILD
@@ -0,0 +1,79 @@
+# $Id: PKGBUILD 27762 2009-02-25 16:29:49Z douglas $
+# Maintainer: Paul Mattal <paul@archlinux.org>
+
+pkgname=postgresql
+pkgver=8.3.6
+pkgrel=1
+pkgdesc="A sophisticated object-relational DBMS"
+arch=(i686 x86_64)
+license=('BSD')
+backup=('etc/conf.d/postgresql' '/etc/pam.d/postgresql')
+url="http://www.postgresql.org/"
+depends=("postgresql-libs>=$pkgver" "libxml2")
+options=('!makeflags')
+source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2 \
+ postgresql postgresql.confd build.patch postgresql.pam)
+
+build() {
+ cd ${startdir}/src/$pkgname-$pkgver || return 1
+
+ # patch to remove regress/test make target (won't build with it present)
+ patch -Np1 -i ../build.patch || return 1
+
+ # configure
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --with-docdir=/usr/share/doc --with-openssl \
+ --datadir=/usr/share/postgresql --with-pam --with-libxml || return 1
+
+ sed -i -e '/interfaces/d' src/Makefile || return 1
+
+ # build
+ make || return 1
+
+ # install
+ make DESTDIR=${startdir}/pkg install || return 1
+
+ (
+ cd contrib/adminpack;
+ make || return 1;
+ make DESTDIR=${startdir}/pkg install || return 1;
+ );
+
+
+ # clean up unneeded installed items
+ rm -rf $startdir/pkg/usr/include/postgresql/internal || return 1
+ rm -rf $startdir/pkg/usr/include/libpq || return 1
+ # the below line is expected to produce an error; fix this one day
+ rm -f $startdir/pkg/usr/include/*
+ rm -f $startdir/pkg/usr/bin/pg_config || return 1
+
+ # Maintaining the lib below because of qt
+ #rm -f $startdir/pkg/usr/lib/libpgport.a || return 1
+
+ # install launch script
+ install -D -m755 ../postgresql $startdir/pkg/etc/rc.d/postgresql \
+ || return 1
+
+ # install license
+ install -D -m644 COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1
+
+ # install conf file
+ install -D -m644 $startdir/src/postgresql.confd \
+ $startdir/pkg/etc/conf.d/postgresql || return 1
+
+ install -D -m644 $startdir/src/postgresql.pam \
+ $startdir/pkg/etc/pam.d/postgresql
+
+ chown root:root $startdir/pkg/usr/share/doc/postgresql/html/*
+}
+
+md5sums=('4f8c67d802bd03b5b844e268bba7d44a'
+ '7d8ea2abb6a8cdacf35604bda659a34a'
+ 'df6ddf9e2ab4700a3415f17c0f4f4172'
+ '4d74f4227dc5e12bf95b3490758d86c9'
+ '96f82c38f3f540b53f3e5144900acf17')
+md5sums=('4f8c67d802bd03b5b844e268bba7d44a'
+ '7d8ea2abb6a8cdacf35604bda659a34a'
+ 'df6ddf9e2ab4700a3415f17c0f4f4172'
+ '4d74f4227dc5e12bf95b3490758d86c9'
+ '96f82c38f3f540b53f3e5144900acf17')
diff --git a/abs/extra/postgresql/build.patch b/abs/extra/postgresql/build.patch
new file mode 100644
index 0000000..c8f665d
--- /dev/null
+++ b/abs/extra/postgresql/build.patch
@@ -0,0 +1,11 @@
+diff -Naur postgresql-8.2.3-orig/src/Makefile postgresql-8.2.3/src/Makefile
+--- postgresql-8.2.3-orig/src/Makefile 2006-06-22 16:50:35.000000000 -0700
++++ postgresql-8.2.3/src/Makefile 2007-03-05 10:46:24.000000000 -0800
+@@ -23,7 +23,6 @@
+ $(MAKE) -C bin $@
+ $(MAKE) -C pl $@
+ $(MAKE) -C makefiles $@
+- $(MAKE) -C test/regress $@
+
+ install: install-local
+
diff --git a/abs/extra/postgresql/postgresql b/abs/extra/postgresql/postgresql
new file mode 100755
index 0000000..c6aedfb
--- /dev/null
+++ b/abs/extra/postgresql/postgresql
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/postgresql
+
+case "$1" in
+ start)
+ stat_busy "Starting PostgreSQL"
+ # initialization
+ if [ ! `egrep '^postgres:' /etc/group` ]; then
+ stat_busy "Adding postgres group"
+ groupadd -g 88 postgres
+ stat_done
+ fi
+ if [ ! `egrep '^postgres:' /etc/passwd` ]; then
+ stat_busy "Adding postgres user"
+ useradd -u 88 -g postgres -d $PGROOT -s /bin/bash postgres
+ [ -d $PGROOT ] && chown -R postgres.postgres $PGROOT
+ stat_done
+ fi
+ if [ ! -d $PGROOT ]; then
+ mkdir -p $PGROOT/data && chown postgres.postgres $PGROOT/data
+ su - postgres -c "/usr/bin/initdb -D $PGROOT/data"
+ fi
+ if [ ! -e /var/log/postgresql.log ]; then
+ touch /var/log/postgresql.log
+ chown postgres /var/log/postgresql.log
+ fi
+ # start the process
+ su - postgres -c \
+ "/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -W start"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon postgresql
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping PostgreSQL"
+ su - postgres -c \
+ "/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -w stop"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon postgresql
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/postgresql/postgresql.confd b/abs/extra/postgresql/postgresql.confd
new file mode 100644
index 0000000..7bbf016
--- /dev/null
+++ b/abs/extra/postgresql/postgresql.confd
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to postgresql
+#
+PGROOT="/var/lib/postgres" \ No newline at end of file
diff --git a/abs/extra/postgresql/postgresql.pam b/abs/extra/postgresql/postgresql.pam
new file mode 100644
index 0000000..53724d1
--- /dev/null
+++ b/abs/extra/postgresql/postgresql.pam
@@ -0,0 +1,3 @@
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/abs/extra/powertop/ChangeLog b/abs/extra/powertop/ChangeLog
new file mode 100644
index 0000000..811f87d
--- /dev/null
+++ b/abs/extra/powertop/ChangeLog
@@ -0,0 +1,3 @@
+2007-06-28 tardo <tardo@nagi-fanboi.net>
+* Built for x86_64
+
diff --git a/abs/extra/powertop/PKGBUILD b/abs/extra/powertop/PKGBUILD
new file mode 100644
index 0000000..4d8c17b
--- /dev/null
+++ b/abs/extra/powertop/PKGBUILD
@@ -0,0 +1,20 @@
+# $Id: PKGBUILD,v 1.10 2008/06/19 08:52:53 pizzapunk Exp $
+# Maintainer: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Xilon <xilonmu@gmail.com>
+
+pkgname=powertop
+pkgver=1.10
+pkgrel=1
+pkgdesc="Tool that finds the software that makes your laptop use more power than necessary"
+arch=('i686' 'x86_64')
+url="http://www.lesswatts.org/projects/powertop/"
+license=('GPL2')
+depends=('ncurses')
+source=(http://www.lesswatts.org/projects/powertop/download/powertop-$pkgver.tar.gz)
+md5sums=('e09f631f60d50299d8885193e6fd3756')
+
+build() {
+ cd $startdir/src/powertop-$pkgver
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/printproto/PKGBUILD b/abs/extra/printproto/PKGBUILD
new file mode 100644
index 0000000..11595db
--- /dev/null
+++ b/abs/extra/printproto/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 567 2008-04-21 09:43:18Z alexander $
+# Maintainer: Alexander Baldeck <alexander@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+pkgname=printproto
+pkgver=1.0.4
+pkgrel=1
+pkgdesc="X11 print extension wire protocol"
+arch=(i686 x86_64)
+license=('custom')
+url="http://xorg.freedesktop.org/"
+source=(${url}/releases/individual/proto/${pkgname}-${pkgver}.tar.bz2)
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+
+ install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/COPYING \
+ ${startdir}/pkg/usr/share/licenses/${pkgname}/COPYING
+}
+md5sums=('7321847a60748b4d2f1fa16db4b6ede8')
diff --git a/abs/extra/pycrypto/PKGBUILD b/abs/extra/pycrypto/PKGBUILD
new file mode 100644
index 0000000..2801337
--- /dev/null
+++ b/abs/extra/pycrypto/PKGBUILD
@@ -0,0 +1,19 @@
+# $Id: PKGBUILD 17322 2008-10-28 12:29:19Z douglas $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Kritoke <kritoke@gamebox.net>
+
+pkgname=pycrypto
+pkgver=2.0.1
+pkgrel=3
+pkgdesc="A collection of cryptographic algorithms and protocols, implemented for use from Python."
+arch=(i686 x86_64)
+depends=('python' 'gmp')
+url="http://www.amk.ca/python/code/crypto.html"
+license=(GPL)
+source=(http://www.amk.ca/files/python/crypto/${pkgname}-${pkgver}.tar.gz)
+md5sums=('4d5674f3898a573691ffb335e8d749cd')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ python setup.py build install --root=${startdir}/pkg
+}
diff --git a/abs/extra/pyopenssl/PKGBUILD b/abs/extra/pyopenssl/PKGBUILD
new file mode 100644
index 0000000..6fb4ac1
--- /dev/null
+++ b/abs/extra/pyopenssl/PKGBUILD
@@ -0,0 +1,15 @@
+pkgname=pyopenssl
+pkgver=0.6
+pkgrel=4
+pkgdesc="pyOpenSSL is a Python interface to the OpenSSL library"
+arch=('i686' 'x86_64')
+url="http://pyopenssl.sourceforge.net"
+license="GPL"
+depends=('python' 'openssl')
+source=(http://easynews.dl.sourceforge.net/sourceforge/pyopenssl/pyOpenSSL-${pkgver}.tar.gz)
+
+build() {
+ cd $startdir/src/pyOpenSSL-${pkgver}
+ python setup.py build
+ python setup.py install --prefix=$startdir/pkg/usr
+ }
diff --git a/abs/extra/pyorbit/PKGBUILD b/abs/extra/pyorbit/PKGBUILD
new file mode 100644
index 0000000..60f8f34
--- /dev/null
+++ b/abs/extra/pyorbit/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 16716 2008-10-22 02:39:42Z allan $
+# Mantainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=pyorbit
+pkgver=2.24.0
+pkgrel=3
+pkgdesc="Python bindings for ORBit2"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://www.pygtk.org"
+depends=('python>=2.5.2' 'orbit2>=2.14.16')
+makedepends=('pkgconfig')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/GNOME/sources/pyorbit/2.24/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('574593815e75ee6e98062c75d6d1581f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/abs/extra/pyrex/ChangeLog b/abs/extra/pyrex/ChangeLog
new file mode 100644
index 0000000..1b0e564
--- /dev/null
+++ b/abs/extra/pyrex/ChangeLog
@@ -0,0 +1,5 @@
+
+2008-07-06 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updating for x86_64 - 0.9.8.4
+
diff --git a/abs/extra/pyrex/PKGBUILD b/abs/extra/pyrex/PKGBUILD
new file mode 100644
index 0000000..4242fb9
--- /dev/null
+++ b/abs/extra/pyrex/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 11841 2008-09-05 01:20:00Z douglas $
+# Contributor: Arjan timmerman <arjan@soulfly.nl>
+# Contributor: Link Dupont <link@subpop.net>
+# Maintainer: Douglas Soares de Andrade <douglas@archlinux.org>
+
+pkgname=pyrex
+pkgver=0.9.8.5
+pkgrel=1
+pkgdesc="Language for writing Python extension modules"
+arch=("i686" "x86_64")
+url="http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/"
+license=""
+depends=('python>=2.5')
+source=(http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/Pyrex-${pkgver}.tar.gz)
+
+md5sums=('3b3d8397c2c9a58fc59a90e2b49c651a')
+
+build() {
+ cd ${startdir}/src/Pyrex-${pkgver}
+ python setup.py install --root=${startdir}/pkg --prefix=/usr
+}
diff --git a/abs/extra/python-m2crypto/PKGBUILD b/abs/extra/python-m2crypto/PKGBUILD
new file mode 100644
index 0000000..86a96d1
--- /dev/null
+++ b/abs/extra/python-m2crypto/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD,v 1.6 2008/11/13 16:04:12 sergej Exp $
+# Maintainer: Sergej Pupykin <sergej@aur.archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=python-m2crypto
+pkgver=0.19.1
+pkgrel=1
+pkgdesc="A crypto and SSL toolkit for Python"
+arch=('i686' 'x86_64')
+url="http://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto"
+license=('BSD')
+depends=('python' 'swig' 'openssl')
+source=(http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-$pkgver.tar.gz)
+md5sums=('c92286fdf0a75f017e72122c2832d5ff')
+
+build() {
+ cd $srcdir/M2Crypto-$pkgver
+ python setup.py build
+ python setup.py install --root=$pkgdir/
+
+ install -D -m644 LICENCE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/abs/extra/python-pybluez/PKGBUILD b/abs/extra/python-pybluez/PKGBUILD
new file mode 100644
index 0000000..8cdbaf4
--- /dev/null
+++ b/abs/extra/python-pybluez/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD,v 1.11 2009/02/12 20:16:22 voidnull Exp $
+# Maintainer: Sergej Pupykin <sergej@aur.archlinux.org>
+# Contributor: cs-cam - me.at.camdaniel.com
+
+pkgname=python-pybluez
+pkgver=0.16
+pkgrel=1
+pkgdesc="Python wrapper for the BlueZ Bluetooth stack"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/pybluez/"
+license=('GPL')
+provides=('pybluez')
+conflicts=('pybluez')
+replaces=('pybluez')
+depends=('python' 'bluez')
+source=(http://pybluez.googlecode.com/files/PyBluez-$pkgver.tar.gz)
+md5sums=('2ce8ff0dbb94c6be14e92e9968f4c914')
+
+build() {
+ cd $srcdir/PyBluez-$pkgver
+ python setup.py install --root=$pkgdir && \
+ ln -s bluetooth/_bluetooth.so $pkgdir/usr/lib/python2.6/site-packages/_bluetooth.so
+}
diff --git a/abs/extra/python-pymedia/PKGBUILD b/abs/extra/python-pymedia/PKGBUILD
new file mode 100755
index 0000000..a23d441
--- /dev/null
+++ b/abs/extra/python-pymedia/PKGBUILD
@@ -0,0 +1,19 @@
+pkgname=python-pymedia
+pkgver=1.3.5.0
+pkgrel=1
+pkgdesc="A Python library for accessing and manipulating media files"
+url="http://www.pymedia.org"
+license=""
+depends=('libvorbis' 'faad2' 'lame')
+makedepends=('python>=2.3')
+replaces=('pymedia')
+provides=('pymedia')
+arch=i686
+source=(http://easynews.dl.sourceforge.net/sourceforge/pymedia/pymedia-$pkgver.tar.gz)
+md5sums=('3b9efcd105707c6696579e3ca8852d0e')
+
+build() {
+ cd $startdir/src/pymedia-$pkgver
+ sed -i -e "s:/usr/local/include/lame:/usr/include/lame:g" setup.py
+ yes "" | python setup.py install --root=$startdir/pkg --prefix=/usr
+ }
diff --git a/abs/extra/pyusb/PKGBUILD b/abs/extra/pyusb/PKGBUILD
new file mode 100644
index 0000000..1922cd8
--- /dev/null
+++ b/abs/extra/pyusb/PKGBUILD
@@ -0,0 +1,16 @@
+# Contributor: Jason Giangrande <jgiangrande@clarku.edu>
+pkgname=pyusb
+pkgver=0.4.1
+pkgrel=1
+pkgdesc="A native Python module written in C which provides USB access."
+arch=('i686' 'x86_64')
+url="http://pyusb.berlios.de/"
+license=('GPL')
+depends=('python' 'libusb')
+source=(http://downloads.sourceforge.net/pyusb/pyusb-$pkgver.tar.gz)
+md5sums=('9576c3e471e40e021fa44f36712bbd04')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ python setup.py install -f --root=$startdir/pkg || return 1
+}
diff --git a/abs/extra/quilt/PKGBUILD b/abs/extra/quilt/PKGBUILD
new file mode 100644
index 0000000..e5c50bc
--- /dev/null
+++ b/abs/extra/quilt/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD,v 1.3 2008/05/26 08:06:11 BaSh Exp $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
+
+pkgname=quilt
+pkgver=0.47
+pkgrel=1
+pkgdesc="Manage a series of patches by keeping track of the changes each patch makes."
+arch=('i686' 'x86_64')
+url="http://savannah.nongnu.org/projects/quilt"
+license=('GPL')
+depends=('perl' 'diffstat' 'gawk' 'patch' 'diffutils' 'mktemp' 'gettext')
+source=(http://savannah.nongnu.org/download/quilt/${pkgname}-${pkgver}.tar.gz)
+
+md5sums=('d33d2442bd34387260b1c1db3e623af0')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --mandir=/usr/share/man || return 1
+ make || return 1
+ make prefix=${startdir}/pkg/usr mandir=${startdir}/pkg/usr/share/man install || return 1
+}
diff --git a/abs/extra/rarian/PKGBUILD b/abs/extra/rarian/PKGBUILD
new file mode 100644
index 0000000..b83caff
--- /dev/null
+++ b/abs/extra/rarian/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 11986 2008-09-06 21:33:59Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=rarian
+pkgver=0.8.1
+pkgrel=1
+pkgdesc="Documentation meta-data library, designed as a replacement for Scrollkeeper."
+arch=('i686' 'x86_64')
+url="http://rarian.freedesktop.org/"
+license=('GPL')
+depends=('gcc-libs')
+makedepends=('libxslt')
+conflicts=('scrollkeeper')
+provides=('scrollkeeper')
+replaces=('scrollkeeper')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.8/${pkgname}-${pkgver}.tar.bz2
+ user-segfault.patch)
+md5sums=('75091185e13da67a0ff4279de1757b94'
+ '457e9827197009cfa360911fe49a5ad7')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ patch -p0 -i ${srcdir}/user-segfault.patch || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/rarian/user-segfault.patch b/abs/extra/rarian/user-segfault.patch
new file mode 100644
index 0000000..3311cec
--- /dev/null
+++ b/abs/extra/rarian/user-segfault.patch
@@ -0,0 +1,14 @@
+--- util/rarian-sk-get-cl.cpp~ 2008-07-28 19:23:28.000000000 +0200
++++ util/rarian-sk-get-cl.cpp 2008-07-28 19:23:28.000000000 +0200
+@@ -160,6 +160,11 @@
+ {
+ char *filename = NULL;
+ char *user = getenv ("USERNAME");
++
++ if (user == NULL) {
++ user = getenv ("USER");
++ }
++
+ char *basepath = NULL;
+ int i=0;
+ int last = 0;
diff --git a/abs/extra/read-edid/PKGBUILD b/abs/extra/read-edid/PKGBUILD
new file mode 100644
index 0000000..6e6b0b3
--- /dev/null
+++ b/abs/extra/read-edid/PKGBUILD
@@ -0,0 +1,20 @@
+# Contributor: Mateusz Herych <heniekk@gmail.com>
+
+pkgname=read-edid
+pkgver=2.0.0
+pkgrel=2
+pkgdesc="Program that can get information from a pnp monitor"
+arch=('i686' 'x86_64')
+url="http://www.polypux.org/projects/read-edid/"
+license=('GPL')
+depends=('libx86')
+source=(http://www.polypux.org/projects/read-edid/read-edid-$pkgver.tar.gz)
+md5sums=('586e7fa1167773b27f4e505edc93274b')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install || return 1
+
+}
diff --git a/abs/extra/removecommercials/PKGBUILD b/abs/extra/removecommercials/PKGBUILD
new file mode 100755
index 0000000..312f965
--- /dev/null
+++ b/abs/extra/removecommercials/PKGBUILD
@@ -0,0 +1,11 @@
+pkgname=removecommercials
+pkgver=0.1
+pkgrel=1
+arch=("i686")
+pkgdesc="A multimedia framework based on the MPEG-4 Systems standard"
+source=( removecommercials )
+
+build() {
+ cd $startdir
+ install -D -m 755 removecommercials $startdir/pkg/usr/bin/removecommercials
+}
diff --git a/abs/extra/removecommercials/removecommercials b/abs/extra/removecommercials/removecommercials
new file mode 100755
index 0000000..d7b910f
--- /dev/null
+++ b/abs/extra/removecommercials/removecommercials
@@ -0,0 +1,195 @@
+#!/bin/sh
+# remove commercials from recording
+# version 0.1
+
+# usage:
+# first parameter must be %DIR% of the recording
+# second parameter must be %FILE% of the recording
+# third parameter must be %CHANID%
+# fourth parameter must be %STARTTIME%
+# fifth parameter must be %JOBID% for the User Job status to be updated in MythTV
+# in the mythtv setup screen invoke this script like this:
+# MYTHTV User Job Command:
+# /usr/LH/bin/removecommercials "%DIR%" "%FILE%" "%CHANID%" "%STARTTIME%" "%JOBID%"
+
+# Auguments passed from command line
+VIDEODIR=$1
+FILENAME=$2
+CHANID=$3
+STARTTIME=$4
+JOBID=$5
+
+# database settings
+BACKEND_HOSTNAME=${BACKEND_HOSTNAME:-"localhost"}
+DBUSERNAME=${DBUSERNAME:-"mythtv"}
+DBPASSWORD=${DBPASSWORD:-"mythtv"}
+SQLCMD="mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -e"
+
+#------FUNCTIONS---------------
+update_comment()
+# Arg_1 = COMMENT
+{
+if [ $NO_JOBID = 0 ]; then
+ `$SQLCMD "update jobqueue set comment=\"$1\" where id=\"$JOBID\";"`
+fi
+}
+
+update_status()
+# Arg_1 = status code
+{
+if [ $NO_JOBID = 0 ]; then
+ `$SQLCMD "update jobqueue set status=\"$1\" where id=\"$JOBID\";"`
+fi
+}
+
+check_myth_jobcmds()
+# check the myth database for stop pause or resume commands
+{
+if [ $NO_JOBID = 0 ]; then
+ CURRENT_CMD=`$SQLCMD "select cmds from jobqueue where id=\"$JOBID\";" | sed '/[0-9]/!d'`
+ case "$CURRENT_CMD" in
+ # JOB_RUN
+ 0) ;;
+ # JOB_PAUSE
+ 1) update_status 6
+ kill -s STOP $TPID ;;
+ # JOB_RESUME
+ 2) update_status 4
+ `$SQLCMD "update jobqueue set cmds=\"0\" where id=\"$JOBID\";"`
+ kill -s CONT $TPID ;;
+ # JOB_STOP
+ 4) update_status 5
+ `$SQLCMD "update jobqueue set cmds=\"0\" where id=\"$JOBID\";"`
+ kill -9 $TPID
+ clean_up_files
+ echo "Cancelled"
+ update_status 320
+ exit ;;
+ esac
+fi
+}
+
+check_background_progress()
+#check progress in background
+{
+while [ `tail -1 $STATUSFILE | grep -c "Done"` = 0 ]
+do
+ sleep 5
+ check_myth_jobcmds
+ current_status=`tail -1 $STATUSFILE`
+ if [ `expr match "$current_status" '.*\complete'` -ne 0 ]; then
+ prog_percent=`echo "$current_status" | awk '{print $3}'`
+ if [ -n "$prog_percent" ]; then
+ echo "Removing Commercials - $prog_percent Completed"
+ update_comment "Removing Commercials - $prog_percent Completed"
+ fi
+ fi
+done
+}
+
+get_pid()
+{
+process_name=""
+i1=1
+while [ "$process_name" != "found" ]; do
+ if [ "`ps $TPID | grep mythtranscode | sed 's_.*\(mythtranscode\).*_\1_'`" = "mythtranscode" ]; then
+ process_name="found"
+ else
+ TPID=`expr $TPID + 1`
+ fi
+ i1=`expr $i1 + 1`
+ if [ $i1 -gt 20 ]; then
+ break
+ fi
+done
+}
+
+clean_up_files()
+# clean up left over files
+{
+unlink $TMPFILE 2> /dev/null
+unlink $TMPFILE.map 2> /dev/null
+unlink $STATUSFILE 2> /dev/null
+unlink $VIDEODIR/$FILENAME.tmp 2> /dev/null
+}
+
+#-------MAIN SCRIPT------------
+# check if %JOBID% is passed from command line
+JOBID=$5
+if [ -z "$JOBID" ]; then
+ NO_JOBID=1
+else
+ NO_JOBID=0
+fi
+# check if file is a .mpg
+if [ `expr match "$FILENAME" '.*\.mpg'` -ne 0 ]; then
+ MPEG="--mpeg2"
+else
+ MPEG=""
+fi
+
+# create temp filename so multiple instances won't conflict
+TMPNAME=rmvCOMMS-$$
+TMPFILE=$VIDEODIR/$FILENAME-$$
+STATUSFILE=/myth/tmp/$TMPNAME-status.log
+
+touch $STATUSFILE
+
+update_status 4
+
+check_myth_jobcmds
+
+# check for cutlist
+MYTHCOMMFRAMES=`mythcommflag --getcutlist -f $VIDEODIR/$FILENAME | grep 'Cutlist:' | cut -d \ -f 2`
+if [ -n "$MYTHCOMMFRAMES" ]; then
+ echo "Extracting cutlist..."
+ update_comment "Removing Commercials..."
+ ( /usr/bin/nice -n19 /usr/bin/mythtranscode -c $CHANID -s $STARTTIME -o $TMPFILE $MPEG --honorcutlist --showprogress > $STATUSFILE 2>&1 ; echo "Done" >> $STATUSFILE ) &
+ TPID=$!
+ get_pid
+ check_background_progress
+ ERROR=$?
+ if [ $ERROR -ne 0 ]; then
+ echo "Transcoding failed for ${FILENAME} with error $ERROR"
+ exit $ERROR
+ fi
+
+ check_myth_jobcmds
+ # move temp file to output location
+ echo "Moving file..."
+ update_comment "Moving file..."
+ if [ `$SQLCMD "select data from settings where value='SaveTranscoding';" | sed '/[0-9]/!d'` = 1 ]; then
+ echo "DB is set to save transcodeing"
+ mv $VIDEODIR/$FILENAME $VIDEODIR/$FILENAME.old
+ fi
+ mv $TMPFILE $VIDEODIR/$FILENAME
+
+ # file has changed, rebuild index
+ echo "Rebuilding index..."
+ update_comment "Rebuilding index..."
+ mythcommflag -c $CHANID -s $STARTTIME --rebuild
+ ERROR=$?
+ if [ $ERROR -ne 0 ]; then
+ echo "Rebuilding seek list failed for ${FILENAME} with error $ERROR"
+ exit $ERROR
+ fi
+
+ # remove old cutlist
+ echo "Removing old cutlist..."
+ update_comment "Removing old cutlist..."
+ mythcommflag -c $CHANID -s $STARTTIME --clearcutlist
+ ERROR=$?
+ if [ $ERROR -eq 0 ]; then
+ # Fix the database entry for the file
+ `$SQLCMD UPDATE recorded SET cutlist = 0, filesize = $(ls -l $VIDEODIR/$FILENAME | awk '{print $5}') WHERE basename = '$FILENAME';` > /dev/null
+ else
+ echo "Clearing cutlist failed for ${FILENAME} with error $ERROR"
+ exit $ERROR
+ fi
+ clean_up_files
+ echo "Commercials Removed"
+ update_status 272
+ update_comment "Sucessfully Completed."
+else
+ echo "No cutlist found."
+fi
diff --git a/abs/extra/rhino/PKGBUILD b/abs/extra/rhino/PKGBUILD
new file mode 100644
index 0000000..27d7c46
--- /dev/null
+++ b/abs/extra/rhino/PKGBUILD
@@ -0,0 +1,18 @@
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=rhino
+pkgver=1.7R1
+pkgrel=1
+pkgdesc="Open-source implementation of JavaScript written entirely in Java"
+arch=('i686' 'x86_64')
+url="http://www.mozilla.org/rhino/"
+license=('MPL' 'GPL2')
+source=(ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R1.zip)
+md5sums=('613eed8201d37be201805e5048ebb0c3')
+
+build() {
+ cd ${srcdir}/rhino1_7R1
+ install -m755 -d ${pkgdir}/usr/share/java
+ install -m644 js.jar ${pkgdir}/usr/share/java/ || return 1
+}
diff --git a/abs/extra/romdb/PKGBUILD b/abs/extra/romdb/PKGBUILD
new file mode 100644
index 0000000..9601fc6
--- /dev/null
+++ b/abs/extra/romdb/PKGBUILD
@@ -0,0 +1,17 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=romdb
+pkgver=20051116_02
+pkgrel=2
+pkgdesc="Table used by MythGame to store information about games."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://linhes.org/"
+source=(ftp://ftp.knoppmyth.net/R6/sources/romdb-20051116-02.tgz)
+install=romdb.install
+build() {
+ cd $startdir/src/
+ mkdir -p $startdir/pkg/usr/LH/sql
+ cp -a *.sql $startdir/pkg/usr/LH/sql
+}
diff --git a/abs/extra/romdb/romdb.install b/abs/extra/romdb/romdb.install
new file mode 100644
index 0000000..4ef33d4
--- /dev/null
+++ b/abs/extra/romdb/romdb.install
@@ -0,0 +1,18 @@
+# arg 1: the new package version
+post_install() {
+ mysql -D mythconverg -u mythtv -pmythtv < /usr/LH/sql/romdb-20051116-02.sql
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/rrd_stats/PKGBUILD b/abs/extra/rrd_stats/PKGBUILD
new file mode 100644
index 0000000..40f0536
--- /dev/null
+++ b/abs/extra/rrd_stats/PKGBUILD
@@ -0,0 +1,20 @@
+pkgname=rrd_stats
+pkgver=1
+pkgrel=16
+pkgdesc="graph system stats"
+arch=('i686' 'x86_64')
+url=""
+license=('GPL')
+source=(rrd_stats.tgz)
+depends=('hddtemp' 'sysstat' 'xmbmon' 'rrdtool' 'perl' 'local-website')
+backup=('etc/rrdsettings.cfg' 'data/srv/httpd/htdocs/index-rrd.html')
+install=rrd_stats.install
+build() {
+ cd $startdir/src/$pkgname
+ cp -a * $startdir/pkg
+ mkdir -p $startdir/pkg/var/lib/rrd
+ echo "RRD files are used by rrd_stats" > $startdir/pkg/var/lib/rrd/README
+ mv $startdir/pkg/data/srv/httpd/htdocs/rrd/index.html $startdir/pkg/data/srv/httpd/htdocs/rrd/index-rrd.html
+ chown -R http:users $startdir/pkg/data/srv/httpd
+ chmod -R 755 $startdir/pkg/data/srv/httpd
+}
diff --git a/abs/extra/rrd_stats/rrd_stats.install b/abs/extra/rrd_stats/rrd_stats.install
new file mode 100644
index 0000000..126e4f0
--- /dev/null
+++ b/abs/extra/rrd_stats/rrd_stats.install
@@ -0,0 +1,34 @@
+post_install() {
+ PFIX="/data/srv/httpd/htdocs/rrd"
+ if [ ! -e $PFIX/index.html.orig ]
+ then
+ mv $PFIX/index.html $PFIX/index.html.orig
+ ln -s $PFIX/index-rrd.html $PFIX/index.html
+ fi
+
+ ct=`crontab -l`
+ echo $ct | grep -q run_rrd.sh
+ if [ $? != 0 ]
+ then
+ line="*/5 * * * * /usr/bin/run_rrd.sh > /dev/null"
+ (crontab -l; echo "$line") | crontab -
+ fi
+
+
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+
+pre_remove() {
+ crontab -l | grep -v run_rrd | crontab -
+ PFIX="/data/srv/httpd/htdocs/rrd"
+ if [ -e $PFIX/index.html.orig ]
+ then
+ rm $PFIX/index.html
+ mv $PFIX/index.html.orig $PFIX/index.html
+ fi
+
+}
diff --git a/abs/extra/rrd_stats/rrd_stats.tgz b/abs/extra/rrd_stats/rrd_stats.tgz
new file mode 100644
index 0000000..c141ffa
--- /dev/null
+++ b/abs/extra/rrd_stats/rrd_stats.tgz
Binary files differ
diff --git a/abs/extra/rrd_stats/run_rrd.sh b/abs/extra/rrd_stats/run_rrd.sh
new file mode 100644
index 0000000..19150a4
--- /dev/null
+++ b/abs/extra/rrd_stats/run_rrd.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+RRD='hddtemp disk traffic mem cpu usage ups'
+DIR='/usr/bin'
+#
+for x in $RRD
+do
+ $DIR/rrd_${x}.pl >& /dev/null
+done
diff --git a/abs/extra/rrdtool/ChangeLog b/abs/extra/rrdtool/ChangeLog
new file mode 100644
index 0000000..f289390
--- /dev/null
+++ b/abs/extra/rrdtool/ChangeLog
@@ -0,0 +1,13 @@
+2009-01-21 Eric Belanger <eric@archlinux.org>
+
+ * rrdtool 1.3.6-1
+ * Upstream update
+
+2009-01-02 Eric Belanger <eric@archlinux.org>
+
+ * rrdtool 1.3.5-1
+ * Upstream update
+ * Replaced install scriptlet by optdepends
+ * Added libxml2 and pango depends
+ * Libtool slayed
+ * Added ChangeLog
diff --git a/abs/extra/rrdtool/PKGBUILD b/abs/extra/rrdtool/PKGBUILD
new file mode 100644
index 0000000..9d67224
--- /dev/null
+++ b/abs/extra/rrdtool/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 24808 2009-01-21 07:19:42Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Tom K <tom@archlinux.org>
+
+pkgname=rrdtool
+pkgver=1.3.6
+pkgrel=7
+pkgdesc="Data logging and graphing application"
+arch=('i686' 'x86_64')
+url="http://www.rrdtool.org"
+license=('GPL')
+depends=('libart-lgpl' 'libpng' 'freetype2' 'libxml2' 'pango' )
+makedepends=('python' 'tcl' 'ruby')
+optdepends=('tcl, python and/or ruby: to use corresponding binding')
+options=('!libtool' '!emptydirs')
+source=(http://oss.oetiker.ch/rrdtool/pub/rrdtool-${pkgver}.tar.gz)
+md5sums=('afaabd5a60115581e866efbac796d307')
+sha1sums=('4a8499ab58dfd37419bf1cb2429a29da9bc782c3')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --enable-perl-site-install \
+ --with-perl-options='INSTALLDIRS=vendor' --enable-ruby-site-install || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name 'perllocal.pod' -delete
+}
diff --git a/abs/extra/rtmpdump/PKGBUILD b/abs/extra/rtmpdump/PKGBUILD
new file mode 100644
index 0000000..33d90b1
--- /dev/null
+++ b/abs/extra/rtmpdump/PKGBUILD
@@ -0,0 +1,19 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=rtmpdump
+pkgver=1.2a
+pkgrel=2
+pkgdesc="A small dumper for media content streamed over the RTMP protocol."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://sourceforge.net/projects/rtmpdump/"
+depends=('boost')
+source=('http://garr.dl.sourceforge.net/sourceforge/rtmpdump/rtmpdump-v1.2a.tar.gz')
+
+build() {
+ cd $startdir/src/rtmpdump
+ make
+ mkdir -p $startdir/pkg/usr/bin
+ cp -p rtmpdump $startdir/pkg/usr/bin
+}
diff --git a/abs/extra/ruby/PKGBUILD b/abs/extra/ruby/PKGBUILD
new file mode 100644
index 0000000..4a4cdd0
--- /dev/null
+++ b/abs/extra/ruby/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 26958 2009-02-14 23:32:24Z jgc $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Contributors: John Proctor <jproctor@prium.net>
+# Jeramy Rutley <jrutley@gmail.com>
+pkgname=ruby
+pkgver=1.8.7_p72
+_pkgver=1.8.7-p72
+pkgrel=3
+pkgdesc="An object-oriented language for quick and easy programming"
+arch=(i686 x86_64)
+license=('custom')
+url="http://www.ruby-lang.org/en/"
+depends=('gdbm>=1.8.3' 'db>=4.7.25' 'openssl>=0.9.8j' 'zlib>=1.2.3.3' 'readline>=5.2.013')
+makedepends=('tk>=8.5')
+source=(ftp://ftp.ruby-lang.org/pub/ruby/stable/${pkgname}-${_pkgver}.tar.bz2)
+options=('!emptydirs' 'force')
+md5sums=('0b215c46b89b28d7ab8d56d96e72d5b9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${_pkgver}"
+ ./configure --prefix=/usr --enable-shared --enable-pthread || return 1
+ make || return 1
+ make DESTDIR="${pkgdir}" install || return 1
+ #generate the ri docs
+ make -j1 DESTDIR="${pkgdir}" install-doc || return 1
+ install -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
+}
diff --git a/abs/extra/sample-media/PKGBUILD b/abs/extra/sample-media/PKGBUILD
new file mode 100644
index 0000000..9851899
--- /dev/null
+++ b/abs/extra/sample-media/PKGBUILD
@@ -0,0 +1,37 @@
+pkgname=sample-media
+pkgver=1
+pkgrel=5
+pkgdesc="sample media for testing"
+url=""
+license="public domain"
+depends=(media_dirs)
+makedepends=()
+conflicts=()
+replaces=()
+backup=()
+install=sample.install
+provides=("")
+source=()
+md5sums=()
+arch=('i686')
+
+build() {
+cd $startdir/src/
+mkdir -p myth/music
+mkdir -p myth/gallery
+mkdir -p myth/video
+mkdir -p myth/games/snes/roms
+
+
+cp -rp $startdir/audio/* myth/music
+cp -rp $startdir/images/* myth/gallery
+cp -rp $startdir/video/* myth/video
+cp -rp $startdir/rom/* myth/games/snes/roms
+
+cd myth
+chown -R mythtv media
+chmod -R 777 media
+cd $startdir/src
+cp -rp myth $startdir/pkg/
+
+}
diff --git a/abs/extra/sample-media/audio/05-Hush.mp3 b/abs/extra/sample-media/audio/05-Hush.mp3
new file mode 100644
index 0000000..e335abb
--- /dev/null
+++ b/abs/extra/sample-media/audio/05-Hush.mp3
Binary files differ
diff --git a/abs/extra/sample-media/images/115_1573.jpg b/abs/extra/sample-media/images/115_1573.jpg
new file mode 100644
index 0000000..f626325
--- /dev/null
+++ b/abs/extra/sample-media/images/115_1573.jpg
Binary files differ
diff --git a/abs/extra/sample-media/images/345-1217206791B81W.jpg b/abs/extra/sample-media/images/345-1217206791B81W.jpg
new file mode 100644
index 0000000..646ae95
--- /dev/null
+++ b/abs/extra/sample-media/images/345-1217206791B81W.jpg
Binary files differ
diff --git a/abs/extra/sample-media/images/classic-menugraph.png b/abs/extra/sample-media/images/classic-menugraph.png
new file mode 100644
index 0000000..bedbd93
--- /dev/null
+++ b/abs/extra/sample-media/images/classic-menugraph.png
Binary files differ
diff --git a/abs/extra/sample-media/images/dvr_menugraph.png b/abs/extra/sample-media/images/dvr_menugraph.png
new file mode 100644
index 0000000..712ab36
--- /dev/null
+++ b/abs/extra/sample-media/images/dvr_menugraph.png
Binary files differ
diff --git a/abs/extra/sample-media/images/menu_diagram_color.png b/abs/extra/sample-media/images/menu_diagram_color.png
new file mode 100644
index 0000000..d364d94
--- /dev/null
+++ b/abs/extra/sample-media/images/menu_diagram_color.png
Binary files differ
diff --git a/abs/extra/sample-media/rom/PACMAN.SMC b/abs/extra/sample-media/rom/PACMAN.SMC
new file mode 100644
index 0000000..7a1f403
--- /dev/null
+++ b/abs/extra/sample-media/rom/PACMAN.SMC
Binary files differ
diff --git a/abs/extra/sample-media/sample.install b/abs/extra/sample-media/sample.install
new file mode 100644
index 0000000..123d060
--- /dev/null
+++ b/abs/extra/sample-media/sample.install
@@ -0,0 +1,41 @@
+# This is a default template for a post-install scriptlet. You can
+# remove any functions you don't need (and this header).
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ cd /
+ chown -R mythtv:users /myth
+
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ depmod -A
+ /bin/true
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/sample-media/video/TripThe1939.mpeg b/abs/extra/sample-media/video/TripThe1939.mpeg
new file mode 100644
index 0000000..84f9ba3
--- /dev/null
+++ b/abs/extra/sample-media/video/TripThe1939.mpeg
Binary files differ
diff --git a/abs/extra/scanfw/PKGBUILD b/abs/extra/scanfw/PKGBUILD
new file mode 100644
index 0000000..21d4f29
--- /dev/null
+++ b/abs/extra/scanfw/PKGBUILD
@@ -0,0 +1,23 @@
+# Contributor: Michael Hanson <hansonorders@verizon.net>
+pkgname=scanfw
+pkgver=98d.beta
+pkgrel=1
+pkgdesc="A CCI scanner for MythTV"
+arch=('i686')
+url="https://help.ubuntu.com/community/MythTV_Firewire/scanfw"
+license=('GPL2')
+depends=('libraw1394' 'libiec61883' 'libavc1394')
+install=scanfw.install
+source=($pkgname-$pkgver.tar.gz)
+md5sums=('8b1da4fca459062f366232a3de6c7775')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make || return 1
+ mkdir -p "$pkgdir"/usr/bin
+ mkdir -p "$pkgdir"/usr/share/doc/"$pkgname"
+ cp "$srcdir"/"$pkgname"-"$pkgver"/scanfw "$pkgdir"/usr/bin/ || return 1
+ cp "$srcdir"/"$pkgname"-"$pkgver"/mythtv.firewire.channels.pl "$pkgdir"/usr/bin/ || return 1
+ cp "$srcdir"/"$pkgname"-"$pkgver"/SCAN_TIPS "$pkgdir"/usr/share/doc/"$pkgname" || return 1
+ cp "$srcdir"/"$pkgname"-"$pkgver"/README "$pkgdir"/usr/share/doc/"$pkgname" || return 1
+}
diff --git a/abs/extra/scanfw/scanfw-98d.beta.tar.gz b/abs/extra/scanfw/scanfw-98d.beta.tar.gz
new file mode 100644
index 0000000..7bd0ee9
--- /dev/null
+++ b/abs/extra/scanfw/scanfw-98d.beta.tar.gz
Binary files differ
diff --git a/abs/extra/scanfw/scanfw.install b/abs/extra/scanfw/scanfw.install
new file mode 100644
index 0000000..d5695a9
--- /dev/null
+++ b/abs/extra/scanfw/scanfw.install
@@ -0,0 +1,5 @@
+post_install() {
+ echo "==> Information on usage is in /usr/share/doc/scanfw/README."
+ echo "==> Scanning tips can be found in /usr/share/doc/scanfw/SCAN_TIPS."
+}
+
diff --git a/abs/extra/scte65scan/PKGBUILD b/abs/extra/scte65scan/PKGBUILD
new file mode 100644
index 0000000..221b7ba
--- /dev/null
+++ b/abs/extra/scte65scan/PKGBUILD
@@ -0,0 +1,23 @@
+# Contributor: Michael Hanson <hansonorders@verizon.net>
+pkgname=scte65scan
+pkgver=0.2.1
+pkgrel=1
+pkgdesc="A reader and parser of SCTE-65 in-band SI data with HDHomerun support."
+arch=('i686')
+url="http://scte65scan.sourceforge.net/"
+license=('GPL')
+source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tgz http://download.silicondust.com/hdhomerun/libhdhomerun_20090830.tgz)
+md5sums=('1ab2d5f1895931c9c1192ee0dcc46f11'
+ '9c51200782c159703f3b32de24ae2608')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ tar zxf "$srcdir"/libhdhomerun_20090830.tgz
+ make -f Makefile.hdhr || return 1
+ mkdir -p "$pkgdir"/usr/bin || return 1
+ mkdir -p "$pkgdir"/usr/share/doc/"$pkgname" || return 1
+ cp "$srcdir"/"$pkgname"-"$pkgver"/scte65scan "$pkgdir"/usr/bin/ || return 1
+ cp "$srcdir"/"$pkgname"-"$pkgver"/Changelog "$pkgdir"/usr/share/doc/"$pkgname" || return 1
+ cp "$srcdir"/"$pkgname"-"$pkgver"/README "$pkgdir"/usr/share/doc/"$pkgname" || return 1
+ cp "$srcdir"/"$pkgname"-"$pkgver"/us-Cable-Standard-center-frequencies-QAM256 "$pkgdir"/usr/share/doc/"$pkgname" || return 1
+}
diff --git a/abs/extra/sdl_gfx/PKGBUILD b/abs/extra/sdl_gfx/PKGBUILD
new file mode 100644
index 0000000..884a80b
--- /dev/null
+++ b/abs/extra/sdl_gfx/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Maintainer: Kevin Piche <kevin@archlinux.org>
+
+# SONAME change rebuild: clanlib luola sdl_perl
+pkgname=sdl_gfx
+pkgver=2.0.16
+pkgrel=1
+pkgdesc="SDL Graphic Primitives"
+arch=(i686 x86_64)
+license=('LGPL')
+options=(!libtool)
+url="http://www.ferzkopp.net/joomla/content/view/19/14/"
+source=(http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-${pkgver}.tar.gz)
+depends=('sdl')
+md5sums=('22dc2d9d916197829f9342c490d2d02b')
+
+build() {
+ cd ${startdir}/src/SDL_gfx-${pkgver}
+
+ if [ "${CARCH}" == "x86_64" ]; then
+ ./configure --prefix=/usr --disable-mmx
+ else
+ ./configure --prefix=/usr
+ fi
+
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
diff --git a/abs/extra/sdl_image/PKGBUILD b/abs/extra/sdl_image/PKGBUILD
new file mode 100644
index 0000000..f3ab8cb
--- /dev/null
+++ b/abs/extra/sdl_image/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+pkgname=sdl_image
+pkgver=1.2.6
+pkgrel=3
+pkgdesc="A simple library to load images of various formats as SDL surfaces"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('sdl>=1.2.13' 'libpng' 'libjpeg' 'libtiff' 'zlib')
+options=('!libtool')
+url="http://www.libsdl.org/projects/SDL_image/"
+source=(http://www.libsdl.org/projects/SDL_image/release/SDL_image-${pkgver}.tar.gz
+ SDL_image-IMG_lbm.patch
+ SDL_image-buffer-overflow.patch)
+md5sums=('b866dc4f647517bdaf57f6ffdefd013e'
+ '81424f716513845f27e1b69459343327'
+ 'e774a12d1a07b788233f6c15aca05780')
+
+build() {
+ cd ${startdir}/src/SDL_image-${pkgver}
+ patch -Np2 -i ${startdir}/src/SDL_image-IMG_lbm.patch || return 1
+ patch -Np2 -i ${startdir}/src/SDL_image-buffer-overflow.patch || return 1
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
diff --git a/abs/extra/sdl_image/SDL_image-IMG_lbm.patch b/abs/extra/sdl_image/SDL_image-IMG_lbm.patch
new file mode 100644
index 0000000..cc4a29b
--- /dev/null
+++ b/abs/extra/sdl_image/SDL_image-IMG_lbm.patch
@@ -0,0 +1,28 @@
+--- trunk/SDL_image/IMG_lbm.c 2007/07/20 04:37:11 3341
++++ trunk/SDL_image/IMG_lbm.c 2008/01/03 20:05:34 3521
+@@ -28,6 +28,7 @@
+ EHB and HAM (specific Amiga graphic chip modes) support added by Marc Le Douarain
+ (http://www.multimania.com/mavati) in December 2003.
+ Stencil and colorkey fixes by David Raulo (david.raulo AT free DOT fr) in February 2004.
++ Buffer overflow fix in RLE decompression by David Raulo in January 2008.
+ */
+
+ #include <stdio.h>
+@@ -328,7 +329,7 @@
+ count ^= 0xFF;
+ count += 2; /* now it */
+
+- if ( !SDL_RWread( src, &color, 1, 1 ) )
++ if ( ( count > remainingbytes ) || !SDL_RWread( src, &color, 1, 1 ) )
+ {
+ error="error reading BODY chunk";
+ goto done;
+@@ -339,7 +340,7 @@
+ {
+ ++count;
+
+- if ( !SDL_RWread( src, ptr, count, 1 ) )
++ if ( ( count > remainingbytes ) || !SDL_RWread( src, ptr, count, 1 ) )
+ {
+ error="error reading BODY chunk";
+ goto done;
diff --git a/abs/extra/sdl_image/SDL_image-buffer-overflow.patch b/abs/extra/sdl_image/SDL_image-buffer-overflow.patch
new file mode 100644
index 0000000..0be82dc
--- /dev/null
+++ b/abs/extra/sdl_image/SDL_image-buffer-overflow.patch
@@ -0,0 +1,13 @@
+--- trunk/SDL_image/IMG_gif.c 2007/12/28 08:17:23 3461
++++ trunk/SDL_image/IMG_gif.c 2007/12/28 16:43:56 3462
+@@ -418,6 +418,10 @@
+ static int stack[(1 << (MAX_LWZ_BITS)) * 2], *sp;
+ register int i;
+
++ /* Fixed buffer overflow found by Michael Skladnikiewicz */
++ if (input_code_size > MAX_LWZ_BITS)
++ return -1;
++
+ if (flag) {
+ set_code_size = input_code_size;
+ code_size = set_code_size + 1;
diff --git a/abs/extra/sdl_mixer/PKGBUILD b/abs/extra/sdl_mixer/PKGBUILD
new file mode 100644
index 0000000..702532c
--- /dev/null
+++ b/abs/extra/sdl_mixer/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 15782 2008-10-19 01:07:30Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Contributor: Lukas Sabota <punkrockguy318@cocmast.net> (Timidity Patch)
+
+pkgname=sdl_mixer
+pkgver=1.2.8
+pkgrel=3
+pkgdesc="A simple multi-channel audio mixer"
+arch=('i686' 'x86_64')
+url="http://www.libsdl.org/projects/SDL_mixer/"
+license=('LGPL' 'GPL')
+depends=('sdl>=1.2.12' 'libvorbis' 'libmikmod' 'smpeg')
+options=('!libtool')
+source=(http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-${pkgver}.tar.gz)
+md5sums=('0b5b91015d0f3bd9597e094ba67c4d65')
+
+build() {
+ cd ${srcdir}/SDL_mixer-${pkgver}
+ sed -i 's|/usr/local/lib/timidity|/usr/lib/timidity|' timidity/config.h || return 1
+ sed -i 's|/etc/timidity/timidity.cfg|/etc/timidity++/timidity.cfg|' timidity/config.h || return 1
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=${pkgdir} install
+}
diff --git a/abs/extra/sdl_net/PKGBUILD b/abs/extra/sdl_net/PKGBUILD
new file mode 100644
index 0000000..ac3073e
--- /dev/null
+++ b/abs/extra/sdl_net/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Alexander Baldeck <alexander@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+pkgname=sdl_net
+pkgver=1.2.7
+pkgrel=2
+pkgdesc="A small sample cross-platform networking library"
+arch=(i686 x86_64)
+license=(GPL)
+depends=('sdl')
+options=('!libtool')
+url="http://www.libsdl.org/projects/SDL_net/"
+source=(http://www.libsdl.org/projects/SDL_net/release/SDL_net-${pkgver}.tar.gz)
+
+build() {
+ cd ${startdir}/src/SDL_net-${pkgver}
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
+md5sums=('6bd4662d1423810f3140d4da21b6d912')
diff --git a/abs/extra/sdl_pango/PKGBUILD b/abs/extra/sdl_pango/PKGBUILD
new file mode 100644
index 0000000..705e900
--- /dev/null
+++ b/abs/extra/sdl_pango/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 8769 2008-08-16 05:40:38Z eric $
+#
+# Contributor: gyo <nucleogeek@gmail.com>
+
+pkgname=sdl_pango
+pkgver=0.1.2
+pkgrel=1
+pkgdesc="Pango SDL binding"
+arch=('i686' 'x86_64')
+url="http://sdlpango.sourceforge.net/"
+license=""
+depends=('pango' 'sdl')
+options=('!libtool')
+source=(http://switch.dl.sourceforge.net/sourceforge/sdlpango/SDL_Pango-$pkgver.tar.gz http://zarb.org/~gc/t/SDL_Pango-$pkgver-API-adds.patch)
+md5sums=('85bbf9bb7b1cee0538154dadd045418c' '5decf3d7eb724e27548af3142131a2f6')
+
+build() {
+ _prefixname=SDL_Pango
+ cd $startdir/src/$_prefixname-$pkgver
+ patch -Np0 < $startdir/src/$_prefixname-$pkgver-API-adds.patch
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/sdl_pango/SDL_Pango-0.1.2-API-adds.patch b/abs/extra/sdl_pango/SDL_Pango-0.1.2-API-adds.patch
new file mode 100644
index 0000000..1535a56
--- /dev/null
+++ b/abs/extra/sdl_pango/SDL_Pango-0.1.2-API-adds.patch
@@ -0,0 +1,116 @@
+--- src/SDL_Pango.c 2004-12-10 10:06:33.000000000 +0100
++++ src/SDL_Pango.c 2006-09-24 22:46:24.000000000 +0200
+@@ -723,13 +723,8 @@
+ SDL_UnlockSurface(surface);
+ }
+
+-/*!
+- Create a context which contains Pango objects.
+-
+- @return A pointer to the context as a SDLPango_Context*.
+-*/
+ SDLPango_Context*
+-SDLPango_CreateContext()
++SDLPango_CreateContext_GivenFontDesc(const char* font_desc)
+ {
+ SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context));
+ G_CONST_RETURN char *charset;
+@@ -743,8 +738,7 @@
+ pango_context_set_language (context->context, pango_language_from_string (charset));
+ pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR);
+
+- context->font_desc = pango_font_description_from_string(
+- MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
++ context->font_desc = pango_font_description_from_string(font_desc);
+
+ context->layout = pango_layout_new (context->context);
+
+@@ -762,6 +756,17 @@
+ }
+
+ /*!
++ Create a context which contains Pango objects.
++
++ @return A pointer to the context as a SDLPango_Context*.
++*/
++SDLPango_Context*
++SDLPango_CreateContext()
++{
++ SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
++}
++
++/*!
+ Free a context.
+
+ @param *context [i/o] Context to be free
+@@ -1053,6 +1058,20 @@
+ pango_layout_set_font_description (context->layout, context->font_desc);
+ }
+
++void
++SDLPango_SetText_GivenAlignment(
++ SDLPango_Context *context,
++ const char *text,
++ int length,
++ SDLPango_Alignment alignment)
++{
++ pango_layout_set_attributes(context->layout, NULL);
++ pango_layout_set_text (context->layout, text, length);
++ pango_layout_set_auto_dir (context->layout, TRUE);
++ pango_layout_set_alignment (context->layout, alignment);
++ pango_layout_set_font_description (context->layout, context->font_desc);
++}
++
+ /*!
+ Set plain text to context.
+ Text must be utf-8.
+@@ -1067,11 +1086,7 @@
+ const char *text,
+ int length)
+ {
+- pango_layout_set_attributes(context->layout, NULL);
+- pango_layout_set_text (context->layout, text, length);
+- pango_layout_set_auto_dir (context->layout, TRUE);
+- pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT);
+- pango_layout_set_font_description (context->layout, context->font_desc);
++ SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT);
+ }
+
+ /*!
+--- src/SDL_Pango.h 2004-12-10 10:06:33.000000000 +0100
++++ src/SDL_Pango.h 2006-09-24 22:46:01.000000000 +0200
+@@ -109,12 +109,20 @@
+ SDLPANGO_DIRECTION_NEUTRAL /*! Neutral */
+ } SDLPango_Direction;
+
+-
++/*!
++ Specifies alignment of text. See Pango reference for detail
++*/
++typedef enum {
++ SDLPANGO_ALIGN_LEFT,
++ SDLPANGO_ALIGN_CENTER,
++ SDLPANGO_ALIGN_RIGHT
++} SDLPango_Alignment;
+
+ extern DECLSPEC int SDLCALL SDLPango_Init();
+
+ extern DECLSPEC int SDLCALL SDLPango_WasInit();
+
++extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc);
+ extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();
+
+ extern DECLSPEC void SDLCALL SDLPango_FreeContext(
+@@ -157,6 +165,12 @@
+ const char *markup,
+ int length);
+
++extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(
++ SDLPango_Context *context,
++ const char *text,
++ int length,
++ SDLPango_Alignment alignment);
++
+ extern DECLSPEC void SDLCALL SDLPango_SetText(
+ SDLPango_Context *context,
+ const char *markup,
diff --git a/abs/extra/sdl_perl/PKGBUILD b/abs/extra/sdl_perl/PKGBUILD
new file mode 100644
index 0000000..5824cd8
--- /dev/null
+++ b/abs/extra/sdl_perl/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
+
+pkgname=sdl_perl
+_realname=SDL_Perl
+pkgver=2.1.3
+pkgrel=2
+pkgdesc="A Perl wrapper for SDL"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://sdl.perl.org"
+depends=('perl>=5.10.0' 'sdl_net' 'sdl_ttf' 'sdl_image' 'sdl_mixer' 'mesa'
+'sdl_gfx' 'smpeg')
+makedepends=('perl-yaml')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/D/DG/DGOEHRIG/${_realname}-${pkgver}.tar.gz)
+md5sums=('6ce26e1b710ce52def4ec22637cd5176')
+
+build() {
+ cd ${startdir}/src/${_realname}-${pkgver}
+ # install module in vendor directories.
+ perl Build.PL installdirs=vendor destdir=${startdir}/pkg \
+ --config man1ext=1p --config man3ext=3pm
+ perl Build
+ perl Build install
+
+ # Fix bad location of libraries.
+ cd ${startdir}/pkg/usr/lib/perl5/vendor_perl
+ mv -f auto/src/SDL* auto
+ rmdir auto/src
+}
diff --git a/abs/extra/sdl_sound/PKGBUILD b/abs/extra/sdl_sound/PKGBUILD
new file mode 100644
index 0000000..87885c2
--- /dev/null
+++ b/abs/extra/sdl_sound/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Maintainer: dorphell <dorphell@archlinux.org>
+pkgname=sdl_sound
+pkgver=1.0.1
+pkgrel=7
+pkgdesc="A library to decode several popular sound file formats, such as .WAV and .MP3"
+arch=(i686 x86_64)
+depends=('sdl' 'libmikmod' 'libvorbis' 'flac>=1.1.4' 'speex')
+source=(http://icculus.org/SDL_sound/downloads/SDL_sound-$pkgver.tar.gz flac.patch)
+url="http://icculus.org/SDL_sound/"
+
+build() {
+ cd $startdir/src/SDL_sound-$pkgver
+ patch -Np1 -i ../flac.patch || return 1
+ aclocal
+ autoconf
+ automake --foreign
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ # libtoolslay
+ find $startdir/pkg -name '*.la' -exec rm {} \;
+}
+md5sums=('49e197ef7c8ab623d0640dc74be43160' '302aa9dc94cc71dd3339ca3177d36e1c')
diff --git a/abs/extra/sdl_sound/flac.patch b/abs/extra/sdl_sound/flac.patch
new file mode 100644
index 0000000..d0ed491
--- /dev/null
+++ b/abs/extra/sdl_sound/flac.patch
@@ -0,0 +1,126 @@
+diff -u -r SDL_sound-1.0.1/configure.in SDL_sound-1.0.1-flac/configure.in
+--- SDL_sound-1.0.1/configure.in 2003-10-12 20:49:54.000000000 +0200
++++ SDL_sound-1.0.1-flac/configure.in 2006-12-11 20:43:46.546583251 +0100
+@@ -155,9 +155,12 @@
+ dnl FLAC developers tend to break their API with every release, so we're
+ dnl checking for the latest-and-greatest here so we don't have to support
+ dnl obsolete versions.
++dnl Starting with FLAC 1.1.3:
++dnl libFLAC supports Ogg FLAC (no more libOggFLAC) so we also need -logg
++dnl the libFLAC .so version is also #defined in FLAC/export.h
+
+ dnl Hooray for shitty autoconf bugs!
+-x="C__seekable_stream_decoder_process_single"
++x="C__stream_decoder_process_single"
+ flcsym="FLA$x"
+ dnl Check for libFLAC
+ AC_ARG_ENABLE(flac,
+@@ -167,7 +170,7 @@
+ AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes)
+ AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes)
+ if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then
+- LIBS="$LIBS -lFLAC"
++ LIBS="$LIBS -lFLAC -logg"
+ AC_DEFINE(SOUND_SUPPORTS_FLAC)
+ fi
+ fi
+diff -u -r SDL_sound-1.0.1/decoders/flac.c SDL_sound-1.0.1-flac/decoders/flac.c
+--- SDL_sound-1.0.1/decoders/flac.c 2003-03-10 23:44:14.000000000 +0100
++++ SDL_sound-1.0.1-flac/decoders/flac.c 2006-12-11 20:43:57.880097062 +0100
+@@ -44,6 +44,16 @@
+ #define __SDL_SOUND_INTERNAL__
+ #include "SDL_sound_internal.h"
+
++#include <FLAC/export.h>
++
++/* FLAC 1.1.3 has FLAC_API_VERSION_CURRENT == 8 */
++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
++#define LEGACY_FLAC
++#else
++#undef LEGACY_FLAC
++#endif
++
++#ifdef LEGACY_FLAC
+ #include <FLAC/seekable_stream_decoder.h>
+
+ #define D_END_OF_STREAM FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM
+@@ -80,6 +90,34 @@
+ typedef FLAC__SeekableStreamDecoderSeekStatus d_seek_status_t;
+ typedef FLAC__SeekableStreamDecoderTellStatus d_tell_status_t;
+ typedef FLAC__SeekableStreamDecoderLengthStatus d_length_status_t;
++#else
++#include <FLAC/stream_decoder.h>
++
++#define D_END_OF_STREAM FLAC__STREAM_DECODER_END_OF_STREAM
++
++#define d_new() FLAC__stream_decoder_new()
++#define d_process_metadata(x) FLAC__stream_decoder_process_until_end_of_metadata(x)
++#define d_process_one_frame(x) FLAC__stream_decoder_process_single(x)
++#define d_get_state(x) FLAC__stream_decoder_get_state(x)
++#define d_finish(x) FLAC__stream_decoder_finish(x)
++#define d_delete(x) FLAC__stream_decoder_delete(x)
++
++typedef FLAC__StreamDecoder decoder_t;
++typedef FLAC__StreamDecoderReadStatus d_read_status_t;
++
++#define D_SEEK_STATUS_OK FLAC__STREAM_DECODER_SEEK_STATUS_OK
++#define D_SEEK_STATUS_ERROR FLAC__STREAM_DECODER_SEEK_STATUS_ERROR
++#define D_TELL_STATUS_OK FLAC__STREAM_DECODER_TELL_STATUS_OK
++#define D_TELL_STATUS_ERROR FLAC__STREAM_DECODER_TELL_STATUS_ERROR
++#define D_LENGTH_STATUS_OK FLAC__STREAM_DECODER_LENGTH_STATUS_OK
++#define D_LENGTH_STATUS_ERROR FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR
++
++#define d_seek_absolute(x, y) FLAC__stream_decoder_seek_absolute(x, y)
++
++typedef FLAC__StreamDecoderSeekStatus d_seek_status_t;
++typedef FLAC__StreamDecoderTellStatus d_tell_status_t;
++typedef FLAC__StreamDecoderLengthStatus d_length_status_t;
++#endif
+
+ #define D_WRITE_CONTINUE FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE
+ #define D_READ_END_OF_STREAM FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM
+@@ -141,9 +179,15 @@
+ } /* free_flac */
+
+
++#ifdef LEGACY_FLAC
+ static d_read_status_t read_callback(
+ const decoder_t *decoder, FLAC__byte buffer[],
+ unsigned int *bytes, void *client_data)
++#else
++static d_read_status_t read_callback(
++ const decoder_t *decoder, FLAC__byte buffer[],
++ size_t *bytes, void *client_data)
++#endif
+ {
+ flac_t *f = (flac_t *) client_data;
+ Uint32 retval;
+@@ -400,6 +444,7 @@
+ BAIL_MACRO(ERR_OUT_OF_MEMORY, 0);
+ } /* if */
+
++#ifdef LEGACY_FLAC
+ d_set_read_callback(decoder, read_callback);
+ d_set_write_callback(decoder, write_callback);
+ d_set_metadata_callback(decoder, metadata_callback);
+@@ -410,6 +455,7 @@
+ d_set_eof_callback(decoder, eof_callback);
+
+ d_set_client_data(decoder, f);
++#endif
+
+ f->rw = internal->rw;
+ f->sample = sample;
+@@ -418,7 +464,12 @@
+ f->is_flac = 0 /* !!! FIXME: should be "has_extension", not "0". */;
+
+ internal->decoder_private = f;
++ /* really should check the init return value here: */
++#ifdef LEGACY_FLAC
+ d_init(decoder);
++#else
++ FLAC__stream_decoder_init_stream(decoder, read_callback, seek_callback, tell_callback, length_callback, eof_callback, write_callback, metadata_callback, error_callback, f);
++#endif
+
+ sample->flags = SOUND_SAMPLEFLAG_NONE;
+
diff --git a/abs/extra/sdl_ttf/PKGBUILD b/abs/extra/sdl_ttf/PKGBUILD
new file mode 100644
index 0000000..956b87f
--- /dev/null
+++ b/abs/extra/sdl_ttf/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 8788 2008-08-16 06:06:57Z eric $
+# Maintainer: Kevin Piche <kevin@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+pkgname=sdl_ttf
+pkgver=2.0.9
+pkgrel=1
+pkgdesc="A library that allows you to use TrueType fonts in your SDL applications"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://www.libsdl.org/projects/SDL_ttf/"
+depends=('sdl>=1.2.12' 'freetype2')
+options=('!libtool')
+source=(http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-${pkgver}.tar.gz)
+md5sums=('6dd5a85e4924689a35a5fb1cb3336156')
+
+build() {
+ cd ${startdir}/src/SDL_ttf-${pkgver}
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
diff --git a/abs/extra/sdlmame/ChangeLog b/abs/extra/sdlmame/ChangeLog
new file mode 100644
index 0000000..872c595
--- /dev/null
+++ b/abs/extra/sdlmame/ChangeLog
@@ -0,0 +1,5 @@
+2008-02-13 JJDaNiMoTh <jjdanimoth.aur@gmail.com>
+ * 0.123 version
+
+2008-01-22 JJDaNiMoTh <jjdanimoth.aur@gmail.com>
+ * 0.122u6 version
diff --git a/abs/extra/sdlmame/PKGBUILD b/abs/extra/sdlmame/PKGBUILD
new file mode 100644
index 0000000..cb9d65b
--- /dev/null
+++ b/abs/extra/sdlmame/PKGBUILD
@@ -0,0 +1,65 @@
+# $Id: PKGBUILD,v 1.19 2009/04/24 15:05:30 sergej Exp $
+# Contributor: robb_force <robb_force@holybuffalo.net>
+# Maintainer: JJDaNiMoTh <jjdanimoth@gmail.com>
+
+pkgname=sdlmame
+pkgver=0.131
+pkgrel=1
+pkgdesc="A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support."
+url="http://rbelmont.mameworld.info/?page_id=163"
+license=('custom:MAME License')
+arch=('i686' 'x86_64')
+depends=('sdl>=1.2.11' 'libxinerama' 'gconf')
+makedepends=('unzip' 'nasm' 'mesa')
+DLAGENTS=('http::/usr/bin/wget -U "" -c -t 3 --waitretry=3')
+options=('!makeflags' 'force')
+install=sdlmame.install
+source=(http://rbelmont.mameworld.info/${pkgname}${pkgver%.*}${pkgver#*.}.zip \
+ sdlmame.sh \
+ extras.tar.gz)
+md5sums=('d4891999ec2ee11cb0d75a1596e17060'
+ '3119ccfa1e970eba4467df31208adaf0'
+ '420b61240bf5ae11615ba7c6100ee00d')
+
+build() {
+ cd ${startdir}/src/${pkgname}${pkgver%.*}${pkgver#*.}
+
+ sed -i 's/-Werror//' makefile || return 1
+
+ # Modify the make options based on the user's architecture
+ if [ "$CARCH" == "x86_64" ]; then
+ echo "Compiling for AMD64..."
+ make AMD64=1 PTR64=1 || return 1
+ elif [ "$CARCH" == "i686" ]; then
+ make I686=1 || return 1
+ else
+ echo "Compiling for i386..."
+ make PM=1 || return 1
+ fi
+
+ # Install the sdlmame script
+ install -Dm755 ${startdir}/src/${pkgname}.sh ${startdir}/pkg/usr/bin/${pkgname} || return 1
+
+ # Install the applications and the UI font in /usr/share
+ install -Dm755 mame* ${startdir}/pkg/usr/share/${pkgname}/${pkgname} && \
+ install -m755 chdman ${startdir}/pkg/usr/share/${pkgname}/chdman && \
+ install -m755 jedutil ${startdir}/pkg/usr/share/${pkgname}/jedutil && \
+# install -m755 makemeta ${startdir}/pkg/usr/share/${pkgname}/makemeta && \
+ install -m755 regrep ${startdir}/pkg/usr/share/${pkgname}/regrep && \
+ install -m755 romcmp ${startdir}/pkg/usr/share/${pkgname}/romcmp && \
+ install -m755 runtest ${startdir}/pkg/usr/share/${pkgname}/runtest && \
+ install -m755 testkeys ${startdir}/pkg/usr/share/${pkgname}/testkeys && \
+ install -m755 src2html ${startdir}/pkg/usr/share/${pkgname}/src2html && \
+ install -m755 srcclean ${startdir}/pkg/usr/share/${pkgname}/srcclean && \
+ install -m755 ldverify ${startdir}/pkg/usr/share/${pkgname}/ldverify && \
+ install -m644 ui.bdf ${startdir}/pkg/usr/share/${pkgname}/ui.bdf || return 1
+
+ # Install the extra bits
+ install -d ${startdir}/pkg/usr/share/${pkgname}/{artwork,ctrlr,keymaps} && \
+ install -m644 ${startdir}/src/artwork/* ${startdir}/pkg/usr/share/${pkgname}/artwork/ && \
+ install -m644 ${startdir}/src/ctrlr/* ${startdir}/pkg/usr/share/${pkgname}/ctrlr/ && \
+ install -m644 keymaps/* ${startdir}/pkg/usr/share/${pkgname}/keymaps/ || return 1
+
+ # Include the license
+ install -Dm644 docs/license.txt $startdir/pkg/usr/share/licenses/${pkgname}/license.txt
+}
diff --git a/abs/extra/sdlmame/extras.tar.gz b/abs/extra/sdlmame/extras.tar.gz
new file mode 100644
index 0000000..ae0bc2a
--- /dev/null
+++ b/abs/extra/sdlmame/extras.tar.gz
Binary files differ
diff --git a/abs/extra/sdlmame/sdlmame.install b/abs/extra/sdlmame/sdlmame.install
new file mode 100644
index 0000000..eedae49
--- /dev/null
+++ b/abs/extra/sdlmame/sdlmame.install
@@ -0,0 +1,32 @@
+# Message displayed for a fresh install.
+post_install()
+{
+ echo ""
+ echo "***************************************************************"
+ echo " SDLMAME and the additional MAME utilities have been installed"
+ echo " in /usr/share/sdlmame However, SDLMAME can be run by"
+ echo " typing sdlmame and it's options. Try running SDLMAME with"
+ echo " these options:"
+ echo " sdlmame <rom> -nowindow -noswitchres"
+ echo "***************************************************************"
+ echo ""
+}
+
+# Message for an update.
+post_upgrade()
+{
+ echo ""
+ echo "***************************************************************"
+ echo " SDLMAME has been updated. If you are upgrading directly from"
+ echo " 0.117 or earlier, you must delete all .cfg files and"
+ echo " re-configure your controllers. You should also run"
+ echo " 'SDLMAME --newini' to force the script to create a new ini"
+ echo " file with default settings at ~/.mame/sdlmame.ini"
+ echo " since there may be new ini options."
+ echo "***************************************************************"
+ echo ""
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/sdlmame/sdlmame.sh b/abs/extra/sdlmame/sdlmame.sh
new file mode 100644
index 0000000..38b4870
--- /dev/null
+++ b/abs/extra/sdlmame/sdlmame.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# Create a variable equal to $HOME that will be used later in the ini creation
+home=('$HOME')
+
+if [ "$1" != "" ] && [ "$1" = "--newini" ]; then
+ echo "Rebuilding the ini file at $HOME/.mame/sdlmame.ini"
+ echo "Modify this file for permanent changes to your SDLMAME"
+ echo "options and paths before running SDLMAME again."
+ cd $HOME/.mame
+ if [ -e sdlmame.ini ]; then
+ echo "Your old ini file has been renamed to sdlmameini.bak"
+ mv sdlmame.ini sdlmameini.bak
+ fi
+ /usr/share/sdlmame/sdlmame \
+ -artpath "$home/.mame/artwork;artwork" \
+ -ctrlrpath "$home/.mame/ctrlr;ctrlr" \
+ -inipath $home/.mame/ini \
+ -rompath $home/.mame/roms \
+ -samplepath $home/.mame/samples \
+ -cfg_directory $home/.mame/cfg \
+ -comment_directory $home/.mame/comments \
+ -diff_directory $home/.mame/diff \
+ -input_directory $home/.mame/inp \
+ -memcard_directory $home/.mame/memcard \
+ -nvram_directory $home/.mame/nvram \
+ -snapshot_directory $home/.mame/snap \
+ -state_directory $home/.mame/sta \
+ -video opengl \
+ -createconfig
+elif [ ! -e $HOME/.mame ]; then
+ echo "Running SDLMAME for the first time..."
+ echo "Creating an ini file for SDLMAME at $HOME/.mame/sdlmame.ini"
+ echo "Modify this file for permanent changes to your SDLMAME"
+ echo "options and paths before running SDLMAME again."
+ mkdir $HOME/.mame
+ mkdir $HOME/.mame/{artwork,cfg,comments,ctrlr,diff,ini,inp,memcard,nvram,samples,snap,sta}
+ cd $HOME/.mame
+ /usr/share/sdlmame/sdlmame \
+ -artpath "$home/.mame/artwork;artwork" \
+ -ctrlrpath "$home/.mame/ctrlr;ctrlr" \
+ -inipath $home/.mame/ini \
+ -rompath $home/.mame/roms \
+ -samplepath $home/.mame/samples \
+ -cfg_directory $home/.mame/cfg \
+ -comment_directory $home/.mame/comments \
+ -diff_directory $home/.mame/diff \
+ -input_directory $home/.mame/inp \
+ -memcard_directory $home/.mame/memcard \
+ -nvram_directory $home/.mame/nvram \
+ -snapshot_directory $home/.mame/snap \
+ -state_directory $home/.mame/sta \
+ -video opengl \
+ -createconfig
+else
+ cd /usr/share/sdlmame
+ ./sdlmame "$@"
+fi
diff --git a/abs/extra/serdisplib/PKGBUILD b/abs/extra/serdisplib/PKGBUILD
new file mode 100644
index 0000000..454769b
--- /dev/null
+++ b/abs/extra/serdisplib/PKGBUILD
@@ -0,0 +1,22 @@
+# Contributor: Bernhard Walle <bernhard.walle@gmx.de>
+pkgname=serdisplib
+pkgver=1.97.8
+pkgrel=1
+pkgdesc="Library for Certain Serial and Parallel LC Displays"
+url="http://serdisplib.sourceforge.net/"
+license="GPL"
+depends=(libusb gd)
+backup=(etc/LCDd.conf)
+arch=(i686 x86_64)
+source=(http://switch.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
+md5sums=('2aa91c43d01d2dfc9fbc1116e3063ae1')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc --enable-libusb
+ make
+ make DESTDIR=$startdir/pkg includedir=$startdir/pkg/usr/include \
+ libdir=$startdir/pkg/usr/lib bindir=$startdir/pkg/usr/bin \
+ install
+}
+# :mode=shellscript:
diff --git a/abs/extra/shepherd/PKGBUILD b/abs/extra/shepherd/PKGBUILD
new file mode 100644
index 0000000..f7b3048
--- /dev/null
+++ b/abs/extra/shepherd/PKGBUILD
@@ -0,0 +1,16 @@
+# $Id: PKGBUILD 23123 2009-01-03 02:43:02Z kevin $
+# Maintainer: Greg Frost <gregfrost1@bigpond.com>
+pkgname=shepherd
+pkgver=1
+pkgrel=2
+pkgdesc="Australian EPG Grabber."
+arch=i686
+depends=(perl-pathtools perl-digest-sha1 perl-algorithm-diff perl-javascript perl-list-compare)
+makedepends=()
+source=(http://www.whuffy.com/shepherd/shepherd)
+
+build() {
+ mkdir -p ${startdir}/pkg/usr/bin/
+ install -m 0755 shepherd ${startdir}/pkg/usr/bin/
+}
+md5sums=('2b826e4a08810d360e9f6843beb6aa42')
diff --git a/abs/extra/slang/ChangeLog b/abs/extra/slang/ChangeLog
new file mode 100644
index 0000000..450a2a2
--- /dev/null
+++ b/abs/extra/slang/ChangeLog
@@ -0,0 +1,7 @@
+2008-12-19 Eric Belanger <eric@archlinux.org>
+
+ * slang 2.1.4-1
+ * Upstream update
+ * Added pcre depends
+ * Added backup array
+ * Added ChangeLog
diff --git a/abs/extra/slang/PKGBUILD b/abs/extra/slang/PKGBUILD
new file mode 100644
index 0000000..16622d4
--- /dev/null
+++ b/abs/extra/slang/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 21963 2008-12-19 07:30:56Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=slang
+pkgver=2.1.4
+pkgrel=1
+pkgdesc="S-Lang is a powerful interpreted language"
+arch=('i686' 'x86_64')
+url="http://www.s-lang.org/"
+license=('GPL')
+depends=('glibc' 'pcre')
+backup=('etc/slsh.rc')
+options=('!makeflags')
+source=(ftp://ftp.fu-berlin.de/pub/unix/misc/slang/v${pkgver%.*}/${pkgname}-${pkgver}.tar.gz)
+md5sums=('3516f593bc04975844f26137c18275d2')
+sha1sums=('5c97698f7dcd91834ce64a4dac476a3587851ead')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc || return 1
+ make || return 1
+ make install-all DESTDIR=${pkgdir} || return 1
+}
diff --git a/abs/extra/smartmontools/PKGBUILD b/abs/extra/smartmontools/PKGBUILD
new file mode 100644
index 0000000..dbee715
--- /dev/null
+++ b/abs/extra/smartmontools/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 6701 2008-07-27 13:29:59Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Jeff Mickey <jeff@archlinux.org>
+# Contributor: Jani Talikka <jani.talikka@gmail.com>
+
+pkgname=smartmontools
+pkgver=5.38
+pkgrel=1
+pkgdesc="Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives."
+url="http://smartmontools.sourceforge.net"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('gcc-libs')
+backup=('etc/smartd.conf')
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz \
+ smartd)
+
+build()
+{
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+ rm -rf ${startdir}/pkg/etc/rc.d
+ install -D -m 755 ../smartd ${startdir}/pkg/etc/rc.d/smartd
+}
+md5sums=('a282846532ecbd6b4a28072373b3a70b' '850f98b6792b7642ff193a49a2f1139d')
diff --git a/abs/extra/smartmontools/smartd b/abs/extra/smartmontools/smartd
new file mode 100644
index 0000000..5fcc414
--- /dev/null
+++ b/abs/extra/smartmontools/smartd
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+ . /etc/rc.conf
+ . /etc/rc.d/functions
+
+ case "$1" in
+
+ start)
+ stat_busy "Starting smartd"
+ /usr/sbin/smartd &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ add_daemon smartd
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping smartd"
+ kill -9 `pidof /usr/sbin/smartd` &>/dev/null
+ rm_daemon smartd
+ stat_done
+ ;;
+
+ restart)
+ stat_busy "Restarting smartd ..."
+ $0 stop
+ $0 start
+ stat_done
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ esac
diff --git a/abs/extra/smpeg/PKGBUILD b/abs/extra/smpeg/PKGBUILD
new file mode 100644
index 0000000..1b52434
--- /dev/null
+++ b/abs/extra/smpeg/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 19615 2008-11-28 13:17:01Z allan $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+
+pkgname=smpeg
+pkgver=0.4.4
+pkgrel=4
+pkgdesc="SDL MPEG Player Library"
+arch=('i686' 'x86_64')
+url="http://icculus.org/smpeg/"
+license=('LGPL')
+depends=('sdl')
+makedepends=('gtk' 'mesa')
+options=('!libtool' '!makeflags')
+source=(http://mirrors.dotsrc.org/lokigames/open-source/smpeg/$pkgname-$pkgver.tar.gz smpeg-0.4.4-gcc41.patch)
+md5sums=('59c76ac704088ef5539210190c4e1fe3' '8b979a58307d7196655758bd3d2466c4')
+sha1sums=('6d7f4449472e6270ab435b2224f3fad951c35259' '7d9a2ad7f6b702dfe3adcb87601d9b55022bbd1e')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ patch -p1 < ../smpeg-0.4.4-gcc41.patch
+ ./configure --prefix=/usr
+ make LDFLAGS+=-lstdc++ || return 1
+ make DESTDIR=$startdir/pkg install
+
+ #fix aclocal warnings
+ sed -i "s#(AM_PATH_SMPEG#([AM_PATH_SMPEG]#" ${pkgdir}/usr/share/aclocal/smpeg.m4
+}
diff --git a/abs/extra/smpeg/smpeg-0.4.4-gcc41.patch b/abs/extra/smpeg/smpeg-0.4.4-gcc41.patch
new file mode 100644
index 0000000..4a0eeb4
--- /dev/null
+++ b/abs/extra/smpeg/smpeg-0.4.4-gcc41.patch
@@ -0,0 +1,41 @@
+Index: MPEGaudio.h
+===================================================================
+RCS file: /cvs/cvsroot/smpeg/MPEGaudio.h,v
+retrieving revision 1.23
+diff -u -p -r1.23 MPEGaudio.h
+--- smpeg/MPEGaudio.h 17 Jul 2001 19:52:24 -0000 1.23
++++ smpeg/MPEGaudio.h 6 Dec 2005 06:10:43 -0000
+@@ -151,12 +151,6 @@ private:
+ /* The actual MPEG audio class */
+ class MPEGaudio : public MPEGerror, public MPEGaudioaction {
+
+- friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
+- friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
+-#ifdef THREADED_AUDIO
+- friend int Decode_MPEGaudio(void *udata);
+-#endif
+-
+ public:
+ MPEGaudio(MPEGstream *stream, bool initSDL = true);
+ virtual ~MPEGaudio();
+@@ -367,6 +361,20 @@ public:
+ #define N_TIMESTAMPS 5
+
+ double timestamp[N_TIMESTAMPS];
++
++ /* Functions which access MPEGaudio internals */
++ friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
++ friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
++#ifdef THREADED_AUDIO
++ friend int Decode_MPEGaudio(void *udata);
++#endif
+ };
+
++/* Need to duplicate the prototypes, this is not a typo :) */
++void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
++int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
++#ifdef THREADED_AUDIO
++int Decode_MPEGaudio(void *udata);
++#endif
++
+ #endif /* _MPEGAUDIO_H_ */
diff --git a/abs/extra/snes9x/PKGBUILD b/abs/extra/snes9x/PKGBUILD
new file mode 100644
index 0000000..928081b
--- /dev/null
+++ b/abs/extra/snes9x/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Alexander Baldeck <alexander@archlinux.org>
+pkgname=snes9x
+pkgver=1.51
+pkgrel=1
+pkgdesc="A portable Emulator for the Super Nintento Entertainment System"
+arch=(i686 x86_64)
+url="http://www.snes9x.com"
+license="Freeware"
+# remove nasm on non x86 platforms
+depends=('zlib' 'libpng' 'sdl' 'nasm' 'mesa')
+install=snes9x.install
+source=(http://www.geocities.co.jp/SiliconValley-PaloAlto/2560/release/${pkgname}-${pkgver}-src.tar.bz2 \
+ snes9x-fixes2.patch)
+build() {
+ mkdir -p ${startdir}/pkg/usr/bin
+
+ cd ${startdir}/src/${pkgname}-${pkgver}-src
+ #patch -Np1 -i ${startdir}/src/snes9x-fixes2.patch || return 1
+
+ # build snes9x with opengl
+ ./configure --prefix=/usr \
+ --with-sdd1-decomp \
+ --with-opengl \
+ --with-netplay
+ make || return 1
+ install -D ${startdir}/src/${pkgname}-${pkgver}-src/osnes9x ${startdir}/pkg/usr/bin/osnes9x
+
+ # build snes9x with glide
+ #cd $startdir/src/$pkgname-$pkgver-src
+ #./configure --prefix=/usr --with-sdd1-decomp --with-glide
+ #make || return 1
+ #install -D ${startdir}/src/${pkgname}-${pkgver}-src/osnes9x ${startdir}/pkg/usr/bin/3dfxsnes9x
+
+ # build snes9x without opengl
+ ./configure --prefix=/usr \
+ --with-sdd1-decomp \
+ --with-netplay
+ make clean || return 1
+ make || return 1
+ install -D ${startdir}/src/${pkgname}-${pkgver}-src/snes9x ${startdir}/pkg/usr/bin/snes9x
+}
+md5sums=('a1038cc761f400318cdced960972f8a7' '395bea78242afc82b3756225fe4ff954')
diff --git a/abs/extra/snes9x/snes9x-fixes2.patch b/abs/extra/snes9x/snes9x-fixes2.patch
new file mode 100644
index 0000000..6007bb6
--- /dev/null
+++ b/abs/extra/snes9x/snes9x-fixes2.patch
@@ -0,0 +1,29 @@
+--- snes9x-1.5-src.orig/unix/opengl.cpp 2006-06-30 13:34:57.000000000 +0000
++++ snes9x-1.5-src/unix/opengl.cpp 2006-09-01 08:48:39.000000000 +0000
+@@ -214,7 +214,7 @@
+
+ // Strip dots from the version string
+ char *ptr;
+- while (ptr = strchr (ver, '.'))
++ while ((ptr = strchr (ver, '.')))
+ memmove (ptr, ptr + 1, strlen (ptr + 1) + 1);
+
+ // Pad the string with zeros to 4 digits
+@@ -381,7 +381,7 @@
+ int i = 0;
+ for (uint32 y = 0; y < pheight; y++)
+ {
+- uint16 *ptr = (uint16 *) (GFX.Screen + (y + startl) * GFX.Pitch2) + startx;
++ uint16 *ptr = (uint16 *) (GFX.Screen + (y + startl) * GFX.Pitch) + startx;
+ for (uint32 x = 0; x < pwidth; x++)
+ {
+ int color = *ptr++;
+@@ -399,7 +399,7 @@
+ for (uint32 y = 0; y < pheight; y++)
+ {
+ memmove (basetexbuffer + sizeof (uint16) * texture_size * y,
+- (GFX.Screen + (y + startl) * GFX.Pitch2) + startx,
++ (GFX.Screen + (y + startl) * GFX.Pitch) + startx,
+ sizeof (uint16) * texture_size);
+ }
+ data = basetexbuffer;
diff --git a/abs/extra/snes9x/snes9x.install b/abs/extra/snes9x/snes9x.install
new file mode 100755
index 0000000..1528f50
--- /dev/null
+++ b/abs/extra/snes9x/snes9x.install
@@ -0,0 +1,13 @@
+post_install() {
+ echo ">> If you wish to use Snes9x with OpenGL try osnes9x"
+ /bin/true
+}
+
+post_upgrade() {
+ echo ">> If you wish to use Snes9x with OpenGL try osnes9x"
+ /bin/true
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/speex/PKGBUILD b/abs/extra/speex/PKGBUILD
new file mode 100644
index 0000000..aac6749
--- /dev/null
+++ b/abs/extra/speex/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 7445 2008-08-02 03:05:20Z eduardo $
+# Contributer: Jason Chu <jason@archlinux.org>
+# Maintainer: Jason Chu <jason@archlinux.org>
+
+pkgname=speex
+pkgver=1.2rc1
+pkgrel=1
+pkgdesc="A free codec for free speech"
+arch=('i686' 'x86_64')
+license=('BSD')
+depends=('libogg')
+source=(http://downloads.us.xiph.org/releases/$pkgname/$pkgname-$pkgver.tar.gz)
+md5sums=('c4438b22c08e5811ff10e2b06ee9b9ae')
+url="http://www.speex.org/"
+
+build() {
+ cd $startdir/src/speex-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ #to fix kde detection
+ cp $startdir/pkg/usr/include/speex/* $startdir/pkg/usr/include/
+ #libtoolslay
+ find $startdir/pkg -name '*.la' -exec rm {} \;
+}
diff --git a/abs/extra/spidermonkey/PKGBUILD b/abs/extra/spidermonkey/PKGBUILD
new file mode 100644
index 0000000..3a44af3
--- /dev/null
+++ b/abs/extra/spidermonkey/PKGBUILD
@@ -0,0 +1,27 @@
+pkgname=spidermonkey
+pkgver=1.7.0
+pkgrel=2
+pkgdesc="Mozilla's C implementation of JavaScript."
+arch=("i686" "x86_64")
+url="http://www.mozilla.org/js/spidermonkey/"
+license=('MPL' 'GPL' 'LGPL')
+depends=('nspr')
+options=('!makeflags' 'force')
+source=("http://ftp.mozilla.org/pub/mozilla.org/js/js-$pkgver.tar.gz" \
+ "spidermonkey-1.7-threadsafe.patch" "header.patch")
+md5sums=('5571134c3863686b623ebe4e6b1f6fe6' 'b2ef9be017b6aa1857354b5223975a4f')
+
+build()
+{
+ cd $startdir/src/js/src
+ # fix for the lib location
+ [ "$CARCH" = "x86_64" ] && (sed -i -e "s:lib64:lib:g" config.mk || return 1)
+ # patch Makefile for threadsafe support with native nspr
+ patch -p2 -i $startdir/src/spidermonkey-1.7-threadsafe.patch || return 1
+ patch -p2 -i $startdir/src/header.patch || return 1
+ # build - threadsafe
+ make -f Makefile.ref BUILD_OPT=1 JS_THREADSAFE=1 DIST=$startdir/pkg/usr all export || return 1
+ # install
+ mkdir -p $startdir/pkg/usr/include/js
+ mv $startdir/pkg/usr/include/*.h $startdir/pkg/usr/include/js/
+}
diff --git a/abs/extra/spidermonkey/header.patch b/abs/extra/spidermonkey/header.patch
new file mode 100644
index 0000000..b69caae
--- /dev/null
+++ b/abs/extra/spidermonkey/header.patch
@@ -0,0 +1,12 @@
+diff -aur js.orig/src/Makefile.ref js/src/Makefile.ref
+--- js.orig/src/Makefile.ref 2008-07-18 21:05:37.154351682 +0800
++++ js/src/Makefile.ref 2008-07-18 21:06:39.291061725 +0800
+@@ -188,6 +188,8 @@
+ jsstr.h \
+ jsxdrapi.h \
+ jsxml.h \
++ jsutil.h \
++ jsprf.h \
+ $(NULL)
+
+ API_HFILES = \
diff --git a/abs/extra/spidermonkey/spidermonkey-1.7-threadsafe.patch b/abs/extra/spidermonkey/spidermonkey-1.7-threadsafe.patch
new file mode 100644
index 0000000..da6c78d
--- /dev/null
+++ b/abs/extra/spidermonkey/spidermonkey-1.7-threadsafe.patch
@@ -0,0 +1,16 @@
+--- js/src/Makefile.ref.orig 2008-05-28 19:51:32.000000000 -0400
++++ js/src/Makefile.ref 2008-05-28 19:52:17.000000000 -0400
+@@ -63,11 +63,11 @@
+
+ ifdef JS_THREADSAFE
+ DEFINES += -DJS_THREADSAFE
+-INCLUDES += -I$(DIST)/include/nspr
++INCLUDES += -I/usr/include/nspr
+ ifdef USE_MSVC
+ OTHER_LIBS += $(DIST)/lib/libnspr$(NSPR_LIBSUFFIX).lib
+ else
+-OTHER_LIBS += -L$(DIST)/lib -lnspr$(NSPR_LIBSUFFIX)
++OTHER_LIBS += -L/usr/$(LIBDIR)/nspr -lnspr${NSPR_LIBSUFFIX}
+ endif
+ endif
+
diff --git a/abs/extra/startup-notification/PKGBUILD b/abs/extra/startup-notification/PKGBUILD
new file mode 100644
index 0000000..0d65123
--- /dev/null
+++ b/abs/extra/startup-notification/PKGBUILD
@@ -0,0 +1,19 @@
+# $Id: PKGBUILD 21429 2008-12-13 03:30:02Z eric $
+# Maintainer: dorphell <dorphell@archlinux.org>
+pkgname=startup-notification
+pkgver=0.9
+pkgrel=1
+pkgdesc="Monitor and display application startup"
+arch=(i686 x86_64)
+depends=('libx11' 'libsm')
+options=('!libtool')
+url="http://www.freedesktop.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('624b42f1fac5a12c543a079e2cd3b366')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
diff --git a/abs/extra/strace/PKGBUILD b/abs/extra/strace/PKGBUILD
new file mode 100644
index 0000000..c965f24
--- /dev/null
+++ b/abs/extra/strace/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 13699 2008-09-27 22:25:37Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+pkgname=strace
+pkgver=4.5.18
+pkgrel=1
+pkgdesc="A useful diagnositic, instructional, and debugging tool"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://sourceforge.net/projects/strace/"
+depends=('glibc')
+source=(http://downloads.sourceforge.net/sourceforge/strace/strace-$pkgver.tar.bz2)
+md5sums=('e9449fcee97e6a8ed73934c883c870e0')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ install -Dm644 COPYRIGHT ${startdir}/pkg/usr/share/licenses/strace/COPYRIGHT
+}
diff --git a/abs/extra/strace/no_linux_socket_h.patch b/abs/extra/strace/no_linux_socket_h.patch
new file mode 100644
index 0000000..f1c3598
--- /dev/null
+++ b/abs/extra/strace/no_linux_socket_h.patch
@@ -0,0 +1,22 @@
+--- strace-4.5.12.orig/configure.ac
++++ strace-4.5.12/configure.ac
+@@ -193,8 +193,7 @@
+
+ AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname)
+ AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h], [], [])
+-AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
+- [], [], [#include <linux/socket.h>])
++AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h])
+ AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
+ AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
+
+--- strace-4.5.12.orig/configure
++++ strace-4.5.12/configure
+@@ -6945,7 +6945,6 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-#include <linux/socket.h>
+
+ #include <$ac_header>
+ _ACEOF
diff --git a/abs/extra/subversion/ChangeLog b/abs/extra/subversion/ChangeLog
new file mode 100644
index 0000000..369cb3b
--- /dev/null
+++ b/abs/extra/subversion/ChangeLog
@@ -0,0 +1,18 @@
+
+2008-10-10 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 1.5.3
+
+2008-09-04 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * 1.5.2: Finally updated for i686 as it does not break the
+ devtools.
+
+2008-08-13 Douglas Soares de Andrade <dsa@aur.archlinux.org>
+
+ * Updated for i686: 1.5.1
+
+2008-07-23 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 1.5.0
+
diff --git a/abs/extra/subversion/PKGBUILD b/abs/extra/subversion/PKGBUILD
new file mode 100644
index 0000000..4ad7460
--- /dev/null
+++ b/abs/extra/subversion/PKGBUILD
@@ -0,0 +1,90 @@
+# $Id: PKGBUILD 15639 2008-10-16 10:28:54Z douglas $
+# Contributer: Jason Chu <jason@archlinux.org>
+# Maintainer: Jason Chu <jason@archlinux.org>
+
+pkgname=subversion
+pkgver=1.5.3
+pkgrel=5
+pkgdesc="Replacement for CVS, another versioning system (svn)"
+arch=(i686 x86_64)
+license=('apache' 'bsd')
+depends=('neon>=0.28.2-2' 'apr-util>=1.3.2-2')
+makedepends=('heimdal>=1.2.1' 'db>=4.7' 'python>=2.5.2-4'
+ 'perl>=5.10.0-3' 'autoconf')
+source=(http://svn.collab.net/tarballs/${pkgname}-${pkgver}.tar.gz
+ svnserve svn svnserve.conf)
+
+md5sums=('37533b0435caaa3e4e1be359389fcbb9'
+ 'c5a2e490b3e58c6bd2ca3a2e72b71845'
+ 'a0db6dd43af33952739b6ec089852630'
+ 'c459e299192552f61578f3438abf0664')
+
+backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve')
+url="http://subversion.tigris.org/"
+provides=('svn')
+options=('!makeflags' 'libtool')
+
+md5sums=('6a57efcc9e487e9bffc554931c98d3a0'
+ 'c5a2e490b3e58c6bd2ca3a2e72b71845'
+ 'a0db6dd43af33952739b6ec089852630'
+ 'c459e299192552f61578f3438abf0664')
+
+build() {
+ cd $startdir/src/${pkgname}-${pkgver}
+
+
+ #patch -Np1 -i $startdir/src/subversion-neon.patch
+
+ #sed -e 's/\(NEON_ALLOWED_LIST=.* 0.26.4\)"/\1 0.27.2 0.28.0 0.28.1 0.28.2"/' -i configure.in
+
+# libtoolize --force --copy
+# aclocal -I build/ac-macros
+# autoconf
+
+ autoreconf
+ ./configure --prefix=/usr --with-apr=/usr --with-apr-util=/usr \
+ --with-zlib=/usr --with-neon=/usr --disable-ldap
+
+ (make external-all && make LT_LDFLAGS="-L$Fdestdir/usr/lib" local-all ) || return 1
+
+ export LD_LIBRARY_PATH=$startdir/pkg/usr/lib:$LD_LIBRARY_PATH
+ make DESTDIR=$startdir/pkg install || return 1
+
+# make DESTDIR=$startdir/pkg swig-py || return 1
+# make install-swig-py DESTDIR=$startdir/pkg || return 1
+
+ # mkdir -p $startdir/pkg/usr/lib/python2.5
+ # mv $startdir/pkg/usr/lib/svn-python/ $startdir/pkg/usr/lib/python2.5/site-packages
+
+
+ mkdir -p $startdir/pkg/usr/share/subversion
+ install -d -m 755 tools/hook-scripts $startdir/pkg/usr/share/subversion/
+ rm -f $startdir/pkg/usr/share/subversion/hook-scripts/*.in
+
+# make DESTDIR=$startdir/pkg swig-pl || return 1
+# make install-swig-pl DESTDIR=$startdir/pkg INSTALLDIRS=vendor || return 1
+ rm -f $startdir/pkg/usr/lib/perl5/vendor_perl/auto/SVN/_Core/.packlist
+ rm -rf $startdir/pkg/usr/lib/perl5/core_perl
+
+# make DESTDIR=$startdir/pkg swig-rb || return 1
+# make install-swig-rb DESTDIR=$startdir/pkg || return 1
+
+# make DESTDIR=$startdir/pkg javahl || return 1
+# make DESTDIR=$startdir/pkg install-javahl || return 1
+
+ mkdir -p $startdir/pkg/etc/rc.d
+ mkdir -p $startdir/pkg/etc/xinetd.d
+ mkdir -p $startdir/pkg/etc/conf.d
+
+ install -m 755 $startdir/src/svnserve $startdir/pkg/etc/rc.d
+ install -m 644 $startdir/src/svn $startdir/pkg/etc/xinetd.d
+ install -m 644 $startdir/src/svnserve.conf $startdir/pkg/etc/conf.d/svnserve
+ install -m 755 $startdir/src/subversion-$pkgver/contrib/client-side/svnmerge/svnmerge.py $startdir/pkg/usr/bin/svnmerge
+ install -D -m 644 $startdir/src/subversion-$pkgver/COPYING $startdir/pkg/usr/share/licenses/$pkgname/LICENSE
+
+ #libtoolslay not all because of kdesdk
+# find ${startdir}/pkg/usr/lib/httpd/modules -name '*.la' -exec rm {} \;
+# find ${startdir}/pkg/usr/lib/ruby -name '*.la' -exec rm {} \;
+# find ${startdir}/pkg/usr/lib/python2.5 -name '*.la' -exec rm {} \;
+}
+
diff --git a/abs/extra/subversion/subversion-neon.patch b/abs/extra/subversion/subversion-neon.patch
new file mode 100644
index 0000000..7dc23c5
--- /dev/null
+++ b/abs/extra/subversion/subversion-neon.patch
@@ -0,0 +1,62 @@
+Index: subversion-1.4.6/build/ac-macros/neon.m4
+===================================================================
+--- subversion-1.4.6.orig/build/ac-macros/neon.m4
++++ subversion-1.4.6/build/ac-macros/neon.m4
+@@ -50,14 +50,18 @@ AC_DEFUN(SVN_LIB_NEON,
+ NEON_VERSION=`cat $abs_srcdir/neon/.version`
+ AC_MSG_RESULT([$NEON_VERSION])
+
+- if test -n "`echo \"$NEON_VERSION\" | grep '^0\.2[[56]]\.'`" ; then
++ if test -n ["`echo "$NEON_VERSION" | grep '^0\.2[5-8]\.'`"] ; then
+ AC_DEFINE_UNQUOTED([SVN_NEON_0_25], [1],
+ [Define to 1 if you have Neon 0.25 or later.])
+ fi
+- if test -n "`echo \"$NEON_VERSION\" | grep '^0\.26\.'`" ; then
++ if test -n ["`echo "$NEON_VERSION" | grep '^0\.2[6-8]\.'`"] ; then
+ AC_DEFINE_UNQUOTED([SVN_NEON_0_26], [1],
+ [Define to 1 if you have Neon 0.26 or later.])
+ fi
++ if test -n ["`echo "$NEON_VERSION" | grep '^0\.2[7-8]\.'`"] ; then
++ AC_DEFINE_UNQUOTED([SVN_NEON_0_27], [1],
++ [Define to 1 if you have Neon 0.27 or later.])
++ fi
+
+ for svn_allowed_neon in $NEON_ALLOWED_LIST; do
+ if test "$NEON_VERSION" = "$svn_allowed_neon" ||
+@@ -127,14 +131,18 @@ AC_DEFUN(SVN_NEON_CONFIG,
+ NEON_VERSION=`$neon_config --version | sed -e 's/^neon //'`
+ AC_MSG_RESULT([$NEON_VERSION])
+
+- if test -n "`echo \"$NEON_VERSION\" | grep '^0\.2[[56]]\.'`" ; then
++ if test -n ["`echo "$NEON_VERSION" | grep '^0\.2[5-8]\.'`"] ; then
+ AC_DEFINE_UNQUOTED([SVN_NEON_0_25], [1],
+ [Define to 1 if you have Neon 0.25 or later.])
+ fi
+- if test -n "`echo \"$NEON_VERSION\" | grep '^0\.26\.'`" ; then
++ if test -n ["`echo "$NEON_VERSION" | grep '^0\.2[6-8]\.'`"] ; then
+ AC_DEFINE_UNQUOTED([SVN_NEON_0_26], [1],
+ [Define to 1 if you have Neon 0.26 or later.])
+ fi
++ if test -n ["`echo "$NEON_VERSION" | grep '^0\.2[7-8]\.'`"] ; then
++ AC_DEFINE_UNQUOTED([SVN_NEON_0_27], [1],
++ [Define to 1 if you have Neon 0.27 or later.])
++ fi
+
+ for svn_allowed_neon in $NEON_ALLOWED_LIST; do
+ if test "$NEON_VERSION" = "$svn_allowed_neon" ||
+Index: subversion-1.4.6/subversion/libsvn_ra_dav/session.c
+===================================================================
+--- subversion-1.4.6.orig/subversion/libsvn_ra_dav/session.c
++++ subversion-1.4.6/subversion/libsvn_ra_dav/session.c
+@@ -575,7 +575,11 @@ typedef struct neonprogress_baton_t
+ } neonprogress_baton_t;
+
+ static void
++#ifdef SVN_NEON_0_27
++ra_dav_neonprogress(void *baton, ne_off_t progress, ne_off_t total)
++#else
+ ra_dav_neonprogress(void *baton, off_t progress, off_t total)
++#endif /* SVN_NEON_0_27 */
+ {
+ const neonprogress_baton_t *neonprogress_baton = baton;
+ if (neonprogress_baton->progress_func)
diff --git a/abs/extra/subversion/svn b/abs/extra/subversion/svn
new file mode 100644
index 0000000..8988aaf
--- /dev/null
+++ b/abs/extra/subversion/svn
@@ -0,0 +1,11 @@
+service svn
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/bin/svnserve
+ server_args = -i
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/abs/extra/subversion/svnserve b/abs/extra/subversion/svnserve
new file mode 100755
index 0000000..2f433b6
--- /dev/null
+++ b/abs/extra/subversion/svnserve
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/svnserve
+
+PID=`pidof -o %PPID /usr/bin/svnserve`
+case "$1" in
+ start)
+ stat_busy "Starting svnserve"
+ if [ -z "$PID" ]; then
+ if [ -n "$SVNSERVE_USER" ]; then
+ su $SVNSERVE_USER -c "/usr/bin/svnserve -d $SVNSERVE_ARGS" &
+ else
+ /usr/bin/svnserve -d $SVNSERVE_ARGS &
+ fi
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon svnserve
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping svnserve"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon svnserve
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/abs/extra/subversion/svnserve.conf b/abs/extra/subversion/svnserve.conf
new file mode 100644
index 0000000..37fb7ea
--- /dev/null
+++ b/abs/extra/subversion/svnserve.conf
@@ -0,0 +1,7 @@
+#
+# Parameters to be passed to svnserve
+#
+#SVNSERVE_ARGS="-r /path/to/some/repos"
+SVNSERVE_ARGS=""
+
+#SVNSERVE_USER="svn"
diff --git a/abs/extra/swh-plugins/PKGBUILD b/abs/extra/swh-plugins/PKGBUILD
new file mode 100644
index 0000000..69157a1
--- /dev/null
+++ b/abs/extra/swh-plugins/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 8773 2008-08-16 05:51:00Z eric $
+#Maintainer: Damir Perisa <damir.perisa@bluewin.ch>
+#Contributor: Robert Emil Berge
+
+pkgname=swh-plugins
+pkgver=0.4.15
+pkgrel=1
+pkgdesc="LADSPA Plugin-Collection from plugin.org.uk"
+arch=(i686 x86_64)
+url="http://plugin.org.uk/"
+depends=('fftw' 'ladspa')
+groups=('ladspa-plugins')
+source=(http://plugin.org.uk/releases/$pkgver/$pkgname-$pkgver.tar.gz)
+md5sums=('2fbdccef2462ea553901acd429fa3573')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+
+#Arch64 fix, -fPIC seems to be the only option
+if [ "$CARCH" = "x86_64" ]; then
+ export CFLAGS="$CFLAGS -fPIC"
+ export CXXFLAGS="$CFLAGS"
+fi
+
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/swig/PKGBUILD b/abs/extra/swig/PKGBUILD
new file mode 100644
index 0000000..e40f539
--- /dev/null
+++ b/abs/extra/swig/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 14415 2008-10-06 08:59:13Z douglas $
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Maintainer: Jason Chu <jason@archlinux.org>
+
+pkgname=swig
+pkgver=1.3.36
+pkgrel=1
+pkgdesc="SWIG is a compiler that makes it easy to integrate C and C++ code with scripting languages"
+arch=('i686' 'x86_64')
+license=('custom')
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
+url="http://www.swig.org/"
+depends=('gcc' 'guile')
+
+md5sums=('8f30aa4130b62404099bbcba1bf429b1')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ install -D -m644 LICENSE ${startdir}/pkg/usr/share/licenses/swig/license.txt
+}
diff --git a/abs/extra/sysstat/PKGBUILD b/abs/extra/sysstat/PKGBUILD
new file mode 100644
index 0000000..12f5afe
--- /dev/null
+++ b/abs/extra/sysstat/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD,v 1.24 2009/05/25 09:04:21 sergej Exp $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Martin Devera <devik@cdi.cz>
+
+pkgname=sysstat
+pkgver=9.0.3
+pkgrel=1
+pkgdesc="A collection of performance monitoring tools"
+arch=('i686' 'x86_64')
+url="http://pagesperso-orange.fr/sebastien.godard/"
+license=('GPL')
+depends=(glibc)
+options=(zipman)
+source=(http://pagesperso-orange.fr/sebastien.godard/$pkgname-$pkgver.tar.gz
+ sysstat)
+md5sums=('0b464951596db934418259737cf50a31'
+ 'ad46159609a2c13b4a46b506ff847bf6')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-install-isag \
+ --disable-man-group
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+
+ install -D -m 644 sysstat.sysconfig $pkgdir/etc/sysstat/sysstat && \
+ install -D -m 744 sysstat.cron.hourly $pkgdir/etc/cron.hourly/sysstat && \
+ install -D -m 744 sysstat.cron.daily $pkgdir/etc/cron.daily/sysstat && \
+ install -D -m 755 $srcdir/sysstat $pkgdir/etc/rc.d/sysstat || return 1
+
+ chown -R root:root $pkgdir
+}
diff --git a/abs/extra/sysstat/sysstat b/abs/extra/sysstat/sysstat
new file mode 100644
index 0000000..d8e312a
--- /dev/null
+++ b/abs/extra/sysstat/sysstat
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Writing SysStat restart record"
+ /usr/lib/sa/sadc -L -F -
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ ;;
+ stop)
+ ;;
+ *)
+ echo "usage: $0 {start|stop}"
+esac
+exit 0
diff --git a/abs/extra/tablet-encode/PKGBUILD b/abs/extra/tablet-encode/PKGBUILD
new file mode 100644
index 0000000..0163f45
--- /dev/null
+++ b/abs/extra/tablet-encode/PKGBUILD
@@ -0,0 +1,20 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=tablet-encode
+pkgver=2.20
+pkgrel=1
+pkgdesc="Transcodes videos for playback on a Nokia Internet Tablet"
+arch=('i686' 'x86_64')
+license=('ARTISTIC')
+depends=(mplayer)
+url="http://mediautils.garage.maemo.org/tablet-encode.html"
+source=(https://garage.maemo.org/frs/download.php/4547/tablet-encode-2.20.tar.gz)
+
+build() {
+ cd ${srcdir}/$pkgname-$pkgver
+ mkdir -p $startdir/pkg/usr/bin
+ mkdir -p $startdir/pkg/usr/share/doc/tablet-encode
+ install -D -m755 tablet-encode $startdir/pkg/usr/bin
+ cp README.txt $startdir/pkg/usr/share/doc/tablet-encode
+}
diff --git a/abs/extra/tango-icon-theme/PKGBUILD b/abs/extra/tango-icon-theme/PKGBUILD
new file mode 100644
index 0000000..21ec4e8
--- /dev/null
+++ b/abs/extra/tango-icon-theme/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: James Rayner <james@archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+pkgname=tango-icon-theme
+pkgver=0.8.1
+pkgrel=2
+pkgdesc="The Tango Desktop Project exists to create a consistent user experience"
+arch=('i686' 'x86_64')
+url="http://tango.freedesktop.org"
+license="CCPL-Attribution-ShareAlike-2.5"
+depends=('librsvg')
+makedepends=('imagemagick' 'icon-naming-utils')
+source=(http://tango.freedesktop.org/releases/$pkgname-$pkgver.tar.gz)
+md5sums=('32d5258f448b5982af9cfa4364f31d41')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr --enable-png-creation
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+
+ install -D COPYING $startdir/pkg/usr/share/licenses/$pkgname/COPYING
+}
diff --git a/abs/extra/tatir/PKGBUILD b/abs/extra/tatir/PKGBUILD
new file mode 100644
index 0000000..e9d8ab2
--- /dev/null
+++ b/abs/extra/tatir/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=tatir
+pkgver=1
+pkgrel=4
+pkgdesc="TatIR, the Linux media remote control."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://tatir.dropthetranny.com/"
+depends=('pyusb' 'xautomation')
+source=('tatir.tar.bz2')
+install=tatir.install
+build() {
+ mkdir -p $pkgdir/usr/bin
+ mkdir -p $pkgdir/etc/tatir
+# mkdir -p $pkgdir/etc/sv/tatir/supervise
+ cp *.py $pkgdir/usr/bin
+ cp remote_xte.conf $pkgdir/etc/tatir/
+# cp run $pkgdir/etc/sv/tatir/
+}
diff --git a/abs/extra/tatir/tatir.install b/abs/extra/tatir/tatir.install
new file mode 100644
index 0000000..aef470a
--- /dev/null
+++ b/abs/extra/tatir/tatir.install
@@ -0,0 +1,19 @@
+# arg 1: the new package version
+post_install() {
+# add_service.sh tatir
+ /bin/true
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ remove_service.sh tatir
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/tatir/tatir.tar.bz2 b/abs/extra/tatir/tatir.tar.bz2
new file mode 100644
index 0000000..1a16a46
--- /dev/null
+++ b/abs/extra/tatir/tatir.tar.bz2
Binary files differ
diff --git a/abs/extra/terminal/PKGBUILD b/abs/extra/terminal/PKGBUILD
new file mode 100644
index 0000000..857696e
--- /dev/null
+++ b/abs/extra/terminal/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 28221 2009-02-28 11:48:48Z andyrtr $
+# Maintainer: Tobias Kieslich <tobias funnychar archlinux.org>
+# Contributor: Aurelien Foret <orelien@chez.com>
+
+pkgname=terminal
+pkgver=0.2.10
+pkgrel=1
+pkgdesc="A modern terminal emulator primarly for the Xfce desktop environment"
+arch=(i686 x86_64)
+license=('GPL2')
+url="http://www.xfce.org/projects/terminal/"
+groups=('xfce4')
+depends=('exo>=0.3.100' "vte>=0.17.4-2" 'dbus-glib>=0.78'
+ 'startup-notification>=0.9' 'hicolor-icon-theme')
+makedepends=('pkgconfig')
+options=('!libtool')
+install=terminal.install
+source=(http://www.xfce.org/archive/xfce-4.6.0/src/Terminal-${pkgver}.tar.bz2
+ terminal-dont-die-on-dbus-kill.patch)
+md5sums=('f6cefa97cf5cad558187267783ffce8a'
+ '7cff5c513739737a0ed2109354538241')
+
+build() {
+ cd ${srcdir}/Terminal-${pkgver}
+ patch -Np0 -i ${srcdir}/terminal-dont-die-on-dbus-kill.patch || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/xfce4 \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+}
diff --git a/abs/extra/terminal/terminal-dont-die-on-dbus-kill.patch b/abs/extra/terminal/terminal-dont-die-on-dbus-kill.patch
new file mode 100644
index 0000000..e20e45c
--- /dev/null
+++ b/abs/extra/terminal/terminal-dont-die-on-dbus-kill.patch
@@ -0,0 +1,10 @@
+--- terminal/terminal-dbus.c.orig 2007-01-23 22:25:12.000000000 +0000
++++ terminal/terminal-dbus.c 2007-01-23 22:25:50.000000000 +0000
+@@ -191,6 +191,7 @@ terminal_dbus_register_service (Terminal
+
+ /* register DBus connection with GLib main loop */
+ dbus_connection_setup_with_g_main (connection, NULL);
++ dbus_connection_set_exit_on_disconnect (connection, FALSE);
+
+ if (dbus_bus_request_name (connection, TERMINAL_DBUS_SERVICE, 0, &derror) < 0)
+ {
diff --git a/abs/extra/terminal/terminal.install b/abs/extra/terminal/terminal.install
new file mode 100644
index 0000000..21b79d2
--- /dev/null
+++ b/abs/extra/terminal/terminal.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
diff --git a/abs/extra/thunar/PKGBUILD b/abs/extra/thunar/PKGBUILD
new file mode 100644
index 0000000..8086857
--- /dev/null
+++ b/abs/extra/thunar/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 28211 2009-02-28 11:12:20Z andyrtr $
+# Maintainer: tobias <tobias funnychar archlinux.org>
+# Contributor: Andrew Simmons <andrew.simmons@gmail.com>
+
+pkgname=thunar
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="new modern file manager for Xfce"
+arch=(i686 x86_64)
+license=('GPL2' 'LGPL2')
+url="http://thunar.xfce.org"
+groups=('xfce4')
+depends=('libexif>=0.6.17' 'hicolor-icon-theme' 'tango-icon-theme' )
+makedepends=('intltool' 'pkgconfig')
+optdepends=('gamin: a fam replacement to make thunar monitor changes to files on the fly')
+options=('!libtool')
+install=${pkgname}.install
+source=(http://www.xfce.org/archive/xfce-4.6.0/src/Thunar-${pkgver}.tar.bz2)
+md5sums=('468c240a4f65a217ec2b6132e85cd84e')
+
+build() {
+ cd ${srcdir}/Thunar-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
+ --localstatedir=/var --disable-static \
+ --disable-gnome-thumbnailers --enable-exif --enable-pcre --disable-fam
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ sed -i 's:x-directory/gnome-default-handler;::' \
+ ${pkgdir}/usr/share/applications/Thunar-folder-handler.desktop
+}
diff --git a/abs/extra/thunar/__changelog b/abs/extra/thunar/__changelog
new file mode 100644
index 0000000..630ddfa
--- /dev/null
+++ b/abs/extra/thunar/__changelog
@@ -0,0 +1 @@
+remove dep for desktop-file-utils
diff --git a/abs/extra/thunar/thunar.install b/abs/extra/thunar/thunar.install
new file mode 100644
index 0000000..28fdb48
--- /dev/null
+++ b/abs/extra/thunar/thunar.install
@@ -0,0 +1,14 @@
+post_install() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
diff --git a/abs/extra/tightvnc/PKGBUILD b/abs/extra/tightvnc/PKGBUILD
new file mode 100644
index 0000000..a9d5efe
--- /dev/null
+++ b/abs/extra/tightvnc/PKGBUILD
@@ -0,0 +1,35 @@
+
+pkgname=tightvnc
+pkgver=1.3.9
+pkgrel=302
+pkgdesc="VNC Unix server && viewer"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.tightvnc.com"
+depends=('libjpeg' 'zlib' 'libxaw' 'libxp')
+makedepends=('imake')
+conflicts=('vnc')
+source=(http://easynews.dl.sf.net/sourceforge/vnc-tight/$pkgname-${pkgver}_unixsrc.tar.bz2 tightvnc-fontpath-xcolors.patch)
+
+
+build() {
+ export MAKEFLAGS="-j1"
+ cd $startdir/src/vnc_unixsrc || return 1
+ patch -Np1 -i ../tightvnc-fontpath-xcolors.patch || return 1
+
+ xmkmf || return 1
+ make World || return 1
+ cd Xvnc || return 1
+ ./configure || return 1
+ sed 's|PROTO_DEFINES =|PROTO_DEFINES = -D_XOPEN_SOURCE=500L|' \
+ -i programs/Xserver/os/Makefile lib/font/fc/Makefile || return 1
+ make || return 1
+ cd .. || return 1
+ mkdir -p $startdir/pkg/usr/bin $startdir/pkg/usr/man/man1 || return 1
+ ./vncinstall $startdir/pkg/usr/bin $startdir/pkg/usr/man || return 1
+
+ # install java classes
+ mkdir -p $startdir/pkg/usr/share/vnc/classes || return 1
+ install -D -m644 $startdir/src/vnc_unixsrc/classes/* \
+ $startdir/pkg/usr/share/vnc/classes || return 1
+}
diff --git a/abs/extra/tightvnc/tightvnc-fontpath-xcolors.patch b/abs/extra/tightvnc/tightvnc-fontpath-xcolors.patch
new file mode 100644
index 0000000..9e44835
--- /dev/null
+++ b/abs/extra/tightvnc/tightvnc-fontpath-xcolors.patch
@@ -0,0 +1,21 @@
+diff -urN vnc_unixsrc/vncserver vnc_unixsrc.fixed/vncserver
+--- vnc_unixsrc/vncserver 2007-04-26 06:57:06.000000000 -0400
++++ vnc_unixsrc.fixed/vncserver 2007-06-17 19:08:02.000000000 -0400
+@@ -38,14 +38,14 @@
+ $desktopName = "X";
+ $vncClasses = "/usr/local/vnc/classes";
+ $vncUserDir = "$ENV{HOME}/.vnc";
+-$fontPath = "unix/:7100";
++#$fontPath = "unix/:7100";
+ $authType = "-rfbauth $vncUserDir/passwd";
+
+ # Here is another example of setting the font path:
+-# $fontPath = "/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/";
++$fontPath = "/usr/share/fonts/misc/,/usr/share/fonts/75dpi/,/usr/share/fonts/100dpi/,/usr/share/fonts/Type1/";
+
+ # X colors database path is optional, uncomment and edit to use:
+-# $colorPath = "/usr/lib/X11/rgb";
++$colorPath = "/usr/share/X11/rgb";
+
+ # You might wish to make your vnc directory under /tmp, to make sure
+ # passwords are always kept on the local filesystem. To do that, just
diff --git a/abs/extra/tree/PKGBUILD b/abs/extra/tree/PKGBUILD
new file mode 100644
index 0000000..8a26dbf
--- /dev/null
+++ b/abs/extra/tree/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 13718 2008-09-27 22:49:14Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+#
+
+pkgname=tree
+pkgver=1.5.2.1
+pkgrel=2
+pkgdesc="A directory listing program displaying a depth indented list of files"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('glibc')
+source=(ftp://mama.indstate.edu/linux/tree/$pkgname-$pkgver.tgz)
+md5sums=('73d5fa220dfef1ee9c1876c3966f1c18')
+url="http://mama.indstate.edu/users/ice/tree/"
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ make || return 1
+ make prefix=$startdir/pkg/usr MANDIR=$startdir/pkg/usr/share/man/man1 install
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/abs/extra/ttf-ms-fonts/PKGBUILD b/abs/extra/ttf-ms-fonts/PKGBUILD
new file mode 100644
index 0000000..00fd09d
--- /dev/null
+++ b/abs/extra/ttf-ms-fonts/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: dale <dale@archlinux.org>
+pkgname=ttf-ms-fonts
+pkgver=2.0
+pkgrel=1
+pkgdesc="Un-extracted TTF Fonts from Microsoft"
+arch=(i686 x86_64)
+url="http://corefonts.sourceforge.net/"
+sfpath="http://heanet.dl.sourceforge.net/sourceforge/corefonts/"
+depends=(cabextract xorg-fonts-encodings xorg-font-utils fontconfig)
+install=ttf-ms-fonts.install
+source=($sfpath/andale32.exe $sfpath/arial32.exe $sfpath/arialb32.exe \
+ $sfpath/comic32.exe $sfpath/courie32.exe $sfpath/georgi32.exe \
+ $sfpath/impact32.exe $sfpath/times32.exe $sfpath/trebuc32.exe \
+ $sfpath/verdan32.exe $sfpath/webdin32.exe $sfpath/wd97vwr32.exe)
+md5sums=('cbdc2fdd7d2ed0832795e86a8b9ee19a' '9637df0e91703179f0723ec095a36cb5'\
+ 'c9089ae0c3b3d0d8c4b0a95979bb9ff0' '2b30de40bb5e803a0452c7715fc835d1'\
+ '4e412c772294403ab62fb2d247d85c60' '4d90016026e2da447593b41a8d8fa8bd'\
+ '7907c7dd6684e9bade91cff82683d9d7' 'ed39c8ef91b9fb80f76f702568291bd5'\
+ '0d7ea16cac6261f8513a061fbfcdb2b5' '12d2a75f8156e10607be1eaa8e8ef120'\
+ '230a1d13a365b22815f502eb24d9149b' 'efa72d3ed0120a07326ce02f051e9b42')
+
+build() {
+ mkdir -p $startdir/pkg/tmp/${pkgname}
+ chmod 1777 $startdir/pkg/tmp
+ install -m644 $startdir/src/*.exe $startdir/pkg/tmp/$pkgname
+}
diff --git a/abs/extra/ttf-ms-fonts/ttf-ms-fonts.install b/abs/extra/ttf-ms-fonts/ttf-ms-fonts.install
new file mode 100644
index 0000000..043cd88
--- /dev/null
+++ b/abs/extra/ttf-ms-fonts/ttf-ms-fonts.install
@@ -0,0 +1,55 @@
+# arg 1: the new package version
+post_install() {
+ echo -n "extracting fonts... "
+ for font in tmp/ttf-ms-fonts/*.exe
+ do
+ cabextract --lowercase --directory=tmp/ttf-ms-fonts/ $font -F '*.ttf' >/dev/null 2>&1
+ done
+ cabextract --lowercase --directory=tmp/ttf-ms-fonts/ tmp/ttf-ms-fonts/wd97vwr32.exe -F '*.cab' >/dev/null 2>&1
+ cabextract --lowercase --directory=tmp/ttf-ms-fonts/ tmp/ttf-ms-fonts/viewer1.cab -F '*.ttf' >/dev/null 2>&1
+ mkdir -p usr/share/fonts/TTF
+ : >usr/share/fonts/TTF/msfonts.txt
+ for i in `/bin/ls tmp/ttf-ms-fonts/*.ttf`; do
+ echo `basename $i` >>usr/share/fonts/TTF/msfonts.txt
+ cp $i usr/share/fonts/TTF
+ done
+ echo "done."
+ echo -n "rebuilding font cache... "
+ fc-cache -f > /dev/null
+ mkfontscale /usr/share/fonts/TTF
+ mkfontdir /usr/share/fonts/TTF
+ echo "done."
+ rm -rf tmp/ttf-ms-fonts
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ # remove fonts from their old location
+ rm -rf usr/X11R6/lib/X11/fonts/ttf-ms-fonts
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ #rm -f usr/X11R6/lib/X11/fonts/TTF/
+ [ -f usr/share/fonts/TTF/msfonts.txt ] || return
+ for i in `cat usr/share/fonts/TTF/msfonts.txt`; do
+ rm -f usr/share/fonts/TTF/$i
+ done
+ rm -f usr/share/fonts/TTF/msfonts.txt
+}
+
+# arg 1: the old package version
+post_remove() {
+ echo -n "rebuilding font cache... "
+ fc-cache -f > /dev/null
+ mkfontscale /usr/share/fonts/TTF
+ mkfontdir /usr/share/fonts/TTF
+ echo "done."
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/extra/unison/PKGBUILD b/abs/extra/unison/PKGBUILD
new file mode 100644
index 0000000..b1efa5b
--- /dev/null
+++ b/abs/extra/unison/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+#Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=unison
+pkgver=2.27.57
+pkgrel=1
+pkgdesc="Unison is a file-synchronization tool"
+arch=(i686 x86_64)
+license=('GPL2')
+url="http://www.cis.upenn.edu/~bcpierce/unison"
+depends=('glibc')
+#makedepends=('ocaml' 'lablgtk' 'lablgtk2' 'imagemagick')
+makedepends=('ocaml' )
+source=(http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/$pkgname-$pkgver.tar.gz \
+ $pkgname.desktop)
+options=(!makeflags)
+install=unison.install
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ CFLAGS=""
+ make clean
+ make UISTYLE=text DEBUGGING=false THREADS=true || return 1
+ mkdir -p $startdir/pkg/usr/bin
+ install -Dm755 unison $startdir/pkg/usr/bin/unison
+}
+md5sums=('4ba0a3e4bf4b4ad0c063f86391371f78'
+ '2daecba7705455a8e4b769e48b059872')
diff --git a/abs/extra/unison/ocaml-3.08-extnames.patch b/abs/extra/unison/ocaml-3.08-extnames.patch
new file mode 100644
index 0000000..e959be2
--- /dev/null
+++ b/abs/extra/unison/ocaml-3.08-extnames.patch
@@ -0,0 +1,14 @@
+diff -ur unison-2.9.1/ubase/uprintf.ml unison-2.9.1.patched/ubase/uprintf.ml
+--- unison-2.9.1/ubase/uprintf.ml 2002-04-11 07:13:23.000000000 +0200
++++ unison-2.9.1.patched/ubase/uprintf.ml 2004-08-08 14:10:09.784776851 +0200
+@@ -10,8 +10,8 @@
+ (* *)
+ (***********************************************************************)
+
+-external format_int: string -> int -> string = "format_int"
+-external format_float: string -> float -> string = "format_float"
++external format_int: string -> int -> string = "caml_format_int"
++external format_float: string -> float -> string = "caml_format_float"
+
+ let fprintf outchan doafter format =
+ let format = (Obj.magic format : string) in
diff --git a/abs/extra/unison/unison.desktop b/abs/extra/unison/unison.desktop
new file mode 100644
index 0000000..3a7e1d7
--- /dev/null
+++ b/abs/extra/unison/unison.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=unison
+Name[de]=unison
+Comment=File synchronisation tool for X11
+Comment[de]=Datei Abgleicher und Synchronisierer
+TryExec=unison-x11
+Exec=unison-x11
+Terminal=false
+Type=Application
+Categories=GTK;Application;Network;
+Icon=unison.png
+StartupNotify=true
diff --git a/abs/extra/unison/unison.install b/abs/extra/unison/unison.install
new file mode 100644
index 0000000..70e70b0
--- /dev/null
+++ b/abs/extra/unison/unison.install
@@ -0,0 +1,32 @@
+# arg 1: the new package version
+post_install() {
+ echo "NOTE:"
+ echo " For gtk1 frontend please add 'gtk' package."
+ echo " For gtk2 frontend please add 'gtk2' package."
+ echo " Default X11 frontend is set to gtk2. "
+ echo ""
+ echo " If you want to default to gtk1 unison:"
+ echo " 'rm /usr/bin/unison-x11'"
+ echo " 'ln -s /usr/bin/unison-gtk /usr/bin/unison-x11'"
+ echo ""
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/unixodbc/PKGBUILD b/abs/extra/unixodbc/PKGBUILD
new file mode 100644
index 0000000..b8c2690
--- /dev/null
+++ b/abs/extra/unixodbc/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 9389 2008-08-17 06:44:49Z allan $
+# Maintainer: Judd Vinet <jvinet@zeroflux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=unixodbc
+pkgver=2.2.12
+pkgrel=2
+pkgdesc="ODBC is an open specification for providing application developers with a predictable API with which to access Data Sources"
+arch=(i686 x86_64)
+license=('GPL2')
+url="http://www.unixodbc.org/"
+backup=('etc/odbc.ini' 'etc/odbcinst.ini')
+depends=('readline')
+source=(http://www.unixodbc.org/unixODBC-$pkgver.tar.gz)
+md5sums=('9a116aad4059c31d231b626ffdf1869a')
+
+build() {
+ cd $startdir/src/unixODBC-$pkgver
+ sed -i 's/YY_FLUSH_BUFFER/yy_flush_buffer(YY_CURRENT_BUFFER)/' sqp/lex.l
+ ./configure --prefix=/usr --sysconfdir=/etc --enable-gui=no
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ find $startdir/pkg -name '*.la' -exec rm {} \;
+}
diff --git a/abs/extra/v4l-dvb-dvico2/PKGBUILD b/abs/extra/v4l-dvb-dvico2/PKGBUILD
new file mode 100644
index 0000000..4886027
--- /dev/null
+++ b/abs/extra/v4l-dvb-dvico2/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=v4l-dvb-dvico2
+_kernver=2.6.28-ARCH
+pkgver=1
+pkgrel=1
+pkgdesc="V4L-DVB drivers from mercurial for some dvico cards."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://linuxtv.org/"
+depends=('kernel26')
+makedepends=(kernel-headers)
+install=v4l-dvb.install
+source=(http://linuxtv.org/hg/v4l-dvb/archive/401393656ebc.tar.bz2)
+
+build() {
+ cd $startdir/src/v4l*
+ make KERNDIR=/lib/modules/$_kernver/build \
+ DESTDIR=$startdir/pkg KERNELRELEASE=$_kernver all || return 1
+ make KERNDIR=/lib/modules/$_kernver/build \
+ DESTDIR=$startdir/pkg KERNELRELEASE=$_kernver install || return 1
+ rm -fr $startdir/pkg/lib/modules/$_kernver/modules*
+}
diff --git a/abs/extra/v4l-dvb-dvico2/fix-jdelvare-i2c-i2c-constify-client-address-data.patch b/abs/extra/v4l-dvb-dvico2/fix-jdelvare-i2c-i2c-constify-client-address-data.patch
new file mode 100644
index 0000000..8c603f6
--- /dev/null
+++ b/abs/extra/v4l-dvb-dvico2/fix-jdelvare-i2c-i2c-constify-client-address-data.patch
@@ -0,0 +1,25 @@
+From: Andrew Morton <akpm@linux-foundation.org>
+
+drivers/media/video/tvaudio.c:147: error: conflicting type qualifiers for 'addr_data'
+include/media/v4l2-i2c-drv-legacy.h:37: error: previous declaration of 'addr_data' was here
+
+Cc: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+
+ include/media/v4l2-i2c-drv-legacy.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff -puN include/media/v4l2-i2c-drv-legacy.h~fix-jdelvare-i2c-i2c-constify-client-address-data include/media/v4l2-i2c-drv-legacy.h
+--- a/include/media/v4l2-i2c-drv-legacy.h~fix-jdelvare-i2c-i2c-constify-client-address-data
++++ a/include/media/v4l2-i2c-drv-legacy.h
+@@ -34,7 +34,7 @@ struct v4l2_i2c_driver_data {
+ };
+
+ static struct v4l2_i2c_driver_data v4l2_i2c_data;
+-static struct i2c_client_address_data addr_data;
++static const struct i2c_client_address_data addr_data;
+ static struct i2c_driver v4l2_i2c_driver_legacy;
+ static char v4l2_i2c_drv_name_legacy[32];
+
+_
diff --git a/abs/extra/v4l-dvb-dvico2/v4l-dvb.install b/abs/extra/v4l-dvb-dvico2/v4l-dvb.install
new file mode 100644
index 0000000..c87bb82
--- /dev/null
+++ b/abs/extra/v4l-dvb-dvico2/v4l-dvb.install
@@ -0,0 +1,23 @@
+# arg 1: the new package version
+post_install() {
+ KERNEL_VERSION='2.6.26-ARCH'
+ depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ KERNEL_VERSION='2.6.26-ARCH'
+ depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1
+
+}
+
+# arg 1: the old package version
+post_remove() {
+ KERNEL_VERSION='2.6.26-ARCH'
+ depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/v4l-dvb-dvico2/xc-bluebird.patch b/abs/extra/v4l-dvb-dvico2/xc-bluebird.patch
new file mode 100644
index 0000000..c54594d
--- /dev/null
+++ b/abs/extra/v4l-dvb-dvico2/xc-bluebird.patch
@@ -0,0 +1,896 @@
+[PATCH] Add support for FusionHDTV DVB-T NANO 2 / Dual Digital 4
+
+Firmware required:
+
+Mirror 1: http://konstantin.filtschew.de/v4l-firmware/
+
+Mirror 2: http://www.tuxamito.com.es/em2880/
+
+This patch is for users, and NOT meant to be merged into the kernel.
+
+For AU support, apply Rogers patch afterwards:
+http://linuxtv.org/~mkrufky/pending/xc/dd4.au.patch
+
+From: Michael Krufky <mkrufky@linuxtv.org>
+---
+ linux/drivers/media/dvb/dvb-usb/cxusb.c | 157 +++++++
+ linux/drivers/media/dvb/dvb-usb/cxusb.h | 2
+ linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 2
+ linux/drivers/media/dvb/frontends/Kconfig | 7
+ linux/drivers/media/dvb/frontends/Makefile | 1
+ linux/drivers/media/dvb/frontends/xc3028-fe.c | 532 ++++++++++++++++++++++++++
+ linux/drivers/media/dvb/frontends/xc3028.h | 56 ++
+ v4l/versions.txt | 1
+ 8 files changed, 757 insertions(+), 1 deletion(-)
+
+--- v4l-dvb.orig/linux/drivers/media/dvb/dvb-usb/cxusb.c
++++ v4l-dvb/linux/drivers/media/dvb/dvb-usb/cxusb.c
+@@ -30,6 +30,7 @@
+ #include "mt352.h"
+ #include "mt352_priv.h"
+ #include "zl10353.h"
++#include "xc3028.h"
+
+ /* debug */
+ int dvb_usb_cxusb_debug;
+@@ -72,6 +73,28 @@
+ st->gpio_write_state[GPIO_TUNER] = onoff;
+ }
+
++static void cxusb_bluebird_gpio(struct dvb_usb_device *d, u8 pin)
++{
++ u8 o[2],i;
++
++ o[0] = 0xff & ~pin;
++ o[1] = 0x00;
++
++ cxusb_ctrl_msg(d, CMD_BLUEBIRD_GPIO_WRITE, o, 2, &i, 1);
++ msleep(140);
++
++ if ((i & pin) != 0x00)
++ deb_info("gpio_write failed.\n");
++
++ o[1] = pin;
++
++ cxusb_ctrl_msg(d, CMD_BLUEBIRD_GPIO_WRITE, o, 2, &i, 1);
++ msleep(140);
++
++ if ((i & pin) != pin)
++ deb_info("gpio_write failed.\n");
++}
++
+ /* I2C */
+ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
+ int num)
+@@ -351,6 +374,64 @@
+ .demod_init = cxusb_mt352_demod_init,
+ };
+
++static struct zl10353_config cxusb_zl10353_dualdig4_config = {
++ .demod_address = 0x0f,
++ .no_tuner = 1,
++ .parallel_ts = 1,
++};
++
++struct bcode {
++ int reg;
++ char *txt;
++ int len;
++ int delay;
++};
++
++static int cxusb_xc3028_zl353_gpio_reset(struct dvb_frontend* fe, int ptr)
++{
++ struct dvb_usb_adapter *adap = fe->dvb->priv;
++ struct dvb_usb_device *d = adap->dev;
++ int j;
++ struct bcode zlconf[] = {
++ /* borrowed from em2880-dvb
++ * this should be fixed in zl10353.c instead */
++ {0x1e,"\x60\x00",2,0},
++ {0x1e,"\x61\x4d",2,0},
++
++ {0x1e,"\x50\x0b",2,0},
++ {0x1e,"\x51\x44",2,0},
++ {0x1e,"\x52\x46",2,0},
++ {0x1e,"\x53\x15",2,0},
++ {0x1e,"\x54\x0f",2,0},
++ {0x1e,"\x5e\x00",2,0},
++ {0x1e,"\x5f\x12",2,0},
++
++
++ {0x1e,"\x55\x80",2,0}, /* reset */
++ {0x1e,"\xea\x01",2,0},
++ {0x1e,"\xea\x00",2,0},
++ {0x1e,"\x5a\xcd",2,0},
++
++
++ {0x1e,"\x6c\xe6",2,0}, // set input frequency
++ {0x1e,"\x6d\x09",2,0},
++ {}
++ };
++
++ if (ptr == 0 || ptr == 1)
++ /* pulse the GPIO tuner reset pin */
++ cxusb_bluebird_gpio(d,0x01);
++ else if (ptr == 2)
++ for(j = 0; zlconf[j].txt; j++)
++ d->adapter[0].fe->ops.write(d->adapter[0].fe, zlconf[j].txt,zlconf[j].len);
++
++ return 0;
++}
++
++static struct xc3028_config cxusb_xc3028_config = {
++ .gpio_reset = cxusb_xc3028_zl353_gpio_reset,
++};
++
+ /* Callbacks for DVB USB */
+ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap)
+ {
+@@ -386,6 +467,12 @@
+ return 0;
+ }
+
++static int cxusb_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
++{
++ dvb_attach(xc3028_attach,adap->fe, &adap->dev->i2c_adap, &cxusb_xc3028_config);
++ return 0;
++}
++
+ static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap)
+ {
+ u8 b;
+@@ -401,6 +488,24 @@
+ return -EIO;
+ }
+
++static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap)
++{
++ if (usb_set_interface(adap->dev->udev, 0, 1) < 0)
++ err("set interface failed");
++
++ cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0);
++
++ /* pulse the GPIO demod reset pin */
++ cxusb_bluebird_gpio(adap->dev,0x02);
++
++ if ((adap->fe = dvb_attach(zl10353_attach,
++ &cxusb_zl10353_dualdig4_config,
++ &adap->dev->i2c_adap)) != NULL)
++ return 0;
++
++ return -EIO;
++}
++
+ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap)
+ {
+ if (usb_set_interface(adap->dev->udev, 0, 7) < 0)
+@@ -479,6 +584,7 @@
+ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties;
+ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties;
+ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties;
++static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties;
+
+ static int cxusb_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+@@ -487,7 +593,8 @@
+ dvb_usb_device_init(intf,&cxusb_bluebird_lgh064f_properties,THIS_MODULE,NULL) == 0 ||
+ dvb_usb_device_init(intf,&cxusb_bluebird_dee1601_properties,THIS_MODULE,NULL) == 0 ||
+ dvb_usb_device_init(intf,&cxusb_bluebird_lgz201_properties,THIS_MODULE,NULL) == 0 ||
+- dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0) {
++ dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0 ||
++ dvb_usb_device_init(intf,&cxusb_bluebird_dualdig4_properties,THIS_MODULE,NULL) == 0) {
+ return 0;
+ }
+
+@@ -508,6 +615,8 @@
+ { USB_DEVICE(USB_VID_DVICO, USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM) },
+ { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD) },
+ { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM) },
++ { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_4) },
++ { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DVBT_NANO_2) },
+ {} /* Terminating entry */
+ };
+ MODULE_DEVICE_TABLE (usb, cxusb_table);
+@@ -766,6 +875,52 @@
+ }
+ };
+
++static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = {
++ .caps = DVB_USB_IS_AN_I2C_ADAPTER,
++
++ .usb_ctrl = CYPRESS_FX2,
++
++ .size_of_priv = sizeof(struct cxusb_state),
++
++ .num_adapters = 1,
++ .adapter = {
++ {
++ .streaming_ctrl = cxusb_streaming_ctrl,
++ .frontend_attach = cxusb_dualdig4_frontend_attach,
++ .tuner_attach = cxusb_xc3028_tuner_attach,
++ /* parameter for the MPEG2-data transfer */
++ .stream = {
++ .type = USB_BULK,
++ .count = 5,
++ .endpoint = 0x02,
++ .u = {
++ .bulk = {
++ .buffersize = 8192,
++ }
++ }
++ },
++ },
++ },
++
++ .power_ctrl = cxusb_bluebird_power_ctrl,
++
++ .i2c_algo = &cxusb_i2c_algo,
++
++ .generic_bulk_ctrl_endpoint = 0x01,
++
++ .num_device_descs = 2,
++ .devices = {
++ { "DViCO FusionHDTV DVB-T Dual Digital 4",
++ { NULL },
++ { &cxusb_table[13], NULL },
++ },
++ { "DViCO FusionHDTV DVB-T NANO2",
++ { NULL },
++ { &cxusb_table[14], NULL },
++ },
++ }
++};
++
+ static struct usb_driver cxusb_driver = {
+ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ .owner = THIS_MODULE,
+--- v4l-dvb.orig/linux/drivers/media/dvb/dvb-usb/cxusb.h
++++ v4l-dvb/linux/drivers/media/dvb/dvb-usb/cxusb.h
+@@ -28,6 +28,8 @@
+ #define CMD_ANALOG 0x50
+ #define CMD_DIGITAL 0x51
+
++#define CMD_BLUEBIRD_GPIO_WRITE 0x05
++
+ struct cxusb_state {
+ u8 gpio_write_state[3];
+ };
+--- v4l-dvb.orig/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
++++ v4l-dvb/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+@@ -142,6 +142,8 @@
+ #define USB_PID_DVICO_BLUEBIRD_DUAL_1_WARM 0xdb51
+ #define USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD 0xdb58
+ #define USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM 0xdb59
++#define USB_PID_DVICO_BLUEBIRD_DUAL_4 0xdb78
++#define USB_PID_DVICO_BLUEBIRD_DVBT_NANO_2 0xdb70
+ #define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_COLD 0xdb54
+ #define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM 0xdb55
+ #define USB_PID_MEDION_MD95700 0x0932
+--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/Kconfig
++++ v4l-dvb/linux/drivers/media/dvb/frontends/Kconfig
+@@ -353,6 +353,13 @@
+ This device is only used inside a SiP called togther with a
+ demodulator for now.
+
++config DVB_XC3028
++ tristate "Xceive XC3028 silicon tuner"
++ depends on I2C
++ default m if DVB_FE_CUSTOMISE
++ help
++ A driver for the silicon tuner XC3028 from Xceive.
++
+ comment "Miscellaneous devices"
+ depends on DVB_CORE
+
+--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/Makefile
++++ v4l-dvb/linux/drivers/media/dvb/frontends/Makefile
+@@ -4,6 +4,7 @@
+
+ EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/
+
++obj-$(CONFIG_DVB_XC3028) += xc3028-fe.o
+ obj-$(CONFIG_DVB_PLL) += dvb-pll.o
+ obj-$(CONFIG_DVB_STV0299) += stv0299.o
+ obj-$(CONFIG_DVB_SP8870) += sp8870.o
+--- /dev/null
++++ v4l-dvb/linux/drivers/media/dvb/frontends/xc3028-fe.c
+@@ -0,0 +1,532 @@
++/*
++
++ Xceive - xc3028 tuner interface (Firmware 2.7)
++
++ Copyright (c) 2007 Michael Krufky <mkrufky@linuxtv.org>
++ Copyright (c) 2006 Markus Rechberger <mrechberger@gmail.com>
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++*/
++
++#include <linux/i2c.h>
++#include "compat.h"
++#include <linux/firmware.h>
++#include <linux/delay.h>
++#include <media/tuner.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
++#include "i2c-compat.h"
++#endif
++#include "dvb_frontend.h"
++#include "xc3028.h"
++
++
++struct xc3028_priv {
++ u8 tuning_code[12];
++ enum v4l2_tuner_type type;
++ v4l2_std_id std;
++ // unsigned int mode;
++
++ struct xc3028_config *cfg;
++
++ struct i2c_adapter *i2c_adap;
++ u32 frequency;
++ int bandwidth;
++};
++
++MODULE_DESCRIPTION("Xceive xc3028 dvb frontend driver");
++MODULE_AUTHOR("Michael Krufky <mkrufky@linuxtv.org>");
++MODULE_AUTHOR("Markus Rechberger <mrechberger@gmail.com>");
++MODULE_LICENSE("GPL");
++
++
++/* hack */
++#define V4L2_TUNER_DVBT_TV 19
++#define V4L2_TUNER_DVBC_TV 29
++#define V4L2_TUNER_ATSC_TV 39
++
++/* firmware functions */
++#define XC3028_BYTECODE 0
++#define XC3028_RESET 1
++#define XC3028_SLEEP 2
++
++#define XC3028_BW8MHZ 0
++#define XC3028_BW7MHZ 1
++#define XC3028_BW6MHZ 2
++#define XC3028_ATSC_BW6MHZ 3
++#define XC3028_RADIO 4
++
++
++#define XC3028_ANALOGUE_FW "xc3028_init0.i2c.fw"
++#define XC3028_DIGITAL_FW "xc3028_8MHz_init0.i2c.fw"
++#define XC3028_RADIO_FW "xc3028_FM_init0.i2c.fw"
++#define XC3028_SPECIFIC_RADIO_FW "xc3028_specific_radio.fw"
++
++#define TUNING_GRANULARITY 15625
++
++static int firmware_loader(struct dvb_frontend *fe, const struct firmware *fw);
++static int upload_firmware(struct dvb_frontend *fe);
++static int xc3028_set_mode(struct dvb_frontend *fe, enum v4l2_tuner_type type);
++
++static struct _analogue_standards{
++ v4l2_std_id standard;
++ u8 filename[50];
++} xc3028_standards[]={
++ {V4L2_STD_PAL_BG,"xc3028_BG_PAL_A2_A.i2c.fw"},
++ {V4L2_STD_PAL_I,"xc3028_I_PAL_NICAM.i2c.fw"},
++ {V4L2_STD_PAL_DK,"xc3028_DK_PAL_A2.i2c.fw"},
++ {V4L2_STD_MN,"xc3028_MN_NTSCPAL_A2.i2c.fw"},
++ {V4L2_STD_PAL, "xc3028_BG_PAL_A2_A.i2c.fw"},
++
++ {V4L2_STD_SECAM_DK,"xc3028_DK_SECAM_A2_DK1.i2c.fw"},
++ {V4L2_STD_SECAM_L,"xc3028_L_SECAM_NICAM.i2c.fw"},
++ {V4L2_STD_SECAM_LC,"xc3028_L'_SECAM_NICAM.i2c.fw"},
++ {V4L2_STD_SECAM_K1,"xc3028_DK_SECAM_A2_DK1.i2c.fw"},
++};
++
++/* TODO: add the other standards here
++ The linux DVB framework sends us following values
++ from 0..2 to set up the correct channel bandwidth
++
++ 0 ... 8 mhz
++ 1 ... 7 mhz
++ 2 ... 6 mhz
++
++ we do not have any settings for 6MHz at least I haven't found one,
++ feel free to complete this list
++
++ */
++
++static struct _digital_standards{
++ unsigned int dvb:1;
++ unsigned int atsc:1;
++ int bandwidth;
++ char filename[50];
++} xc3028_dtv_standards[]={
++ {1, 0, XC3028_BW8MHZ /* 8mhz */, "xc3028_DTV8_2633.i2c.fw" },
++ {1, 0, XC3028_BW7MHZ /* 7mhz */, "xc3028_DTV7_2633.i2c.fw" },
++ /* 2 6mhz */
++ {0, 1, 0 /* ???? */, "xc3028_DTV6_ATSC_2620.i2c.fw"},
++ {0, 1, 1 /* ???? */, "xc3028_DTV6_ATSC_2620.i2c.fw"},
++ {0, 1, XC3028_ATSC_BW6MHZ, "xc3028_DTV6_ATSC_2620.i2c.fw"},
++};
++
++/* ---------------------------------------------------------------------- */
++#define XC3028_I2C_ADDR 0x61
++
++static int xc3028_i2c_xfer(struct i2c_adapter* adap, char *buf, int len)
++{
++ int ret;
++ struct i2c_msg msg = { .addr = XC3028_I2C_ADDR, .flags = 0,
++ .buf = buf, .len = len };
++
++ ret = i2c_transfer(adap, &msg, 1);
++
++ /* If everything went ok (i.e. 1 msg transmitted), return #bytes
++ transmitted, else error code. */
++ return (ret == 1) ? len : ret;
++}
++
++/* ---------------------------------------------------------------------- */
++
++static int xc3028_set_params(struct dvb_frontend *fe,
++ struct dvb_frontend_parameters *params)
++{
++ struct xc3028_priv *priv = fe->tuner_priv;
++ const struct firmware *fw = NULL;
++ unsigned char chanbuf[4];
++ unsigned long frequency=0;
++ unsigned long value;
++ int bandwidth;
++ int i;
++ enum v4l2_tuner_type type;
++
++ if (fe->ops.info.type == FE_ATSC) {
++ type = V4L2_TUNER_ATSC_TV;
++ } else { // if (fe->ops.info.type == FE_OFDM)
++ type = V4L2_TUNER_DVBT_TV;
++ }
++
++ xc3028_set_mode(fe, type);
++
++ if (priv->type == V4L2_TUNER_ATSC_TV) {
++ bandwidth = XC3028_ATSC_BW6MHZ;
++ } else {
++ bandwidth = params->u.ofdm.bandwidth;
++ }
++
++ if (priv->bandwidth != bandwidth) {
++ switch(bandwidth) {
++ case -1:
++ /* analogue */
++ priv->bandwidth = bandwidth;
++ break;
++ case XC3028_ATSC_BW6MHZ:
++ for (i = 0; i < ARRAY_SIZE(xc3028_dtv_standards); i++) {
++ if (xc3028_dtv_standards[i].bandwidth == XC3028_ATSC_BW6MHZ) {
++ printk("Loading 6MHz Bandwidth settings: %s\n",xc3028_dtv_standards[i].filename);
++ if (request_firmware(&fw, xc3028_dtv_standards[i].filename, &priv->i2c_adap->dev) == 0) {
++ if (firmware_loader(fe,fw) != 0) {
++ release_firmware(fw);
++ printk("xc3028-tuner.c: error uploading firmware!\n");
++ return -EINVAL;
++ }
++ release_firmware(fw);
++ break;
++ } else
++ printk("Loading firmware from file failed!\n");
++ }
++ }
++ priv->bandwidth = bandwidth;
++ break;
++ case XC3028_BW8MHZ: /* 8 MHz */
++ for (i = 0; i < ARRAY_SIZE(xc3028_dtv_standards); i++) {
++ if (xc3028_dtv_standards[i].bandwidth == XC3028_BW8MHZ) {
++ printk("Loading 8MHz Bandwidth settings: %s\n",xc3028_dtv_standards[i].filename);
++ if (request_firmware(&fw, xc3028_dtv_standards[i].filename, &priv->i2c_adap->dev) == 0) {
++ if (firmware_loader(fe,fw) != 0) {
++ release_firmware(fw);
++ printk("xc3028-tuner.c: error uploading firmware!\n");
++ return -EINVAL;
++ }
++ release_firmware(fw);
++ break;
++ } else
++ printk("Loading firmware from file failed!\n");
++ }
++ }
++ priv->bandwidth = bandwidth;
++ break;
++ case XC3028_BW7MHZ: /* 7 MHz */
++ for (i = 0; i < ARRAY_SIZE(xc3028_dtv_standards); i++) {
++ if (xc3028_dtv_standards[i].bandwidth == XC3028_BW7MHZ) {
++ printk("Loading 7MHz Bandwidth settings: %s\n",xc3028_dtv_standards[i].filename);
++ if (request_firmware(&fw, xc3028_dtv_standards[i].filename, &priv->i2c_adap->dev) == 0) {
++ if (firmware_loader(fe,fw) != 0) {
++ release_firmware(fw);
++ printk("xc3028-tuner.c: error uploading firmware!\n");
++ return -EINVAL;
++ }
++ release_firmware(fw);
++ break;
++ } else
++ printk("Loading firmware from file failed!\n");
++ }
++ }
++ priv->bandwidth = bandwidth;
++ break;
++ default:
++ printk("xc3028-tuner.c: sorry [%d] bandwidth isn't supported (please report)\n",bandwidth);
++ }
++ }
++ /* TODO: 7 MHz (1) has the same offset as 8 MHz -- this depends on the used firmware */
++#if 0
++ if(t->mode == V4L2_TUNER_RADIO){
++ frequency=(unsigned long long)f->frequency*1000/16;
++ } else { }
++#endif
++ switch(bandwidth) {
++ case XC3028_BW8MHZ:
++ case XC3028_BW7MHZ:
++ frequency=(unsigned long long)params->frequency-2750000;
++ break;
++ case XC3028_BW6MHZ:
++ case XC3028_ATSC_BW6MHZ:
++ frequency=(unsigned long long)params->frequency-1750000;
++ break;
++ default:
++ frequency=(unsigned long long)params->frequency;
++ }
++
++ value=(frequency+(TUNING_GRANULARITY/2))/TUNING_GRANULARITY;
++ chanbuf[0]=0;
++ chanbuf[1]=0;
++ chanbuf[2]=(value&0xff00)>>8;
++ chanbuf[3]=value&0x00ff;
++
++#if 0
++ /* seems like it's not needed! */
++ rc=i2c_master_send(c,"\xa0\x00\x00\x00",4);
++ if(priv && priv->tuning_code)
++ i2c_master_send(c,priv->tuning_code,12);
++ else
++ printk("ERROR: *** NO TUNING CODE SET **\n");
++ i2c_master_send(c,"\x00\x8c",2);
++#endif
++ xc3028_i2c_xfer(priv->i2c_adap,"\x80\x02\x00\x00",4);
++ xc3028_i2c_xfer(priv->i2c_adap,chanbuf,4);
++ return 0;
++}
++
++static int firmware_loader(struct dvb_frontend *fe, const struct firmware *fw)
++{
++ int txtlen=0;
++ int current_ptr=0;
++ int version;
++ int function;
++ int x;
++ struct xc3028_priv *priv = fe->tuner_priv;
++
++ if (fw->size == 0)
++ return -EINVAL;
++
++ version = fw->data[current_ptr++];
++
++ switch (version) {
++ case 1:
++ while (current_ptr < fw->size) {
++ function = fw->data[current_ptr++];
++ switch (function) {
++ case XC3028_BYTECODE:
++ txtlen = fw->data[current_ptr++];
++ if ((current_ptr + txtlen) > fw->size)
++ return -EINVAL;
++ if (fw->data[current_ptr]==0x1e && txtlen == 12){
++ memcpy(priv->tuning_code, &fw->data[current_ptr], 12);
++ }
++ if (txtlen != xc3028_i2c_xfer(priv->i2c_adap,&fw->data[current_ptr],txtlen)) {
++ printk("failed: %02x| ",txtlen);
++ for(x=0; x < txtlen; x++) {
++ printk("%02x ",(unsigned char)fw->data[current_ptr+x]);
++ }
++ printk("\n");
++ }
++
++ current_ptr += txtlen;
++ break;
++ case XC3028_RESET:
++ x = fw->data[current_ptr++];
++
++ if ((priv->cfg) && (priv->cfg->gpio_reset))
++ priv->cfg->gpio_reset(fe,x);
++ else
++ printk("XC3028: NO GPIO CALLBACK FUNCTION PROVIDED - SWITCHING MODES WON'T WORK (GPIO FW ARG: %d)!\n",x);
++ break;
++ case XC3028_SLEEP:
++ msleep(fw->data[current_ptr++]);
++ break;
++ default:
++ printk("xc3028-tuner.c: error while loading firmware!\n");
++ return -EINVAL;
++ }
++ }
++ break;
++ default:
++ printk("xc3028-tuner.c: Firmware Loader: Unknown firmware version (%d)\n",version);
++ return -EINVAL;
++ }
++ return 0;
++}
++
++static int upload_firmware(struct dvb_frontend *fe) {
++ struct xc3028_priv *priv = fe->tuner_priv;
++ const struct firmware *fw = NULL;
++ int i;
++
++ switch (priv->type) {
++ case V4L2_TUNER_ANALOG_TV:
++ printk("Loading base firmware: %s\n", XC3028_ANALOGUE_FW);
++ if (request_firmware(&fw, XC3028_ANALOGUE_FW, &priv->i2c_adap->dev) == 0) {
++ firmware_loader(fe,fw);
++ release_firmware(fw);
++ } else {
++ printk("xc3028-tuner.c: Unable to load firmware\n");
++ printk("xc3028-tuner.c: ** PLEASE HAVE A LOOK AT **\n");
++ printk("xc3028-tuner.c: http://linuxtv.org/v4lwiki/index.php/Talk:Em2880#Firmware\n");
++ return -EINVAL;
++ }
++ for (i = 0; i < ARRAY_SIZE(xc3028_standards); i++) {
++ if (xc3028_standards[i].standard & priv->std) {
++ printk("%s, Loading specific analogue TV settings: %s\n",__FUNCTION__, xc3028_standards[i].filename);
++ if (request_firmware(&fw, xc3028_standards[i].filename, &priv->i2c_adap->dev) == 0){
++ if(firmware_loader(fe,fw)==0){
++ release_firmware(fw);
++ return 0;
++ }
++ release_firmware(fw);
++ } else {
++ printk("Loading configuration from file failed!\n");
++ }
++ break;
++ }
++ }
++ printk("Loading default analogue TV settings: %s\n",xc3028_standards[0].filename);
++ priv->std=xc3028_standards[0].standard;
++ if (request_firmware(&fw, xc3028_standards[0].filename, &priv->i2c_adap->dev) == 0) {
++ if (firmware_loader(fe,fw) == 0) {
++ release_firmware(fw);
++ return 0;
++ }
++ release_firmware(fw);
++ }
++ printk("xc3028-tuner.c: error loading firmware (analogue TV)! (please report -> mrechberger@gmail.com)\n");
++ break;
++ case V4L2_TUNER_DVBT_TV:
++ case V4L2_TUNER_DVBC_TV:
++ case V4L2_TUNER_ATSC_TV:
++ printk("Loading base firmware: %s\n", XC3028_DIGITAL_FW);
++ /* reset analog standard */
++ priv->std = 0;
++ if (request_firmware(&fw, XC3028_DIGITAL_FW, &priv->i2c_adap->dev) == 0) {
++ firmware_loader(fe,fw);
++ release_firmware(fw);
++ } else {
++ printk("xc3028-tuner.c: Unable to load firmware\n");
++ printk("xc3028-tuner.c: ** PLEASE HAVE A LOOK AT **\n");
++ printk("xc3028-tuner.c: http://linuxtv.org/v4lwiki/index.php/Talk:Em2880#Firmware\n");
++ return -EINVAL;
++ }
++ for( i = 0; i < ARRAY_SIZE(xc3028_dtv_standards); i++) {
++ if ((xc3028_dtv_standards[i].dvb==1 &&
++ xc3028_dtv_standards[i].bandwidth == priv->bandwidth) ||
++ (priv->type == V4L2_TUNER_ATSC_TV &&
++ xc3028_dtv_standards[i].atsc == 1)) {
++ printk("Loading specific dtv settings: %s\n",xc3028_dtv_standards[i].filename);
++ if (request_firmware(&fw, xc3028_dtv_standards[i].filename, &priv->i2c_adap->dev) == 0) {
++ if (firmware_loader(fe,fw) == 0) {
++ release_firmware(fw);
++ return 0;
++ }
++ release_firmware(fw);
++ }
++ }
++ i++;
++ }
++
++ /* this gets accessed if a switchover occures, t->bandwidth will be set to -1 */
++ printk("Loading default dtv settings: %s\n",xc3028_dtv_standards[0].filename);
++ priv->bandwidth = xc3028_dtv_standards[0].bandwidth;
++ if (request_firmware(&fw, xc3028_dtv_standards[0].filename, &priv->i2c_adap->dev) == 0) {
++ if (firmware_loader(fe,fw) == 0) {
++ release_firmware(fw);
++ return 0;
++ }
++ release_firmware(fw);
++ }
++ printk("xc3028-tuner.c: error loading firmware (analogue TV)! (please report -> mrechberger@gmail.com)\n");
++ break;
++ case V4L2_TUNER_RADIO:
++ printk("Loading base firmware: %s\n", XC3028_RADIO_FW);
++ if (request_firmware(&fw, XC3028_RADIO_FW, &priv->i2c_adap->dev) == 0) {
++ firmware_loader(fe,fw);
++ release_firmware(fw);
++ } else {
++ printk("xc3028-tuner.c: Unable to load (radio) firmware\n");
++ printk("xc3028-tuner.c: ** PLEASE HAVE A LOOK AT **\n");
++ printk("xc3028-tuner.c: http://linuxtv.org/v4lwiki/index.php/Talk:Em2880#Firmware\n");
++ return -EINVAL;
++ }
++ printk("%s, Loading specific radio firmware: %s\n",__FUNCTION__, XC3028_SPECIFIC_RADIO_FW);
++ if (request_firmware(&fw, XC3028_SPECIFIC_RADIO_FW, &priv->i2c_adap->dev) == 0) {
++ if (firmware_loader(fe,fw) == 0) {
++ release_firmware(fw);
++ return 0;
++ }
++ release_firmware(fw);
++ } else {
++ printk("Loading configuration from file failed!\n");
++ }
++ return 0;
++ default:
++ printk("ERROR TUNER TYPE NOT SUPPORTED (%d)\n",priv->type);
++ return -EINVAL;
++ }
++
++ printk("xc3028-tuner.c: *********************************************************\n");
++ printk("xc3028-tuner.c: no firmware uploaded\n" );
++ printk("xc3028-tuner.c: ** please have a look at: **\n");
++ printk("xc3028-tuner.c: http://linuxtv.org/v4lwiki/index.php/Talk:Em2880#Firmware\n");
++ printk("xc3028-tuner.c: *********************************************************\n");
++
++ return -EINVAL;
++}
++
++static int xc3028_set_mode(struct dvb_frontend *fe, enum v4l2_tuner_type type)
++{
++ struct xc3028_priv *priv = fe->tuner_priv;
++
++ priv->type = type;
++
++ upload_firmware(fe);
++
++ if (priv->cfg && priv->cfg->gpio_reset && (priv->type == V4L2_TUNER_DVBT_TV ||
++ priv->type == V4L2_TUNER_DVBC_TV ||
++ priv->type == V4L2_TUNER_ATSC_TV )) {
++ printk("xc3028-tuner.c: sending extra call for DVB-T\n");
++ priv->cfg->gpio_reset(fe,2);
++ }
++
++ return 0;
++}
++
++/* dvb tuner api */
++static int xc3028_release(struct dvb_frontend *fe)
++{
++ kfree(fe->tuner_priv);
++ fe->tuner_priv = NULL;
++ return 0;
++}
++
++static int xc3028_get_frequency(struct dvb_frontend *fe, u32 *frequency)
++{
++ struct xc3028_priv *priv = fe->tuner_priv;
++
++ *frequency = priv->frequency*1000/16*1000;
++ return 0;
++}
++
++static int xc3028_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
++{
++ struct xc3028_priv *priv = fe->tuner_priv;
++
++ *bandwidth = priv->bandwidth;
++ return 0;
++}
++
++static const struct dvb_tuner_ops xc3028_tuner_ops = {
++ .info = {
++ .name = "Xceive XC3028",
++#if 0
++ .frequency_min = ,
++ .frequency_max =
++#endif
++ },
++ .release = xc3028_release,
++ .set_params = xc3028_set_params,
++ .get_frequency = xc3028_get_frequency,
++ .get_bandwidth = xc3028_get_bandwidth,
++};
++
++struct dvb_frontend *xc3028_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct xc3028_config *cfg)
++{
++ struct xc3028_priv *priv = kzalloc(sizeof(struct xc3028_priv),GFP_KERNEL);
++
++ priv->i2c_adap = i2c;
++ priv->bandwidth=XC3028_BW8MHZ;
++ priv->cfg = cfg;
++
++ memcpy(&fe->ops.tuner_ops, &xc3028_tuner_ops, sizeof(struct dvb_tuner_ops));
++ fe->tuner_priv = priv;
++ return fe;
++}
++EXPORT_SYMBOL(xc3028_attach);
++
++/*
++ * Overrides for Emacs so that we follow Linus's tabbing style.
++ * ---------------------------------------------------------------------------
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+--- /dev/null
++++ v4l-dvb/linux/drivers/media/dvb/frontends/xc3028.h
+@@ -0,0 +1,56 @@
++ /*
++ Header for Xceive Silicon tuners
++
++ (c) 2007 Michael Krufky
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ */
++
++#ifndef __DVB_XC3028_H__
++#define __DVB_XC3028_H__
++
++#include <linux/i2c.h>
++#include "dvb_frontend.h"
++
++/**
++ * Attach a xc3028 tuner to the supplied frontend structure.
++ *
++ * @param fe Frontend to attach to.
++ * @param i2c i2c adapter to use.
++ * @param cfg config struct with gpio reset callback.
++ * @return FE pointer on success, NULL on failure.
++ */
++
++struct xc3028_config {
++ int (*gpio_reset) (struct dvb_frontend *fe, int ptr);
++};
++
++#if defined(CONFIG_DVB_XC3028) || (defined(CONFIG_DVB_XC3028_MODULE) && defined(MODULE))
++extern struct dvb_frontend* xc3028_attach(struct dvb_frontend *fe,
++ struct i2c_adapter *i2c,
++ struct xc3028_config *cfg);
++#else
++static inline struct dvb_frontend* xc3028_attach(struct dvb_frontend *fe,
++ struct i2c_adapter *i2c,
++ struct xc3028_config *cfg)
++{
++ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
++ return NULL;
++}
++#endif // CONFIG_DVB_XC3028
++
++#endif // __DVB_XC3028_H__
+--- v4l-dvb.orig/v4l/versions.txt
++++ v4l-dvb/v4l/versions.txt
+@@ -228,3 +228,4 @@
+ USB_ZC0301
+ USB_ET61X251
+ USB_ZR364XX
++DVB_XC3028
diff --git a/abs/extra/vcdimager/PKGBUILD b/abs/extra/vcdimager/PKGBUILD
new file mode 100644
index 0000000..9a97e31
--- /dev/null
+++ b/abs/extra/vcdimager/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: damir <damir@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=vcdimager
+pkgver=0.7.23
+pkgrel=6
+pkgdesc="GNU VCDImager is a full-featured mastering suite for authoring disassembling and analyzing Video CD's and Super Video CD's"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.vcdimager.org/"
+depends=('libcdio>=0.79' 'libxml2' 'popt')
+options=('!libtool' '!emptydirs')
+source=(ftp://ftp.gnu.org/gnu/vcdimager/${pkgname}-${pkgver}.tar.gz)
+md5sums=('5e7d80fdbf0037ad20e438f2a9573253')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=${startdir}/pkg install
+}
diff --git a/abs/extra/vcdimager/__changelog b/abs/extra/vcdimager/__changelog
new file mode 100644
index 0000000..701b6bb
--- /dev/null
+++ b/abs/extra/vcdimager/__changelog
@@ -0,0 +1 @@
+options=!noemptdir
diff --git a/abs/extra/vcdimager/cdio.patch b/abs/extra/vcdimager/cdio.patch
new file mode 100644
index 0000000..f7f9e31
--- /dev/null
+++ b/abs/extra/vcdimager/cdio.patch
@@ -0,0 +1,11 @@
+--- lib/image.c.org 2004-07-15 17:19:01.000000000 +0200
++++ lib/image.c 2004-07-15 17:22:06.000000000 +0200
+@@ -76,7 +76,7 @@
+ }
+
+ int
+-vcd_image_sink_write (VcdImageSink *obj, void *buf, uint32_t lsn)
++vcd_image_sink_write (VcdImageSink *obj, void *buf, lsn_t lsn)
+ {
+ vcd_assert (obj != NULL);
+
diff --git a/abs/extra/vim/PKGBUILD b/abs/extra/vim/PKGBUILD
new file mode 100644
index 0000000..7e3db29
--- /dev/null
+++ b/abs/extra/vim/PKGBUILD
@@ -0,0 +1,66 @@
+# $Id: PKGBUILD 17696 2008-10-31 17:28:10Z allan $
+# Maintainer: tobias [ tobias at archlinux org ]
+
+pkgname=vim
+_srcver=7.2
+_patchlevel=132
+pkgver=${_srcver}.${_patchlevel}
+pkgrel=1.5
+pkgdesc="a highly configurable, improved version of the vi text editor"
+arch=(i686 x86_64)
+license=('custom:vim')
+url="http://www.vim.org"
+depends=("vi>=${pkgver}" 'perl' 'python' 'acl' 'gpm>=1.20.4' 'libxt')
+makedepends=('wget' 'sed' 'grep')
+backup=(etc/vimrc)
+install=${pkgname}.install
+# we need the extra-stuff to get all patches applied smoothly
+source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
+ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
+ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
+ fetch_patches.sh)
+
+build()
+{
+ # pull in patches from vim.org (or the src cache alternatively)
+ . ${startdir}/src/fetch_patches.sh
+ get_patches || return 1
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
+ # build party
+ ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
+ --with-compiledby=ArchLinux --with-features=big \
+ --with-x=yes --disable-gui \
+ --with-global-runtime=/usr/share/vim --with-vim-name=vim \
+ --enable-multibyte --enable-cscope \
+ --enable-perlinterp --enable-pythoninterp
+ make || return 1
+ make VIMRCLOC=/etc DESTDIR=${startdir}/pkg VIMRTDIR= install
+ cd ${startdir}/pkg/usr/bin
+ rm -f ex view rview xxd vimtutor
+ ln -s vitutor vimtutor
+
+ # delete the manpages/symlinks provided by vi package
+ find ${startdir}/pkg/usr/share/man -type d -name 'man1' 2> /dev/null | \
+ while read mandir; do
+ cd ${mandir}
+ mv vimdiff.1 vimdiff.org
+ rm -f *.1
+ ln -s rvi.1.gz rvim.1.gz
+ ln -s vi.1.gz vim.1.gz
+ ln -s vitutor.1.gz vimtutor.1.gz
+ mv vimdiff.org vimdiff.1
+ done
+
+ # kill the nobackup parts
+ sed -i '/vms/,+4 d' ${startdir}/pkg/usr/share/vim/vimrc_example.vim
+ install -Dm644 ${startdir}/pkg/usr/share/vim/vimrc_example.vim \
+ ${startdir}/pkg/etc/vimrc
+ # clean all settings and controls - served by vi package
+ rm -rf ${startdir}/pkg/usr/share/vim
+
+# Changes to remove mouse support VERY IMPORTANT!
+##############################################################
+ sed -i "s/mouse=a/mouse-=a/g" $startdir/pkg/etc/vimrc
+#################################################################
+}
diff --git a/abs/extra/vim/__changelog b/abs/extra/vim/__changelog
new file mode 100644
index 0000000..47cbb5f
--- /dev/null
+++ b/abs/extra/vim/__changelog
@@ -0,0 +1,3 @@
+Remove mouse support from /etc/vimrc. This new found ability is truely annoying.
+
+
diff --git a/abs/extra/vim/fetch_patches.sh b/abs/extra/vim/fetch_patches.sh
new file mode 100644
index 0000000..2ce1019
--- /dev/null
+++ b/abs/extra/vim/fetch_patches.sh
@@ -0,0 +1,61 @@
+# the external logic for pulling in patches
+
+get_patches() {
+ _patchdir=${startdir}/src/patches
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ if [ -d ${_patchdir} ]; then
+ rm -rf ${_patchdir}
+ echo -e "\tremove patches from old build"
+ fi
+ mkdir ${_patchdir} && cd ${_patchdir}
+ _rpath=ftp://ftp.vim.org/pub/vim/patches/${_srcver}
+
+ # change IFS to loop line-by-line
+ _OLDIFS=$IFS
+ IFS="
+"
+ echo -e "\tfetching checksumfile for patches"
+ wget ${_rpath}/MD5SUMS >/dev/null 2>&1
+
+ downloads=-1
+ for _line in $(/bin/cat MD5SUMS); do
+ downloads=$((${downloads} + 1))
+ _md5=$(echo $_line | cut -d ' ' -f1)
+ _file=$(echo $_line | cut -d ' ' -f3)
+ if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then
+ echo -e "\thaving patch file:${_file}"
+ cp ${SRCDEST}/vim-${_srcver}/${_file} ./
+ else
+ echo -n -e "\t... fetching patch file: ${_file} ..."
+ wget ${_rpath}/${_file} >/dev/null 2>&1
+ if [ -w ${SRCDEST} ]; then
+ if [ ! -d ${SRCDEST}/vim-${_srcver} ]; then
+ mkdir -p ${SRCDEST}/vim-${_srcver}
+ fi
+ cp ${_file} ${SRCDEST}/vim-${_srcver}/
+ echo " done!"
+ fi
+ fi
+
+ if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then
+ echo ${_file} md5sums do not match
+ return 1
+ fi
+ done
+ cd $startdir/src/patches
+ rm 7.2.001-100.gz
+ ########
+
+ if [ ${downloads} != ${_patchlevel} ]; then
+ echo -e "Number of patches does not match the patchlevel!\nEdit the PKGBUILD accordingly!"
+ return 1
+ fi
+ IFS=$_OLDIFS
+ rm MD5SUMS
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ for _patch in $(/bin/ls ${_patchdir}); do
+ patch -Np0 -i ${_patchdir}/${_patch} || return 1
+ done
+ rm -rf ${_patchdir}
+ return 0
+}
diff --git a/abs/extra/vim/vim.install b/abs/extra/vim/vim.install
new file mode 100644
index 0000000..1d46e19
--- /dev/null
+++ b/abs/extra/vim/vim.install
@@ -0,0 +1,38 @@
+post_install() {
+ # if we have an existing gvim installation - relocate binaries and symlinks
+ if [ -f usr/bin/vim ] ; then
+ cd usr/bin
+ rm -f view rview
+ ln -s vim view
+ ln -s vim rview
+ cd ${OLDPWD}
+ echo "Create vim related symlinks..."
+ fi
+ echo -n "Updating vim help tags..."
+ usr/bin/vim --noplugins -u NONE -U NONE \
+ --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done."
+}
+
+pre_remove() {
+ cd usr/bin
+ rm -f view rview
+ if [ -f usr/bin/vi ] ; then
+ ln -s vi view
+ ln -s vi rview
+ echo "Create vi related symlinks..."
+ fi
+ cd ${OLDPWD}
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_upgrade() {
+ pre_remove $2
+}
+
+op=$1
+shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
diff --git a/abs/extra/vorbis-tools/ChangeLog b/abs/extra/vorbis-tools/ChangeLog
new file mode 100644
index 0000000..b4f8311
--- /dev/null
+++ b/abs/extra/vorbis-tools/ChangeLog
@@ -0,0 +1,10 @@
+2008-03-15 Travis Willard <travis@archlinux.org>
+
+ * 1.2.0-3
+ Removed explicit /usr/man usage
+
+2008-03-15 Travis Willard <travis@archlinux.org>
+
+ * 1.2.0-1
+ New upstream release.
+ Added ChangeLog
diff --git a/abs/extra/vorbis-tools/PKGBUILD b/abs/extra/vorbis-tools/PKGBUILD
new file mode 100644
index 0000000..4428e6a
--- /dev/null
+++ b/abs/extra/vorbis-tools/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Travis Willard <travis@archlinux.org>
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Committer: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=vorbis-tools
+pkgver=1.2.0
+pkgrel=3
+pkgdesc="Extra tools for Ogg-Vorbis"
+arch=(i686 x86_64)
+url='http://www.xiph.org/vorbis/'
+license=('GPL')
+depends=('libao' 'libvorbis' 'curl>=7.16.2' 'flac>=1.1.4')
+source=(http://downloads.xiph.org/releases/vorbis/$pkgname-$pkgver.tar.gz)
+md5sums=('df976d24e51ef3d87cd462edf747bf9a')
+
+build()
+{
+ cd $startdir/src/$pkgname-$pkgver
+ autoconf
+ ./configure --prefix=/usr --without-speex
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
+
diff --git a/abs/extra/vorbis-tools/curl.patch b/abs/extra/vorbis-tools/curl.patch
new file mode 100644
index 0000000..2aabebe
--- /dev/null
+++ b/abs/extra/vorbis-tools/curl.patch
@@ -0,0 +1,10 @@
+--- vorbis-tools-1.1.1/ogg123/http_transport.c.orig 2006-12-09 16:34:44.000000000 +1100
++++ vorbis-tools-1.1.1/ogg123/http_transport.c 2006-12-09 16:39:46.000000000 +1100
+@@ -116,7 +116,6 @@
+ if (inputOpts.ProxyTunnel)
+ curl_easy_setopt (handle, CURLOPT_HTTPPROXYTUNNEL, inputOpts.ProxyTunnel);
+ */
+- curl_easy_setopt(handle, CURLOPT_MUTE, 1);
+ curl_easy_setopt(handle, CURLOPT_ERRORBUFFER, private->error);
+ curl_easy_setopt(handle, CURLOPT_PROGRESSFUNCTION, progress_callback);
+ curl_easy_setopt(handle, CURLOPT_PROGRESSDATA, private);
diff --git a/abs/extra/vorbis-tools/vorbis-tools-1.1.1-flac_gt_1.1.3_support.patch b/abs/extra/vorbis-tools/vorbis-tools-1.1.1-flac_gt_1.1.3_support.patch
new file mode 100644
index 0000000..19f8e33
--- /dev/null
+++ b/abs/extra/vorbis-tools/vorbis-tools-1.1.1-flac_gt_1.1.3_support.patch
@@ -0,0 +1,500 @@
+Add support for libFLAC-1.1.3. Original patch from Josh Coalson:
+http://lists.xiph.org/pipermail/vorbis-dev/2006-October/018561.html
+This patch updates that to build against svn trunk, and includes
+automatic detection of libFLAC version in ./configure.
+Tested against libFLAC versions 1.1.2 and 1.1.3.
+
+--- old/vorbis-tools-1.1.1/configure.ac 2005-06-27 10:25:51.000000000 +0100
++++ vorbis-tools-1.1.1/configure.ac 2007-04-07 17:26:15.000000000 +0100
+@@ -169,17 +169,33 @@
+
+ FLAC_LIBS=""
+ if test "x$build_flac" = xyes; then
++
+ AC_CHECK_LIB(m,log,FLAC_LIBS="-lm")
+- AC_CHECK_LIB(FLAC, [FLAC__stream_decoder_process_single],
+- [have_libFLAC=yes; FLAC_LIBS="-lFLAC $FLAC_LIBS"],
+- AC_MSG_WARN([libFLAC missing])
+- have_libFLAC=no, [$FLAC_LIBS]
+- )
+- AC_CHECK_LIB(OggFLAC, [OggFLAC__stream_decoder_new],
+- [FLAC_LIBS="-lOggFLAC $FLAC_LIBS $OGG_LIBS"],
+- AC_MSG_WARN([libOggFLAC missing])
+- have_libFLAC=no, [$FLAC_LIBS $OGG_LIBS]
+- )
++
++ dnl First check for libFLAC-1.1.3 or later. As of libFLAC 1.1.3,
++ dnl OggFLAC functionality has been rolled into libFLAC rather
++ dnl than being in a separate libOggFLAC library.
++
++ AC_CHECK_LIB(FLAC, [FLAC__stream_decoder_init_ogg_stream],
++ have_libFLAC=yes, have_libFLAC=no, [$FLAC_LIBS $OGG_LIBS])
++
++ if test "x$have_libFLAC" = xyes; then
++ FLAC_LIBS="-lFLAC $FLAC_LIBS $OGG_LIBS"
++ else
++ dnl Check for libFLAC prior to 1.1.3
++ AC_CHECK_LIB(FLAC, [FLAC__stream_decoder_process_single],
++ [have_libFLAC=yes; FLAC_LIBS="-lFLAC $FLAC_LIBS"],
++ AC_MSG_WARN([libFLAC missing])
++ have_libFLAC=no, [$FLAC_LIBS]
++ )
++
++ AC_CHECK_LIB(OggFLAC, [OggFLAC__stream_decoder_new],
++ [FLAC_LIBS="-lOggFLAC $FLAC_LIBS $OGG_LIBS"],
++ AC_MSG_WARN([libOggFLAC missing])
++ have_libFLAC=no, [$FLAC_LIBS $OGG_LIBS]
++ )
++ fi
++
+ AC_CHECK_HEADER(FLAC/stream_decoder.h,,
+ AC_MSG_WARN(libFLAC headers missing)
+ have_libFLAC=no,[ ])
+--- old/vorbis-tools-1.1.1/ogg123/flac_format.c 2005-06-03 11:15:09.000000000 +0100
++++ vorbis-tools-1.1.1/ogg123/flac_format.c 2007-04-07 17:25:14.000000000 +0100
+@@ -20,18 +20,26 @@
+ #include <string.h>
+ #include <sys/types.h>
+ #include <math.h>
+-#include <FLAC/metadata.h>
++#include <FLAC/all.h>
+ #include <ao/ao.h>
+ #include "audio.h"
+ #include "format.h"
+ #include "i18n.h"
++#if !defined(FLAC_API_VERSION_CURRENT) || (FLAC_API_VERSION_CURRENT < 8)
++#define NEED_EASYFLAC 1
++#endif
++#if NEED_EASYFLAC
+ #include "easyflac.h"
++#endif
+ #include "vorbis_comments.h"
+
+-#define DEFAULT_FLAC_FRAME_SIZE 4608
+-
+ typedef struct {
++#if NEED_EASYFLAC
+ EasyFLAC__StreamDecoder *decoder;
++#else
++ FLAC__StreamDecoder *decoder;
++ int is_oggflac;
++#endif
+ short channels;
+ int rate;
+ int bits_per_sample;
+@@ -67,10 +75,18 @@
+
+
+ /* Private functions declarations */
+-FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
+-FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
+-void easyflac_metadata_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
+-void easyflac_error_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++#if NEED_EASYFLAC
++static FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
++static FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
++static void easyflac_metadata_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
++static void easyflac_error_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++#else
++static FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data);
++static FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
++static void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
++static void error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++static FLAC__bool eof_callback(const FLAC__StreamDecoder *decoder, void *client_data);
++#endif
+
+ void resize_buffer(flac_private_t *flac, int newchannels, int newsamples);
+ /*void copy_comments (vorbis_comment *v_comments, FLAC__StreamMetadata_VorbisComment *f_comments);*/
+@@ -155,6 +171,7 @@
+ private->buf_start = 0;
+
+ /* Setup FLAC decoder */
++#if NEED_EASYFLAC
+ if (oggflac_can_decode(source)) {
+ decoder->format = &oggflac_format;
+ private->decoder = EasyFLAC__stream_decoder_new(1);
+@@ -172,13 +189,40 @@
+ EasyFLAC__set_metadata_respond(private->decoder, FLAC__METADATA_TYPE_STREAMINFO);
+ EasyFLAC__set_metadata_respond(private->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
+ EasyFLAC__init(private->decoder);
++#else
++ if (oggflac_can_decode(source)) {
++ private->is_oggflac = 1;
++ decoder->format = &oggflac_format;
++ } else {
++ private->is_oggflac = 0;
++ decoder->format = &flac_format;
++ }
++ private->decoder = FLAC__stream_decoder_new();
++
++ FLAC__stream_decoder_set_md5_checking(private->decoder, false);
++ FLAC__stream_decoder_set_metadata_respond(private->decoder, FLAC__METADATA_TYPE_STREAMINFO);
++ FLAC__stream_decoder_set_metadata_respond(private->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
++ /*FLAC__stream_decoder_init(private->decoder);*/
++ if(private->is_oggflac)
++ FLAC__stream_decoder_init_ogg_stream(private->decoder, read_callback, /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, eof_callback, write_callback, metadata_callback, error_callback, decoder);
++ else
++ FLAC__stream_decoder_init_stream(private->decoder, read_callback, /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, eof_callback, write_callback, metadata_callback, error_callback, decoder);
++#endif
+
+ /* Callback will set the total samples and sample rate */
++#if NEED_EASYFLAC
+ EasyFLAC__process_until_end_of_metadata(private->decoder);
++#else
++ FLAC__stream_decoder_process_until_end_of_metadata(private->decoder);
++#endif
+
+ /* Callback will set the number of channels and resize the
+ audio buffer */
++#if NEED_EASYFLAC
+ EasyFLAC__process_single(private->decoder);
++#else
++ FLAC__stream_decoder_process_single(private->decoder);
++#endif
+
+ /* FLAC API returns signed samples on all streams */
+ decoder->actual_fmt.signed_sample = 1;
+@@ -241,11 +285,19 @@
+ realsamples += copy;
+ }
+ else if (!priv->eos) {
++#if NEED_EASYFLAC
+ ret = EasyFLAC__process_single(priv->decoder);
+ if (!ret ||
+ EasyFLAC__get_state(priv->decoder)
+ == FLAC__STREAM_DECODER_END_OF_STREAM)
+ priv->eos = 1; /* Bail out! */
++#else
++ ret = FLAC__stream_decoder_process_single(priv->decoder);
++ if (!ret ||
++ FLAC__stream_decoder_get_state(priv->decoder)
++ == FLAC__STREAM_DECODER_END_OF_STREAM)
++ priv->eos = 1; /* Bail out! */
++#endif
+ } else
+ break;
+ }
+@@ -311,8 +363,13 @@
+ free(priv->buf[i]);
+
+ free(priv->buf);
++#if NEED_EASYFLAC
+ EasyFLAC__finish(priv->decoder);
+ EasyFLAC__stream_decoder_delete(priv->decoder);
++#else
++ FLAC__stream_decoder_finish(priv->decoder);
++ FLAC__stream_decoder_delete(priv->decoder);
++#endif
+
+ free(decoder->private);
+ free(decoder);
+@@ -342,7 +399,11 @@
+
+
+
++#if NEED_EASYFLAC
+ FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
++#else
++FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
++#endif
+ {
+ decoder_t *e_decoder = client_data;
+ flac_private_t *priv = e_decoder->private;
+@@ -363,7 +424,11 @@
+ }
+
+
++#if NEED_EASYFLAC
+ FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++#else
++FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++#endif
+ {
+ decoder_t *e_decoder = client_data;
+ flac_private_t *priv = e_decoder->private;
+@@ -389,7 +454,11 @@
+ }
+
+
++#if NEED_EASYFLAC
+ void easyflac_metadata_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++#else
++void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++#endif
+ {
+ decoder_t *e_decoder = client_data;
+ flac_private_t *priv = e_decoder->private;
+@@ -409,12 +478,26 @@
+ }
+
+
++#if NEED_EASYFLAC
+ void easyflac_error_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++#else
++void error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++#endif
+ {
+
+
+ }
+
++#if !NEED_EASYFLAC
++FLAC__bool eof_callback(const FLAC__StreamDecoder *decoder, void *client_data)
++{
++ decoder_t *e_decoder = client_data;
++ flac_private_t *priv = e_decoder->private;
++
++ return priv->eos;
++}
++#endif
++
+
+ void resize_buffer(flac_private_t *flac, int newchannels, int newsamples)
+ {
+@@ -457,7 +540,11 @@
+
+
+
++#if NEED_EASYFLAC
+ if (EasyFLAC__is_oggflac(priv->decoder))
++#else
++ if (priv->is_oggflac)
++#endif
+ cb->printf_metadata(decoder->callback_arg, 2,
+ _("Ogg FLAC stream: %d bits, %d channel, %ld Hz"),
+ priv->bits_per_sample,
+--- old/vorbis-tools-1.1.1/ogg123/easyflac.c 2005-06-03 11:15:09.000000000 +0100
++++ vorbis-tools-1.1.1/ogg123/easyflac.c 2007-04-07 17:25:26.000000000 +0100
+@@ -33,10 +33,12 @@
+ *
+ */
+
++#include <FLAC/export.h>
++#if !defined(FLAC_API_VERSION_CURRENT) || (FLAC_API_VERSION_CURRENT < 8)
++
+ #include <stdlib.h>
+ #include "easyflac.h"
+
+-
+ FLAC__bool EasyFLAC__is_oggflac(EasyFLAC__StreamDecoder *decoder)
+ {
+ return decoder->is_oggflac;
+@@ -373,3 +375,5 @@
+ else
+ return FLAC__stream_decoder_process_until_end_of_stream(decoder->flac);
+ }
++
++#endif
+--- old/vorbis-tools-1.1.1/oggenc/flac.c 2005-06-03 11:15:10.000000000 +0100
++++ vorbis-tools-1.1.1/oggenc/flac.c 2007-04-07 18:17:27.000000000 +0100
+@@ -20,15 +20,25 @@
+ #include "platform.h"
+ #include "resample.h"
+
+-#define DEFAULT_FLAC_FRAME_SIZE 4608
++#if !defined(FLAC_API_VERSION_CURRENT) || (FLAC_API_VERSION_CURRENT < 8)
++#define NEED_EASYFLAC 1
++#endif
++
++#if NEED_EASYFLAC
++static FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
++static FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
++static void easyflac_metadata_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
++static void easyflac_error_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++#else
++static FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data);
++static FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
++static void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
++static void error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
++static FLAC__bool eof_callback(const FLAC__StreamDecoder *decoder, void *client_data);
++#endif
+
+-FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
+-FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
+-void easyflac_metadata_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
+-void easyflac_error_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
+-
+-void resize_buffer(flacfile *flac, int newchannels, int newsamples);
+-void copy_comments (vorbis_comment *v_comments, FLAC__StreamMetadata_VorbisComment *f_comments);
++static void resize_buffer(flacfile *flac, int newchannels, int newsamples);
++static void copy_comments (vorbis_comment *v_comments, FLAC__StreamMetadata_VorbisComment *f_comments);
+
+
+ int flac_id(unsigned char *buf, int len)
+@@ -76,6 +86,7 @@
+ flac->in = in;
+
+ /* Setup FLAC decoder */
++#if NEED_EASYFLAC
+ flac->decoder = EasyFLAC__stream_decoder_new(oggflac_id(oldbuf, buflen));
+ EasyFLAC__set_client_data(flac->decoder, flac);
+ EasyFLAC__set_read_callback(flac->decoder, &easyflac_read_callback);
+@@ -85,14 +96,32 @@
+ EasyFLAC__set_metadata_respond(flac->decoder, FLAC__METADATA_TYPE_STREAMINFO);
+ EasyFLAC__set_metadata_respond(flac->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
+ EasyFLAC__init(flac->decoder);
++#else
++ flac->decoder = FLAC__stream_decoder_new();
++ FLAC__stream_decoder_set_md5_checking(flac->decoder, false);
++ FLAC__stream_decoder_set_metadata_respond(flac->decoder, FLAC__METADATA_TYPE_STREAMINFO);
++ FLAC__stream_decoder_set_metadata_respond(flac->decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
++ if(oggflac_id(oldbuf, buflen))
++ FLAC__stream_decoder_init_ogg_stream(flac->decoder, read_callback, /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, eof_callback, write_callback, metadata_callback, error_callback, flac);
++ else
++ FLAC__stream_decoder_init_stream(flac->decoder, read_callback, /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, eof_callback, write_callback, metadata_callback, error_callback, flac);
++#endif
+
+ /* Callback will set the total samples and sample rate */
++#if NEED_EASYFLAC
+ EasyFLAC__process_until_end_of_metadata(flac->decoder);
++#else
++ FLAC__stream_decoder_process_until_end_of_metadata(flac->decoder);
++#endif
+
+ /* Callback will set the number of channels and resize the
+ audio buffer */
++#if NEED_EASYFLAC
+ EasyFLAC__process_single(flac->decoder);
+-
++#else
++ FLAC__stream_decoder_process_single(flac->decoder);
++#endif
++
+ /* Copy format info for caller */
+ opt->rate = flac->rate;
+ opt->channels = flac->channels;
+@@ -133,11 +162,19 @@
+ }
+ else if (!flac->eos)
+ {
++#if NEED_EASYFLAC
+ ret = EasyFLAC__process_single(flac->decoder);
+ if (!ret ||
+ EasyFLAC__get_state(flac->decoder)
+ == FLAC__STREAM_DECODER_END_OF_STREAM)
+ flac->eos = 1; /* Bail out! */
++#else
++ ret = FLAC__stream_decoder_process_single(flac->decoder);
++ if (!ret ||
++ FLAC__stream_decoder_get_state(flac->decoder)
++ == FLAC__STREAM_DECODER_END_OF_STREAM)
++ flac->eos = 1; /* Bail out! */
++#endif
+ } else
+ break;
+ }
+@@ -157,13 +194,22 @@
+ free(flac->buf);
+ free(flac->oldbuf);
+ free(flac->comments);
++#if NEED_EASYFLAC
+ EasyFLAC__finish(flac->decoder);
+ EasyFLAC__stream_decoder_delete(flac->decoder);
++#else
++ FLAC__stream_decoder_finish(flac->decoder);
++ FLAC__stream_decoder_delete(flac->decoder);
++#endif
+ free(flac);
+ }
+
+
++#if NEED_EASYFLAC
+ FLAC__StreamDecoderReadStatus easyflac_read_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)
++#else
++FLAC__StreamDecoderReadStatus read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
++#endif
+ {
+ flacfile *flac = (flacfile *) client_data;
+ int i = 0;
+@@ -200,7 +246,11 @@
+ return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
+ }
+
++#if NEED_EASYFLAC
+ FLAC__StreamDecoderWriteStatus easyflac_write_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++#else
++FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data)
++#endif
+ {
+ flacfile *flac = (flacfile *) client_data;
+ int samples = frame->header.blocksize;
+@@ -221,7 +271,11 @@
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ }
+
++#if NEED_EASYFLAC
+ void easyflac_metadata_callback(const EasyFLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++#else
++void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
++#endif
+ {
+ flacfile *flac = (flacfile *) client_data;
+
+@@ -240,11 +294,24 @@
+ }
+ }
+
++#if NEED_EASYFLAC
+ void easyflac_error_callback(const EasyFLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++#else
++void error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
++#endif
+ {
+- flacfile *flac = (flacfile *) client_data;
++ flacfile *flac = (flacfile *) client_data;
++
++}
++
++#if !NEED_EASYFLAC
++FLAC__bool eof_callback(const FLAC__StreamDecoder *decoder, void *client_data)
++{
++ flacfile *flac = (flacfile *) client_data;
+
++ return feof(flac->in)? true : false;
+ }
++#endif
+
+
+ void resize_buffer(flacfile *flac, int newchannels, int newsamples)
+--- old/vorbis-tools-1.1.1/oggenc/easyflac.c 2005-06-03 11:15:10.000000000 +0100
++++ vorbis-tools-1.1.1/oggenc/easyflac.c 2007-04-07 17:25:56.000000000 +0100
+@@ -33,6 +33,9 @@
+ *
+ */
+
++#include <FLAC/export.h>
++#if !defined(FLAC_API_VERSION_CURRENT) || (FLAC_API_VERSION_CURRENT < 8)
++
+ #include <stdlib.h>
+ #include "easyflac.h"
+
+@@ -373,3 +376,5 @@
+ else
+ return FLAC__stream_decoder_process_until_end_of_stream(decoder->flac);
+ }
++
++#endif
+--- old/vorbis-tools-1.1.1/oggenc/flac.h 2005-06-03 11:15:10.000000000 +0100
++++ vorbis-tools-1.1.1/oggenc/flac.h 2007-04-07 17:31:53.000000000 +0100
+@@ -5,10 +5,21 @@
+ #include "encode.h"
+ #include "audio.h"
+ #include <stdio.h>
++#include <FLAC/stream_decoder.h>
++#if !defined(FLAC_API_VERSION_CURRENT) || (FLAC_API_VERSION_CURRENT < 8)
++#define NEED_EASYFLAC 1
++#endif
++#if NEED_EASYFLAC
++#include <OggFLAC/stream_decoder.h>
+ #include "easyflac.h"
++#endif
+
+ typedef struct {
++#if NEED_EASYFLAC
+ EasyFLAC__StreamDecoder *decoder;
++#else
++ FLAC__StreamDecoder *decoder;
++#endif
+ short channels;
+ int rate;
+ long totalsamples; /* per channel, of course */
diff --git a/abs/extra/vte/PKGBUILD b/abs/extra/vte/PKGBUILD
new file mode 100644
index 0000000..569db33
--- /dev/null
+++ b/abs/extra/vte/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 16789 2008-10-22 03:33:22Z allan $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=vte
+pkgver=0.17.4
+pkgrel=2
+pkgdesc="VTE - Virtual Terminal Emulator"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('gtk2>=2.11.3' 'libsm')
+options=('!libtool')
+makedepends=('pygtk>=2.11.0' 'pkgconfig' 'intltool')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/GNOME/sources/vte/0.17/vte-${pkgver}.tar.bz2
+ vte-0.16.0-reaper-python-bindings.patch)
+md5sums=('ec6cb2668db7146eae7cfc48af98f3ed' 'efe29cd40635e73fa3152f77d91a4f39')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ patch -Np1 -i ${startdir}/src/vte-0.16.0-reaper-python-bindings.patch || return 1
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/vte \
+ --localstatedir=/var --disable-static || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+}
diff --git a/abs/extra/vte/vte-0.16.0-reaper-python-bindings.patch b/abs/extra/vte/vte-0.16.0-reaper-python-bindings.patch
new file mode 100644
index 0000000..47d6ce6
--- /dev/null
+++ b/abs/extra/vte/vte-0.16.0-reaper-python-bindings.patch
@@ -0,0 +1,62 @@
+diff -NarU 3 vte-0.16.0.orig/python/vte.defs vte-0.16.0/python/vte.defs
+--- vte-0.16.0.orig/python/vte.defs 2007-02-26 22:05:02.000000000 +0100
++++ vte-0.16.0/python/vte.defs 2007-03-14 20:44:55.000000000 +0100
+@@ -7,6 +7,14 @@
+ (gtype-id "VTE_TYPE_TERMINAL")
+ )
+
++(define-object Reaper
++ (in-module "Vte")
++ (parent "GObject")
++ (c-name "VteReaper")
++ (gtype-id "VTE_TYPE_REAPER")
++)
++
++
+ ;; Enumerations and flags ...
+
+ (define-enum TerminalEraseBinding
+@@ -701,4 +709,14 @@
+ (return-type "const-char*")
+ )
+
++;; From ../src/reaper.h
++(define-function vte_reaper_get_type
++ (c-name "vte_reaper_get_type")
++ (return-type "GtkType")
++)
++
++(define-function reaper_get
++ (c-name "vte_reaper_get")
++ (return-type "VteReaper*")
++)
+
+diff -NarU 3 vte-0.16.0.orig/python/vte.override vte-0.16.0/python/vte.override
+--- vte-0.16.0.orig/python/vte.override 2007-02-26 22:05:02.000000000 +0100
++++ vte-0.16.0/python/vte.override 2007-03-14 20:46:12.000000000 +0100
+@@ -7,12 +7,14 @@
+ #include <pygobject.h>
+ #include <gtk/gtk.h>
+ #include "../src/vte.h"
++#include "../src/reaper.h"
+ %%
+ modulename vte
+ %%
+ import gtk.gdk.Pixbuf as PyGdkPixbuf_Type
+ import gtk.MenuShell as PyGtkMenuShell_Type
+ import gtk.Widget as PyGtkWidget_Type
++import gobject.GObject as PyGObject_Type
+ %%
+ override vte_terminal_feed kwargs
+ static PyObject *
+diff -NarU 3 vte-0.16.0.orig/python/vtemodule.c vte-0.16.0/python/vtemodule.c
+--- vte-0.16.0.orig/python/vtemodule.c 2007-02-26 22:05:02.000000000 +0100
++++ vte-0.16.0/python/vtemodule.c 2007-03-14 20:47:12.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include <pygobject.h>
+ #include <pygtk/pygtk.h>
+ #include "../src/vte.h"
++#include "../src/reaper.h"
+
+ extern void pyvte_register_classes(PyObject * d);
+ extern PyMethodDef pyvte_functions[];
diff --git a/abs/extra/wavpack/PKGBUILD b/abs/extra/wavpack/PKGBUILD
new file mode 100644
index 0000000..c0ab01a
--- /dev/null
+++ b/abs/extra/wavpack/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 3456 2008-06-22 19:29:25Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Shinlun Hsieh <yngwiexx@yahoo.com.tw>
+# Contributor: Michal Hybner <dta081@gmail.com>
+pkgname=wavpack
+pkgver=4.50.0
+pkgrel=1
+pkgdesc="A completely open audio compression format providing lossless, high-quality lossy, and a unique hybrid compression mode"
+arch=('i686' 'x86_64')
+url="http://www.wavpack.com/"
+license=('custom')
+depends=('glibc')
+options=('!libtool')
+source=(http://www.wavpack.com/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('9cf854fc2e5757f6534a3a231ec6bfbc')
+
+build() {
+ cd ${startdir}/src/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --enable-mmx --disable-static || return 1
+ make || return 1
+ make DESTDIR=${startdir}/pkg install || return 1
+ install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname}
+ install -m644 license.txt ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
+ rm -f ${startdir}/pkg/usr/lib/*.a
+}
diff --git a/abs/extra/webmin/PKGBUILD b/abs/extra/webmin/PKGBUILD
new file mode 100644
index 0000000..1ce083e
--- /dev/null
+++ b/abs/extra/webmin/PKGBUILD
@@ -0,0 +1,222 @@
+# $Id: PKGBUILD 18672 2008-11-08 15:27:08Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+pkgname=webmin
+pkgver=1.441
+pkgrel=2
+pkgdesc="a web-based interface for system administration"
+arch=(i686 x86_64)
+license=('custom:webmin')
+url="http://www.webmin.com/"
+depends=('perl')
+makedepends=('perl-net-ssleay')
+backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' 'etc/webmin/config' 'etc/webmin/webmin.cats' \
+'etc/webmin/pacman/config' \
+'etc/webmin/at/config' \
+'etc/webmin/acl/config' \
+'etc/webmin/lvm/config' \
+'etc/webmin/net/config' \
+'etc/webmin/nis/config' \
+'etc/webmin/pam/config' \
+'etc/webmin/cron/config' \
+'etc/webmin/file/config' \
+'etc/webmin/grub/config' \
+'etc/webmin/init/config' \
+'etc/webmin/ipfw/config' \
+'etc/webmin/lilo/config' \
+'etc/webmin/proc/config' \
+'etc/webmin/raid/config' \
+'etc/webmin/spam/config' \
+'etc/webmin/sshd/config' \
+'etc/webmin/time/config' \
+'etc/webmin/cluster-passwd/config' \
+'etc/webmin/software/config' \
+'etc/webmin/webminlog/config' \
+'etc/webmin/cluster-webmin/config' \
+'etc/webmin/bind8/config' \
+'etc/webmin/dhcpd/config' \
+'etc/webmin/fdisk/config' \
+'etc/webmin/mount/config' \
+'etc/webmin/mysql/config' \
+'etc/webmin/quota/config' \
+'etc/webmin/samba/config' \
+'etc/webmin/shell/config' \
+'etc/webmin/squid/config' \
+'etc/webmin/adsl-client/config' \
+'etc/webmin/servers/config' \
+'etc/webmin/cluster-shell/config' \
+'etc/webmin/bandwidth/config' \
+'etc/webmin/ppp-client/config' \
+'etc/webmin/lpadmin/config' \
+'etc/webmin/apache/config' \
+'etc/webmin/firewall/config' \
+'etc/webmin/stunnel/config' \
+'etc/webmin/burner/config' \
+'etc/webmin/exports/config' \
+'etc/webmin/backup-config/config' \
+'etc/webmin/custom/config' \
+'etc/webmin/htaccess-htpasswd/config' \
+'etc/webmin/logrotate/config' \
+'etc/webmin/format/config' \
+'etc/webmin/fsdump/config' \
+'etc/webmin/passwd/config' \
+'etc/webmin/cluster-useradmin/config' \
+'etc/webmin/cluster-software/config' \
+'etc/webmin/cluster-copy/config' \
+'etc/webmin/cluster-cron/config' \
+'etc/webmin/telnet/config' \
+'etc/webmin/status/config' \
+'etc/webmin/syslog/config' \
+'etc/webmin/updown/config' \
+'etc/webmin/usermin/config' \
+'etc/webmin/webmin/config' \
+'etc/webmin/xinetd/config' \
+'etc/webmin/openslp/config' \
+'etc/webmin/procmail/config' \
+'etc/webmin/fetchmail/config' \
+'etc/webmin/postgresql/config' \
+'etc/webmin/useradmin/config' \
+'etc/webmin/mailboxes/config' \
+'etc/webmin/inittab/config' \
+'etc/webmin/change-user/config' \
+'etc/webmin/postfix/config' \
+'etc/webmin/proftpd/config' \
+'etc/webmin/pserver/config' \
+'etc/webmin/dnsadmin/config' )
+install=webmin.install
+source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz
+ ftp://ftp.archlinux.org/other/webmin/webmin-config.tar.bz2
+ ftp://ftp.archlinux.org/other/webmin/webmin-pacman.tar.bz2
+ webmin.rc
+ run)
+
+build() {
+ # NOTE: USE --asroot build option to avoid fakeroot error!
+ cd $startdir/src/$pkgname-$pkgver
+ # add patches from webmin.com
+ #for i in ../*.wbm
+ #do tar xvf $i
+ #done
+ #for i in ../*.wbt
+ #do tar xvf $i
+ #done
+ # delete stuff that's not needed
+ rm -f mount/freebsd-mounts*
+ rm -f mount/openbsd-mounts*
+ rm -f mount/macos-mounts*
+
+ # remove modules we do not support
+ rm -rf {bacula-backup,ldap-useradmin,mon,sentry,frox,jabber,majordomo,qmail,sendmail,sarg,wuftpd,webalizer,inetd,ipsec,pap,pptp-client,pptp-server,shorewall,smart-status,vgetty,heartbeat,cfengine,cpan,sgiexports,hpuxexports,qmailadmin,bsdexports,dfsadmin}
+
+ #remove config files from other distros
+ rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*')
+
+ # remove caldera theme
+ rm -rf caldera
+
+ # remove init-scripts from other distros
+ rm webmin-gentoo-init
+ rm webmin-init
+ rm webmin-caldera-init
+ rm webmin-daemon
+
+ # remove update stuff to avoid problems with updating webmin,modules and themes without pacman
+ rm -f webmin/{update.cgi,update.pl,update_sched.cgi,upgrade.cgi,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi}
+ rm -f usermin/{upgrade.cgi,update.cgi,update.pl,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi}
+
+ # remove modules add because we don't want files installed without pacman control
+ rm -f webmin/{install_mod.cgi,delete_mod.cgi}
+
+ # setting perl path
+ (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl -
+
+ # create dirs
+ mkdir -p $startdir/pkg/opt/webmin
+ mkdir -p $startdir/pkg/var/log/webmin
+ mkdir -p $startdir/pkg/etc/webmin
+
+ # install pam stuff
+ install -D -m 644 webmin-pam $startdir/pkg/etc/pam.d/webmin
+
+ # remove other distros and add only Archlinux don't change next line else it will not work!
+ rm os_list.txt
+ echo 'Archlinux Any version generic-linux * -d "/etc/pacman.d"' >> os_list.txt
+
+ # Add rc.conf support to boot and shutdown menu and lock editing of this module
+ cd init/
+ sed -i -e 's:^local_down=.*:local_down=Archlinux RC.CONF,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*')
+ sed -i -e 's:^local_script=.*:local_script=Archlinux RC.LOCAL,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*')
+ sed -i -e 's:^index_downscript=.*:index_downscript=Archlinux RC.CONF:g' lang/*
+ sed -i -e 's:^index_script=.*:index_script=Archlinux RC.LOCAL:g' lang/*
+ sed -i -e 's:^noconfig=0:noconfig=1:g' defaultacl
+
+ # Add pacman menu
+ cd $startdir/src/$pkgname-$pkgver
+ cp -rf custom/ pacman
+ cp -rf mscstyle3/custom mscstyle3/pacman
+ sed -i -e 's:^noconfig=0:noconfig=1:g' -e 's:^edit=1:edit=0:g' pacman/defaultacl
+ sed -i -e '/desc/d' -e '/longdesc/d' pacman/module.info
+ sed -i -e 's:^name=Custom:name=Pacman:g' pacman/module.info
+ echo 'category=system' >> pacman/module.info
+ echo 'desc=Pacman' >> pacman/module.info
+ sed -i -e 's:^index_title=.*:index_title=Pacman:g' pacman/lang/*
+
+ # copy stuff to right dirs
+ cd $startdir/src/$pkgname-$pkgver
+ cp -rp * $startdir/pkg/opt/webmin
+ cd $startdir/src/webmin-config
+ cp -rfp * $startdir/pkg/opt/webmin
+
+ # define parameters for setup.sh
+ config_dir=$startdir/pkg/etc/webmin
+ var_dir=$startdir/pkg/var/log/webmin
+ perl=/usr/bin/perl
+ autoos=1
+ port=10000
+ login=root
+ crypt="XXX"
+ ssl=1
+ atboot=0
+ nostart=1
+ nochown=1
+ autothird=1
+ nouninstall=1
+ noperlpath=1
+ atbootyn=n
+ tempdir=$startdir/pkg/tmp
+ export config_dir var_dir perl autoos port tempdir login crypt ssl nochown autothird nouninstall nostart noperlpath atbootyn
+
+ # Fix setup.sh
+ sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' $startdir/pkg/opt/webmin/setup.sh
+ $startdir/pkg/opt/webmin/setup.sh
+
+ # Fixup the config files to use their real locations
+ sed -i 's:^pidfile=.*$:pidfile=/var/run/webmin.pid:' $startdir/pkg/etc/webmin/miniserv.conf
+ find $startdir/pkg/etc/webmin -type f -exec sed -i "s:$startdir/pkg::g" {} \;
+
+ # make it only accessible by localhost and private networks
+ echo 'allow=127.0.0.1 192.168. 172.16. 10.' >> $startdir/pkg/etc/webmin/miniserv.conf
+
+ #Let not fork this bad boy. We need to control it w/ runit.
+ echo 'nofork=1' >> $startdir/pkg/etc/webmin/miniserv.conf
+
+ # install pacman menu
+ cd $startdir/src/webmin-pacman/config
+ cp -rfp * $startdir/pkg/etc/webmin/pacman
+
+ #install rc file
+ install -D -m 755 $startdir/src/webmin.rc $startdir/pkg/etc/rc.d/webmin
+
+ # delete temp dir
+ rm -r $startdir/pkg/tmp
+ # install license
+ install -m 644 -D $startdir/src/$pkgname-$pkgver/LICENCE $startdir/pkg/usr/share/licenses/webmin/LICENCE
+
+ #runit
+ mkdir -p $startdir/pkg/etc/sv/webmin/supervise
+ install -D -m 755 $startdir/src/run $startdir/pkg/etc/sv/webmin
+}
+md5sums=('b841af1b1a9f78795814ce8211e6ad81'
+ 'da6bea412a5be8cf82a813078fec5847'
+ '4cf1139093ea59044be42a4f173fb8aa'
+ '0673e51af0e81418b4a6c1e205f7e5cd'
+ 'bc578b249e2090deb84119a626c53c48')
diff --git a/abs/extra/webmin/run b/abs/extra/webmin/run
new file mode 100644
index 0000000..659c6cd
--- /dev/null
+++ b/abs/extra/webmin/run
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo Starting Webmin server in /opt/webmin
+trap '' 1
+LANG=
+export LANG
+#PERLIO=:raw
+unset PERLIO
+export PERLIO
+PERLLIB=/opt/webmin
+export PERLLIB
+exec '/opt/webmin/miniserv.pl' /etc/webmin/miniserv.conf
diff --git a/abs/extra/webmin/webmin-config.tar.bz2 b/abs/extra/webmin/webmin-config.tar.bz2
new file mode 100644
index 0000000..a51b43d
--- /dev/null
+++ b/abs/extra/webmin/webmin-config.tar.bz2
Binary files differ
diff --git a/abs/extra/webmin/webmin-pacman.tar.bz2 b/abs/extra/webmin/webmin-pacman.tar.bz2
new file mode 100644
index 0000000..548acc2
--- /dev/null
+++ b/abs/extra/webmin/webmin-pacman.tar.bz2
Binary files differ
diff --git a/abs/extra/webmin/webmin.install b/abs/extra/webmin/webmin.install
new file mode 100644
index 0000000..ce5da6c
--- /dev/null
+++ b/abs/extra/webmin/webmin.install
@@ -0,0 +1,39 @@
+# arg 1: the new package version
+post_install() {
+ local crypt=$(grep "^root:" ${ROOT}/etc/shadow | cut -f 2 -d :)
+ crypt=${crypt//\\/\\\\}
+ crypt=${crypt//\//\\\/}
+ sed -i "s/root:XXX/root:${crypt}/" /etc/webmin/miniserv.users
+
+cat << EOF
+Note:
+==> It is not allowed to install 3rd party modules, or delete existing modules.
+==> Please write your own PKGBUILDS for 3rd party modules and additional themes.
+Setup:
+==> To make webmin start at boot time, add webmin to rc.conf daemons
+==> Point your web browser to http://localhost:10000 to use webmin.
+==> The access is restricted to localhost, if you want to connect from other locations
+==> change /etc/webmin/miniserv.conf to something like that: allow=127.0.0.1 <your-ip>
+==> If you want to have ssl encryption please install 'perl-net-ssleay' additional.
+EOF
+# fix man module
+ cd /opt/webmin/man
+ for i in $(find . -name '*.gz'); do
+ gzip -df $i
+ done
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ # uninstall unzipped files
+ rm -r /opt/webmin/man
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/webmin/webmin.rc b/abs/extra/webmin/webmin.rc
new file mode 100644
index 0000000..ee83fbe
--- /dev/null
+++ b/abs/extra/webmin/webmin.rc
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+start=/etc/webmin/start
+stop=/etc/webmin/stop
+lockfile=/var/lock/webmin
+
+case "$1" in
+'start')
+ stat_busy "Starting Webmin daemon"
+ $start >/dev/null 2>&1 </dev/null
+ RETVAL=$?
+ if [ "$RETVAL" = "0" ]; then
+ touch $lockfile >/dev/null 2>&1
+ stat_done
+ else
+ stat_fail
+fi
+;;
+
+'stop')
+ stat_busy "Stopping Webmin daemon"
+ $stop >/dev/null 2>&1 </dev/null
+ RETVAL=$?
+ if [ "$RETVAL" = "0" ]; then
+ rm -f $lockfile
+ stat_done
+ else
+ stat_fail
+fi
+;;
+
+'restart')
+ $stop && $start
+ RETVAL=$?
+;;
+*)
+echo "Usage: $0 { start | stop | restart }"
+RETVAL=1
+;;
+esac
+exit $RETVAL \ No newline at end of file
diff --git a/abs/extra/windowmaker/PKGBUILD b/abs/extra/windowmaker/PKGBUILD
new file mode 100644
index 0000000..5422f87
--- /dev/null
+++ b/abs/extra/windowmaker/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 27785 2009-02-25 23:32:40Z eric $
+# Maintainer: aurelien <aurelien@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+pkgname=windowmaker
+pkgver=0.92.0
+pkgrel=5
+pkgdesc="An X11 window manager with a NEXTSTEP look and feel"
+arch=(i686 x86_64)
+url="http://www.windowmaker.info/"
+license=('GPL' 'custom')
+depends=('libxinerama' 'libpng' 'libxpm' 'libxft' 'libtiff' 'giflib')
+options=('!libtool')
+source=(http://windowmaker.info/pub/source/release/WindowMaker-$pkgver.tar.bz2 windowmaker-gcc4.patch.tar.bz2)
+md5sums=('aaac5421b686ed2d3e6ab65229c98097' 'd9fb6a9c255f5c03d0e0c83dc3cd2320')
+
+build() {
+ cd $srcdir/WindowMaker-$pkgver
+ patch -Np1 -i ../windowmaker-gcc4.patch || return 1
+ libtoolize --force --copy || return 1
+ aclocal || return 1
+ autoconf || return 1
+ automake || return 1
+ [ -z "$LINGUAS" ] && export LINGUAS="`ls po/*.po | sed 's:po/\(.*\)\.po$:\1:'`"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --with-gnustepdir=/usr/share/GNUstep --with-nlsdir=/usr/share/locale \
+ --enable-xinerama || return 1
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+ install -D -m644 COPYING.WTFPL $pkgdir/usr/share/licenses/$pkgname/COPYING.WTFPL
+}
+
diff --git a/abs/extra/windowmaker/windowmaker-gcc4.patch.tar.bz2 b/abs/extra/windowmaker/windowmaker-gcc4.patch.tar.bz2
new file mode 100644
index 0000000..fae12a9
--- /dev/null
+++ b/abs/extra/windowmaker/windowmaker-gcc4.patch.tar.bz2
Binary files differ
diff --git a/abs/extra/wireshark/PKGBUILD b/abs/extra/wireshark/PKGBUILD
new file mode 100644
index 0000000..4b7a88c
--- /dev/null
+++ b/abs/extra/wireshark/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 34765 2009-04-11 14:17:32Z hugo $
+# Maintainer: Hugo Doria <hugo@archlinux.org>
+
+pkgname=wireshark
+pkgver=1.2.0
+pkgrel=3
+pkgdesc="A free network protocol analyzer for Unix/Linux and Windows"
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('gtk2>=2.14.5' 'heimdal>=1.2.1' 'libpcap>=1.0.0' 'bash' 'gnutls>=2.4.1' 'libcap>=2.16')
+makedepends=('bison' 'flex')
+url="http://www.wireshark.org/"
+replaces=('ethereal')
+options=(!libtool)
+source=(http://www.wireshark.org/download/src/${pkgname}-${pkgver}.tar.gz wireshark.desktop wireshark.png)
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ export CFLAGS="-fno-unit-at-a-time ${CFLAGS}"
+ ./configure --prefix=/usr --with-ssl || return 1
+ make all || return 1
+ make DESTDIR=${pkgdir} install || return 1
+
+ install -Dm644 ${srcdir}/wireshark.png ${pkgdir}/usr/share/icons/wireshark.png
+ install -Dm644 ${srcdir}/wireshark.desktop ${pkgdir}/usr/share/applications/wireshark.desktop
+}
diff --git a/abs/extra/wireshark/wireshark.desktop b/abs/extra/wireshark/wireshark.desktop
new file mode 100644
index 0000000..f4317f6
--- /dev/null
+++ b/abs/extra/wireshark/wireshark.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+GenericName=Wireshark
+Comment=Network protocol analyzer
+Name=wireshark
+Exec=wireshark
+Icon=/usr/share/icons/wireshark.png
+Type=Application
+Terminal=false
+Categories=Application;Network;
diff --git a/abs/extra/wireshark/wireshark.png b/abs/extra/wireshark/wireshark.png
new file mode 100644
index 0000000..4e40263
--- /dev/null
+++ b/abs/extra/wireshark/wireshark.png
Binary files differ
diff --git a/abs/extra/wol/PKGBUILD b/abs/extra/wol/PKGBUILD
new file mode 100755
index 0000000..a9bb4eb
--- /dev/null
+++ b/abs/extra/wol/PKGBUILD
@@ -0,0 +1,19 @@
+# Contributor: Markus Volkmann <mcfock@counterstrike.de>
+pkgname=wol
+pkgver=0.7.1
+pkgrel=3
+pkgdesc="wol implements Wake On LAN functionality in a small program. It wakes up hardware that is Magic Packet compliant."
+license="GPL"
+url="http://ahh.sourceforge.net/wol/"
+arch=('i686')
+source=(http://easynews.dl.sourceforge.net/sourceforge/ahh/wol-$pkgver.tar.gz wakeonlan.sh)
+md5sums=('c2fa9d7e771134ac8c89d56b8197d4ca')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+ install -m755 $startdir/src/wakeonlan.sh $startdir/pkg/usr/bin/wakeonlan.sh
+}
+
diff --git a/abs/extra/wol/wakeonlan.sh b/abs/extra/wol/wakeonlan.sh
new file mode 100755
index 0000000..f87dd34
--- /dev/null
+++ b/abs/extra/wol/wakeonlan.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+DIR="/data/srv/hobbit/var/hostdata/$1"
+FILE=`ls -t --group-directories-first $DIR|tail -n 1`
+for mac in `grep HW "$DIR/$FILE" |awk '{ print $5 } '`
+do
+ /usr/bin/wol -v $mac
+done
+
+
+
diff --git a/abs/extra/wxgtk/ChangeLog b/abs/extra/wxgtk/ChangeLog
new file mode 100644
index 0000000..03e9f96
--- /dev/null
+++ b/abs/extra/wxgtk/ChangeLog
@@ -0,0 +1,18 @@
+2009-03-06 Eric Belanger <eric@archlinux.org>
+
+ * wxgtk 2.8.9.2-1
+ * Upstream update
+ * Switched to wxpython source tarball
+
+2008-09-26 Eric Belanger <eric@archlinux.org>
+
+ * wxgtk 2.8.9-1
+ * Upstream update
+ * Added mediactrl support (close FS#11220)
+
+2008-07-05 Eric Belanger <eric@archlinux.org>
+
+ * wxgtk 2.8.8-1
+ * Upstream update
+ * Enabled gnomeprint - needed for wxpython to build
+ * Added ChangeLog
diff --git a/abs/extra/wxgtk/PKGBUILD b/abs/extra/wxgtk/PKGBUILD
new file mode 100644
index 0000000..d98ac43
--- /dev/null
+++ b/abs/extra/wxgtk/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 29177 2009-03-06 09:02:47Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Original Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# New Version - Contributor: Bob Finch <w9ya@arrl.net>
+# with help from J. Santiago Hirschfeld <jsantiagoh@yahoo.com.ar> aka Angelus
+
+pkgname=wxgtk
+pkgver=2.8.9.2
+pkgrel=2
+pkgdesc="wxGTK - GTK+ implementation of wxWidgets API for GUI"
+arch=('i686' 'x86_64')
+url="http://wxwidgets.org"
+license=('custom:wxWindows')
+depends=('gtk2>=2.12.11' 'mesa' 'libjpeg')
+#makedepends=('libgnomeprintui')
+#source=(http://downloads.sourceforge.net/wxwindows/wxGTK-${pkgver}.tar.bz2)
+source=(http://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2)
+md5sums=('e3d89746af98b9279e4ff39a57f6dc63')
+sha1sums=('a0d58d8b9606d04a35b9853da15eb7dfb08d5637')
+
+build() {
+ cd ${srcdir}/wxPython-src-${pkgver}
+ ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \
+ --enable-graphics_ctx --without-gnomeprint --disable-optimize || return 1
+ make || return 1
+ make -C locale allmo || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ cd contrib/src
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ install -D -m644 ../../docs/licence.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
+}
diff --git a/abs/extra/wxgtk/__changelog b/abs/extra/wxgtk/__changelog
new file mode 100644
index 0000000..3bf8bed
--- /dev/null
+++ b/abs/extra/wxgtk/__changelog
@@ -0,0 +1 @@
+remove libgnomeprint
diff --git a/abs/extra/x11vnc/PKGBUILD b/abs/extra/x11vnc/PKGBUILD
new file mode 100644
index 0000000..650f81e
--- /dev/null
+++ b/abs/extra/x11vnc/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: damir <damir@archlinux.org>
+
+pkgname=x11vnc
+pkgver=0.9.7
+pkgrel=2
+pkgdesc="a VNC server for real X displays"
+arch=("i686" "x86_64")
+license=("GPL2")
+#source=(http://dl.sourceforge.net/sourceforge/libvncserver/$pkgname-$pkgver.tar.gz)
+url="http://www.karlrunge.com/x11vnc/"
+source=("http://x11vnc.sourceforge.net/dev/x11vnc-0.9.7.tar.gz")
+depends=('openssl' 'libjpeg' 'zlib' 'libx11' 'libxtst' 'libxinerama' 'libxdamage' 'libxrandr' 'avahi')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure
+ make || return 1
+ make prefix=$startdir/pkg/usr install || return 1
+}
+
+md5sums=('30a167577f657909b3355421e14e2ddb')
diff --git a/abs/extra/xalan-java/PKGBUILD b/abs/extra/xalan-java/PKGBUILD
new file mode 100644
index 0000000..634cb23
--- /dev/null
+++ b/abs/extra/xalan-java/PKGBUILD
@@ -0,0 +1,21 @@
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Hussam Al-Tayeb <ht990332@gmail.com>
+
+pkgname=xalan-java
+pkgver=2.7.1
+pkgrel=2
+pkgdesc="XSLT processor for transforming XML documents into HTML, text, or other XML document types"
+arch=('i686' 'x86_64')
+license=('APACHE')
+url="http://xml.apache.org/xalan-j"
+depends=('xerces2-java')
+source=(http://www.apache.org/dist/xml/xalan-j/xalan-j_${pkgver//./_}-bin-2jars.tar.gz)
+md5sums=('3ccda39bcd08b780436dfd2f22fb23d5')
+
+build() {
+ cd ${srcdir}/xalan-j_${pkgver//./_}
+ install -m755 -d ${pkgdir}/usr/share/java
+ install -m644 xalan.jar ${pkgdir}/usr/share/java/ || return 1
+ install -m644 xsltc.jar ${pkgdir}/usr/share/java/ || return 1
+}
diff --git a/abs/extra/xautomation/PKGBUILD b/abs/extra/xautomation/PKGBUILD
new file mode 100644
index 0000000..6151353
--- /dev/null
+++ b/abs/extra/xautomation/PKGBUILD
@@ -0,0 +1,18 @@
+# Contributor: raubkopierer <mail[dot]sensenmann[at]gmail[dot]com>
+
+pkgname=xautomation
+pkgver=1.02
+pkgrel=2
+pkgdesc="Controls X from the command line for scripts, and do 'visual scraping' to find things on the screen."
+url="http://hoopajoo.net/projects/xautomation.html"
+arch=('i686' 'x86_64')
+license=('GPL')
+source=(http://hoopajoo.net/static/projects/$pkgname-$pkgver.tar.gz)
+md5sums=('523198135f7cf7a5324189aef20ac48d')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/xdg-utils/PKGBUILD b/abs/extra/xdg-utils/PKGBUILD
new file mode 100644
index 0000000..c707346
--- /dev/null
+++ b/abs/extra/xdg-utils/PKGBUILD
@@ -0,0 +1,19 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xdg-utils
+pkgver=1.0.2
+pkgrel=1
+pkgdesc="Command line tools that assist applications with a variety of desktop integration tasks."
+arch=(i686 x86_64)
+url="http://portland.freedesktop.org/"
+license=(MIT)
+source=(http://portland.freedesktop.org/download/$pkgname-$pkgver.tgz)
+md5sums=('348a5b91dc66426505022c74a64b2940')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/abs/extra/xe/PKGBUILD b/abs/extra/xe/PKGBUILD
new file mode 100644
index 0000000..1ada156
--- /dev/null
+++ b/abs/extra/xe/PKGBUILD
@@ -0,0 +1,21 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=xe
+pkgver=2.16.2
+pkgrel=1
+pkgdesc="A multi system emulator, that emulates many console and handheld video game systems."
+arch=('i686' 'x86_64')
+depends=('gtk2>=2.10.11')
+url="http://www.xe-emulator.com"
+source=('http://www.xe-emulator.com/files/xe-x86-32-bin.2.16.2.tar.bz2' 'http://www.xe-emulator.com/files/bios.zip')
+install=xe.install
+build() {
+ cd $startdir/src/xe-x86
+ make
+ mkdir -p $startdir/pkg/usr/bin
+ mkdir -p $startdir/pkg/usr/lib/xe
+ mkdir -p $startdir/pkg/usr/lib/xe/bios
+ cp -rf xe modules rc manual.html $startdir/pkg/usr/lib/xe
+ cp -a ../bios/* $startdir/pkg/usr/lib/xe/bios
+}
diff --git a/abs/extra/xe/xe.install b/abs/extra/xe/xe.install
new file mode 100644
index 0000000..d0dd63d
--- /dev/null
+++ b/abs/extra/xe/xe.install
@@ -0,0 +1,18 @@
+# arg 1: the new package version
+post_install() {
+ ln -s /usr/lib/xe/xe /usr/bin/xe
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ rm -fr /usr/bin/xe
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/xerces2-java/PKGBUILD b/abs/extra/xerces2-java/PKGBUILD
new file mode 100644
index 0000000..526115d
--- /dev/null
+++ b/abs/extra/xerces2-java/PKGBUILD
@@ -0,0 +1,22 @@
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=xerces2-java
+pkgver=2.9.1
+pkgrel=2
+pkgdesc="High performance fully compliant Java XML parser"
+arch=('i686' 'x86_64')
+url="http://xml.apache.org/xerces2-j"
+license=('APACHE')
+provides=("java-xerces2=${pkgver}")
+conflicts=('java-xerces2')
+replaces=('java-xerces2')
+source=(http://www.apache.org/dist/xml/xerces-j/Xerces-J-bin.${pkgver}.tar.gz)
+md5sums=('32718d4cbe009f93d551ab8d3ef4b2aa')
+
+build() {
+ cd $startdir/src/xerces-${pkgver//./_}
+ install -m755 -d ${pkgdir}/usr/share/java
+ rm -f xercesSamples.jar
+ install -m644 *.jar ${pkgdir}/usr/share/java/ || return 1
+}
diff --git a/abs/extra/xfsdump/PKGBUILD b/abs/extra/xfsdump/PKGBUILD
new file mode 100644
index 0000000..1d40228
--- /dev/null
+++ b/abs/extra/xfsdump/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 26569 2009-02-09 18:40:22Z paul $
+# Maintainer: judd <jvinet@zeroflux.org>
+pkgname=xfsdump
+pkgver=3.0.0
+pkgrel=1
+pkgdesc="Additional XFS filesystem utilities"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://oss.sgi.com/projects/xfs/"
+depends=('xfsprogs>=3.0.0' 'attr>=2.4.39' 'acl>=2.2.45' 'dmapi')
+options=('!makeflags')
+source=(ftp://oss.sgi.com/projects/xfs/cmd_tars/xfsdump-${pkgver}.tar.gz)
+md5sums=('')
+options=(!emptydirs)
+
+build() {
+ cd $startdir/src/xfsdump-$pkgver
+ autoconf
+ ./configure --prefix=/usr
+ make || return 1
+ make prefix=$startdir/pkg/usr install
+ # fixes
+ rm -f $startdir/pkg/usr/lib/*.la
+ rm -f $startdir/pkg/usr/bin/{xfsdump,xfsrestore}
+}
diff --git a/abs/extra/xine-lib/ChangeLog b/abs/extra/xine-lib/ChangeLog
new file mode 100644
index 0000000..7ac9d33
--- /dev/null
+++ b/abs/extra/xine-lib/ChangeLog
@@ -0,0 +1,43 @@
+2009-02-11 Eric Belanger <eric@archlinux.org>
+
+ * xine-lib 1.1.16.2-1
+ * Upstream update
+
+2009-02-02 Eric Belanger <eric@archlinux.org>
+
+ * xine-lib 1.1.16.1-2
+ * Rebuilt against imagemagick 6.4.8.10
+
+2009-01-11 Eric Belanger <eric@archlinux.org>
+
+ * xine-lib 1.1.16.1-1
+ * Upstream update
+
+2009-01-10 Eric Belanger <eric@archlinux.org>
+
+ * xine-lib 1.1.16-1
+ * Upstream update
+
+2008-12-05 Eric Belanger <eric@archlinux.org>
+
+ * xine-lib 1.1.15-4
+ * Rebuilt against heimdal 1.2.1
+ * Added xcb support
+
+2008-11-27 Eric Belanger <eric@archlinux.org>
+
+ * xine-lib 1.1.15-3
+ * Added jack support (close FS#12020)
+ * Fixed several build issue (close FS#12117)
+
+2008-08-14 Eric Belanger <eric@archlinux.org>
+
+ * xine-lib 1.1.15-1
+ * Upstream update
+
+2008-07-28 Eric Belanger <eric@archlinux.org>
+
+ * xine-lib 1.1.14-2
+ * Switched to the more recent externel ffmpeg snapshot (close FS#10286)
+ * Updated win32 codecs directory location (close FS#11011)
+ * Added ChangeLog
diff --git a/abs/extra/xine-lib/PKGBUILD b/abs/extra/xine-lib/PKGBUILD
new file mode 100644
index 0000000..aa15b8f
--- /dev/null
+++ b/abs/extra/xine-lib/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 26791 2009-02-12 02:31:16Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=xine-lib
+pkgver=1.1.16.3
+pkgrel=4
+pkgdesc="A free video player for Unix"
+arch=('i686' 'x86_64')
+url="http://xinehq.de/"
+install=xine.install
+license=('LGPL' 'GPL')
+depends=('libgl' 'libxvmc' 'flac>=1.1.4' 'libvorbis' 'sdl' 'libmng' 'libtheora'
+ 'libxcb' 'wavpack' 'ffmpeg>=20081220' 'heimdal>=1.2.1')
+makedepends=('pkgconfig' 'libtool' 'imagemagick' 'smbclient' 'mesa' 'alsa-lib'
+ 'vcdimager' )
+options=('!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/xine/${pkgname}-${pkgver}.tar.bz2
+ xine-lib-1.1.1-configure-no-mcpu-march.patch)
+md5sums=('4f508abf088cf427a731f85634c8260d'
+ '9776df4eb54d2f1f68d8268adbc3b5c2')
+optiona=(!emptydir)
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p0 < ../xine-lib-1.1.1-configure-no-mcpu-march.patch || return 1
+
+ libtoolize --force --copy || return 1
+ aclocal -I m4 || return 1
+ autoconf || return 1
+ automake --add-missing || return 1
+
+ ./configure --prefix=/usr --with-w32-path=/usr/lib/codecs \
+ --with-xv-path=/usr/lib --with-xxmc-path=/usr/lib --with-xvmc-path=/usr/lib \
+ --with-libflac --with-wavpack --with-xcb \
+ --without-arts --without-jack --without-speex \
+ --disable-gnomevfs --without-pulseaudio --disable-aalib \
+ --disable-modplug --with-external-ffmpeg --without-esd || return 1
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+}
diff --git a/abs/extra/xine-lib/__changelog b/abs/extra/xine-lib/__changelog
new file mode 100644
index 0000000..0f4719d
--- /dev/null
+++ b/abs/extra/xine-lib/__changelog
@@ -0,0 +1,3 @@
+add xine.install
+disable jack
+disable esound
diff --git a/abs/extra/xine-lib/xine-header.patch b/abs/extra/xine-lib/xine-header.patch
new file mode 100644
index 0000000..a37bfb9
--- /dev/null
+++ b/abs/extra/xine-lib/xine-header.patch
@@ -0,0 +1,11 @@
+--- src/xine-engine/buffer.h 2008-07-16 23:01:56.000000000 +0200
++++ src/xine-engine/buffer.h 2008-08-24 21:14:39.000000000 +0200
+@@ -676,7 +676,7 @@
+ /* convert xine_waveformatex struct from little endian */
+ void _x_waveformatex_le2me( xine_waveformatex *wavex ) XINE_PROTECTED;
+
+-static inline _x_is_fourcc(void *ptr, void *tag) {
++static __inline _x_is_fourcc(void *ptr, void *tag) {
+ return memcmp(ptr, tag, 4) == 0;
+ }
+
diff --git a/abs/extra/xine-lib/xine-imagemagick.patch b/abs/extra/xine-lib/xine-imagemagick.patch
new file mode 100644
index 0000000..9faa4ab
--- /dev/null
+++ b/abs/extra/xine-lib/xine-imagemagick.patch
@@ -0,0 +1,11 @@
+--- xine-lib-1.1.15.orig/src/libxinevdec/image.c
++++ xine-lib-1.1.15/src/libxinevdec/image.c
+@@ -110,7 +110,7 @@
+ width = MagickGetImageWidth(wand) & ~1; /* must be even for init_yuv_planes */
+ height = MagickGetImageHeight(wand);
+ img_buf = malloc(width * height * 3);
+- MagickGetImagePixels(wand, 0, 0, width, height, "RGB", CharPixel, img_buf);
++ MagickGetAuthenticPixels(wand, 0, 0, width, height, "RGB", CharPixel, img_buf);
+ DestroyMagickWand(wand);
+
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, width);
diff --git a/abs/extra/xine-lib/xine-lib-1.1.1-configure-no-mcpu-march.patch b/abs/extra/xine-lib/xine-lib-1.1.1-configure-no-mcpu-march.patch
new file mode 100644
index 0000000..4b6ba9e
--- /dev/null
+++ b/abs/extra/xine-lib/xine-lib-1.1.1-configure-no-mcpu-march.patch
@@ -0,0 +1,13 @@
+--- m4/optimizations.m4.orig 2005-11-27 01:20:08.000000000 +0100
++++ m4/optimizations.m4 2005-11-27 01:22:56.000000000 +0100
+@@ -161,10 +161,6 @@
+ ;;
+
+ esac
+- if test x"$archopt_val" != x; then
+- CFLAGS="$sarchopt=$archopt_val $CFLAGS"
+- DEBUG_CFLAGS="$sarchopt=$archopt_val $DEBUG_CFLAGS"
+- fi
+ fi
+ else
+ dnl we have the Intel compiler
diff --git a/abs/extra/xine-lib/xine.install b/abs/extra/xine-lib/xine.install
new file mode 100755
index 0000000..f9102ee
--- /dev/null
+++ b/abs/extra/xine-lib/xine.install
@@ -0,0 +1,27 @@
+# arg 1: the new package version
+ post_install() {
+ MYTHOME=` su - mythtv -c "echo ~" `
+ if [ ! -f $MYTHOME/.xine/config ]
+ then
+ echo "Copying in standard config file for xine"
+ mkdir -p $MYTHOME/.xine/
+ cp -rp $TEMPLATES/xine.config.template $MYTHOME/.xine/config
+ chown -R mythtv:mythtv $MYTHOME/.xine
+ fi
+ }
+
+# # arg 1: the new package version
+# # arg 2: the old package version
+ post_upgrade() {
+ post_install $1
+ }
+#
+# # arg 1: the old package version
+ post_remove() {
+ /bin/true
+ }
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/extra/xine-ui/ChangeLog b/abs/extra/xine-ui/ChangeLog
new file mode 100644
index 0000000..e5fb3e8
--- /dev/null
+++ b/abs/extra/xine-ui/ChangeLog
@@ -0,0 +1,7 @@
+2008-08-19 Eric Belanger <eric@archlinux.org>
+
+ * xine-ui 0.99.5-4
+ * Added xine and xine-remote binaries (missing in 0.99.5-3)
+ * Added missing libxt makedepends
+ * Replaced .install file by an optdepends
+ * Added ChangeLog
diff --git a/abs/extra/xine-ui/PKGBUILD b/abs/extra/xine-ui/PKGBUILD
new file mode 100644
index 0000000..79ab3c3
--- /dev/null
+++ b/abs/extra/xine-ui/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 9858 2008-08-19 23:56:23Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+
+pkgname=xine-ui
+pkgver=0.99.5
+pkgrel=4
+pkgdesc="A free video player for Unix"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://xinehq.de/"
+depends=('xine-lib' 'curl>=7.16.2' 'libxtst' 'libxinerama' 'libxv' 'libpng' 'libxft' 'libsm' 'libxxf86vm' 'ncurses>=5.6-7')
+makedepends=('lirc' 'libxt')
+optdepends=('lirc')
+options=('!emptydirs')
+source=(http://downloads.sourceforge.net/sourceforge/xine/${pkgname}-${pkgver}.tar.gz)
+md5sums=('e643cd1fcad4d98a5ae4eb877ce5087b')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ #add missing constant (defined in xine.h from xine-lib cvs)
+ echo '#define XINE_MSG_AUDIO_OUT_UNAVAILABLE 11' >> src/xitk/common.h
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --with-curses --with-x --enable-lirc --without-aalib
+ make || return 1
+ make DESTDIR=${pkgdir} install
+ install -d ${pkgdir}/usr/share/applications
+ echo "Categories=Application;AudioVideo;" >> ${pkgdir}/usr/share/xine/desktop/xine.desktop
+ mv ${pkgdir}/usr/share/xine/desktop/xine.desktop ${pkgdir}/usr/share/applications
+}
diff --git a/abs/extra/xmbmon/Makefile.in.patch b/abs/extra/xmbmon/Makefile.in.patch
new file mode 100644
index 0000000..be3bf73
--- /dev/null
+++ b/abs/extra/xmbmon/Makefile.in.patch
@@ -0,0 +1,37 @@
+diff -ru xmbmon205.orig/Makefile.in xmbmon205/Makefile.in
+--- xmbmon205.orig/Makefile.in 2004-08-13 17:04:21.000000000 +1000
++++ xmbmon205/Makefile.in 2008-06-14 00:59:35.000000000 +1000
+@@ -37,11 +37,11 @@
+ RM=rm -f
+ INSTALL=install
+
+-INST_DIR=/usr/local/bin
+-INST_MANDIR=/usr/local/man/man1
+-INST_XDIR=/usr/X11R6/bin
+-INST_MANXDIR=/usr/X11R6/man/man1
+-INST_XRDIR=/usr/X11R6/lib/X11/app-defaults
++INST_DIR=/usr/bin
++INST_MANDIR=/usr/share/man/man1
++INST_XDIR=/usr/bin
++INST_MANXDIR=/usr/share/man/man1
++INST_XRDIR=/usr/lib/X11/app-defaults
+
+ .c.o:
+ $(CC) -c $(CFLAGS) $*.c
+@@ -133,12 +133,12 @@
+ $(RM) Makefile config.cache config.log config.h config.status
+
+ install: $(PROGRAM)
+- $(INSTALL) -o root -g wheel -m 4555 -c -p mbmon $(INST_DIR)
+- $(INSTALL) -o root -g wheel -m 4555 -c -p xmbmon $(INST_XDIR)
++ $(INSTALL) -o root -g wheel -m 4555 -c -p mbmon $(DESTDIR)$(INST_DIR)
++ $(INSTALL) -o root -g wheel -m 4555 -c -p xmbmon $(DESTDIR)$(INST_XDIR)
+
+ install-man: $(MANPAGE)
+- $(INSTALL) -o root -g wheel -m 444 -c -p mbmon.1 $(INST_MANDIR)
+- $(INSTALL) -o root -g wheel -m 444 -c -p xmbmon.1x $(INST_MANXDIR)
++ $(INSTALL) -o root -g wheel -m 444 -c -p mbmon.1 $(DESTDIR)$(INST_MANDIR)
++ $(INSTALL) -o root -g wheel -m 444 -c -p xmbmon.1x $(DESTDIR)$(INST_MANXDIR)
+
+ lint:
+ $(LINT) $(INCLUDES) $(DEFS) $(FONTDEFINES) $(SRCS) -lm
diff --git a/abs/extra/xmbmon/PKGBUILD b/abs/extra/xmbmon/PKGBUILD
new file mode 100644
index 0000000..348094b
--- /dev/null
+++ b/abs/extra/xmbmon/PKGBUILD
@@ -0,0 +1,20 @@
+# Contributor: Jonathan Liu <net147@hotmail.com>
+pkgname=xmbmon
+pkgver=2.05
+pkgrel=2
+pkgdesc="X Motherboard Monitor"
+arch=('i686' 'x86_64')
+url="http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html"
+license=('GPL')
+source=(http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/xmbmon205.tar.gz
+ Makefile.in.patch)
+md5sums=('ab6614c785f5b653fcc69fb9c02058f0'
+ 'e417a1a04b95bc3505b74a52faa54c4a')
+
+build() {
+ cd $startdir/src/xmbmon205
+ patch -Np1 -i $startdir/src/Makefile.in.patch
+ ./configure
+ mkdir -p $startdir/pkg/usr/{bin,share/man/man1}
+ make DESTDIR=$startdir/pkg install install-man || return 1
+}
diff --git a/abs/extra/xmlto/PKGBUILD b/abs/extra/xmlto/PKGBUILD
new file mode 100644
index 0000000..76db93c
--- /dev/null
+++ b/abs/extra/xmlto/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
+# Contributor: Robert Stoffers <rob1@ubuntu.com>
+
+pkgname=xmlto
+pkgver=0.0.21
+pkgrel=2
+pkgdesc="Convert xml to many other formats"
+arch=('i686' 'x86_64')
+url="http://cyberelk.net/tim/software/xmlto/"
+license=('GPL')
+depends=('libxslt>=1.1.24')
+makedepends=('docbook-xsl')
+source=(https://fedorahosted.org/releases/x/m/xmlto/xmlto-0.0.21.tar.bz2)
+md5sums=('cc2039dedc81f1a56b06e5fdac6f7570')
+
+build() {
+ cd $srcdir/${pkgname}-${pkgver}
+ ./configure --prefix=/usr || return 1
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+}
diff --git a/abs/extra/xmms/PKGBUILD b/abs/extra/xmms/PKGBUILD
new file mode 100644
index 0000000..533c227
--- /dev/null
+++ b/abs/extra/xmms/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD,v 1.3 2007/12/06 01:18:06 Snowman Exp $
+# Maintainer: Eric Belanger <belanger@astro.umontreal.ca>
+
+pkgname=xmms
+pkgver=1.2.11
+pkgrel=1
+pkgdesc="The X MultiMedia System"
+arch=('i686' 'x86_64')
+url="http://www.xmms.org"
+license=('GPL')
+depends=('libsm' 'libxxf86vm' 'zlib' 'gtk' 'libvorbis' 'esd' 'alsa-lib' 'libgl')
+makedepends=('mesa')
+options=('!libtool')
+source=(http://www.xmms.org/files/1.2.x/$pkgname-$pkgver.tar.bz2 \
+ xmms-menu.patch \
+ xmms-1.2.10-crossfade-0.3.9.patch \
+ xmms-fix.diff)
+md5sums=('f3e6dbaf0b3f571a532ab575656be506' 'b7b6f1811bad8d14e4c4534240e45980'\
+ '4eb222111a82a2e1ebe63b5f6109133d' 'd7f9dc3712c486658149c4504f7478a7')
+sha1sums=('9d1eae4baab25fd35c9ddfb49321ca60222f672d'
+ '27fb6e21bd6db923a425a8df8bd07a2a93867ddb'
+ 'ff5c172752c8bee708d9a9ecd53864cc95a4bcc5'
+ 'c227284955f2cc16f027dade670155c0f0fbc4ff')
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+
+# Add id3v2 editing feature (doesn't apply atm, needs to be redone)
+# patch -Np1 -i ../id3v2.patch || return 1
+# Fix xmms.desktop
+ patch -Np0 -i ../xmms-menu.patch || return 1
+# Patch for hang with xmms-crossfade
+ patch -Np1 -i ../xmms-1.2.10-crossfade-0.3.9.patch || return 1
+# fix xmms not able to be shown double size,at least needed for x86_64
+ patch -Np1 -i ../xmms-fix.diff || return 1
+
+ if [ "$CARCH" == "x86_64" ]; then
+ ./configure --prefix=/usr --disable-mikmod --disable-simd # for x86_64
+ else
+ ./configure --prefix=/usr --disable-mikmod --enable-simd # for i686
+ fi
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+ mkdir -p ${startdir}/pkg/usr/share/{applications,pixmaps}
+ install -m 644 xmms/xmms.desktop ${startdir}/pkg/usr/share/applications
+ install -m 644 xmms/xmms_mini.xpm ${startdir}/pkg/usr/share/pixmaps/xmms.xpm
+ # don't want wmxmms
+ rm -rf $startdir/pkg/usr/bin/wmxmms $startdir/pkg/usr/share/xmms
+ rm -f $startdir/pkg/usr/man/man1/{gnomexmms.1,wmxmms.1}
+}
diff --git a/abs/extra/xmms/id3v2.patch b/abs/extra/xmms/id3v2.patch
new file mode 100644
index 0000000..c8f8ba2
--- /dev/null
+++ b/abs/extra/xmms/id3v2.patch
@@ -0,0 +1,3379 @@
+diff -Naur xmms-1.2.9-orig/Input/mpg123/charset.h xmms-1.2.9/Input/mpg123/charset.h
+--- xmms-1.2.9-orig/Input/mpg123/charset.h Wed Dec 31 19:00:00 1969
++++ xmms-1.2.9/Input/mpg123/charset.h Thu Jan 29 05:20:31 2004
+@@ -0,0 +1,420 @@
++/* charset.h - 2001/12/04 */
++/*
++ * EasyTAG - Tag editor for MP3 and OGG files
++ * Copyright (C) 2000-2002 Jerome Couderc <j.couderc@ifrance.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ */
++
++#ifndef FALSE
++#define FALSE 0
++#endif
++#ifndef TRUE
++#define TRUE 1
++#endif
++
++/*
++ * Standard gettext macros.
++ */
++#ifdef ENABLE_NLS
++# include <libintl.h>
++# define _(String) gettext (String)
++# ifdef gettext_noop
++# define N_(String) gettext_noop (String)
++# else
++# define N_(String) (String)
++# endif
++#else
++# define textdomain(String) (String)
++# define gettext(String) (String)
++# define dgettext(Domain,Message) (Message)
++# define dcgettext(Domain,Message,Type) (Message)
++# define bindtextdomain(Domain,Directory) (Domain)
++# define _(String) (String)
++# define N_(String) (String)
++#endif
++
++#ifndef DLL_H
++#define DLL_H
++typedef struct DLL_s
++{
++ void *prev;
++ void *data;
++ void *next;
++} DLL;
++#endif
++
++#ifndef __CHARSET_H__
++#define __CHARSET_H__
++
++
++/***************
++ * Declaration *
++ ***************/
++
++typedef struct {
++ char *charset_title;
++ char *charset_name;
++} CharsetInfo;
++
++
++/**************
++ * Prototypes *
++ **************/
++
++//static gchar* get_current_charset (void);
++
++/* Used for ogg tags */
++char* convert_to_utf8 (const char *string);
++char* convert_from_utf8 (const char *string);
++
++char* convert_from_file_to_user (const char *string);
++char* convert_from_user_to_file (const char *string);
++
++DLL *Charset_Create_List (void);
++char *Charset_Get_Name_From_Title (char *charset_title);
++char *Charset_Get_Title_From_Name (char *charset_name);
++
++short int test_conversion_charset (char *from, char *to);
++
++
++#endif /* __CHARSET_H__ */
++
++/*
++ * Main part of code, written by:
++ *
++ * Copyright (C) 1999-2001 Håvard Kvålen <havardk@xmms.org>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++ * 02111-1307, USA.
++ *
++ */
++
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++#ifdef HAVE_ICONV_OPEN
++#include <iconv.h>
++#endif
++
++#ifdef HAVE_LANGINFO_CODESET
++#include <langinfo.h>
++#endif
++
++/****************
++ * Declarations *
++ ****************/
++
++#define CHARSET_TRANS_ARRAY_LEN ( sizeof(charset_trans_array) / sizeof((charset_trans_array)[0]) )
++const CharsetInfo charset_trans_array[] = {
++ {N_("Arabic (IBM-864)"), "IBM864" },
++ {N_("Arabic (ISO-8859-6)"), "ISO-8859-6" },
++ {N_("Arabic (Windows-1256)"), "windows-1256" },
++ {N_("Baltic (ISO-8859-13)"), "ISO-8859-13" },
++ {N_("Baltic (ISO-8859-4)"), "ISO-8859-4" },
++ {N_("Baltic (Windows-1257)"), "windows-1257" },
++ {N_("Celtic (ISO-8859-14)"), "ISO-8859-14" },
++ {N_("Central European (IBM-852)"), "IBM852" },
++ {N_("Central European (ISO-8859-2)"), "ISO-8859-2" },
++ {N_("Central European (Windows-1250)"), "windows-1250" },
++ {N_("Chinese Simplified (GB18030)"), "gb18030" },
++ {N_("Chinese Simplified (GB2312)"), "GB2312" },
++ {N_("Chinese Traditional (Big5)"), "Big5" },
++ {N_("Chinese Traditional (Big5-HKSCS)"), "Big5-HKSCS" },
++ {N_("Cyrillic (IBM-855)"), "IBM855" },
++ {N_("Cyrillic (ISO-8859-5)"), "ISO-8859-5" },
++ {N_("Cyrillic (ISO-IR-111)"), "ISO-IR-111" },
++ {N_("Cyrillic (KOI8-R)"), "KOI8-R" },
++ {N_("Cyrillic (Windows-1251)"), "windows-1251" },
++ {N_("Cyrillic/Russian (CP-866)"), "IBM866" },
++ {N_("Cyrillic/Ukrainian (KOI8-U)"), "KOI8-U" },
++ {N_("English (US-ASCII)"), "us-ascii" },
++ {N_("Greek (ISO-8859-7)"), "ISO-8859-7" },
++ {N_("Greek (Windows-1253)"), "windows-1253" },
++ {N_("Hebrew (IBM-862)"), "IBM862" },
++ {N_("Hebrew (Windows-1255)"), "windows-1255" },
++ {N_("Japanese (EUC-JP)"), "EUC-JP" },
++ {N_("Japanese (ISO-2022-JP)"), "ISO-2022-JP" },
++ {N_("Japanese (Shift_JIS)"), "Shift_JIS" },
++ {N_("Korean (EUC-KR)"), "EUC-KR" },
++ {N_("Nordic (ISO-8859-10)"), "ISO-8859-10" },
++ {N_("South European (ISO-8859-3)"), "ISO-8859-3" },
++ {N_("Thai (TIS-620)"), "TIS-620" },
++ {N_("Turkish (IBM-857)"), "IBM857" },
++ {N_("Turkish (ISO-8859-9)"), "ISO-8859-9" },
++ {N_("Turkish (Windows-1254)"), "windows-1254" },
++ {N_("Unicode (UTF-7)"), "UTF-7" },
++ {N_("Unicode (UTF-8)"), "UTF-8" },
++ {N_("Unicode (UTF-16BE)"), "UTF-16BE" },
++ {N_("Unicode (UTF-16LE)"), "UTF-16LE" },
++ {N_("Unicode (UTF-32BE)"), "UTF-32BE" },
++ {N_("Unicode (UTF-32LE)"), "UTF-32LE" },
++ {N_("Vietnamese (VISCII)"), "VISCII" },
++ {N_("Vietnamese (Windows-1258)"), "windows-1258" },
++ {N_("Visual Hebrew (ISO-8859-8)"), "ISO-8859-8" },
++ {N_("Western (IBM-850)"), "IBM850" },
++ {N_("Western (ISO-8859-1)"), "ISO-8859-1" },
++ {N_("Western (ISO-8859-15)"), "ISO-8859-15" },
++ {N_("Western (Windows-1252)"), "windows-1252" }
++
++ /*
++ * From this point, character sets aren't supported by iconv
++ */
++/* {N_("Arabic (IBM-864-I)"), "IBM864i" },
++ {N_("Arabic (ISO-8859-6-E)"), "ISO-8859-6-E" },
++ {N_("Arabic (ISO-8859-6-I)"), "ISO-8859-6-I" },
++ {N_("Arabic (MacArabic)"), "x-mac-arabic" },
++ {N_("Armenian (ARMSCII-8)"), "armscii-8" },
++ {N_("Central European (MacCE)"), "x-mac-ce" },
++ {N_("Chinese Simplified (GBK)"), "x-gbk" },
++ {N_("Chinese Simplified (HZ)"), "HZ-GB-2312" },
++ {N_("Chinese Traditional (EUC-TW)"), "x-euc-tw" },
++ {N_("Croatian (MacCroatian)"), "x-mac-croatian" },
++ {N_("Cyrillic (MacCyrillic)"), "x-mac-cyrillic" },
++ {N_("Cyrillic/Ukrainian (MacUkrainian)"), "x-mac-ukrainian" },
++ {N_("Farsi (MacFarsi)"), "x-mac-farsi"},
++ {N_("Greek (MacGreek)"), "x-mac-greek" },
++ {N_("Gujarati (MacGujarati)"), "x-mac-gujarati" },
++ {N_("Gurmukhi (MacGurmukhi)"), "x-mac-gurmukhi" },
++ {N_("Hebrew (ISO-8859-8-E)"), "ISO-8859-8-E" },
++ {N_("Hebrew (ISO-8859-8-I)"), "ISO-8859-8-I" },
++ {N_("Hebrew (MacHebrew)"), "x-mac-hebrew" },
++ {N_("Hindi (MacDevanagari)"), "x-mac-devanagari" },
++ {N_("Icelandic (MacIcelandic)"), "x-mac-icelandic" },
++ {N_("Korean (JOHAB)"), "x-johab" },
++ {N_("Korean (UHC)"), "x-windows-949" },
++ {N_("Romanian (MacRomanian)"), "x-mac-romanian" },
++ {N_("Turkish (MacTurkish)"), "x-mac-turkish" },
++ {N_("User Defined"), "x-user-defined" },
++ {N_("Vietnamese (TCVN)"), "x-viet-tcvn5712" },
++ {N_("Vietnamese (VPS)"), "x-viet-vps" },
++ {N_("Western (MacRoman)"), "x-mac-roman" },
++ // charsets whithout posibly translatable names
++ {"T61.8bit", "T61.8bit" },
++ {"x-imap4-modified-utf7", "x-imap4-modified-utf7"},
++ {"x-u-escaped", "x-u-escaped" },
++ {"windows-936", "windows-936" }
++*/
++};
++
++
++
++
++/*************
++ * Functions *
++ *************/
++// Return the last item of an doubly linked list
++static DLL *
++dll_last_c (DLL *list)
++{
++ DLL *item = list;
++
++ while ( item->next )
++ item = item->next;
++
++ return item;
++}
++
++// Append an item to the doubly linked list
++static DLL *
++dll_append_c (DLL *list, void *data)
++{
++ DLL *item = malloc (sizeof(DLL));
++
++ item->data = data;
++ item->prev = dll_last_c(list);
++ item->next = NULL;
++
++ return item;
++}
++
++static char* get_current_charset (void)
++{
++ char *charset = getenv("CHARSET");
++
++#ifdef HAVE_LANGINFO_CODESET
++ if (!charset)
++ charset = nl_langinfo(CODESET);
++#endif
++ if (!charset)
++ charset = "ISO-8859-1";
++
++ return charset;
++}
++
++
++#ifdef HAVE_ICONV_OPEN
++static char* convert_string (const char *string, char *from, char *to)
++{
++ size_t outleft, outsize, length;
++ iconv_t cd;
++ char *out, *outptr;
++ const char *input = string;
++
++ if (!string)
++ return NULL;
++
++ length = strlen(string);
++
++ /* g_message("converting %s from %s to %s", string, from, to); */
++ if ((cd = iconv_open(to, from)) == (iconv_t)-1)
++ {
++ fprintf (stderr, "convert_string(): Conversion not supported. Charsets: %s -> %s", from, to);
++ return strdup(string);
++ }
++
++ /* Due to a GLIBC bug, round outbuf_size up to a multiple of 4 */
++ /* + 1 for nul in case len == 1 */
++ outsize = ((length + 3) & ~3) + 1;
++ out = g_malloc(outsize);
++ outleft = outsize - 1;
++ outptr = out;
++
++ retry:
++ if (iconv(cd, (char **)&input, &length, &outptr, &outleft) == -1)
++ {
++ int used;
++ switch (errno)
++ {
++ case E2BIG:
++ used = outptr - out;
++ outsize = (outsize - 1) * 2 + 1;
++ out = g_realloc(out, outsize);
++ outptr = out + used;
++ outleft = outsize - 1 - used;
++ goto retry;
++ case EINVAL:
++ break;
++ case EILSEQ:
++ /* Invalid sequence, try to get the
++ rest of the string */
++ input++;
++ length = strlen(input);
++ goto retry;
++ default:
++ fprintf (stderr, "convert_string(): Conversion failed. Inputstring: %s; Error: %s", string, strerror(errno));
++ break;
++ }
++ }
++ *outptr = '\0';
++
++ iconv_close(cd);
++ return out;
++}
++#else
++static char* convert_string (const char *string, char *from, char *to)
++{
++ if (!string)
++ return NULL;
++ return strdup(string);
++}
++#endif
++
++
++/*
++ * Conversion with UTF-8 for ogg tags
++ */
++char* convert_to_utf8 (const char *string)
++{
++ char *charset = get_current_charset();
++
++ return convert_string(string, charset, "UTF-8");
++}
++
++char* convert_from_utf8 (const char *string)
++{
++ char *charset = get_current_charset();
++
++ return convert_string(string, "UTF-8", charset);
++}
++
++
++DLL *Charset_Create_List (void)
++{
++ DLL *list = NULL;
++ int i;
++
++ for (i=0; i<CHARSET_TRANS_ARRAY_LEN; i++)
++ list = dll_append_c (list,_(charset_trans_array[i].charset_title));
++ return list;
++}
++
++
++/*
++ * Return charset_name from charset_title
++ */
++char *Charset_Get_Name_From_Title (char *charset_title)
++{
++ int i;
++
++ if (charset_title)
++ for (i=0; i<CHARSET_TRANS_ARRAY_LEN; i++)
++ if ( strcasecmp(_(charset_title),_(charset_trans_array[i].charset_title)) == 0 )
++ return charset_trans_array[i].charset_name;
++ return "";
++}
++
++
++/*
++ * Return charset_title from charset_name
++ */
++char *Charset_Get_Title_From_Name (char *charset_name)
++{
++ int i;
++
++ if (charset_name)
++ for (i=0; i<CHARSET_TRANS_ARRAY_LEN; i++)
++ if ( strcasecmp(charset_name,charset_trans_array[i].charset_name) == 0 )
++ return _(charset_trans_array[i].charset_title);
++ return "";
++}
++
++
++
++/*
++ * Test if the conversion is supported between two character sets ('from' and 'to)
++ */
++#ifdef HAVE_ICONV_OPEN
++short int test_conversion_charset (char *from, char *to)
++{
++ iconv_t cd;
++
++ if ((cd=iconv_open(to,from)) == (iconv_t)-1)
++ {
++ /* Conversion not supported */
++ return FALSE;
++ }
++ iconv_close(cd);
++ return TRUE;
++}
++#else
++short int test_conversion_charset (char *from, char *to)
++{
++ return TRUE;
++}
++#endif
+diff -Naur xmms-1.2.9-orig/Input/mpg123/fileinfo.c xmms-1.2.9/Input/mpg123/fileinfo.c
+--- xmms-1.2.9-orig/Input/mpg123/fileinfo.c Thu Jan 29 06:43:24 2004
++++ xmms-1.2.9/Input/mpg123/fileinfo.c Thu Jan 29 06:39:47 2004
+@@ -25,28 +25,36 @@
+ #include <errno.h>
+ #include <libxmms/xentry.h>
+ #include "mpg123.h"
++#include "lib_id3v2.h"
++
++#define MAX_STR_LEN 100
++#define MAX_ENTRY_LEN2 1023
+
+ static GtkWidget *window = NULL;
+-static GtkWidget *filename_entry, *id3_frame;
+-static GtkWidget *title_entry, *artist_entry, *album_entry, *year_entry;
+-static GtkWidget *tracknum_entry, *comment_entry, *genre_combo;
++static GtkWidget *notebook = NULL;
++static GtkWidget *filename_entry, *id3v1_frame, *id3v2_frame;
++static GtkWidget *v1_checkbox, *v2_checkbox;
++static GtkWidget *v1_title_entry, *v1_artist_entry, *v1_album_entry, *v1_year_entry, *v1_tracknum_entry, *v1_comment_entry;
++static GtkWidget *v2_title_entry, *v2_artist_entry, *v2_album_entry, *v2_year_entry, *v2_tracknum_entry, *v2_comment_entry,
++ *v2_composer_entry, *v2_orig_artist_entry, *v2_url_entry, *v2_encoded_by_entry;
++static GtkWidget *v1_genre_combo, *v2_genre_combo;
+ static GtkWidget *mpeg_level, *mpeg_bitrate, *mpeg_samplerate, *mpeg_flags;
+ static GtkWidget *mpeg_fileinfo;
+
++static GPtrArray *v1_labels_list = NULL, *v2_labels_list = NULL; // TODO: Where will these be freed?
+ static GList *genre_list;
+ struct genre_item {
+ const char *name;
+ int id;
+ };
+-static int current_genre;
++static int v1_current_genre;
++static int v2_current_genre;
+ static char *current_filename;
+
+ extern char *mpg123_filename;
+ extern int mpg123_bitrate, mpg123_frequency, mpg123_layer, mpg123_lsf, mpg123_mode;
+ extern gboolean mpg123_stereo, mpg123_mpeg25;
+
+-#define MAX_STR_LEN 100
+-
+ static void label_set_text(GtkWidget * label, char *str, ...)
+ G_GNUC_PRINTF(2, 3);
+
+@@ -66,6 +74,12 @@
+ strncpy(tag, gtk_entry_get_text(entry), length);
+ }
+
++void copy_entry_tag(GtkEntry * src, GtkEntry * dest, int length)
++{
++ set_entry_tag(dest, gtk_entry_get_text(src), length);
++ return;
++}
++
+ static int genre_find_index(GList *genre_list, int id)
+ {
+ int idx = 0;
+@@ -80,15 +94,29 @@
+ return idx;
+ }
+
++static int genre_find_index_str(GList *genre_list, const char* str)
++{
++ int idx = 0;
++ while (genre_list)
++ {
++ struct genre_item *item = genre_list->data;
++ if (strcmp(item->name, str) == 0)
++ break;
++ idx++;
++ genre_list = genre_list->next;
++ }
++ return idx;
++}
++
+ static int genre_comp_func(gconstpointer a, gconstpointer b)
+ {
+ const struct genre_item *ga = a, *gb = b;
+ return strcasecmp(ga->name, gb->name);
+ }
+
+-static void save_cb(GtkWidget * w, gpointer data)
++static void remove_id3v1(void)
+ {
+- int fd;
++ int fd, len;
+ struct id3v1tag_t tag;
+ char *msg = NULL;
+
+@@ -97,71 +125,36 @@
+
+ if ((fd = open(current_filename, O_RDWR)) != -1)
+ {
+- int tracknum;
+-
+- lseek(fd, -128, SEEK_END);
++ len = lseek(fd, -128, SEEK_END);
+ read(fd, &tag, sizeof (struct id3v1tag_t));
+
+ if (!strncmp(tag.tag, "TAG", 3))
+- lseek(fd, -128, SEEK_END);
+- else
+- lseek(fd, 0, SEEK_END);
+- tag.tag[0] = 'T';
+- tag.tag[1] = 'A';
+- tag.tag[2] = 'G';
+- get_entry_tag(GTK_ENTRY(title_entry), tag.title, 30);
+- get_entry_tag(GTK_ENTRY(artist_entry), tag.artist, 30);
+- get_entry_tag(GTK_ENTRY(album_entry), tag.album, 30);
+- get_entry_tag(GTK_ENTRY(year_entry), tag.year, 4);
+- tracknum = atoi(gtk_entry_get_text(GTK_ENTRY(tracknum_entry)));
+- if (tracknum > 0)
+ {
+- get_entry_tag(GTK_ENTRY(comment_entry),
+- tag.u.v1_1.comment, 28);
+- tag.u.v1_1.__zero = 0;
+- tag.u.v1_1.track_number = MIN(tracknum, 255);
++ if (ftruncate(fd, len))
++ msg = g_strdup_printf(_("%s\n"
++ "Unable to truncate file: %s"),
++ _("Couldn't remove tag!"),
++ strerror(errno));
+ }
+- else
+- get_entry_tag(GTK_ENTRY(comment_entry),
+- tag.u.v1_0.comment, 30);
+- tag.genre = current_genre;
+- if (write(fd, &tag, sizeof (tag)) != sizeof (tag))
+- msg = g_strdup_printf(_("%s\nUnable to write to file: %s"),
+- _("Couldn't write tag!"),
+- strerror(errno));
+ close(fd);
+ }
+ else
+ msg = g_strdup_printf(_("%s\nUnable to open file: %s"),
+- _("Couldn't write tag!"),
++ _("Couldn't remove tag!"),
+ strerror(errno));
+ if (msg)
+ {
+- GtkWidget *mwin = xmms_show_message(_("File Info"), msg,
+- _("Ok"), FALSE, NULL, NULL);
++ GtkWidget *mwin = xmms_show_message(_("File Info"), msg, _("Ok"),
++ FALSE, NULL, NULL);
+ gtk_window_set_transient_for(GTK_WINDOW(mwin),
+ GTK_WINDOW(window));
+ g_free(msg);
+ }
+- else
+- gtk_widget_destroy(window);
+-}
+-
+-static void label_set_text(GtkWidget * label, char *str, ...)
+-{
+- va_list args;
+- char tempstr[MAX_STR_LEN];
+-
+- va_start(args, str);
+- g_vsnprintf(tempstr, MAX_STR_LEN, str, args);
+- va_end(args);
+-
+- gtk_label_set_text(GTK_LABEL(label), tempstr);
+ }
+
+-static void remove_id3_cb(GtkWidget * w, gpointer data)
++static void save_cb(GtkWidget * w, gpointer data)
+ {
+- int fd, len;
++ int fd;
+ struct id3v1tag_t tag;
+ char *msg = NULL;
+
+@@ -170,36 +163,95 @@
+
+ if ((fd = open(current_filename, O_RDWR)) != -1)
+ {
+- len = lseek(fd, -128, SEEK_END);
+- read(fd, &tag, sizeof (struct id3v1tag_t));
++ if (!GTK_TOGGLE_BUTTON(v1_checkbox)->active) {
++ // Try to save id3v1 tag
++ int tracknum;
+
+- if (!strncmp(tag.tag, "TAG", 3))
+- {
+- if (ftruncate(fd, len))
+- msg = g_strdup_printf(
+- _("%s\n"
+- "Unable to truncate file: %s"),
+- _("Couldn't remove tag!"),
+- strerror(errno));
++ lseek(fd, -128, SEEK_END);
++ read(fd, &tag, sizeof (struct id3v1tag_t));
++
++ if (!strncmp(tag.tag, "TAG", 3))
++ lseek(fd, -128, SEEK_END);
++ else
++ lseek(fd, 0, SEEK_END);
++ tag.tag[0] = 'T';
++ tag.tag[1] = 'A';
++ tag.tag[2] = 'G';
++ get_entry_tag(GTK_ENTRY(v1_title_entry), tag.title, 30);
++ get_entry_tag(GTK_ENTRY(v1_artist_entry), tag.artist, 30);
++ get_entry_tag(GTK_ENTRY(v1_album_entry), tag.album, 30);
++ get_entry_tag(GTK_ENTRY(v1_year_entry), tag.year, 4);
++ tracknum = atoi(gtk_entry_get_text(GTK_ENTRY(v1_tracknum_entry)));
++ if (tracknum > 0)
++ {
++ get_entry_tag(GTK_ENTRY(v1_comment_entry),
++ tag.u.v1_1.comment, 28);
++ tag.u.v1_1.__zero = 0;
++ tag.u.v1_1.track_number = MIN(tracknum, 255);
++ }
++ else
++ get_entry_tag(GTK_ENTRY(v1_comment_entry),
++ tag.u.v1_0.comment, 30);
++ tag.genre = v1_current_genre;
++ if (write(fd, &tag, sizeof (tag)) != sizeof (tag))
++ msg = g_strdup_printf(_("%s\nUnable to write to file: %s"),
++ _("Couldn't write tag!"),
++ strerror(errno));
++ } else {
++ // Remove the id3v1 tag from the file
++ remove_id3v1();
+ }
+- else
+- msg = strdup(_("No tag to remove!"));
+- close(fd);
++
++ if (!GTK_TOGGLE_BUTTON(v2_checkbox)->active) {
++
++ id3Tag v2_tag;
++ strncpy(v2_tag.title, gtk_entry_get_text(GTK_ENTRY(v2_title_entry)), MAX_ENTRY_LEN2);
++ strncpy(v2_tag.artist, gtk_entry_get_text(GTK_ENTRY(v2_artist_entry)), MAX_ENTRY_LEN2);
++ strncpy(v2_tag.album, gtk_entry_get_text(GTK_ENTRY(v2_album_entry)), MAX_ENTRY_LEN2);
++ strncpy(v2_tag.year, gtk_entry_get_text(GTK_ENTRY(v2_year_entry)), 4);
++ strncpy(v2_tag.comment, gtk_entry_get_text(GTK_ENTRY(v2_comment_entry)), MAX_ENTRY_LEN2);
++ strncpy(v2_tag.track, gtk_entry_get_text(GTK_ENTRY(v2_tracknum_entry)), 3);
++ snprintf(v2_tag.genre, 6, "(%d)", v2_current_genre);
++
++ strncpy(v2_tag.composer, gtk_entry_get_text(GTK_ENTRY(v2_composer_entry)), MAX_ENTRY_LEN2);
++ strncpy(v2_tag.url, gtk_entry_get_text(GTK_ENTRY(v2_url_entry)), MAX_ENTRY_LEN2);
++ strncpy(v2_tag.orig_artist, gtk_entry_get_text(GTK_ENTRY(v2_orig_artist_entry)), MAX_ENTRY_LEN2);
++ strncpy(v2_tag.enc_by, gtk_entry_get_text(GTK_ENTRY(v2_encoded_by_entry)), MAX_ENTRY_LEN2);
++
++ set_id3v2_tag(&v2_tag, current_filename);
++
++ } else {
++ // remove the id3v2 tag from the file
++ del_id3v2_tag(current_filename);
++ }
++
++ if (fd)
++ close(fd);
+ }
+ else
+ msg = g_strdup_printf(_("%s\nUnable to open file: %s"),
+- _("Couldn't remove tag!"),
++ _("Couldn't write tag!"),
+ strerror(errno));
+ if (msg)
+ {
+- GtkWidget *mwin = xmms_show_message(_("File Info"), msg,
+- _("Ok"), FALSE, NULL, NULL);
++ GtkWidget *mwin = xmms_show_message(_("File Info"), msg, _("Ok"),
++ FALSE, NULL, NULL);
+ gtk_window_set_transient_for(GTK_WINDOW(mwin),
+ GTK_WINDOW(window));
+ g_free(msg);
+ }
+- else
+- gtk_widget_destroy(window);
++}
++
++static void label_set_text(GtkWidget * label, char *str, ...)
++{
++ va_list args;
++ char tempstr[MAX_STR_LEN];
++
++ va_start(args, str);
++ g_vsnprintf(tempstr, MAX_STR_LEN, str, args);
++ va_end(args);
++
++ gtk_label_set_text(GTK_LABEL(label), tempstr);
+ }
+
+ static void set_mpeg_level_label(gboolean mpeg25, int lsf, int layer)
+@@ -222,28 +274,144 @@
+
+ static void file_info_http(char *filename)
+ {
+- gtk_widget_set_sensitive(id3_frame, FALSE);
++ gtk_widget_set_sensitive(id3v1_frame, FALSE);
++ gtk_widget_set_sensitive(id3v2_frame, FALSE);
+ if (mpg123_filename && !strcmp(filename, mpg123_filename) &&
+ mpg123_bitrate != 0)
+ {
+- set_mpeg_level_label(mpg123_mpeg25, mpg123_lsf, mpg123_layer);
++ set_mpeg_level_label(mpg123_mpeg25, mpg123_lsf,
++ mpg123_layer);
+ label_set_text(mpeg_bitrate, _("Bitrate: %d kb/s"),
+- mpg123_bitrate);
++ mpg123_bitrate);
+ label_set_text(mpeg_samplerate, _("Samplerate: %d Hz"),
+- mpg123_frequency);
++ mpg123_frequency);
+ label_set_text(mpeg_flags, "%s",
+- channel_mode_name(mpg123_mode));
++ channel_mode_name(mpg123_mode));
+ }
+ }
+
+-static void genre_selected(GtkList *list, GtkWidget *w, gpointer data)
++void copy_v2_to_v1_cb(GtkButton *button, gpointer user_data)
++{
++ copy_entry_tag(GTK_ENTRY(v2_title_entry), GTK_ENTRY(v1_title_entry), 30);
++ copy_entry_tag(GTK_ENTRY(v2_artist_entry), GTK_ENTRY(v1_artist_entry), 30);
++ copy_entry_tag(GTK_ENTRY(v2_album_entry), GTK_ENTRY(v1_album_entry), 30);
++ copy_entry_tag(GTK_ENTRY(v2_year_entry), GTK_ENTRY(v1_year_entry), 4);
++ copy_entry_tag(GTK_ENTRY(v2_comment_entry), GTK_ENTRY(v1_comment_entry), 30);
++ copy_entry_tag(GTK_ENTRY(v2_tracknum_entry), GTK_ENTRY(v1_tracknum_entry), 3);
++
++ gtk_list_select_item(GTK_LIST(GTK_COMBO(v1_genre_combo)->list), genre_find_index(genre_list, v2_current_genre));
++ return;
++}
++
++void copy_v1_to_v2_cb(GtkButton *button, gpointer user_data)
++{
++ copy_entry_tag(GTK_ENTRY(v1_title_entry), GTK_ENTRY(v2_title_entry), MAX_ENTRY_LEN2);
++ copy_entry_tag(GTK_ENTRY(v1_artist_entry), GTK_ENTRY(v2_artist_entry), MAX_ENTRY_LEN2);
++ copy_entry_tag(GTK_ENTRY(v1_album_entry), GTK_ENTRY(v2_album_entry), MAX_ENTRY_LEN2);
++ copy_entry_tag(GTK_ENTRY(v1_year_entry), GTK_ENTRY(v2_year_entry), 4);
++ copy_entry_tag(GTK_ENTRY(v1_comment_entry), GTK_ENTRY(v2_comment_entry), MAX_ENTRY_LEN2);
++ copy_entry_tag(GTK_ENTRY(v1_tracknum_entry), GTK_ENTRY(v2_tracknum_entry), 3);
++
++ gtk_list_select_item(GTK_LIST(GTK_COMBO(v2_genre_combo)->list), genre_find_index(genre_list, v1_current_genre));
++ //int genreID = find_genre_id(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(v1_genre_combo)->entry)));
++ //gtk_list_select_item(GTK_LIST(GTK_COMBO(v2_genre_combo)->list),
++ // g_list_index(genre_list, (char *) mpg123_id3_genres[genreID]));
++ return;
++}
++
++void v1_toggle_cb (GtkWidget *widget, gpointer data)
++{
++ int i = 0;
++ if (GTK_TOGGLE_BUTTON (widget)->active)
++ {
++ // If control reaches here, the toggle button is down
++ // Gray out labels
++ for (i = 0; i < v1_labels_list->len; i++) {
++ gtk_widget_set_sensitive(GTK_WIDGET( g_ptr_array_index(v1_labels_list, i) ), FALSE);
++ }
++ gtk_widget_set_sensitive(v1_title_entry, FALSE);
++ gtk_widget_set_sensitive(v1_artist_entry, FALSE);
++ gtk_widget_set_sensitive(v1_album_entry, FALSE);
++ gtk_widget_set_sensitive(v1_year_entry, FALSE);
++ gtk_widget_set_sensitive(v1_tracknum_entry, FALSE);
++ gtk_widget_set_sensitive(v1_comment_entry, FALSE);
++ gtk_widget_set_sensitive(v1_genre_combo, FALSE);
++ } else {
++
++ // If control reaches here, the toggle button is up
++ // Enable labels
++ for (i = 0; i < v1_labels_list->len; i++) {
++ gtk_widget_set_sensitive(GTK_WIDGET( g_ptr_array_index(v1_labels_list, i) ), TRUE);
++ }
++ gtk_widget_set_sensitive(v1_title_entry, TRUE);
++ gtk_widget_set_sensitive(v1_artist_entry, TRUE);
++ gtk_widget_set_sensitive(v1_album_entry, TRUE);
++ gtk_widget_set_sensitive(v1_year_entry, TRUE);
++ gtk_widget_set_sensitive(v1_tracknum_entry, TRUE);
++ gtk_widget_set_sensitive(v1_comment_entry, TRUE);
++ gtk_widget_set_sensitive(v1_genre_combo, TRUE);
++ }
++}
++
++void v2_toggle_cb (GtkWidget *widget, gpointer data)
++{
++ int i = 0;
++ if (GTK_TOGGLE_BUTTON (widget)->active)
++ {
++ // If control reaches here, the toggle button is down
++ // Gray out labels
++ for (i = 0; i < v2_labels_list->len; i++) {
++ gtk_widget_set_sensitive(GTK_WIDGET( g_ptr_array_index(v2_labels_list, i) ), FALSE);
++ }
++ gtk_widget_set_sensitive(v2_title_entry, FALSE);
++ gtk_widget_set_sensitive(v2_artist_entry, FALSE);
++ gtk_widget_set_sensitive(v2_album_entry, FALSE);
++ gtk_widget_set_sensitive(v2_year_entry, FALSE);
++ gtk_widget_set_sensitive(v2_tracknum_entry, FALSE);
++ gtk_widget_set_sensitive(v2_comment_entry, FALSE);
++ gtk_widget_set_sensitive(v2_composer_entry, FALSE);
++ gtk_widget_set_sensitive(v2_orig_artist_entry, FALSE);
++ gtk_widget_set_sensitive(v2_url_entry, FALSE);
++ gtk_widget_set_sensitive(v2_encoded_by_entry, FALSE);
++ gtk_widget_set_sensitive(v2_genre_combo, FALSE);
++ } else {
++
++ // If control reaches here, the toggle button is up
++ // Enable labels
++ for (i = 0; i < v2_labels_list->len; i++) {
++ gtk_widget_set_sensitive(GTK_WIDGET( g_ptr_array_index(v2_labels_list, i) ), TRUE);
++ }
++ gtk_widget_set_sensitive(v2_title_entry, TRUE);
++ gtk_widget_set_sensitive(v2_artist_entry, TRUE);
++ gtk_widget_set_sensitive(v2_album_entry, TRUE);
++ gtk_widget_set_sensitive(v2_year_entry, TRUE);
++ gtk_widget_set_sensitive(v2_tracknum_entry, TRUE);
++ gtk_widget_set_sensitive(v2_comment_entry, TRUE);
++ gtk_widget_set_sensitive(v2_composer_entry, TRUE);
++ gtk_widget_set_sensitive(v2_orig_artist_entry, TRUE);
++ gtk_widget_set_sensitive(v2_url_entry, TRUE);
++ gtk_widget_set_sensitive(v2_encoded_by_entry, TRUE);
++ gtk_widget_set_sensitive(v2_genre_combo, TRUE);
++ }
++}
++static void v1_genre_selected(GtkList *list, GtkWidget *w, gpointer data)
++{
++ void * p;
++ p = gtk_object_get_data(GTK_OBJECT(w), "genre_id");
++ if (p != NULL)
++ v1_current_genre = GPOINTER_TO_INT(p);
++ else
++ v1_current_genre = 0;
++}
++
++static void v2_genre_selected(GtkList *list, GtkWidget *w, gpointer data)
+ {
+ void * p;
+ p = gtk_object_get_data(GTK_OBJECT(w), "genre_id");
+ if (p != NULL)
+- current_genre = GPOINTER_TO_INT(p);
++ v2_current_genre = GPOINTER_TO_INT(p);
+ else
+- current_genre = 0;
++ v2_current_genre = 0;
+ }
+
+ static void genre_set_popdown(GtkWidget *combo, GList *genres)
+@@ -266,11 +434,12 @@
+ void mpg123_file_info_box(char *filename)
+ {
+ int i;
+- struct id3v1tag_t tag;
++ struct id3v1tag_t id3v1tag;
+ FILE *fh;
+ char *tmp, *title;
+ const char *emphasis[4];
+ const char *bool_label[2];
++ struct id3tag_t id3v2tag;
+
+ emphasis[0] = _("None");
+ emphasis[1] = _("50/15 ms");
+@@ -281,116 +450,123 @@
+
+ if (!window)
+ {
+- GtkWidget *vbox, *hbox, *left_vbox, *table;
+- GtkWidget *mpeg_frame, *mpeg_box;
+- GtkWidget *label, *filename_hbox;
+- GtkWidget *bbox, *save, *remove_id3, *cancel;
+-
+- window = gtk_window_new(GTK_WINDOW_DIALOG);
+- gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
+- gtk_signal_connect(GTK_OBJECT(window), "destroy",
+- gtk_widget_destroyed, &window);
+- gtk_container_set_border_width(GTK_CONTAINER(window), 10);
+-
+- vbox = gtk_vbox_new(FALSE, 10);
+- gtk_container_add(GTK_CONTAINER(window), vbox);
++ GtkWidget *window_vbox,
++ *id3v1_vbox, *id3v2_vbox, *id3v1_frame_vbox, *id3v2_frame_vbox,
++ *mpeg_lvbox, *mpeg_rvbox, *mpeg_hbox, *mpeg_box, *mpeg_frame,
++ *bbox, *save, *close, *copy_to, *copy_from,
++ *table, *label, *filename_hbox;
++
++ v1_labels_list = g_ptr_array_new();
++ v2_labels_list = g_ptr_array_new();
++
++ window = gtk_window_new(GTK_WINDOW_DIALOG);
++ //gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
++ gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &window);
++ gtk_container_set_border_width(GTK_CONTAINER(window), 10);
+
++ window_vbox = gtk_vbox_new(FALSE,10);
+ filename_hbox = gtk_hbox_new(FALSE, 5);
+- gtk_box_pack_start(GTK_BOX(vbox), filename_hbox,
+- FALSE, TRUE, 0);
++ gtk_box_pack_start(GTK_BOX(window_vbox), filename_hbox, FALSE, TRUE, 0);
+
+ label = gtk_label_new(_("Filename:"));
+- gtk_box_pack_start(GTK_BOX(filename_hbox), label,
+- FALSE, TRUE, 0);
++ gtk_box_pack_start(GTK_BOX(filename_hbox), label, FALSE, TRUE, 0);
+ filename_entry = xmms_entry_new();
+ gtk_editable_set_editable(GTK_EDITABLE(filename_entry), FALSE);
+- gtk_box_pack_start(GTK_BOX(filename_hbox),
+- filename_entry, TRUE, TRUE, 0);
+-
+- hbox = gtk_hbox_new(FALSE, 10);
+- gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
+-
+- left_vbox = gtk_vbox_new(FALSE, 10);
+- gtk_box_pack_start(GTK_BOX(hbox), left_vbox, FALSE, FALSE, 0);
+-
+- id3_frame = gtk_frame_new(_("ID3 Tag:"));
+- gtk_box_pack_start(GTK_BOX(left_vbox), id3_frame,
+- FALSE, FALSE, 0);
+-
+- table = gtk_table_new(5, 5, FALSE);
+- gtk_container_set_border_width(GTK_CONTAINER(table), 5);
+- gtk_container_add(GTK_CONTAINER(id3_frame), table);
+-
+- label = gtk_label_new(_("Title:"));
+- gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
+- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
+- GTK_FILL, GTK_FILL, 5, 5);
+-
+- title_entry = gtk_entry_new_with_max_length(30);
+- gtk_table_attach(GTK_TABLE(table), title_entry, 1, 4, 0, 1,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
+-
+- label = gtk_label_new(_("Artist:"));
+- gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
+- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
+- GTK_FILL, GTK_FILL, 5, 5);
+-
+- artist_entry = gtk_entry_new_with_max_length(30);
+- gtk_table_attach(GTK_TABLE(table), artist_entry, 1, 4, 1, 2,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
+-
+- label = gtk_label_new(_("Album:"));
+- gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
+- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3,
+- GTK_FILL, GTK_FILL, 5, 5);
+-
+- album_entry = gtk_entry_new_with_max_length(30);
+- gtk_table_attach(GTK_TABLE(table), album_entry, 1, 4, 2, 3,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
+-
+- label = gtk_label_new(_("Comment:"));
+- gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
+- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4,
+- GTK_FILL, GTK_FILL, 5, 5);
+-
+- comment_entry = gtk_entry_new_with_max_length(30);
+- gtk_table_attach(GTK_TABLE(table), comment_entry, 1, 4, 3, 4,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
+-
+- label = gtk_label_new(_("Year:"));
+- gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
+- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5,
+- GTK_FILL, GTK_FILL, 5, 5);
+-
+- year_entry = gtk_entry_new_with_max_length(4);
+- gtk_widget_set_usize(year_entry, 40, -1);
+- gtk_table_attach(GTK_TABLE(table), year_entry, 1, 2, 4, 5,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
+-
+- label = gtk_label_new(_("Track number:"));
+- gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
+- gtk_table_attach(GTK_TABLE(table), label, 2, 3, 4, 5,
+- GTK_FILL, GTK_FILL, 5, 5);
+-
+- tracknum_entry = gtk_entry_new_with_max_length(3);
+- gtk_widget_set_usize(tracknum_entry, 40, -1);
+- gtk_table_attach(GTK_TABLE(table), tracknum_entry, 3, 4, 4, 5,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
+-
+- label = gtk_label_new(_("Genre:"));
+- gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
+- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6,
+- GTK_FILL, GTK_FILL, 5, 5);
+-
+- genre_combo = gtk_combo_new();
+- gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(genre_combo)->entry),
+- FALSE);
++ gtk_box_pack_start(GTK_BOX(filename_hbox), filename_entry, TRUE, TRUE, 0);
++
++ id3v1_vbox = gtk_vbox_new(FALSE, 10);
++ id3v1_frame = gtk_frame_new("ID3v1 Information");
++ gtk_box_pack_start(GTK_BOX(id3v1_vbox), id3v1_frame, TRUE, TRUE, 0);
++
++ id3v1_frame_vbox = gtk_vbox_new(FALSE,10);
++ gtk_container_add(GTK_CONTAINER(id3v1_frame), id3v1_frame_vbox);
++
++ table = gtk_table_new(6, 6, FALSE);
++ gtk_container_set_border_width(GTK_CONTAINER(table), 5);
++ //gtk_widget_set_usize(GTK_WIDGET(table), 325, -1);
++ //gtk_container_add(GTK_CONTAINER(id3v1_frame), table);
++ gtk_box_pack_start(GTK_BOX(id3v1_frame_vbox), table, FALSE, FALSE, 0);
++
++ v1_checkbox = gtk_check_button_new_with_label ("Disable ID3v1 Tag");
++ gtk_signal_connect(GTK_OBJECT(v1_checkbox), "toggled", GTK_SIGNAL_FUNC(v1_toggle_cb), NULL);
++ gtk_table_attach(GTK_TABLE(table), v1_checkbox, 1, 3, 0, 1,
++ GTK_FILL, GTK_FILL, 0, 2);
++
++ label = gtk_label_new("Track number:");
++ g_ptr_array_add(v1_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 3, 4, 0, 1,
++ GTK_FILL, GTK_FILL, 5,5);
++
++ v1_tracknum_entry = gtk_entry_new_with_max_length(3);
++ gtk_widget_set_usize(v1_tracknum_entry, 20, -1);
++ gtk_table_attach(GTK_TABLE(table), v1_tracknum_entry, 4, 5, 0, 1,
++ GTK_FILL, GTK_FILL, 0, 2);
++
++ label = gtk_label_new("Title:");
++ g_ptr_array_add(v1_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v1_title_entry = gtk_entry_new_with_max_length(30);
++ gtk_table_attach(GTK_TABLE(table), v1_title_entry, 1, 5, 1, 2,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Artist:");
++ g_ptr_array_add(v1_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v1_artist_entry = gtk_entry_new_with_max_length(30);
++ gtk_table_attach(GTK_TABLE(table), v1_artist_entry, 1, 5, 2, 3,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Album:");
++ g_ptr_array_add(v1_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v1_album_entry = gtk_entry_new_with_max_length(30);
++ gtk_table_attach(GTK_TABLE(table), v1_album_entry, 1, 5, 3, 4,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Comment:");
++ g_ptr_array_add(v1_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v1_comment_entry = gtk_entry_new_with_max_length(30);
++ gtk_table_attach(GTK_TABLE(table), v1_comment_entry, 1, 5, 4, 5,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Year:");
++ g_ptr_array_add(v1_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v1_year_entry = gtk_entry_new_with_max_length(4);
++ gtk_widget_set_usize(v1_year_entry, 45, -1);
++ gtk_table_attach(GTK_TABLE(table), v1_year_entry, 1, 2, 5, 6,
++ GTK_FILL, GTK_FILL, 0, 2);
++
++ label = gtk_label_new("Genre:");
++ g_ptr_array_add(v1_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 2, 3, 5, 6,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v1_genre_combo = gtk_combo_new();
++ gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(v1_genre_combo)->entry),
++ FALSE);
+ if (!genre_list)
+ {
+ struct genre_item *item;
+@@ -408,77 +584,278 @@
+ genre_list = g_list_prepend(genre_list, item);
+ genre_list = g_list_sort(genre_list, genre_comp_func);
+ }
+- genre_set_popdown(genre_combo, genre_list);
+- gtk_signal_connect(GTK_OBJECT(GTK_COMBO(genre_combo)->list),
+- "select-child", genre_selected, NULL);
+-
+- gtk_table_attach(GTK_TABLE(table), genre_combo, 1, 4, 5, 6,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+- GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5);
+-
+- bbox = gtk_hbutton_box_new();
+- gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox),
+- GTK_BUTTONBOX_END);
+- gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
+- gtk_box_pack_start(GTK_BOX(left_vbox), bbox, FALSE, FALSE, 0);
+-
+- save = gtk_button_new_with_label(_("Save"));
+- gtk_signal_connect(GTK_OBJECT(save), "clicked", save_cb, NULL);
+- GTK_WIDGET_SET_FLAGS(save, GTK_CAN_DEFAULT);
+- gtk_box_pack_start(GTK_BOX(bbox), save, TRUE, TRUE, 0);
+- gtk_widget_grab_default(save);
+-
+- remove_id3 = gtk_button_new_with_label(_("Remove ID3"));
+- gtk_signal_connect(GTK_OBJECT(remove_id3), "clicked",
+- remove_id3_cb, NULL);
+- GTK_WIDGET_SET_FLAGS(remove_id3, GTK_CAN_DEFAULT);
+- gtk_box_pack_start(GTK_BOX(bbox), remove_id3, TRUE, TRUE, 0);
+-
+- cancel = gtk_button_new_with_label(_("Cancel"));
+- gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked",
+- gtk_widget_destroy, GTK_OBJECT(window));
+- GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
+- gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
+-
+- mpeg_frame = gtk_frame_new(_("MPEG Info:"));
+- gtk_box_pack_start(GTK_BOX(hbox), mpeg_frame, FALSE, FALSE, 0);
+-
+- mpeg_box = gtk_vbox_new(FALSE, 5);
+- gtk_container_add(GTK_CONTAINER(mpeg_frame), mpeg_box);
+- gtk_container_set_border_width(GTK_CONTAINER(mpeg_box), 10);
+- gtk_box_set_spacing(GTK_BOX(mpeg_box), 0);
+-
+- mpeg_level = gtk_label_new("");
+- gtk_widget_set_usize(mpeg_level, 120, -2);
+- gtk_misc_set_alignment(GTK_MISC(mpeg_level), 0, 0);
+- gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_level, FALSE, FALSE, 0);
+-
+- mpeg_bitrate = gtk_label_new("");
+- gtk_misc_set_alignment(GTK_MISC(mpeg_bitrate), 0, 0);
+- gtk_label_set_justify(GTK_LABEL(mpeg_bitrate),
+- GTK_JUSTIFY_LEFT);
+- gtk_box_pack_start(GTK_BOX(mpeg_box),
+- mpeg_bitrate, FALSE, FALSE, 0);
+-
+- mpeg_samplerate = gtk_label_new("");
+- gtk_misc_set_alignment(GTK_MISC(mpeg_samplerate), 0, 0);
+- gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_samplerate,
+- FALSE, FALSE, 0);
+-
+- mpeg_flags = gtk_label_new("");
+- gtk_misc_set_alignment(GTK_MISC(mpeg_flags), 0, 0);
+- gtk_label_set_justify(GTK_LABEL(mpeg_flags), GTK_JUSTIFY_LEFT);
+- gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_flags,
+- FALSE, FALSE, 0);
+-
+- mpeg_fileinfo = gtk_label_new("");
+- gtk_misc_set_alignment(GTK_MISC(mpeg_fileinfo), 0, 0);
+- gtk_label_set_justify(GTK_LABEL(mpeg_fileinfo),
+- GTK_JUSTIFY_LEFT);
+- gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_fileinfo,
+- FALSE, FALSE, 0);
++ genre_set_popdown(v1_genre_combo, genre_list);
++ gtk_signal_connect(GTK_OBJECT(GTK_COMBO(v1_genre_combo)->list),
++ "select-child", v1_genre_selected, NULL);
++
++ gtk_table_attach(GTK_TABLE(table), v1_genre_combo, 3, 5, 5, 6,
++ GTK_FILL | GTK_SHRINK, GTK_FILL |
++ GTK_SHRINK, 0, 2);
++
++ bbox = gtk_hbutton_box_new();
++ gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_START);
++ gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 0);
++ gtk_container_set_border_width(GTK_CONTAINER(bbox), 5);
++ gtk_box_pack_start(GTK_BOX(id3v1_frame_vbox), bbox, FALSE, FALSE, 0);
++
++ copy_from = gtk_button_new_with_label("ID3v1 to ID3v2");
++ gtk_signal_connect(GTK_OBJECT(copy_from), "clicked", GTK_SIGNAL_FUNC(copy_v1_to_v2_cb), NULL);
++ // remove the next line to thicken the button width
++ GTK_WIDGET_SET_FLAGS(copy_from, GTK_CAN_DEFAULT);
++ gtk_box_pack_start(GTK_BOX(bbox), copy_from, FALSE, TRUE, 0);
++
++
++ notebook = gtk_notebook_new ();
++ gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP);
++
++ label = gtk_label_new ("ID3v1");
++ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), id3v1_vbox, label);
++
++
++ ////////////////////////////////////////////////////////////////////////////////////////////////////
++ ////////////////////////////////////////////////////////////////////////////////////////////////////
++
++ id3v2_vbox = gtk_vbox_new(FALSE, 0);
++
++ id3v2_frame = gtk_frame_new("ID3v2 Information");
++ gtk_box_pack_start(GTK_BOX(id3v2_vbox), id3v2_frame, FALSE, FALSE, 0);
++
++ id3v2_frame_vbox = gtk_vbox_new(FALSE, 0);
++ gtk_container_add(GTK_CONTAINER(id3v2_frame), id3v2_frame_vbox);
++
++ table = gtk_table_new(6, 6, FALSE);
++ gtk_container_set_border_width(GTK_CONTAINER(table), 5);
++ gtk_widget_set_usize(GTK_WIDGET(table), 400, -1);
++ //gtk_container_add(GTK_CONTAINER(id3v2_frame), table);
++ gtk_box_pack_start(GTK_BOX(id3v2_frame_vbox), table, FALSE, FALSE, 0);
++
++ v2_checkbox = gtk_check_button_new_with_label ("Disable ID3v2 Tag");
++ gtk_signal_connect(GTK_OBJECT(v2_checkbox), "toggled", GTK_SIGNAL_FUNC(v2_toggle_cb), NULL);
++ gtk_table_attach(GTK_TABLE(table), v2_checkbox, 1, 3, 0, 1,
++ GTK_FILL, GTK_FILL, 0, 2);
++
++ label = gtk_label_new("Track number:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 3, 4, 0, 1,
++ GTK_FILL, GTK_FILL, 5,5);
++
++ v2_tracknum_entry = gtk_entry_new_with_max_length(3);
++ gtk_widget_set_usize(v2_tracknum_entry, 20, -1);
++ gtk_table_attach(GTK_TABLE(table), v2_tracknum_entry, 4, 5, 0, 1,
++ GTK_FILL, GTK_FILL, 0, 2);
++
++ label = gtk_label_new("Title:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_title_entry = gtk_entry_new_with_max_length(MAX_ENTRY_LEN2);
++ gtk_table_attach(GTK_TABLE(table), v2_title_entry, 1, 5, 1, 2,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Artist:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_artist_entry = gtk_entry_new_with_max_length(MAX_ENTRY_LEN2);
++ gtk_table_attach(GTK_TABLE(table), v2_artist_entry, 1, 5, 2, 3,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Album:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_album_entry = gtk_entry_new_with_max_length(MAX_ENTRY_LEN2);
++ gtk_table_attach(GTK_TABLE(table), v2_album_entry, 1, 5, 3, 4,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Comment:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_comment_entry = gtk_entry_new_with_max_length(MAX_ENTRY_LEN2);
++ gtk_table_attach(GTK_TABLE(table), v2_comment_entry, 1, 5, 4, 5,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Year:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_year_entry = gtk_entry_new_with_max_length(4);
++ gtk_widget_set_usize(v2_year_entry, 45, -1);
++ gtk_table_attach(GTK_TABLE(table), v2_year_entry, 1, 2, 5, 6,
++ GTK_FILL, GTK_FILL, 0, 2);
++
++ label = gtk_label_new("Genre:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 2, 3, 5, 6,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_genre_combo = gtk_combo_new();
++ gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(v2_genre_combo)->entry), FALSE);
++ genre_set_popdown(v2_genre_combo, genre_list);
++ gtk_signal_connect(GTK_OBJECT(GTK_COMBO(v2_genre_combo)->list),
++ "select-child", v2_genre_selected, NULL);
++
++ gtk_table_attach(GTK_TABLE(table), v2_genre_combo, 3, 5, 5, 6,
++ GTK_FILL | GTK_SHRINK, GTK_FILL |
++ GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Composer:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 6, 7,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_composer_entry = gtk_entry_new_with_max_length(MAX_ENTRY_LEN2);
++ gtk_table_attach(GTK_TABLE(table), v2_composer_entry, 1, 5, 6, 7,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("Orig. Artist:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 7, 8,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_orig_artist_entry = gtk_entry_new_with_max_length(MAX_ENTRY_LEN2);
++ gtk_table_attach(GTK_TABLE(table), v2_orig_artist_entry, 1, 5, 7, 8,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ label = gtk_label_new("URL:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 8, 9,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_url_entry = gtk_entry_new_with_max_length(MAX_ENTRY_LEN2);
++ gtk_table_attach(GTK_TABLE(table), v2_url_entry, 1, 5, 8, 9,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++ label = gtk_label_new("Encoded By:");
++ g_ptr_array_add(v2_labels_list, (gpointer)label);
++ gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
++ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 9, 10,
++ GTK_FILL, GTK_FILL, 5, 5);
++
++ v2_encoded_by_entry = gtk_entry_new_with_max_length(MAX_ENTRY_LEN2);
++ gtk_table_attach(GTK_TABLE(table), v2_encoded_by_entry, 1, 5, 9, 10,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK,
++ GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 2);
++
++ bbox = gtk_hbutton_box_new();
++ gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_START);
++ gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 0);
++ gtk_container_set_border_width(GTK_CONTAINER(bbox), 5);
++ gtk_box_pack_start(GTK_BOX(id3v2_frame_vbox), bbox, FALSE, FALSE, 0);
++
++ copy_to = gtk_button_new_with_label("ID3v2 to ID3v1");
++ gtk_signal_connect(GTK_OBJECT(copy_to), "clicked", GTK_SIGNAL_FUNC(copy_v2_to_v1_cb), NULL);
++ // remove the next line to thicken the button width
++ GTK_WIDGET_SET_FLAGS(copy_to, GTK_CAN_DEFAULT);
++ gtk_box_pack_start(GTK_BOX(bbox), copy_to, FALSE, TRUE, 0);
++
++ label = gtk_label_new ("ID3v2");
++ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), id3v2_vbox, label);
++
++
++ ////////////////////////////////////////////////////////////////////////////////////////////////////
++ ////////////////////////////////////////////////////////////////////////////////////////////////////
++
++ mpeg_frame = gtk_frame_new("MPEG Information");
++ mpeg_hbox = gtk_hbox_new(FALSE,50);
++ gtk_container_add(GTK_CONTAINER(mpeg_frame), mpeg_hbox);
++
++ mpeg_lvbox = gtk_vbox_new(FALSE, 5);
++ gtk_container_set_border_width(GTK_CONTAINER(mpeg_lvbox), 10);
++ gtk_box_pack_start(GTK_BOX(mpeg_hbox), mpeg_lvbox, FALSE, FALSE, 0);
++
++ //gtk_container_set_border_width(GTK_CONTAINER(table), 5);
++ //gtk_widget_set_usize(GTK_WIDGET(table), 325, -1);
++ //gtk_container_add(GTK_CONTAINER(mpeg_frame), table);
++
++ mpeg_box = gtk_vbox_new(FALSE, 5);
++ gtk_box_pack_start(GTK_BOX(mpeg_hbox), mpeg_box, FALSE, FALSE, 0);
++ gtk_container_set_border_width(GTK_CONTAINER(mpeg_box), 10);
++ gtk_box_set_spacing(GTK_BOX(mpeg_box), 0);
++
++ mpeg_level = gtk_label_new("");
++ //gtk_widget_set_usize(mpeg_level, 120, -2);
++ gtk_label_set_justify (GTK_LABEL(mpeg_level), GTK_JUSTIFY_LEFT);
++ gtk_misc_set_alignment(GTK_MISC(mpeg_level), 0, 0.5);
++ gtk_box_pack_start(GTK_BOX(mpeg_lvbox), mpeg_level, FALSE, FALSE, 0);
++
++ mpeg_samplerate = gtk_label_new("");
++ gtk_label_set_justify (GTK_LABEL(mpeg_samplerate), GTK_JUSTIFY_LEFT);
++ gtk_misc_set_alignment(GTK_MISC(mpeg_samplerate), 0, 0.5);
++ gtk_box_pack_start(GTK_BOX(mpeg_lvbox), mpeg_samplerate, FALSE, FALSE, 0);
++
++ mpeg_fileinfo = gtk_label_new("");
++ gtk_label_set_justify (GTK_LABEL(mpeg_fileinfo), GTK_JUSTIFY_LEFT);
++ gtk_misc_set_alignment(GTK_MISC(mpeg_fileinfo), 0, 0.5);
++ gtk_box_pack_start(GTK_BOX(mpeg_lvbox), mpeg_fileinfo, FALSE, FALSE, 0);
++
++ mpeg_rvbox = gtk_vbox_new(FALSE, 5);
++ gtk_box_pack_start(GTK_BOX(mpeg_hbox), mpeg_rvbox, FALSE, FALSE, 0);
++ gtk_container_set_border_width(GTK_CONTAINER(mpeg_rvbox), 10);
++
++ mpeg_bitrate = gtk_label_new("");
++ gtk_label_set_justify (GTK_LABEL(mpeg_bitrate), GTK_JUSTIFY_LEFT);
++ gtk_misc_set_alignment(GTK_MISC(mpeg_bitrate), 0, 0.5);
++ gtk_box_pack_start(GTK_BOX(mpeg_rvbox), mpeg_bitrate, FALSE, FALSE, 0);
++
++ mpeg_flags = gtk_label_new("");
++ gtk_label_set_justify (GTK_LABEL(mpeg_flags), GTK_JUSTIFY_LEFT);
++ gtk_misc_set_alignment(GTK_MISC(mpeg_flags), 0, 0.5);
++ gtk_box_pack_start(GTK_BOX(mpeg_rvbox), mpeg_flags, FALSE, FALSE, 0);
++
++ label = gtk_label_new ("MPEG");
++ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), mpeg_frame, label);
++
++ //////////////////////////////////////////////////////////////////
++ //////////////////////////////////////////////////////////////////
++
++ // add notebook to window vbox
++ gtk_box_pack_start(GTK_BOX(window_vbox), notebook, FALSE, FALSE, 0);
++
++ // add button box to window vbox
++ bbox = gtk_hbutton_box_new();
++ gtk_box_pack_start(GTK_BOX(window_vbox), bbox, FALSE, FALSE, 0);
++
++ gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END);
++ gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 5);
++ //gtk_button_box_set_child_size (GTK_BUTTON_BOX (bbox), child_w, child_h);
++
++ save = gtk_button_new_with_label("Save");
++ gtk_signal_connect(GTK_OBJECT(save), "clicked", GTK_SIGNAL_FUNC(save_cb), NULL);
++ //GTK_WIDGET_SET_FLAGS(save, GTK_CAN_DEFAULT);
++ gtk_box_pack_start(GTK_BOX(bbox), save, TRUE, TRUE, 5);
++ //gtk_widget_grab_default(save);
++
++ close = gtk_button_new_with_label("Close");
++ gtk_signal_connect_object(GTK_OBJECT(close), "clicked",
++ GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(window));
++ //GTK_WIDGET_SET_FLAGS(close, GTK_CAN_DEFAULT);
++ gtk_box_pack_start(GTK_BOX(bbox), close, TRUE, TRUE, 5);
+
+- gtk_widget_show_all(window);
++ gtk_container_add(GTK_CONTAINER(window), window_vbox);
++ gtk_widget_show_all(window);
+ }
+
+ if (current_filename)
+@@ -495,29 +872,43 @@
+ title = g_strdup(g_basename(filename));
+ if ((tmp = strrchr(title, '.')) != NULL)
+ *tmp = '\0';
+- gtk_entry_set_text(GTK_ENTRY(title_entry), title);
++ gtk_entry_set_text(GTK_ENTRY(v1_title_entry), title);
++ gtk_entry_set_text(GTK_ENTRY(v2_title_entry), title);
+ g_free(title);
+
+- gtk_entry_set_text(GTK_ENTRY(artist_entry), "");
+- gtk_entry_set_text(GTK_ENTRY(album_entry), "");
+- gtk_entry_set_text(GTK_ENTRY(year_entry), "");
+- gtk_entry_set_text(GTK_ENTRY(tracknum_entry), "");
+- gtk_entry_set_text(GTK_ENTRY(comment_entry), "");
+- gtk_list_select_item(GTK_LIST(GTK_COMBO(genre_combo)->list),
++ gtk_entry_set_text(GTK_ENTRY(v1_artist_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v1_album_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v1_year_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v1_tracknum_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v1_comment_entry), "");
++ gtk_list_select_item(GTK_LIST(GTK_COMBO(v1_genre_combo)->list),
++ genre_find_index(genre_list, 0xff));
++
++ gtk_entry_set_text(GTK_ENTRY(v2_artist_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v2_album_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v2_year_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v2_tracknum_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v2_comment_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v2_composer_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v2_orig_artist_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v2_url_entry), "");
++ gtk_entry_set_text(GTK_ENTRY(v2_encoded_by_entry), "");
++ gtk_list_select_item(GTK_LIST(GTK_COMBO(v2_genre_combo)->list),
+ genre_find_index(genre_list, 0xff));
++
+ gtk_label_set_text(GTK_LABEL(mpeg_level), "MPEG ?, layer ?");
+ gtk_label_set_text(GTK_LABEL(mpeg_bitrate), "");
+ gtk_label_set_text(GTK_LABEL(mpeg_samplerate), "");
+ gtk_label_set_text(GTK_LABEL(mpeg_flags), "");
+ gtk_label_set_text(GTK_LABEL(mpeg_fileinfo), "");
+-
+ if (!strncasecmp(filename, "http://", 7))
+ {
+ file_info_http(filename);
+ return;
+ }
+
+- gtk_widget_set_sensitive(id3_frame, TRUE);
++ gtk_widget_set_sensitive(id3v1_frame, TRUE);
++ gtk_widget_set_sensitive(id3v2_frame, TRUE);
+
+ if ((fh = fopen(current_filename, "rb")) != NULL)
+ {
+@@ -525,40 +916,95 @@
+ unsigned char tmp[4];
+ struct frame frm;
+ gboolean id3_found = FALSE;
++ char *temp = NULL;
++ struct id3_tag *id3 = NULL;
+
+- fseek(fh, -sizeof (tag), SEEK_END);
+- if (fread(&tag, 1, sizeof (tag), fh) == sizeof (tag))
++ /*
++ * Try reading ID3v2 tag.
++ */
++ if (!mpg123_cfg.disable_id3v2)
+ {
+- if (!strncmp(tag.tag, "TAG", 3))
++ fseek(fh, 0, SEEK_SET);
++ id3 = id3_open_fp(fh, 0);
++ if (id3)
+ {
+- id3_found = TRUE;
+- set_entry_tag(GTK_ENTRY(title_entry),
+- tag.title, 30);
+- set_entry_tag(GTK_ENTRY(artist_entry),
+- tag.artist, 30);
+- set_entry_tag(GTK_ENTRY(album_entry),
+- tag.album, 30);
+- set_entry_tag(GTK_ENTRY(year_entry),
+- tag.year, 4);
+- /* Check for v1.1 tags */
+- if (tag.u.v1_1.__zero == 0)
+- {
+- char *temp = g_strdup_printf("%d", tag.u.v1_1.track_number);
+- set_entry_tag(GTK_ENTRY(comment_entry),
+- tag.u.v1_1.comment, 28);
+- gtk_entry_set_text(GTK_ENTRY(tracknum_entry), temp);
+- g_free(temp);
+- }
+- else
+- {
+- set_entry_tag(GTK_ENTRY(comment_entry),
+- tag.u.v1_0.comment, 30);
+- gtk_entry_set_text(GTK_ENTRY(tracknum_entry), "");
+- }
++ mpg123_get_id3v2(id3, &id3v2tag);
++ set_entry_tag(GTK_ENTRY(v2_title_entry),
++ id3v2tag.title, 128);
++ set_entry_tag(GTK_ENTRY(v2_artist_entry),
++ id3v2tag.artist, 128);
++ set_entry_tag(GTK_ENTRY(v2_album_entry),
++ id3v2tag.album, 128);
++ set_entry_tag(GTK_ENTRY(v2_comment_entry),
++ id3v2tag.comment, 256);
++ set_entry_tag(GTK_ENTRY(v2_composer_entry),
++ id3v2tag.composer, MAX_ENTRY_LEN2);
++ set_entry_tag(GTK_ENTRY(v2_orig_artist_entry),
++ id3v2tag.orig_artist, MAX_ENTRY_LEN2);
++ set_entry_tag(GTK_ENTRY(v2_url_entry),
++ id3v2tag.url, MAX_ENTRY_LEN2);
++ set_entry_tag(GTK_ENTRY(v2_encoded_by_entry),
++ id3v2tag.encoded_by, MAX_ENTRY_LEN2);
+
+- gtk_list_select_item(GTK_LIST(GTK_COMBO(genre_combo)->list), genre_find_index(genre_list, tag.genre));
++ temp = g_strdup_printf("%d", id3v2tag.track_number);
++ gtk_entry_set_text(GTK_ENTRY(v2_tracknum_entry), temp);
++ g_free(temp);
++
++ temp = g_strdup_printf("%d", id3v2tag.year);
++ gtk_entry_set_text(GTK_ENTRY(v2_year_entry), temp);
++ g_free(temp);
++
++ printf("Loading genre: %s", id3v2tag.genre);
++ gtk_list_select_item(GTK_LIST(GTK_COMBO(v2_genre_combo)->list), genre_find_index_str(genre_list, id3v2tag.genre));
++ id3_close(id3);
+ }
++ else
++ {
++ // Grey out the id3v2 tab
++ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(v2_checkbox), TRUE);
++ }
++ }
++
++ /*
++ * Try reading ID3v1 tag.
++ */
++ fseek(fh, -sizeof (id3v1tag), SEEK_END);
++ if ( (fread(&id3v1tag, 1, sizeof (id3v1tag), fh) == sizeof (id3v1tag)) &&
++ !strncmp(id3v1tag.tag, "TAG", 3))
++ {
++ id3_found = TRUE;
++ set_entry_tag(GTK_ENTRY(v1_title_entry),
++ id3v1tag.title, 30);
++ set_entry_tag(GTK_ENTRY(v1_artist_entry),
++ id3v1tag.artist, 30);
++ set_entry_tag(GTK_ENTRY(v1_album_entry),
++ id3v1tag.album, 30);
++ set_entry_tag(GTK_ENTRY(v1_year_entry),
++ id3v1tag.year, 4);
++ /* Check for v1.1 tags */
++ if (id3v1tag.u.v1_1.__zero == 0)
++ {
++ char *temp = g_strdup_printf("%d", id3v1tag.u.v1_1.track_number);
++ set_entry_tag(GTK_ENTRY(v1_comment_entry),
++ id3v1tag.u.v1_1.comment, 28);
++ gtk_entry_set_text(GTK_ENTRY(v1_tracknum_entry), temp);
++ g_free(temp);
++ }
++ else
++ {
++ set_entry_tag(GTK_ENTRY(v1_comment_entry),
++ id3v1tag.u.v1_0.comment, 30);
++ gtk_entry_set_text(GTK_ENTRY(v1_tracknum_entry), "");
++ }
++
++ gtk_list_select_item(GTK_LIST(GTK_COMBO(v1_genre_combo)->list), genre_find_index(genre_list, id3v1tag.genre));
+ }
++ else
++ {
++ // Grey out id3v1 tab
++ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(v1_checkbox), TRUE);
++ }
++
+ rewind(fh);
+ if (fread(tmp, 1, 4, fh) != 4)
+ {
+diff -Naur xmms-1.2.9-orig/Input/mpg123/id3.h xmms-1.2.9/Input/mpg123/id3.h
+--- xmms-1.2.9-orig/Input/mpg123/id3.h Thu Jan 29 06:43:24 2004
++++ xmms-1.2.9/Input/mpg123/id3.h Thu Jan 29 05:20:31 2004
+@@ -351,6 +351,7 @@
+ int id3_set_text(struct id3_frame *, char *);
+ int id3_set_text_number(struct id3_frame *, int);
+ gboolean id3_frame_is_text(struct id3_frame *frame);
++char* id3_get_comm(struct id3_frame *frame);
+
+ /* From id3_frame_content.c */
+ char *id3_get_content(struct id3_frame *);
+diff -Naur xmms-1.2.9-orig/Input/mpg123/id3_frame_text.c xmms-1.2.9/Input/mpg123/id3_frame_text.c
+--- xmms-1.2.9-orig/Input/mpg123/id3_frame_text.c Thu Jan 29 06:43:24 2004
++++ xmms-1.2.9/Input/mpg123/id3_frame_text.c Thu Jan 29 05:18:54 2004
+@@ -38,15 +38,15 @@
+
+ char *id3_utf16_to_ascii(void *utf16)
+ {
+- char ascii[256];
+- char *uc = (char *) utf16 + 2;
+- int i;
+-
+- for (i = 0; *uc != 0 && i < sizeof(ascii); i++, uc += 2)
+- ascii[i] = *uc;
+-
+- ascii[i] = 0;
+- return g_strdup(ascii);
++ char ascii[256];
++ char *uc = (char *) utf16 + 2;
++ int i;
++
++ for (i = 0; *uc != 0 && i < sizeof(ascii); i++, uc += 2)
++ ascii[i] = *uc;
++
++ ascii[i] = 0;
++ return g_strdup(ascii);
+ }
+
+
+@@ -59,25 +59,25 @@
+ */
+ gint8 id3_get_encoding(struct id3_frame *frame)
+ {
+- /* Type check */
+- if (!id3_frame_is_text(frame) &&
+- frame->fr_desc->fd_id != ID3_WXXX &&
+- frame->fr_desc->fd_id != ID3_IPLS &&
+- frame->fr_desc->fd_id != ID3_USLT &&
+- frame->fr_desc->fd_id != ID3_SYLT &&
+- frame->fr_desc->fd_id != ID3_COMM &&
+- frame->fr_desc->fd_id != ID3_APIC &&
+- frame->fr_desc->fd_id != ID3_GEOB &&
+- frame->fr_desc->fd_id != ID3_USER &&
+- frame->fr_desc->fd_id != ID3_OWNE &&
+- frame->fr_desc->fd_id != ID3_COMR)
+- return -1;
+-
+- /* Check if frame is compressed */
+- if (id3_decompress_frame(frame) == -1)
+- return -1;
++ /* Type check */
++ if (!id3_frame_is_text(frame) &&
++ frame->fr_desc->fd_id != ID3_WXXX &&
++ frame->fr_desc->fd_id != ID3_IPLS &&
++ frame->fr_desc->fd_id != ID3_USLT &&
++ frame->fr_desc->fd_id != ID3_SYLT &&
++ frame->fr_desc->fd_id != ID3_COMM &&
++ frame->fr_desc->fd_id != ID3_APIC &&
++ frame->fr_desc->fd_id != ID3_GEOB &&
++ frame->fr_desc->fd_id != ID3_USER &&
++ frame->fr_desc->fd_id != ID3_OWNE &&
++ frame->fr_desc->fd_id != ID3_COMR)
++ return -1;
++
++ /* Check if frame is compressed */
++ if (id3_decompress_frame(frame) == -1)
++ return -1;
+
+- return *(gint8 *) frame->fr_data;
++ return *(gint8 *) frame->fr_data;
+ }
+
+
+@@ -92,25 +92,25 @@
+ {
+ /* Type check */
+ if ( frame->fr_desc->fd_idstr[0] != 'T' &&
+- frame->fr_desc->fd_id != ID3_WXXX &&
+- frame->fr_desc->fd_id != ID3_IPLS &&
+- frame->fr_desc->fd_id != ID3_USLT &&
+- frame->fr_desc->fd_id != ID3_SYLT &&
+- frame->fr_desc->fd_id != ID3_COMM &&
+- frame->fr_desc->fd_id != ID3_APIC &&
+- frame->fr_desc->fd_id != ID3_GEOB &&
+- frame->fr_desc->fd_id != ID3_USER &&
+- frame->fr_desc->fd_id != ID3_OWNE &&
+- frame->fr_desc->fd_id != ID3_COMR )
+- return -1;
++ frame->fr_desc->fd_id != ID3_WXXX &&
++ frame->fr_desc->fd_id != ID3_IPLS &&
++ frame->fr_desc->fd_id != ID3_USLT &&
++ frame->fr_desc->fd_id != ID3_SYLT &&
++ frame->fr_desc->fd_id != ID3_COMM &&
++ frame->fr_desc->fd_id != ID3_APIC &&
++ frame->fr_desc->fd_id != ID3_GEOB &&
++ frame->fr_desc->fd_id != ID3_USER &&
++ frame->fr_desc->fd_id != ID3_OWNE &&
++ frame->fr_desc->fd_id != ID3_COMR )
++ return -1;
+
+ /* Check if frame is compressed */
+ if (id3_decompress_frame(frame) == -1)
+- return -1;
++ return -1;
+
+ /* Changing the encoding of frames is not supported yet */
+ if ( *(gint8 *) frame->fr_data != encoding )
+- return -1;
++ return -1;
+
+ /* Set encoding */
+ *(gint8 *) frame->fr_data = encoding;
+@@ -128,44 +128,44 @@
+ {
+ /* Type check */
+ if ( frame->fr_desc->fd_idstr[0] != 'T' )
+- return NULL;
++ return NULL;
+
+ /* Check if frame is compressed */
+ if (id3_decompress_frame(frame) == -1)
+- return NULL;
++ return NULL;
+
+ if ( frame->fr_desc->fd_id == ID3_TXXX ) {
+- /*
+- * This is a user defined text frame. Skip the description.
+- */
+- switch ( *(guint8 *) frame->fr_data ) {
+- case ID3_ENCODING_ISO_8859_1:
+- {
+- char *text = (char *) frame->fr_data + 1;
+-
+- while ( *text != 0 )
+- text++;
+-
+- return g_strdup(++text);
+- }
+- case ID3_ENCODING_UTF16:
+- {
+- char *text16 = (char *) frame->fr_data + 1;
+-
+- while (*text16 != 0 || *(text16 + 1) != 0)
+- text16 += 2;
+-
+- return id3_utf16_to_ascii(text16 + 2);
+- }
+- default:
+- return NULL;
+- }
++ /*
++ * This is a user defined text frame. Skip the description.
++ */
++ switch ( *(guint8 *) frame->fr_data ) {
++ case ID3_ENCODING_ISO_8859_1:
++ {
++ char *text = (char *) frame->fr_data + 1;
++
++ while ( *text != 0 )
++ text++;
++
++ return g_strdup(++text);
++ }
++ case ID3_ENCODING_UTF16:
++ {
++ char *text16 = (char *) frame->fr_data + 1;
++
++ while (*text16 != 0 || *(text16 + 1) != 0)
++ text16 += 2;
++
++ return id3_utf16_to_ascii(text16 + 2);
++ }
++ default:
++ return NULL;
++ }
+ }
+
+ if (*(guint8 *) frame->fr_data == ID3_ENCODING_ISO_8859_1)
+- return g_strdup((char *) frame->fr_data + 1);
++ return g_strdup((char *) frame->fr_data + 1);
+ else
+- return id3_utf16_to_ascii(((char *) frame->fr_data + 1));
++ return id3_utf16_to_ascii(((char *) frame->fr_data + 1));
+ }
+
+
+@@ -179,20 +179,20 @@
+ {
+ /* Type check */
+ if ( frame->fr_desc->fd_idstr[0] != 'T' )
+- return NULL;
++ return NULL;
+
+ /* If predefined text frame, return description. */
+ if ( frame->fr_desc->fd_id != ID3_TXXX )
+- return frame->fr_desc->fd_description;
++ return frame->fr_desc->fd_description;
+
+ /* Check if frame is compressed */
+ if (id3_decompress_frame(frame) == -1)
+- return NULL;
++ return NULL;
+
+ if (*(guint8 *) frame->fr_data == ID3_ENCODING_ISO_8859_1)
+- return g_strdup((char *) frame->fr_data + 1);
++ return g_strdup((char *) frame->fr_data + 1);
+ else
+- return id3_utf16_to_ascii((char *) frame->fr_data + 1);
++ return id3_utf16_to_ascii((char *) frame->fr_data + 1);
+ }
+
+
+@@ -209,42 +209,42 @@
+
+ /* Check if frame is compressed */
+ if (id3_decompress_frame(frame) == -1)
+- return -1;
++ return -1;
+
+ /*
+ * Generate integer according to encoding.
+ */
+ switch ( *(guint8 *) frame->fr_data ) {
+- case ID3_ENCODING_ISO_8859_1:
+- {
+- char *text = ((char *) frame->fr_data) + 1;
+-
+- while ( *text >= '0' && *text <= '9' ) {
+- number *= 10;
+- number += *text - '0';
+- text++;
+- }
++ case ID3_ENCODING_ISO_8859_1:
++ {
++ char *text = ((char *) frame->fr_data) + 1;
++
++ while ( *text >= '0' && *text <= '9' ) {
++ number *= 10;
++ number += *text - '0';
++ text++;
++ }
++
++ return number;
++ }
++ case ID3_ENCODING_UTF16:
++ {
++ char *text = ((char *) frame->fr_data) + 3;
++
++/* if (*(gint16 *) frame->fr_data == 0xfeff) */
++/* text++; */
++
++ while ( *text >= '0' && *text <= '9' ) {
++ number *= 10;
++ number += *text - '0';
++ text++;
++ }
+
+- return number;
+- }
+- case ID3_ENCODING_UTF16:
+- {
+- char *text = ((char *) frame->fr_data) + 3;
+-
+-/* if (*(gint16 *) frame->fr_data == 0xfeff) */
+-/* text++; */
+-
+- while ( *text >= '0' && *text <= '9' ) {
+- number *= 10;
+- number += *text - '0';
+- text++;
+- }
++ return number;
++ }
+
+- return number;
+- }
+-
+- default:
+- return -1;
++ default:
++ return -1;
+ }
+ }
+
+@@ -260,7 +260,7 @@
+ {
+ /* Type check */
+ if ( frame->fr_desc->fd_idstr[0] != 'T' )
+- return -1;
++ return -1;
+
+ /*
+ * Release memory occupied by previous data.
+@@ -289,6 +289,58 @@
+ }
+
+
++
++
++char* id3_get_comm(struct id3_frame *frame)
++{
++
++ /* Type check */
++ if ( frame->fr_desc->fd_id != ID3_COMM )
++ return NULL;
++
++ /* Check if frame is compressed */
++ if (id3_decompress_frame(frame) == -1)
++ return NULL;
++
++ /*
++ * <Header for 'Comment', ID: "COMM">
++ * Text encoding $xx
++ * Language $xx xx xx
++ * Short content descrip. <text string according to encoding> $00 (00)
++ * The actual text <full text string according to encoding>
++ *
++ * Skip language and short description.
++ */
++ switch ( *(guint8 *) frame->fr_data ) {
++ case ID3_ENCODING_ISO_8859_1:
++ {
++ char *text = (char *) frame->fr_data + 4;
++
++ while ( *text != 0 )
++ text++;
++
++ return g_strdup(++text);
++ }
++ case ID3_ENCODING_UTF16:
++ {
++ char *text16 = (char *) frame->fr_data + 4;
++
++ while (*text16 != 0 || *(text16 + 1) != 0)
++ text16 += 2;
++
++ return id3_utf16_to_ascii(text16 + 2);
++ }
++ default:
++ return NULL;
++ }
++
++ if (*(guint8 *) frame->fr_data == ID3_ENCODING_ISO_8859_1)
++ return g_strdup((char *) frame->fr_data + 1);
++ else
++ return id3_utf16_to_ascii(((char *) frame->fr_data + 1));
++}
++
++
+ /*
+ * Function id3_set_text_number (frame, number)
+ *
+@@ -304,25 +356,25 @@
+
+ /* Type check */
+ if ( frame->fr_desc->fd_idstr[0] != 'T' )
+- return -1;
++ return -1;
+
+ /*
+ * Release memory occupied by previous data.
+ */
+ id3_frame_clear_data(frame);
+-
++
+ /*
+ * Create a string with a reversed number.
+ */
+ pos = 0;
+ while ( number > 0 && pos < 64 ) {
+- buf[pos++] = (number % 10) + '0';
+- number /= 10;
++ buf[pos++] = (number % 10) + '0';
++ number /= 10;
+ }
+ if ( pos == 64 )
+- return -1;
++ return -1;
+ if ( pos == 0 )
+- buf[pos++] = '0';
++ buf[pos++] = '0';
+
+ /*
+ * Allocate memory for new data.
+@@ -336,7 +388,7 @@
+ *(gint8 *) frame->fr_raw_data = ID3_ENCODING_ISO_8859_1;
+ text = (char *) frame->fr_raw_data + 1;
+ while ( --pos >= 0 )
+- *text++ = buf[pos];
++ *text++ = buf[pos];
+ *text = '\0';
+
+ frame->fr_altered = 1;
+@@ -350,9 +402,9 @@
+
+ gboolean id3_frame_is_text(struct id3_frame *frame)
+ {
+- if (frame && frame->fr_desc &&
+- (frame->fr_desc->fd_idstr[0] == 'T' ||
+- frame->fr_desc->fd_idstr[0] == 'W' ))
+- return TRUE;
+- return FALSE;
++ if (frame && frame->fr_desc &&
++ (frame->fr_desc->fd_idstr[0] == 'T' ||
++ frame->fr_desc->fd_idstr[0] == 'W' ))
++ return TRUE;
++ return FALSE;
+ }
+diff -Naur xmms-1.2.9-orig/Input/mpg123/lib_id3v2.h xmms-1.2.9/Input/mpg123/lib_id3v2.h
+--- xmms-1.2.9-orig/Input/mpg123/lib_id3v2.h Wed Dec 31 19:00:00 1969
++++ xmms-1.2.9/Input/mpg123/lib_id3v2.h Thu Jan 29 05:20:31 2004
+@@ -0,0 +1,1280 @@
++/* the id3v2.3 library.
++ * (c)2002 by Samuel Abels (sam@manicsadness.com)
++ * This project's homepage is: http://software.manicsadness.com/cantus
++ *
++ * This library is designed for easyest possible access to id3 V2 tags.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#ifndef DLL_H
++#define DLL_H
++typedef struct DLL_s
++{
++ void *prev;
++ void *data;
++ void *next;
++} DLL;
++#endif
++
++#ifndef FALSE
++#define FALSE 0
++#endif
++#ifndef TRUE
++#define TRUE 1
++#endif
++
++#ifndef id3Tag_def
++#define id3Tag_def
++
++typedef struct id3Tag_s
++{
++ char title[1024];
++ char artist[1024];
++ char album[1024];
++ char year[5];
++ char comment[1024];
++ char track[3];
++ char genre[512];
++ char composer[1024];
++ char url[1024];
++ char orig_artist[1024];
++ char enc_by[1024];
++ unsigned int size;
++ short int has_footer;
++} id3Tag;
++
++typedef struct id3v2Tag_s
++{
++// header
++ int tag_size;
++ short int unsync;
++ short int has_extheader;
++ short int is_experimental;
++//extheader
++ int extheader_size;
++ int padding_size;
++ short int crc_data_present;
++ char crc_data[4];
++// frames
++ DLL *frames;
++} id3v2Tag;
++
++typedef struct id3v2Frame_s
++{
++ unsigned char id[4];
++ int datasize;
++ short int tagalter;
++ short int filealter;
++ short int readonly;
++ short int compression;
++ short int encryption;
++ short int grouping;
++ char *data;
++} id3v2Frame;
++
++#endif
++
++/* the id3v2.3 library.
++ * (c)2002 by Samuel Abels (sam@manicsadness.com)
++ * This project's homepage is: http://software.manicsadness.com/cantus
++ *
++ * This library is designed for easyest possible access to id3 V2 tags.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++#include <ctype.h>
++#include "charset.h"
++
++
++
++/***************************************************************************************
++ * BELOW FOLLOW THE STATICS
++ ***************************************************************************************/
++// Return the last item of an doubly linked list
++static DLL *
++dll_last (DLL *list)
++{
++ if( list == NULL )
++ return (NULL);
++
++ while ( list->next != NULL )
++ list = list->next;
++
++ return (list);
++}
++
++// Append an item to the doubly linked list
++static DLL *
++dll_append (DLL *list, void *data)
++{
++ DLL *item = malloc (sizeof(DLL));
++ DLL *lastitem = dll_last(list);
++
++ item->data = data;
++ item->next = NULL;
++
++ if ( lastitem == NULL )
++ {
++ item->prev = NULL;
++ return (item);
++ }
++ else
++ {
++ item->prev = lastitem;
++ lastitem->next = item;
++ }
++
++ return list;
++}
++
++static DLL *
++dll_remove (DLL *list, void *data)
++{
++ DLL *item = list;
++
++ while ( item )
++ {
++ if ( item->data == data )
++ {
++ if ( item->prev == NULL
++ && item->next == NULL )
++ {
++// No other items there? Then return a zero pointer.
++ free (item);
++ return (NULL);
++ }
++ if ( item->prev == NULL )
++ {
++// remove the first item of the list here...
++ list = item->next;
++ list->prev = NULL;
++ free (item);
++
++ break;
++ }
++ if ( item->next == NULL )
++ {
++// ...remove the last item of the list here...
++ ((DLL*)(item->prev))->next = NULL;
++ free (item);
++
++ break;
++ }
++// ...or other items here
++ ((DLL*)(item->prev))->next = item->next;
++ ((DLL*)(item->next))->prev = item->prev;
++ free (item);
++
++ break;
++ }
++ item = item->next;
++ }
++
++ return list;
++}
++
++// Free a doubly linked list
++static DLL *
++dll_free (DLL *list)
++{
++ DLL *item = list;
++ DLL *current = NULL;
++
++ while (item)
++ {
++ current = item;
++ item = item->next;
++
++ free (current);
++ }
++
++ return NULL;
++}
++
++/*
++ * Converts all occurences of a CR/LF to LF
++ */
++static void
++crlf2cr (char *source)
++{
++ char *psource = source;
++ char destination[2048];
++
++ if(source != NULL)
++ {
++ memset (destination, 0, 2048);
++ for (psource = source; *psource != '\0'; psource++)
++ {
++ if(*psource == 13
++ && *(psource+1) == 10 )
++ {
++ psource++;
++ }
++ destination[strlen(destination)] = *psource;
++ }
++ }
++
++ strncpy (source, destination, strlen(destination)+1);
++}
++
++
++/*
++ * Converts all occurences of a LF to CR/LF
++ */
++static void
++cr2crlf (char *source)
++{
++ char *psource = source;
++ char destination[2048];
++
++ if( source != NULL )
++ {
++ memset (destination, 0, 2048);
++ for (psource = source; *psource != '\0'; psource++)
++ {
++ if (*psource == 10)
++ destination[strlen(destination)] = 13;
++ destination[strlen(destination)] = *psource;
++ }
++ }
++
++ strncpy (source, destination, strlen(destination)+1);
++}
++
++
++
++
++/*
++ * Reads the first ten bytes of an file and checks, if it's a valid ID3 V2.3 file
++ * If it is, the header flags are stored in the tag struct.
++ * Returns TRUE on a valid header, otherwise FALSE.
++ */
++static short int
++check_header (FILE *mp3file, id3v2Tag *v2)
++{
++ unsigned char buf[10];
++
++// get header (=first ten bytes of the file)
++ fseek (mp3file, 0, SEEK_SET);
++ if ( fread (buf, 1, 10, mp3file) < 10 )
++ return (FALSE);
++
++// a valid tag must begin with "ID3" followed by the version (checked below)
++// followed by a flag byte, where the last five bytes are unused and must be FALSE
++ if ( memcmp(buf, "ID3", 3) != 0
++ || (buf[5] & 31) != 0 )
++ return (FALSE);
++
++// check if version is supported
++ if ( buf[3] != 3
++ || buf[4] != 0 )
++ return (FALSE);
++
++// The next thing to come is the tag size. These are 4 bytes, the MSB should always be set to zero. check!
++ if ( (buf[6] & 128) != 0
++ || (buf[7] & 128) != 0
++ || (buf[8] & 128) != 0
++ || (buf[9] & 128) != 0 )
++ return (FALSE);
++
++// The tag size is encoded to be syncsave, so I got to decode it.
++// The tag size is the size of the complete tag EXCLUDING the 10-byte header.
++ v2->tag_size = buf[9] + (buf[8] << 7) + (buf[7] << 14) + (buf[6] << 21);
++
++// ok, so were save. put the flags in the nicer struct.
++ v2->unsync = (buf[5] & 128) >> 7;
++ v2->has_extheader = (buf[5] & 64) >> 6;
++ v2->is_experimental = (buf[5] & 32) >> 5;
++
++ return (TRUE);
++}
++
++
++
++
++
++/*
++ * Reads the extheader of a valid ID3V2.3 file and checks, if it's a valid.
++ * If it is, the extheader flags are stored in the tag struct.
++ * Returns TRUE on a valid extheader, otherwise FALSE.
++ */
++static short int
++check_extheader (FILE *mp3file, id3v2Tag *v2)
++{
++ unsigned char buf[10];
++
++// Read id3 extheader intro (5 bytes)
++ fseek (mp3file, 10, SEEK_SET);
++ if ( fread(buf, 1, 5, mp3file) < 5 )
++ return (FALSE);
++
++// First comes the extheader size. These are 4 bytes, the MSB should always be set to zero. check!
++ if( (buf[0] & 128) != 0
++ || (buf[1] & 128) != 0
++ || (buf[2] & 128) != 0
++ || (buf[3] & 128) != 0 )
++ return (FALSE);
++
++// OK. In ID3V2.3 only six byte or ten byte extheaders are allowed.
++ if( v2->extheader_size != 6
++ && v2->extheader_size != 10 )
++ return (FALSE);
++
++// The first four bytes specify the extheader size.
++ v2->extheader_size = buf[3] + (buf[2] << 7) + (buf[1] << 14) + (buf[0] << 21);
++
++// The fifth byte specifies extendened flags. (in fact, only one flag is used for ID3V2.3
++// The MSB of the byte 5 specifies, if there is CRC data to come, appended to the extheader.
++ if( (buf[4] & 127) != 0
++ || buf[5] != 0 )
++ return (FALSE);
++
++ v2->crc_data_present = (buf[4] & 128) >> 7;
++
++// if crc data is present, the extheader size must be ten bytes, otherwise 6.
++ if ( (v2->extheader_size == 6 && v2->crc_data_present == TRUE)
++ || (v2->extheader_size == 10 && v2->crc_data_present == FALSE) )
++ return (FALSE);
++
++// now come four bytes specifying the padding size
++ if ( (buf[6] & 128) != 0
++ || (buf[7] & 128) != 0
++ || (buf[8] & 128) != 0
++ || (buf[9] & 128) != 0 )
++ return (FALSE);
++
++ v2->padding_size = buf[9] + (buf[8] << 7) + (buf[7] << 14) + (buf[6] << 21);
++
++// Now to the optional crc data.
++ if( v2->crc_data_present )
++ {
++ if( fread (buf, 1, 4, mp3file) < 4 )
++ return (FALSE);
++
++ memcpy (v2->crc_data, buf, 4);
++ }
++
++ return (TRUE);
++}
++
++
++
++
++
++/*
++ * Reads the complete frames of a valid ID3V2.3 file and checks, if they are valid.
++ * If they are, the flags are stored in a DLL and appended to the tag struct.
++ * Returns TRUE on success, otherwise FALSE.
++ */
++static short int
++read_frames (FILE *mp3file, id3v2Tag *v2)
++{
++ unsigned char buf[10];
++ int numframes = 0;
++ unsigned int totalframesize = 0;
++ id3v2Frame *frame = NULL;
++
++// set the position to the first frame header (header = 10 bytes + extheadersize + 4 bytes "extheaderheader")
++ if (v2->has_extheader)
++ fseek (mp3file, 10 + v2->extheader_size + 4, SEEK_SET);
++ else
++ fseek (mp3file, 10, SEEK_SET);
++
++// If the tag size is too small for frames, return with an error.
++ if ( ((v2->tag_size + 10) - v2->padding_size) <= ftell(mp3file) )
++ return FALSE;
++
++// now read all the frames
++ numframes = 0;
++ v2->frames = NULL;
++ while ( ftell (mp3file) < ((v2->tag_size + 10) - v2->padding_size) )
++ {
++ frame = calloc (1, sizeof(id3v2Frame));
++
++// the frame header is ten bytes long
++ if ( fread (buf, 1, 10, mp3file) < 10 )
++ goto error;
++
++// if we are already in the padding, we must no longer look for frames...
++ if ( buf[0] == 0 && buf[1] == 0 && buf[2] == 0 && buf[3] == 0 )
++ {
++ if (numframes == 0)
++ goto error;
++
++ free (frame);
++ break;
++ }
++
++// first come four characters identifying the frame. It must be alphanumeric.
++ if ( !isalnum(buf[0]) || !isalnum(buf[1]) || !isalnum(buf[2]) || !isalnum(buf[3]) )
++ goto error;
++
++ *(frame->id) = buf[0];
++ *(frame->id + 1) = buf[1];
++ *(frame->id + 2) = buf[2];
++ *(frame->id + 3) = buf[3];
++
++// then, the frame size is to come. Again, the four MSBs must be zero.
++ if ( (buf[4] & 128) != 0
++ || (buf[5] & 128) != 0
++ || (buf[6] & 128) != 0
++ || (buf[7] & 128) != 0 )
++ goto error;
++
++ frame->datasize = buf[7] + (buf[6] << 7) + (buf[5] << 14) + (buf[4] << 21);
++
++// A minimum size must be present!
++ if ( frame->datasize <= 0 )
++ goto error;
++
++// The two following frame header flags have the 5 LSBs not set.
++ if ( (buf[8] & 31) != 0
++ || (buf[9] & 31) != 0 )
++ goto error;
++
++// now, put the flags in the struct.
++ frame->tagalter = (buf[8] & 128) >> 7;
++ frame->filealter = (buf[8] & 64) >> 6;
++ frame->readonly = (buf[8] & 32) >> 5;
++
++ frame->compression = (buf[9] & 128) >> 7;
++ frame->encryption = (buf[8] & 64) >> 6;
++ frame->grouping = (buf[8] & 32) >> 5;
++
++// ok, we are done with the frame header, so now we read the frame data.
++ frame->data = calloc (1, frame->datasize + 1);
++ if( fread (frame->data, 1, frame->datasize, mp3file) < frame->datasize )
++ goto error;
++
++ numframes++;
++ totalframesize += 10 + frame->datasize;
++
++// we append it to a glist, which is appended to the v2 struct.
++ v2->frames = dll_append (v2->frames, frame);
++ }
++
++// if we have no extheader, that means, we don't know how much padding we have!
++// thus, i calculate it here.
++ if ( !v2->has_extheader )
++ v2->padding_size = v2->tag_size - totalframesize;
++
++// A minimum of one frame is mandatory.
++ if( numframes > 0 )
++ return (TRUE);
++
++error:
++// cleanups in case of an error.
++ if( frame && frame->data )
++ free (frame->data);
++ if( frame )
++ free (frame);
++ return (FALSE);
++}
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++/*
++ * Reads all tag information of a valid ID3V2.3 file.
++ * When successful, the info is stored in the tag struct.
++ * Returns:
++ * 0 = success
++ * 1 = Cannot open file.
++ * 2 = No header or wrong version.
++ * 3 = broken extheader.
++ * 4 = broken frames.
++ */
++static int
++get_id3v2tag_raw (id3v2Tag *v2, char *filename)
++{
++ FILE *mp3file = NULL;
++ int error = 0;
++
++// open file
++ error = 1;
++ mp3file = fopen (filename, "rb");
++ if (!mp3file)
++ goto done;
++
++// check/get header
++ error = 2;
++ if( !check_header (mp3file, v2) )
++ goto done;
++
++// check/get extheader
++ error = 3;
++ if( v2->has_extheader
++ && !check_extheader (mp3file, v2) )
++ goto done;
++
++// get the content frames
++ error = 4;
++ if( !read_frames (mp3file, v2) )
++ goto done;
++
++ error = 0;
++done:
++ fclose (mp3file);
++ return (error);
++}
++
++
++
++
++
++/*
++ * Find one frames data and give back its data in the correct format.
++ * Returns TRUE on success, otherwise FALSE;
++ */
++static short int
++frame_find (id3v2Tag *v2, char *name, char *value)
++{
++ DLL *curframe = NULL;
++ id3v2Frame *frame = NULL;
++
++ // we parse through the whole list of frames, giving back the correct frame value.
++ curframe = v2->frames;
++ while ( curframe )
++ {
++ frame = (id3v2Frame *)curframe->data;
++
++ // Just to be sure...
++ if( frame->datasize <= 0 )
++ goto nextframe;
++
++ // Matches the users request? Otherwise try the next frame.
++ if( memcmp (frame->id, name, 4) != 0 )
++ goto nextframe;
++
++ // These types don't need much change, just give the whole data back to the user according to the encoding.
++ // The first byte is the encoding.
++ // TPE1: Artist
++ // TIT2: Song Title
++ // TALB: Album Title
++ // TYER: Year
++ // TRCK: Track
++ // TCON: Genre
++ // COMM: Comment
++ // TCOM: Composer
++ // TOPE: TOPE Original artist(s)/performer(s)
++ // TENC: Encoded by
++ if ( memcmp (frame->id, "TPE1", 4) == 0
++ || memcmp (frame->id, "TIT2", 4) == 0
++ || memcmp (frame->id, "TALB", 4) == 0
++ || memcmp (frame->id, "TYER", 4) == 0
++ || memcmp (frame->id, "TRCK", 4) == 0
++ || memcmp (frame->id, "TCON", 4) == 0
++ || memcmp (frame->id, "TCOM", 4) == 0
++ || memcmp (frame->id, "TOPE", 4) == 0
++ || memcmp (frame->id, "TENC", 4) == 0)
++ //|| memcmp (frame->id, "WXXX", 4) == 0)
++ {
++ if ( *frame->data == 0 )
++ memcpy(value, frame->data + 1, frame->datasize - 1);
++ if ( *frame->data == 1 )
++ {
++ char nulltermvalue[frame->datasize];
++ char *isovalue = NULL;
++
++ // the tag is not null terminated, so i have to create a null terminated string first.
++ memset (nulltermvalue, 0, frame->datasize);
++ memcpy (nulltermvalue, frame->data + 1, frame->datasize - 1);
++
++ // Convert from UTF to ISO and copy to the users variable.
++ isovalue = convert_from_utf8 (nulltermvalue);
++ strncpy (value, isovalue, sizeof(value) - 1);
++ free (isovalue);
++ }
++
++ // change linefeeds to a single "return" key.
++ crlf2cr (value);
++ return (TRUE);
++ }
++ if ( memcmp (frame->id, "WCOM", 4) == 0
++ || memcmp (frame->id, "WCOP", 4) == 0
++ || memcmp (frame->id, "WOAF", 4) == 0
++ || memcmp (frame->id, "WOAR", 4) == 0
++ || memcmp (frame->id, "WOAS", 4) == 0
++ || memcmp (frame->id, "WPAY", 4) == 0
++ || memcmp (frame->id, "WPUB", 4) == 0)
++ {
++ memcpy(value, frame->data, frame->datasize - 1);
++
++ // change linefeeds to a single "return" key.
++ crlf2cr (value);
++ return (TRUE);
++ }
++
++ // The comment requires special handling.
++ // Its data has: One byte "encoding" (0 = ISO-8859-1, 1 = UNICODE)
++ // followed by the language (three bytes, e.g. "eng"),
++ // followed by a short description,
++ // then a NULL,
++ // and the full description
++ // For now, i simply drop the short description
++ if( memcmp(frame->id, "COMM", 4) == 0 )
++ {
++ // check for the right format. (minsize 5, must contain a "\0" after the language)
++ if ( frame->datasize < 5 )
++ goto nextframe;
++ if ( !memchr (frame->data + 4, '\0', frame->datasize - 4) )
++ goto nextframe;
++
++ // now, give the data back to the user, according to the encoding.
++ if ( *frame->data == 0 )
++ memcpy (value, frame->data + 5, frame->datasize - 5);
++ if ( *frame->data == 1 )
++ {
++ char nulltermvalue[frame->datasize];
++ char *isovalue = NULL;
++
++ // the tag is not null terminated, so i have to create a null terminated string first.
++ memset (nulltermvalue, 0, frame->datasize);
++ memcpy (nulltermvalue, frame->data + 5, frame->datasize - 5);
++
++ // Convert from UTF to ISO and copy to the users variable.
++ isovalue = convert_from_utf8 (nulltermvalue);
++ strncpy (value, isovalue, sizeof(value) - 1);
++ free (isovalue);
++ }
++
++ // change linefeeds to a single "return" key.
++ crlf2cr (value);
++ return TRUE;
++ }
++
++nextframe:
++ curframe = curframe->next;
++ }
++
++ return FALSE;
++}
++
++
++
++
++/*
++ * Remove one frame out of the id3v2Tag struct
++ * Returns TRUE on success, otherwise FALSE;
++ */
++static short int
++frame_remove (id3v2Tag *v2, char *name)
++{
++ id3v2Frame *frame = NULL;
++ DLL *curframe = NULL;
++ DLL *tempframe = NULL;
++
++// Parse through the list of frames.
++ curframe = v2->frames;
++ while ( curframe )
++ {
++ frame = (id3v2Frame *)curframe->data;
++ tempframe = curframe;
++ curframe = curframe->next;
++
++ if ( memcmp (frame->id, name, 4) == 0 )
++ {
++// we have found the item! removing will NOT shrink the tag, but increase the padding.
++ v2->padding_size += (frame->datasize + 10);
++// and free memory.
++ v2->frames = dll_remove (v2->frames, tempframe->data);
++ free (frame->data);
++ free (frame);
++
++ return TRUE;
++ }
++ }
++
++ return FALSE;
++}
++
++
++
++/*
++ * Add a frame to the framelist. If the frame name is already in the list, it will be replaced.
++ * Returns:
++ * TRUE: The tag size HAS BEEN increased.
++ * FALSE: The tag size has NOT been increased.
++ */
++static short int
++frame_set (id3v2Tag *v2, char *name, char *value)
++{
++ id3v2Frame *frame = NULL;
++ short int sizechange = FALSE;
++
++// prevent the user to send CR/LF, which is forbidden.
++ cr2crlf (value);
++// eventually remove an existing item!
++ frame_remove (v2, name);
++
++// alloc space for the new frame.
++ frame = malloc (sizeof(id3v2Frame));
++
++ memcpy (frame->id, name, 4);
++ frame->datasize = strlen (value);
++ frame->tagalter = 0;
++ frame->filealter = 0;
++ frame->readonly = 0;
++ frame->compression = 0;
++ frame->encryption = 0;
++ frame->grouping = 0;
++
++// The comment requires special handling. If you need to know why, look at the documentation
++// of the "frame_find" function above.
++ if( memcmp (frame->id, "COMM", 4) == 0 )
++ {
++ char fullvalue[frame->datasize + 6];
++
++ sprintf(fullvalue, "%ceng%c%s", 0, 0, value);
++
++ frame->datasize += 5;
++ frame->data = malloc (frame->datasize);
++ memcpy (frame->data, fullvalue, frame->datasize);
++ }
++ else if ((memcmp(frame->id, "WCOM", 4) == 0)
++ || memcmp (frame->id, "WCOP", 4) == 0
++ || memcmp (frame->id, "WOAF", 4) == 0
++ || memcmp (frame->id, "WOAR", 4) == 0
++ || memcmp (frame->id, "WOAS", 4) == 0
++ || memcmp (frame->id, "WPAY", 4) == 0
++ || memcmp (frame->id, "WPUB", 4) == 0)
++ {
++ frame->data = malloc (frame->datasize);
++ memcpy (frame->data, value, frame->datasize);
++ }
++ else
++ {
++ char fullvalue[frame->datasize + 2];
++
++ // Put encoding type just before the value
++ sprintf (fullvalue, "%c%s", 0, value);
++
++ frame->datasize += 1;
++ frame->data = malloc (frame->datasize);
++ memcpy (frame->data, fullvalue, frame->datasize);
++ }
++
++// Ok. This decreases the available padding. If we have no padding left, we must increase the padding (and thus, the tag).
++ if( v2->padding_size - (frame->datasize + 10) <= 0 )
++ {
++// add: framesize + frameheadersize + padding.
++ v2->padding_size += frame->datasize + 10 + 1024;
++ v2->tag_size += frame->datasize + 10 + 1024;
++
++ sizechange = TRUE;
++ }
++
++// In every case, we must subtract the new allocated space from the padding.
++ v2->padding_size -= frame->datasize + 10;
++
++ v2->frames = dll_append (v2->frames, frame);
++
++ return sizechange;
++}
++
++
++
++/*
++ * Create raw header.
++ * Returns:
++ * TRUE: successful.
++ * FALSE: unsuccessful.
++ */
++static int
++create_header_raw (char *raw, id3v2Tag *v2)
++{
++// now we are going to write the tags raw data into the raw string
++ memset (raw, 0, v2->tag_size + 10);
++// ID3 identifier bytes
++ memcpy (raw, "ID3", 3);
++ raw += 3;
++// major version byte
++ *raw++ = 3;
++// minor version byte
++ *raw++ = 0;
++// Flags byte
++ *raw++ = ((v2->unsync & 1) << 7)
++ | ((v2->has_extheader & 1) << 6)
++ | ((v2->is_experimental & 1) << 5);
++// Tag size. It must be syncsafe!
++ *raw++ = ((v2->tag_size & 0x800000) >> 23) | (((v2->tag_size & 0x7f000000) >> 24) << 1);
++ *raw++ = ((v2->tag_size & 0x8000) >> 15) | (((v2->tag_size & 0x7f0000) >> 16) << 1);
++ *raw++ = ((v2->tag_size & 0x80) >> 7) | (((v2->tag_size & 0x7f00) >> 8) << 1);
++ *raw++ = (v2->tag_size & 0x7f);
++
++ return TRUE;
++}
++
++
++
++
++/*
++ * Generates the frames. btw.: ID3 sucks!
++ * Returns: TRUE if succesful, otherwise FALSE.
++ */
++static short int
++create_frames_raw (char *raw, id3v2Tag *v2)
++{
++ id3v2Frame *frame = NULL;
++ DLL *curframe = NULL;
++
++// if we have no frames, just quit.
++ if ( v2->frames == NULL )
++ return FALSE;
++
++// the header and extheader have already been written.
++ raw += 10;
++ if ( v2->has_extheader )
++ raw += 4 + v2->extheader_size;
++
++ curframe = v2->frames;
++ while ( curframe )
++ {
++ frame = (id3v2Frame *)curframe->data;
++
++// secure is secure
++ if ( frame->datasize <= 0 )
++ goto nextframe;
++
++// add the frame id
++ memcpy(raw, frame->id, 4);
++ raw += 4;
++// add the frame size (syncsafe)
++ *raw++ = ((frame->datasize & 0x800000) >> 23) | (((frame->datasize & 0x7f000000) >> 24) << 1);
++ *raw++ = ((frame->datasize & 0x8000) >> 15) | (((frame->datasize & 0x7f0000) >> 16) << 1);
++ *raw++ = ((frame->datasize & 0x80) >> 7) | (((frame->datasize & 0x7f00) >> 8) << 1);
++ *raw++ = (frame->datasize & 0x7f);
++
++// The two flagbytes
++ *raw++ = ((frame->tagalter & 1) << 7)
++ | ((frame->filealter & 1) << 6)
++ | ((frame->readonly & 1) << 5);
++
++ *raw++ = ((frame->compression & 1) << 7)
++ | ((frame->encryption & 1) << 6)
++ | ((frame->grouping & 1) << 5);
++
++// now the frame data.
++ memcpy(raw, frame->data, frame->datasize);
++ raw += frame->datasize;
++
++nextframe:
++ curframe = curframe->next;
++ }
++
++ return TRUE;
++}
++
++/***************************************************************************************
++ * END OF STATICS
++ ***************************************************************************************/
++
++
++
++
++
++
++
++/*
++ * Purpose: Reads the ID3 tag from a file.
++ * Parameters: tag - The structure to store the tag in, filename - The name of the file to operate on.
++ * Returns:
++ * 0 if successful,
++ * 1 if an error occured when opening the file
++ * 2 if error while reading tag.
++ * 3 if no TAG found.
++ */
++int
++get_id3v2_tag (id3Tag *tag, char *filename)
++{
++ id3v2Tag *v2 = calloc (1, sizeof(id3v2Tag));
++ DLL *curframe = NULL;
++ int error = 0;
++
++// Read the tag.
++ error = get_id3v2tag_raw (v2, filename);
++
++// Init the users tag
++ memset (tag, 0, sizeof (id3Tag));
++
++ if( error == 0 )
++ {
++// if we have a valid tag we copy the raw data to the users struct
++ tag->size = v2->tag_size;
++
++ frame_find (v2, "TPE1", tag->artist);
++ frame_find (v2, "TIT2", tag->title);
++ frame_find (v2, "TALB", tag->album);
++ frame_find (v2, "TYER", tag->year);
++ frame_find (v2, "COMM", tag->comment);
++ frame_find (v2, "TRCK", tag->track);
++ frame_find (v2, "TCON", tag->genre);
++ frame_find (v2, "TCOM", tag->composer); // Composer
++ frame_find (v2, "TOPE", tag->orig_artist); // Original artist(s)/performer(s)
++ frame_find (v2, "WCOM", tag->url); // URL
++ frame_find (v2, "TENC", tag->enc_by); // Encoded by
++ }
++
++// Free all the stuff
++ if (v2->frames)
++ {
++ id3v2Frame *frame = NULL;
++
++ curframe = v2->frames;
++ while ( curframe )
++ {
++ frame = (id3v2Frame *)curframe->data;
++
++ free (frame->data);
++ free (frame);
++
++ curframe = curframe->next;
++ }
++ v2->frames = dll_free (v2->frames);
++ }
++
++ free (v2);
++ return (error);
++}
++
++
++
++
++
++
++
++
++
++/*
++ * Purpose: Clear the ID3 tag of a file.
++ * Parameters: a filename.
++ * Returns:
++ * 0 if successful,
++ * 1 if an error occured when opening the file
++ * 2 if an error while reading/writing the tag.
++ */
++int
++del_id3v2_tag (char *filename)
++{
++ id3v2Tag *v2 = calloc (1, sizeof(id3v2Tag));
++ long file_len;
++ FILE *file;
++ void *ptr;
++
++// check if an valid old id3v2 tag is present
++// In these two error-cases we don't know how big the tag is.
++ if( get_id3v2tag_raw (v2, filename) == 1
++ || get_id3v2tag_raw (v2, filename) == 2 )
++ return(0);
++
++ ptr = malloc (4096);
++
++// open file read/write
++ file = fopen (filename, "r+b");
++ if (!file)
++ return (1);
++
++ fseek (file, 0, SEEK_END);
++ file_len = ftell (file);
++ if ( file_len < 11
++ || v2->tag_size < 11 )
++ return (2);
++
++// set anything but the header in tag to zero. I'll not really remove the tag,
++// because this would be much slower and if we write a new tag, this would mean we´d have to
++// rewrite the complete tag.
++/*
++ fseek (file, 10, SEEK_SET);
++ for (read = 0; read < v2->tag_size - 10; read++)
++ fputc (0, file);
++
++*/
++ {
++ FILE *file = NULL;
++ FILE *tempfile = NULL;
++ char *tempfilename = NULL;
++ int read = 0;
++ char buf[4096];
++ int error = 0;
++
++ // Open a tempfile
++ error = 2;
++ tempfilename = malloc (strlen (filename) + 11);
++ sprintf (tempfilename, "%s%s", filename, ".tempXXXXX");
++ if( !(tempfile = fopen(tempfilename, "wb")) )
++ {
++ remove (tempfilename);
++ free (tempfilename);
++ goto done;
++ }
++
++ // Write the tag to the tempfile.
++
++ // Open the mp3file.
++ error = 4;
++ if( !(file = fopen(filename, "r+b")) )
++ {
++ fclose (file);
++ remove (tempfilename);
++ free (tempfilename);
++ goto done;
++ }
++ // skip the old tag (if one existed)
++ fseek (file, v2->tag_size + 10, SEEK_SET);
++
++ // copy the rest of the file to the tempfile.
++ while ( !feof(file) )
++ {
++ error = 5;
++ read = fread (buf, 1, 4096, file);
++ if( fwrite (buf, 1, read, tempfile) != read
++ && !feof (file) )
++ {
++ remove (tempfilename);
++ free (tempfilename);
++ fflush (tempfile);
++ fclose (tempfile);
++ fflush (file);
++ fclose (file);
++ goto done;
++ }
++ }
++
++ fflush (file);
++ fclose (file);
++ fflush (tempfile);
++ fclose (tempfile);
++
++ // rename the tempfile, so it is the mp3file.
++ rename (tempfilename, filename);
++ free (tempfilename);
++ }
++
++done:
++ if (v2) free (v2);
++ if (ptr) free (ptr);
++
++ return(0);
++}
++
++
++
++
++
++
++
++
++
++
++
++int
++set_id3v2_tag (id3Tag *tag, char *filename)
++{
++ id3v2Tag *v2 = malloc (sizeof(id3v2Tag));
++ id3v2Frame *frame = NULL;
++ unsigned char *rawdata = NULL;
++ DLL *curframe = NULL;
++ int oldsize = 0;
++ char track[3];
++ int error = 0;
++
++// Try to get the content of an old tag
++ error = 1;
++ memset (v2, 0, sizeof(id3v2Tag));
++ get_id3v2tag_raw (v2, filename);
++
++ oldsize = v2->tag_size;
++
++// If the old tag had an extheader, I'll add its size to my tag, because i don't plan to add it again.
++ if ( v2->has_extheader )
++ {
++ v2->padding_size += v2->extheader_size;
++ v2->has_extheader = FALSE;
++ v2->extheader_size = 0;
++ }
++
++// first of all I'll generate a valid id3v2 tag struct out of the tag struct we got by the user.
++// Set the flags...
++ v2->unsync = FALSE;
++ v2->is_experimental = FALSE;
++ v2->crc_data_present = FALSE;
++
++// Set the contentframes
++ frame_set (v2, "TIT2", tag->title);
++ frame_set (v2, "TPE1", tag->artist);
++ frame_set (v2, "TALB", tag->album);
++ frame_set (v2, "TYER", tag->year);
++ frame_set (v2, "COMM", tag->comment);
++ frame_set (v2, "TCON", tag->genre);
++ frame_set (v2, "TCOM", tag->composer); // Composer
++ frame_set (v2, "TOPE", tag->orig_artist); // TOPE Original artist(s)/performer(s)
++ frame_set (v2, "WCOM", tag->url); // URL
++ frame_set (v2, "TENC", tag->enc_by); // Encoded by
++ if ( atoi (tag->track) < 10 )
++ snprintf (track, 3, "0%i", atoi(tag->track));
++ else
++ snprintf (track, 3, "%i", atoi(tag->track));
++ frame_set (v2, "TRCK", track);
++
++// Create a header in the raw data string
++ rawdata = calloc (1, v2->tag_size + 10);
++ create_header_raw (rawdata, v2);
++
++// Create frames raw data.
++ create_frames_raw (rawdata, v2);
++
++// is the new tag bigger than the old one? Then we'll have to completely rewrite the file...
++ if ( v2->tag_size > oldsize )
++ {
++ FILE *file = NULL;
++ FILE *tempfile = NULL;
++ char *tempfilename = NULL;
++ int read = 0;
++ char buf[4096];
++
++// Open a tempfile
++ error = 2;
++ tempfilename = malloc (strlen (filename) + 11);
++ sprintf (tempfilename, "%s%s", filename, ".tempXXXXX");
++ if( !(tempfile = fopen(tempfilename, "wb")) )
++ {
++ remove (tempfilename);
++ free (tempfilename);
++ goto done;
++ }
++
++// Write the tag to the tempfile.
++ error = 3;
++ fseek (tempfile, 0, SEEK_SET);
++ if( fwrite (rawdata, 1, v2->tag_size + 10, tempfile) < v2->tag_size )
++ {
++ fclose (tempfile);
++ remove (tempfilename);
++ free (tempfilename);
++ goto done;
++ }
++
++// Open the mp3file.
++ error = 4;
++ if( !(file = fopen(filename, "r+b")) )
++ {
++ fclose (file);
++ remove (tempfilename);
++ free (tempfilename);
++ goto done;
++ }
++// skip the old tag (if one existed)
++ fseek (file, oldsize? oldsize + 10 : oldsize, SEEK_SET);
++
++// copy the rest of the file to the tempfile.
++ while ( !feof(file) )
++ {
++ error = 5;
++ read = fread (buf, 1, 4096, file);
++ if( fwrite (buf, 1, read, tempfile) != read
++ && !feof (file) )
++ {
++ remove (tempfilename);
++ free (tempfilename);
++ fflush (tempfile);
++ fclose (tempfile);
++ fflush (file);
++ fclose (file);
++ goto done;
++ }
++ }
++
++ fflush (file);
++ fclose (file);
++ fflush (tempfile);
++ fclose (tempfile);
++
++// rename the tempfile, so it is the mp3file.
++ rename (tempfilename, filename);
++ free (tempfilename);
++ }
++ else
++ {
++ FILE *file = NULL;
++
++// If the old tag was bigger than the new one, we can simply overwrite it!
++// open.
++ error = 10;
++ if( !(file = fopen(filename, "r+b")) )
++ goto done;
++
++// write.
++ error = 11;
++ fseek (file, 0, SEEK_SET);
++ if( fwrite (rawdata, 1, v2->tag_size + 10, file) < v2->tag_size )
++ {
++ fflush (file);
++ fclose (file);
++ goto done;
++ }
++
++ fflush (file);
++ fclose (file);
++ }
++
++ error = 0;
++
++done:
++// Free all the stuff
++ curframe = v2->frames;
++ while ( curframe )
++ {
++ frame = (id3v2Frame *)curframe->data;
++
++ free (frame->data);
++ free (frame);
++
++ curframe = curframe->next;
++ }
++ dll_free (v2->frames);
++
++ if ( rawdata != NULL )
++ free (rawdata);
++ free (v2);
++ return (error);
++}
+diff -Naur xmms-1.2.9-orig/Input/mpg123/mpg123.c xmms-1.2.9/Input/mpg123/mpg123.c
+--- xmms-1.2.9-orig/Input/mpg123/mpg123.c Thu Jan 29 06:43:24 2004
++++ xmms-1.2.9/Input/mpg123/mpg123.c Thu Jan 29 05:18:54 2004
+@@ -607,8 +607,13 @@
+ { \
+ id3frm = id3_get_frame( id3d, _tid, 1 ); \
+ if (id3frm) { \
+- txt = _tid == ID3_TCON ? id3_get_content(id3frm) \
+- : id3_get_text(id3frm); \
++ if (_tid == ID3_COMM) \
++ txt = id3_get_comm(id3frm); \
++ else if (id3frm->fr_desc->fd_idstr[0] == 'W') \
++ txt = id3_get_url(id3frm); \
++ else \
++ txt = _tid == ID3_TCON ? id3_get_content(id3frm) \
++ : id3_get_text(id3frm); \
+ if(txt) \
+ { \
+ tlen = strlen(txt); \
+@@ -644,6 +649,10 @@
+ ID3_SET_NUM (ID3_TRCK, track_number);
+ ID3_SET (ID3_COMM, comment);
+ ID3_SET (ID3_TCON, genre);
++ ID3_SET (ID3_TCOM, composer);
++ ID3_SET (ID3_TOPE, orig_artist);
++ ID3_SET (ID3_WCOM, url);
++ ID3_SET (ID3_TENC, encoded_by);
+ }
+
+ /*
+diff -Naur xmms-1.2.9-orig/Input/mpg123/mpg123.h xmms-1.2.9/Input/mpg123/mpg123.h
+--- xmms-1.2.9-orig/Input/mpg123/mpg123.h Thu Jan 29 06:43:24 2004
++++ xmms-1.2.9/Input/mpg123/mpg123.h Thu Jan 29 05:20:31 2004
+@@ -78,6 +78,10 @@
+ char genre[256];
+ int year;
+ int track_number;
++ char composer[1024];
++ char orig_artist[1024];
++ char url[1024];
++ char encoded_by[1024];
+ };
+
+ typedef struct
diff --git a/abs/extra/xmms/xmms-1.2.10-crossfade-0.3.9.patch b/abs/extra/xmms/xmms-1.2.10-crossfade-0.3.9.patch
new file mode 100644
index 0000000..51c5167
--- /dev/null
+++ b/abs/extra/xmms/xmms-1.2.10-crossfade-0.3.9.patch
@@ -0,0 +1,101 @@
+diff -ur xmms-1.2.10/xmms/input.c xmms-1.2.10.patched/xmms/input.c
+--- xmms-1.2.10/xmms/input.c 2003-08-08 19:10:44.000000000 +0200
++++ xmms-1.2.10.patched/xmms/input.c 2005-11-25 00:12:36.000000000 +0100
+@@ -285,6 +285,14 @@
+ }
+ }
+
++gboolean input_stopped_for_restart = FALSE; /* crossfade */
++void input_stop_for_restart() /* crossfade */
++{
++ input_stopped_for_restart = TRUE;
++ input_stop();
++ input_stopped_for_restart = FALSE;
++}
++
+ void input_stop(void)
+ {
+ if (ip_data->playing && get_current_input_plugin())
+diff -ur xmms-1.2.10/xmms/input.h xmms-1.2.10.patched/xmms/input.h
+--- xmms-1.2.10/xmms/input.h 2000-02-16 22:05:57.000000000 +0100
++++ xmms-1.2.10.patched/xmms/input.h 2005-11-25 00:12:36.000000000 +0100
+@@ -34,6 +34,7 @@
+ gboolean input_check_file(gchar * filename);
+ void input_play(char *filename);
+ void input_stop(void);
++void input_stop_for_restart(void);
+ void input_pause(void);
+ int input_get_time(void);
+ void input_set_eq(int on, float preamp, float *bands);
+diff -ur xmms-1.2.10/xmms/main.c xmms-1.2.10.patched/xmms/main.c
+--- xmms-1.2.10/xmms/main.c 2004-02-23 21:31:43.000000000 +0100
++++ xmms-1.2.10.patched/xmms/main.c 2005-11-25 00:12:36.000000000 +0100
+@@ -881,8 +881,10 @@
+ mainwin_set_shade(!cfg.player_shaded);
+ }
+
++gboolean is_quitting = FALSE; /* crossfade */
+ void mainwin_quit_cb(void)
+ {
++ is_quitting = TRUE; /* crossfade */
+ input_stop();
+ gtk_widget_hide(equalizerwin);
+ gtk_widget_hide(playlistwin);
+@@ -1523,7 +1525,8 @@
+ int *pos;
+
+ if (get_input_playing())
+- input_stop();
++ input_stop_for_restart();
++
+ pos = gtk_clist_get_row_data(clist, GPOINTER_TO_INT(clist->selection->data));
+ playlist_set_position(*pos);
+ playlist_play();
+diff -ur xmms-1.2.10/xmms/playlist.c xmms-1.2.10.patched/xmms/playlist.c
+--- xmms-1.2.10/xmms/playlist.c 2004-02-23 21:31:43.000000000 +0100
++++ xmms-1.2.10.patched/xmms/playlist.c 2005-11-25 00:12:36.000000000 +0100
+@@ -124,7 +124,7 @@
+ if (get_input_playing())
+ {
+ PL_UNLOCK();
+- input_stop();
++ input_stop_for_restart();
+ PL_LOCK();
+ *restart_playing = TRUE;
+ }
+@@ -570,7 +570,7 @@
+ }
+
+ if (get_input_playing())
+- input_stop();
++ input_stop_for_restart();
+
+ vis_clear_data(mainwin_vis);
+ vis_clear_data(playlistwin_vis);
+@@ -668,7 +668,7 @@
+ {
+ /* We need to stop before changing playlist_position */
+ PL_UNLOCK();
+- input_stop();
++ input_stop_for_restart();
+ PL_LOCK();
+ restart_playing = TRUE;
+ }
+@@ -723,7 +723,7 @@
+ {
+ /* We need to stop before changing playlist_position */
+ PL_UNLOCK();
+- input_stop();
++ input_stop_for_restart();
+ PL_LOCK();
+ restart_playing = TRUE;
+ }
+@@ -852,7 +852,7 @@
+ {
+ /* We need to stop before changing playlist_position */
+ PL_UNLOCK();
+- input_stop();
++ input_stop_for_restart();
+ PL_LOCK();
+ restart_playing = TRUE;
+ }
diff --git a/abs/extra/xmms/xmms-fix.diff b/abs/extra/xmms/xmms-fix.diff
new file mode 100644
index 0000000..a810aa2
--- /dev/null
+++ b/abs/extra/xmms/xmms-fix.diff
@@ -0,0 +1,11 @@
+--- xmms-1.2.10+cvs20060429/xmms/util.c.orig 2006-11-05 12:29:59.000000000 +0800
++++ xmms-1.2.10+cvs20060429/xmms/util.c 2006-11-05 12:30:01.000000000 +0800
+@@ -175,7 +175,7 @@ GdkImage *create_dblsize_image(GdkImage
+ * This needs to be optimized
+ */
+
+- dblimg = gdk_image_new(GDK_IMAGE_NORMAL, gdk_visual_get_best(), img->width << 1, img->height << 1);
++ dblimg = gdk_image_new(GDK_IMAGE_NORMAL, gdk_visual_get_best_with_depth(img->depth), img->width << 1, img->height << 1);
+ if (dblimg->bpp == 1)
+ {
+ register guint8 *srcptr, *ptr, *ptr2, pix;
diff --git a/abs/extra/xmms/xmms-menu.patch b/abs/extra/xmms/xmms-menu.patch
new file mode 100644
index 0000000..39304f9
--- /dev/null
+++ b/abs/extra/xmms/xmms-menu.patch
@@ -0,0 +1,35 @@
+--- xmms/xmms.desktop 2002-02-11 23:15:56.000000000 +0000
++++ xmms.desktop 2006-02-25 14:21:03.000000000 +0000
+@@ -1,21 +1,16 @@
+ [Desktop Entry]
+ Name=XMMS
+ Comment=X Multimedia System
+-comment[az]=X Multimedya Sistemi
+-comment[ca]=Sistema Multimèdia per a X
+-comment[cs]=Multimediální pøehrávaè
+-comment[es]=Sistema Multimedia para X
+-comment[gl]=Sistema Multimedia para X
+-comment[hr]=X Multimedijski Sustav
+-comment[nn]=X Multimedia-system
+-comment[pt_BR]=X Multimedia System
+-comment[ro]=X MultiMedia Sistem
+-comment[th]=ÃкºÁÑŵÔÁÕà´Õº¹ X
+-comment[tr]=X Multimedya Sistem
+-comment[zh_TW]=X ¦h´CÅé¨t²Î
+-Encoding=Legacy-Mixed
++Comment[es]=Sistema Multimedia para X
++Comment[gl]=Sistema Multimedia para X
++Comment[hr]=X Multimedijski Sustav
++Comment[pt_BR]=X Multimedia System
++Comment[ro]=X MultiMedia Sistem
++Comment[tr]=X Multimedya Sistem
++Encoding=UTF-8
+ Exec=xmms
+-Icon=xmms_mini.xpm
+-MimeType=audio/x-scpls;audio/x-mpegurl;audio/mpegurl;audio/mp3;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/x-wav;application/x-ogg
+-Terminal=0
++Icon=xmms
+ Type=Application
++Categories=Application;AudioVideo;
++MimeType=audio/x-scpls;audio/x-mpegurl;audio/mpegurl;audio/mp3;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/x-wav;application/x-ogg
++Terminal=false
diff --git a/abs/extra/xscreensaver/ChangeLog b/abs/extra/xscreensaver/ChangeLog
new file mode 100644
index 0000000..f972cf0
--- /dev/null
+++ b/abs/extra/xscreensaver/ChangeLog
@@ -0,0 +1,20 @@
+2009-01-02 Eric Belanger <eric@archlinux.org>
+
+ * xscreensaver 5.08-1
+ * Upstream update
+
+2008-08-11 Eric Belanger <eric@archlinux.org>
+
+ * xscreensaver 5.07-1
+ * Upstream update
+
+2008-07-18 Eric Belanger <eric@archlinux.org>
+
+ * xscreensaver 5.06-1
+ * Upstream update
+
+2008-03-02 Eric Belanger <eric@archlinux.org>
+
+ * xscreensaver 5.05-1
+ * Upstream update
+ * FHS man pages
diff --git a/abs/extra/xscreensaver/LICENSE b/abs/extra/xscreensaver/LICENSE
new file mode 100644
index 0000000..4f587b5
--- /dev/null
+++ b/abs/extra/xscreensaver/LICENSE
@@ -0,0 +1,9 @@
+/* xscreensaver, Copyright (c) 1993-2006 Jamie Zawinski <jwz@jwz.org>
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
diff --git a/abs/extra/xscreensaver/PKGBUILD b/abs/extra/xscreensaver/PKGBUILD
new file mode 100644
index 0000000..2eb7b7c
--- /dev/null
+++ b/abs/extra/xscreensaver/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 23065 2009-01-02 07:24:36Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Sean Middleditch <elanthis@awesomeplay.com>
+
+pkgname=xscreensaver
+pkgver=5.08
+pkgrel=6
+pkgdesc="Screen saver and locker for the X Window System"
+arch=('i686' 'x86_64')
+url="http://www.jwz.org/xscreensaver/"
+license=('BSD')
+depends=('libxxf86misc' 'libglade' 'mesa' 'pam' 'xorg-res-utils')
+makedepends=('bc')
+install=xscreensaver.install
+backup=('etc/pam.d/xscreensaver')
+source=(http://www.jwz.org/xscreensaver/${pkgname}-${pkgver}.tar.gz \
+ xscreensaver.pam LICENSE)
+md5sums=('79dea708c915341f205e00318a699be9' '367a3538f54db71f108b34cfa31088ac'\
+ '5e7f3f2a63d20a484742f5b4cb5d572c')
+sha1sums=('4e6889d7171eaf18b856c484a87d5701787e5dc6'
+ '106635aa1aae51d6f0668b1853f6c49a4fe9d3d8'
+ '4209ea586b204fd1d81c382a0522c654f9fd9134')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --libexecdir=/usr/lib \
+ --with-x-app-defaults=/usr/share/X11/app-defaults \
+ --with-pam --without-motif \
+ --with-gtk --without-gnome --with-xml --with-gl \
+ --without-gle --with-xpm --with-pixbuf --with-jpeg \
+ --with-fortune="/bin/cat /etc/LinHES-release" || return 1
+ make || return 1
+ make install_prefix=${pkgdir} install || return 1
+ install -D -m644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
+ install -D -m644 ${srcdir}/xscreensaver.pam ${pkgdir}/etc/pam.d/xscreensaver || return 1
+ chmod 755 ${pkgdir}/usr/bin/xscreensaver || return 1
+ echo "NotShowIn=KDE;GNOME;" >> ${pkgdir}/usr/share/applications/xscreensaver-properties.desktop || return 1
+ ls $pkgdir/usr/lib/xscreensaver > $startdir/xscreensavers
+}
diff --git a/abs/extra/xscreensaver/__changelog b/abs/extra/xscreensaver/__changelog
new file mode 100644
index 0000000..ca14a40
--- /dev/null
+++ b/abs/extra/xscreensaver/__changelog
@@ -0,0 +1,3 @@
+print out list of screensavers to xscreensaver
+ ls $pkgdir/usr/lib/xscreensaver > $startdir/xscreensavers
+
diff --git a/abs/extra/xscreensaver/xscreensaver b/abs/extra/xscreensaver/xscreensaver
new file mode 100644
index 0000000..887bef9
--- /dev/null
+++ b/abs/extra/xscreensaver/xscreensaver
@@ -0,0 +1,198 @@
+abstractile
+anemone
+anemotaxis
+antinspect
+antmaze
+antspotlight
+apollonian
+apple2
+atlantis
+attraction
+atunnel
+barcode
+blaster
+blinkbox
+blitspin
+blocktube
+boing
+bouboule
+bouncingcow
+boxed
+boxfit
+braid
+bsod
+bubble3d
+bumps
+cage
+carousel
+ccurve
+celtic
+circuit
+cloudlife
+compass
+coral
+crackberg
+crystal
+cube21
+cubenetic
+cubestorm
+cubicgrid
+cwaves
+cynosure
+dangerball
+decayscreen
+deco
+deluxe
+demon
+discrete
+distort
+drift
+endgame
+engine
+epicycle
+eruption
+euler2d
+fadeplot
+fiberlamp
+fireworkx
+flame
+flipflop
+flipscreen3d
+fliptext
+flow
+fluidballs
+flurry
+flyingtoasters
+fontglide
+fuzzyflakes
+galaxy
+gears
+gflux
+glblur
+glcells
+gleidescope
+glhanoi
+glknots
+glmatrix
+glplanet
+glschool
+glslideshow
+glsnake
+gltext
+goop
+grav
+greynetic
+halftone
+halo
+helix
+hopalong
+hyperball
+hypercube
+hypertorus
+hypnowheel
+ifs
+imsmap
+interaggregate
+interference
+intermomentary
+jigglypuff
+jigsaw
+juggle
+juggler3d
+julia
+kaleidescope
+klein
+kumppa
+lament
+lavalite
+lcdscrub
+ljlatest
+lockward
+loop
+m6502
+maze
+memscroller
+menger
+metaballs
+mirrorblob
+moebius
+moebiusgears
+moire
+moire2
+molecule
+morph3d
+mountain
+munch
+nerverot
+noof
+noseguy
+pacman
+pedal
+penetrate
+penrose
+petri
+phosphor
+photopile
+piecewise
+pinion
+pipes
+polyhedra
+polyominoes
+polytopes
+pong
+popsquares
+providence
+pulsar
+pyro
+qix
+queens
+rd-bomb
+ripples
+rocks
+rorschach
+rotzoomer
+rubik
+sballs
+shadebobs
+sierpinski
+sierpinski3d
+skytentacles
+slidescreen
+slip
+sonar
+speedmine
+spheremonics
+spotlight
+sproingies
+squiral
+stairs
+starfish
+starwars
+stonerview
+strange
+substrate
+superquadrics
+swirl
+tangram
+thornbird
+timetunnel
+topblock
+triangle
+truchet
+twang
+vermiculate
+vidwhacker
+voronoi
+wander
+webcollage
+webcollage-helper
+whirlwindwarp
+wormhole
+xanalogtv
+xflame
+xjack
+xlyap
+xmatrix
+xrayswarm
+xspirograph
+zoom
diff --git a/abs/extra/xscreensaver/xscreensaver.install b/abs/extra/xscreensaver/xscreensaver.install
new file mode 100644
index 0000000..a64ab36
--- /dev/null
+++ b/abs/extra/xscreensaver/xscreensaver.install
@@ -0,0 +1,30 @@
+# arg 1: the new package version
+post_install() {
+ if grep xscreensaver-command /home/mythtv/.mplayer/config
+ then
+ echo "Nothing to do here..."
+ else
+ echo "heartbeat-cmd=\"xscreensaver-command -deactivate &\"" >> /home/mythtv/.mplayer/config
+fi
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if grep xscreensaver-command /home/mythtv/.mplayer/config
+ then
+ echo "Nothing to do here..."
+ else
+ echo "heartbeat-cmd=\"xscreensaver-command -deactivate &\"" >> /home/mythtv/.mplayer/config
+fi
+}
+
+# arg 1: the old package version
+post_remove() {
+ grep -v xscreensaver /home/mythtv/.mplayer/config > /tmp/mp-config
+ mv /tmp/mp-config /home/mythtv/.mplayer/config
+ chown mythtv.mythtv /home/mythtv/.mplayer/config
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/xscreensaver/xscreensaver.pam b/abs/extra/xscreensaver/xscreensaver.pam
new file mode 100644
index 0000000..b4d80c2
--- /dev/null
+++ b/abs/extra/xscreensaver/xscreensaver.pam
@@ -0,0 +1 @@
+auth required pam_unix_auth.so
diff --git a/abs/extra/xscreensaver/xscreensavers b/abs/extra/xscreensaver/xscreensavers
new file mode 100644
index 0000000..887bef9
--- /dev/null
+++ b/abs/extra/xscreensaver/xscreensavers
@@ -0,0 +1,198 @@
+abstractile
+anemone
+anemotaxis
+antinspect
+antmaze
+antspotlight
+apollonian
+apple2
+atlantis
+attraction
+atunnel
+barcode
+blaster
+blinkbox
+blitspin
+blocktube
+boing
+bouboule
+bouncingcow
+boxed
+boxfit
+braid
+bsod
+bubble3d
+bumps
+cage
+carousel
+ccurve
+celtic
+circuit
+cloudlife
+compass
+coral
+crackberg
+crystal
+cube21
+cubenetic
+cubestorm
+cubicgrid
+cwaves
+cynosure
+dangerball
+decayscreen
+deco
+deluxe
+demon
+discrete
+distort
+drift
+endgame
+engine
+epicycle
+eruption
+euler2d
+fadeplot
+fiberlamp
+fireworkx
+flame
+flipflop
+flipscreen3d
+fliptext
+flow
+fluidballs
+flurry
+flyingtoasters
+fontglide
+fuzzyflakes
+galaxy
+gears
+gflux
+glblur
+glcells
+gleidescope
+glhanoi
+glknots
+glmatrix
+glplanet
+glschool
+glslideshow
+glsnake
+gltext
+goop
+grav
+greynetic
+halftone
+halo
+helix
+hopalong
+hyperball
+hypercube
+hypertorus
+hypnowheel
+ifs
+imsmap
+interaggregate
+interference
+intermomentary
+jigglypuff
+jigsaw
+juggle
+juggler3d
+julia
+kaleidescope
+klein
+kumppa
+lament
+lavalite
+lcdscrub
+ljlatest
+lockward
+loop
+m6502
+maze
+memscroller
+menger
+metaballs
+mirrorblob
+moebius
+moebiusgears
+moire
+moire2
+molecule
+morph3d
+mountain
+munch
+nerverot
+noof
+noseguy
+pacman
+pedal
+penetrate
+penrose
+petri
+phosphor
+photopile
+piecewise
+pinion
+pipes
+polyhedra
+polyominoes
+polytopes
+pong
+popsquares
+providence
+pulsar
+pyro
+qix
+queens
+rd-bomb
+ripples
+rocks
+rorschach
+rotzoomer
+rubik
+sballs
+shadebobs
+sierpinski
+sierpinski3d
+skytentacles
+slidescreen
+slip
+sonar
+speedmine
+spheremonics
+spotlight
+sproingies
+squiral
+stairs
+starfish
+starwars
+stonerview
+strange
+substrate
+superquadrics
+swirl
+tangram
+thornbird
+timetunnel
+topblock
+triangle
+truchet
+twang
+vermiculate
+vidwhacker
+voronoi
+wander
+webcollage
+webcollage-helper
+whirlwindwarp
+wormhole
+xanalogtv
+xflame
+xjack
+xlyap
+xmatrix
+xrayswarm
+xspirograph
+zoom
diff --git a/abs/extra/xulrunner/PKGBUILD b/abs/extra/xulrunner/PKGBUILD
new file mode 100644
index 0000000..da6d8cd
--- /dev/null
+++ b/abs/extra/xulrunner/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 36430 2009-04-22 12:03:12Z pierre $
+# Maintainer: Alexander Baldeck <alexander@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+pkgname=xulrunner
+pkgver=1.9.1.1
+_ffoxver=3.5.1
+pkgrel=5
+pkgdesc="Mozilla Runtime Environment"
+arch=(i686 x86_64)
+license=('MPL' 'GPL' 'LGPL')
+depends=('gtk2>=2.16.0' 'gcc-libs>=4.3.3' 'libidl2>=0.8.13' 'mozilla-common' 'nss>=3.12.3' 'libxt' 'lcms'
+ 'hunspell>=1.2.8' 'startup-notification>=0.9')
+makedepends=('zip' 'pkgconfig' 'diffutils' 'libgnomeui>=2.24.1')
+provides=(gecko-sdk)
+replaces=(gecko-sdk)
+url="http://wiki.mozilla.org/XUL:Xul_Runner"
+source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}-source.tar.bz2
+ mozconfig)
+md5sums=('18169e189785d680827d4fce94524449'
+ '6509d12e6b17bfc51c09e1dc35259035')
+install=xulrunner.install
+
+build() {
+ cd ${startdir}/src/mozilla-1.9.1
+ cp ${startdir}/src/mozconfig .mozconfig
+
+ unset CFLAGS
+ unset CXXFLAGS
+ export LDFLAGS="-Wl,-rpath,/usr/lib/xulrunner-1.9"
+
+ make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS" || return 1
+ make -j1 DESTDIR=${startdir}/pkg install || return 1
+
+ ln -sf xulrunner-${pkgver} ${pkgdir}/usr/lib/xulrunner-1.9
+ ln -sf xulrunner-devel-${pkgver} ${pkgdir}/usr/lib/xulrunner-devel-1.9
+ ln -sf xulrunner-${pkgver} ${pkgdir}/usr/include/xulrunner-1.9
+ ln -sf xulrunner-${pkgver} ${pkgdir}/usr/share/idl/xulrunner-1.9
+
+ # The ubuntu patch adds these... get rid of it, NSS/NSPR has it.
+ rm -f ${startdir}/pkg/usr/lib/pkgconfig/mozilla-ns{s,pr}.pc || return 1
+
+ sed -i -e "s/xulrunner-${pkgver}/xulrunner-1.9/g" -e "s/xulrunner-devel-${pkgver}/xulrunner-devel-1.9/g" ${pkgdir}/usr/lib/pkgconfig/*.pc || return 1
+}
diff --git a/abs/extra/xulrunner/mozconfig b/abs/extra/xulrunner/mozconfig
new file mode 100644
index 0000000..22212cb
--- /dev/null
+++ b/abs/extra/xulrunner/mozconfig
@@ -0,0 +1,33 @@
+. $topsrcdir/xulrunner/config/mozconfig
+ac_add_options --prefix=/usr
+ac_add_options --libdir=/usr/lib
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-zlib
+ac_add_options --with-system-bz2
+ac_add_options --with-system-png
+ac_add_options --enable-system-lcms
+ac_add_options --enable-system-hunspell
+ac_add_options --enable-system-sqlite
+ac_add_options --enable-system-cairo
+ac_add_options --with-pthreads
+ac_add_options --enable-strip
+ac_add_options --disable-tests
+ac_add_options --disable-mochitest
+ac_add_options --disable-installer
+ac_add_options --disable-debug
+ac_add_options --enable-optimize
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --enable-pango
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --disable-javaxpcom
+ac_add_options --disable-crashreporter
+ac_add_options --enable-safe-browsing
+ac_add_options --enable-startup-notification
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
diff --git a/abs/extra/xulrunner/xulrunner.install b/abs/extra/xulrunner/xulrunner.install
new file mode 100644
index 0000000..0b4cf9c
--- /dev/null
+++ b/abs/extra/xulrunner/xulrunner.install
@@ -0,0 +1,11 @@
+post_install() {
+ # Ensure that the ld.so.conf file contains the xulrunner libs.
+ cp -f /etc/ld.so.conf /tmp/ld.so.conf
+ grep -v xulrunner /tmp/ld.so.conf > /etc/ld.so.conf
+ echo /usr/lib/xulrunner-1.9.1.1 >> /etc/ld.so.conf
+ /sbin/ldconfig
+}
+
+post_upgrade() {
+ post_install $*
+}
diff --git a/abs/extra/zip/ChangeLog b/abs/extra/zip/ChangeLog
new file mode 100644
index 0000000..29ec4d1
--- /dev/null
+++ b/abs/extra/zip/ChangeLog
@@ -0,0 +1,5 @@
+
+2008-07-27 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updating for i686: 3.0
+
diff --git a/abs/extra/zip/PKGBUILD b/abs/extra/zip/PKGBUILD
new file mode 100644
index 0000000..30cec8b
--- /dev/null
+++ b/abs/extra/zip/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 6705 2008-07-27 14:04:19Z douglas $
+# Maintainer: dorphell <dorphell@archlinux.org>
+
+pkgname=zip
+pkgver=3.0
+pkgrel=1
+pkgdesc="Creates PKZIP-compatible .zip files"
+arch=(i686 x86_64)
+url="http://www.info-zip.org/pub/infozip/Zip.html"
+depends=('glibc')
+makedepends=('unzip')
+source=(ftp://ftp.info-zip.org/pub/infozip/src/zip30.zip
+ ftp://ftp.info-zip.org/pub/infozip/src/zcrypt.zip
+ zip-3.0-build.patch zip-3.0-no-crypt.patch
+ zip-3.0-exec-stack.patch zip-3.0-pic.patch
+ )
+
+
+md5sums=('e88492c8abd68fa9cfba72bc08757dba'
+ '0c969ba1661183b041a142945ed2710e')
+
+build() {
+ cd $startdir/src/${pkgname}30
+# echo "A"| unzip ../zcrypt.zip
+ patch -p1 < $startdir/src/zip-3.0-build.patch
+ patch -p0 < $startdir/src/zip-3.0-no-crypt.patch || return 1
+ patch -p1 < $startdir/src/zip-3.0-exec-stack.patch
+ patch -p0 < $startdir/src/zip-3.0-pic.patch
+
+ make -f unix/Makefile LOCAL_ZIP="$CFLAGS" prefix=/usr generic_gcc || return 1
+ make -f unix/Makefile INSTALL=`which install` prefix=$startdir/pkg/usr install
+}
diff --git a/abs/extra/zip/zip-3.0-build.patch b/abs/extra/zip/zip-3.0-build.patch
new file mode 100644
index 0000000..880b49e
--- /dev/null
+++ b/abs/extra/zip/zip-3.0-build.patch
@@ -0,0 +1,34 @@
+--- zip/unix/configure
++++ zip/unix/configure
+@@ -18,7 +18,7 @@
+
+ CC=${1-cc}
+ CFLAGS=${2-"-I. -DUNIX"}
+-LFLAGS1=''
++LFLAGS1="${LDFLAGS}"
+ LFLAGS2=''
+ LN="ln -s"
+
+@@ -118,7 +118,7 @@ _EOF_
+ fi
+
+ # optimization flags
+-if test -n "${CFLAGS_OPT}"; then
++if false; then
+ CFLAGS="${CFLAGS} ${CFLAGS_OPT}"
+ CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}"
+ fi
+@@ -220,13 +220,6 @@ fi
+ echo Check for the C preprocessor
+ # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
+ CPP="${CC} -E"
+-# solaris as(1) needs -P, maybe others as well ?
+-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+-[ -f /lib/cpp ] && CPP=/lib/cpp
+-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+-[ -f /xenix ] && CPP="${CC} -E"
+-[ -f /lynx.os ] && CPP="${CC} -E"
+
+ echo "#include <stdio.h>" > conftest.c
+ $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
diff --git a/abs/extra/zip/zip-3.0-exec-stack.patch b/abs/extra/zip/zip-3.0-exec-stack.patch
new file mode 100644
index 0000000..2eb1acf
--- /dev/null
+++ b/abs/extra/zip/zip-3.0-exec-stack.patch
@@ -0,0 +1,20 @@
+--- zip-2.31/crc_i386.S
++++ zip-2.31/crc_i386.S
+@@ -238,3 +238,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
++
++#if defined __ELF__ && defined __linux__
++.section .note.GNU-stack,"",@progbits
++#endif
+--- zip-2.31/match.S
++++ zip-2.31/match.S
+@@ -405,3 +405,7 @@
+ #endif /* i386 || _I386 || _i386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++#if defined __ELF__ && defined __linux__
++.section .note.GNU-stack,"",@progbits
++#endif
diff --git a/abs/extra/zip/zip-3.0-no-crypt.patch b/abs/extra/zip/zip-3.0-no-crypt.patch
new file mode 100644
index 0000000..301c289
--- /dev/null
+++ b/abs/extra/zip/zip-3.0-no-crypt.patch
@@ -0,0 +1,51 @@
+--- zip.c
++++ zip.c
+@@ -3452,6 +3452,9 @@ char **argv; /* command line tokens */
+
+ /* Key not yet specified. If needed, get/verify it now. */
+ if (key_needed) {
++#if !CRYPT
++ ZIPERR(ZE_PARMS, "encryption not supported");
++#else /* CRYPT */
+ if ((key = malloc(IZ_PWLEN+1)) == NULL) {
+ ZIPERR(ZE_MEM, "was getting encryption password");
+ }
+@@ -3478,6 +3481,7 @@ char **argv; /* command line tokens */
+ if (r) {
+ ZIPERR(ZE_PARMS, "password verification failed");
+ }
++#endif
+ }
+ if (key) {
+ /* if -P "" could get here */
+--- zipcloak.c
++++ zipcloak.c
+@@ -744,6 +744,28 @@ struct option_struct far options[] = {
+
+ int main OF((void));
+
++void zipmessage_nl(a, nl)
++ZCONST char *a;
++int nl;
++{
++}
++
++void zipmessage(a, b)
++ZCONST char *a, *b;
++{
++}
++
++int set_filetype(out_path)
++ char *out_path;
++{
++}
++
++int rename_split(temp_name, out_path)
++ char *temp_name;
++ char *out_path;
++{
++}
++
+ void zipwarn(msg1, msg2)
+ ZCONST char *msg1, *msg2;
+ {
diff --git a/abs/extra/zip/zip-3.0-pic.patch b/abs/extra/zip/zip-3.0-pic.patch
new file mode 100644
index 0000000..d37e5ed
--- /dev/null
+++ b/abs/extra/zip/zip-3.0-pic.patch
@@ -0,0 +1,12 @@
+--- unix/configure
++++ unix/configure
+@@ -29,6 +29,9 @@
+ echo Check if we can use asm code
+ OBJA=""
+ OCRCU8=""
++piclib="$(echo | $CPP -dM $CFLAGS - | grep -i __pic__)"
++echo "Checking if compiler wants to create pic code"
++[ "$piclib" == "" ] && \
+ if eval "$CPP match.S > _match.s 2>/dev/null"; then
+ if test ! -s _match.s || grep error < _match.s > /dev/null; then
+ :