summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-11-22 14:05:07 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-11-22 14:05:07 -0300
commitc5d0267480dce7ea1149cae6f63111678588c772 (patch)
treed06726989018701c05b8c93b1b548f14cfc541f3 /pcr
parenta221a452890917ec65b617a0be21b472a63e2a81 (diff)
parent13c6302fab6118693af345756375923b9fb7da69 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/allegro/PKGBUILD community/erlang/PKGBUILD community/python-openbabel/PKGBUILD core/vi/PKGBUILD extra/accountsservice/PKGBUILD extra/calligra/PKGBUILD kde-unstable/kactivities/PKGBUILD kde-unstable/kdeaccessibility-jovie/PKGBUILD kde-unstable/kdeaccessibility-kaccessible/PKGBUILD kde-unstable/kdeaccessibility-kmag/PKGBUILD kde-unstable/kdeaccessibility-kmousetool/PKGBUILD kde-unstable/kdeaccessibility-kmouth/PKGBUILD kde-unstable/kdeadmin/PKGBUILD kde-unstable/kdeartwork/PKGBUILD kde-unstable/kdebase-konsole/PKGBUILD kde-unstable/kdebase-workspace/PKGBUILD kde-unstable/kdebase-workspace/kde-np.pam kde-unstable/kdebase-workspace/kde.pam kde-unstable/kdebase-workspace/kdebase-workspace.install kde-unstable/kdebase/PKGBUILD kde-unstable/kdebindings-kimono/PKGBUILD kde-unstable/kdebindings-korundum/PKGBUILD kde-unstable/kdebindings-korundum/ruby19.patch kde-unstable/kdebindings-kross/PKGBUILD kde-unstable/kdebindings-perlkde/PKGBUILD kde-unstable/kdebindings-perlqt/PKGBUILD kde-unstable/kdebindings-python/PKGBUILD kde-unstable/kdebindings-qtruby/PKGBUILD kde-unstable/kdebindings-qyoto/PKGBUILD kde-unstable/kdebindings-smokegen/PKGBUILD kde-unstable/kdebindings-smokekde/PKGBUILD kde-unstable/kdebindings-smokeqt/PKGBUILD kde-unstable/kdeedu-analitza/PKGBUILD kde-unstable/kdeedu-blinken/PKGBUILD kde-unstable/kdeedu-cantor/PKGBUILD kde-unstable/kdeedu-kalgebra/PKGBUILD kde-unstable/kdeedu-kalzium/PKGBUILD kde-unstable/kdeedu-kalzium/kdeedu-kalzium.install kde-unstable/kdeedu-kanagram/PKGBUILD kde-unstable/kdeedu-kbruch/PKGBUILD kde-unstable/kdeedu-kgeography/PKGBUILD kde-unstable/kdeedu-khangman/PKGBUILD kde-unstable/kdeedu-kig/PKGBUILD kde-unstable/kdeedu-kiten/PKGBUILD kde-unstable/kdeedu-klettres/PKGBUILD kde-unstable/kdeedu-kmplot/PKGBUILD kde-unstable/kdeedu-kstars/PKGBUILD kde-unstable/kdeedu-ktouch/PKGBUILD kde-unstable/kdeedu-kturtle/PKGBUILD kde-unstable/kdeedu-kwordquiz/PKGBUILD kde-unstable/kdeedu-marble/PKGBUILD kde-unstable/kdeedu-marble/kdeedu-marble.install kde-unstable/kdeedu-pairs/PKGBUILD kde-unstable/kdeedu-parley/PKGBUILD kde-unstable/kdeedu-rocs/PKGBUILD kde-unstable/kdeedu-step/PKGBUILD kde-unstable/kdegraphics-gwenview/PKGBUILD kde-unstable/kdegraphics-kamera/PKGBUILD kde-unstable/kdegraphics-kcolorchooser/PKGBUILD kde-unstable/kdegraphics-kgamma/PKGBUILD kde-unstable/kdegraphics-kolourpaint/PKGBUILD kde-unstable/kdegraphics-kruler/PKGBUILD kde-unstable/kdegraphics-ksaneplugin/PKGBUILD kde-unstable/kdegraphics-ksnapshot/PKGBUILD kde-unstable/kdegraphics-mobipocket/PKGBUILD kde-unstable/kdegraphics-okular/PKGBUILD kde-unstable/kdegraphics-strigi-analyzer/PKGBUILD kde-unstable/kdegraphics-svgpart/PKGBUILD kde-unstable/kdegraphics-thumbnailers/PKGBUILD kde-unstable/kdemultimedia-audiocd-kio/PKGBUILD kde-unstable/kdemultimedia-dragonplayer/PKGBUILD kde-unstable/kdemultimedia-ffmpegthumbs/PKGBUILD kde-unstable/kdemultimedia-juk/PKGBUILD kde-unstable/kdemultimedia-kmix/PKGBUILD kde-unstable/kdemultimedia-kscd/PKGBUILD kde-unstable/kdemultimedia-mplayerthumbs/PKGBUILD kde-unstable/kdenetwork/PKGBUILD kde-unstable/kdepim-runtime/PKGBUILD kde-unstable/kdepim/PKGBUILD kde-unstable/kdepim/fix-build.patch kde-unstable/kdepimlibs/PKGBUILD kde-unstable/kdeplasma-addons/PKGBUILD kde-unstable/kdesdk-kate/PKGBUILD kde-unstable/kdesdk-kate/pkgbuild-syntax-highlight.patch kde-unstable/kdesdk/PKGBUILD kde-unstable/kdetoys/PKGBUILD kde-unstable/kdeutils-filelight/PKGBUILD kde-unstable/kdeutils-kcalc/PKGBUILD kde-unstable/kdeutils-kcharselect/PKGBUILD kde-unstable/kdeutils-kdf/PKGBUILD kde-unstable/kdeutils-kfloppy/PKGBUILD kde-unstable/kdeutils-kgpg/PKGBUILD kde-unstable/kdeutils-kremotecontrol/PKGBUILD kde-unstable/kdeutils-ktimer/PKGBUILD kde-unstable/kdeutils-kwallet/PKGBUILD kde-unstable/kdeutils-superkaramba/PKGBUILD kde-unstable/kdeutils-sweeper/PKGBUILD kde-unstable/kdewebdev/PKGBUILD kde-unstable/libkcddb/PKGBUILD kde-unstable/libkcompactdisc/PKGBUILD kde-unstable/libkdcraw/PKGBUILD kde-unstable/libkdeedu/PKGBUILD kde-unstable/libkexiv2/PKGBUILD kde-unstable/libkipi/PKGBUILD kde-unstable/libksane/PKGBUILD kde-unstable/nepomuk-core/PKGBUILD
Diffstat (limited to 'pcr')
-rw-r--r--pcr/barnyard2/PKGBUILD44
-rw-r--r--pcr/bison++/PKGBUILD51
-rw-r--r--pcr/ffmpeg-static/PKGBUILD2
-rw-r--r--pcr/gtkmm-utils/PKGBUILD27
-rw-r--r--pcr/gtkmm-utils/gtkmm-utils-glib.diff25
-rw-r--r--pcr/libav/PKGBUILD114
-rw-r--r--pcr/log4cxx/PKGBUILD24
-rw-r--r--pcr/log4cxx/log4cxx-0.10.0-missing_includes.patch38
-rw-r--r--pcr/mediatomb/PKGBUILD63
-rw-r--r--pcr/mediatomb/gcc46.patch10
-rw-r--r--pcr/mediatomb/jsparse.patch144
-rw-r--r--pcr/mediatomb/libav_0.7_support.patch64
-rw-r--r--pcr/mediatomb/libavformat.patch52
-rw-r--r--pcr/mediatomb/libmp4v2_191_p497.patch187
-rw-r--r--pcr/mediatomb/mediatomb.conf23
-rw-r--r--pcr/mediatomb/mediatomb.install9
-rw-r--r--pcr/mediatomb/mediatomb.rc54
-rw-r--r--pcr/mediatomb/tonewjs.patch564
-rw-r--r--pcr/pactools/PKGBUILD18
-rwxr-xr-xpcr/pactools/pactools63
-rwxr-xr-xpcr/pactools/pt-deptree54
-rwxr-xr-xpcr/pactools/pt-pacfix22
-rwxr-xr-xpcr/pactools/pt-pacman-cage152
-rwxr-xr-xpcr/pactools/pt-pacman-info77
-rwxr-xr-xpcr/pactools/pt-pacman-uncage108
-rwxr-xr-xpcr/pactools/pt-pacsize21
-rwxr-xr-xpcr/pactools/pt-repolist42
-rw-r--r--pcr/perl-file-find-rule/PKGBUILD27
-rw-r--r--pcr/perl-iptables-chainmgr/PKGBUILD22
-rw-r--r--pcr/perl-number-compare/PKGBUILD27
-rw-r--r--pcr/perl-text-glob/PKGBUILD51
-rw-r--r--pcr/perl-unix-syslog/PKGBUILD33
-rw-r--r--pcr/psad/PKGBUILD66
-rw-r--r--pcr/psad/psad-systemdinit.archlinux12
-rw-r--r--pcr/psad/psad-sysvinit.archlinux52
-rw-r--r--pcr/psad/psad.patch137
-rw-r--r--pcr/psad/responses7
-rw-r--r--pcr/pulledpork/PKGBUILD19
-rw-r--r--pcr/python2-empy/PKGBUILD20
-rw-r--r--pcr/python2-rospkg/PKGBUILD23
-rw-r--r--pcr/rosinstall/PKGBUILD21
-rw-r--r--pcr/snort/PKGBUILD51
-rw-r--r--pcr/snort/snort41
-rw-r--r--pcr/snort/snort.conf.d21
-rw-r--r--pcr/snort/snort.install26
-rw-r--r--pcr/ttf-roboto/PKGBUILD25
-rw-r--r--pcr/ttf-roboto/ttf-roboto.install15
-rw-r--r--pcr/vcstools/PKGBUILD33
-rw-r--r--pcr/vuurmuur/PKGBUILD139
-rw-r--r--pcr/vuurmuur/modules.conf3
-rw-r--r--pcr/vuurmuur/vuurmuur.install27
-rw-r--r--pcr/vuurmuur/vuurmuur.rc114
-rw-r--r--pcr/vuurmuur/vuurmuur.script88
-rw-r--r--pcr/vuurmuur/vuurmuur.service13
-rw-r--r--pcr/xtables-addons/PKGBUILD35
55 files changed, 3099 insertions, 1 deletions
diff --git a/pcr/barnyard2/PKGBUILD b/pcr/barnyard2/PKGBUILD
new file mode 100644
index 000000000..7b52c952c
--- /dev/null
+++ b/pcr/barnyard2/PKGBUILD
@@ -0,0 +1,44 @@
+# Contributor: Commiebstrd<spenserreinhardt@gmail.com>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=barnyard2
+pkgver=1
+pkgrel=9
+pkgdesc="Barnyard2 is a fork of the original barnyard project, designed specifically for Snort's new unified2 file format. Barnyard2 is under active development and continues to adapt based on user feedback."
+arch=('i686' 'x86_64')
+url="http://www.securixlive.com/barnyard2/index.php"
+license=('GPLv2')
+depends=('snort' 'mysql')
+source=("http://www.securixlive.com/download/${pkgname}/${pkgname}-${pkgver}.${pkgrel}.tar.gz")
+
+package() {
+
+ #configures and makes package
+ cd "${srcdir}/${pkgname}-${pkgver}.${pkgrel}"
+ ./configure --with-mysql
+ make
+ make DESTDIR="${pkgdir}" install
+
+ #makes dir for /etc locations
+ mkdir "${pkgdir}/etc" -p
+
+ #makes dirs for /var locations
+ mkdir "${pkgdir}/var" -p
+ mkdir "${pkgdir}/var/log" -p
+ mkdir "${pkgdir}/var/log/$pkgname" -p
+
+ #makes /usr/bin, /usr should already be made from make\make install
+ mkdir "${pkgdir}/usr/bin"
+
+ #copy barnyard2.conf to /etc/barnyard2.conf and executable to /usr/bin/
+ cp "${pkgdir}/usr/local/etc/$pkgname.conf" "${pkgdir}/etc/"
+ cp "${pkgdir}/usr/local/bin/$pkgname" "${pkgdir}/usr/bin/"
+
+ #file permission mods and creation of initial .waldo file
+ chmod 666 "${pkgdir}/var/log/$pkgname"
+ touch "${pkgdir}/var/log/$pkgname/$pkgname.waldo"
+ chown snort.snort "${pkgdir}/var/log/$pkgname/$pkgname.waldo"
+
+ #not needed since conf is copied to /etc/ and barnyard is sent to /usr/bin
+ rm -rf "${pkgdir}/usr/local/"
+}
diff --git a/pcr/bison++/PKGBUILD b/pcr/bison++/PKGBUILD
new file mode 100644
index 000000000..947c41df4
--- /dev/null
+++ b/pcr/bison++/PKGBUILD
@@ -0,0 +1,51 @@
+# Contributor: Antonio Garcia-Dominguez <antonio.garciadominguez@uca.es>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=bison++
+pkgver=1.21.11
+pkgrel=1
+pkgdesc="Parser generator in C or C++ from BNF notation"
+arch=('i686' 'x86_64')
+url="http://packages.debian.org/bison++"
+license=('GPL')
+source=('http://ftp.de.debian.org/debian/pool/main/b/bison++/bison++_1.21.11.orig.tar.gz' 'http://ftp.de.debian.org/debian/pool/main/b/bison++/bison++_1.21.11-3.diff.gz')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # Apply the Debian patch
+ patch -p1 < ../*.diff
+
+ # Fix the broken Makefile.am script
+ sed -e '
+ s/datadir/DESTDIR\)\$(datadir/
+ s/bindir/DESTDIR\)\$(bindir/
+ /^pkgdata_DATA/s/ Example$//
+ /install\-exec\-hook/i\install-data-hook:\
+\tcp -r $(srcdir)/Example $(DESTDIR)$(pkgdatadir)\
+' -i Makefile.am
+
+ # Bootstrap the autotools and compile
+ aclocal
+ automake --add-missing
+ autoreconf
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make -k check
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install
+
+ # Remove or rename files that could conflict with regular Bison
+ rm "$pkgdir/usr/bin/bison"
+ mv "$pkgdir/usr/share/info/"{bison,bison++}.info
+ rm "$pkgdir/usr/share/man/man1/bison.1"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/ffmpeg-static/PKGBUILD b/pcr/ffmpeg-static/PKGBUILD
index 67ce115bb..1e5634fb6 100644
--- a/pcr/ffmpeg-static/PKGBUILD
+++ b/pcr/ffmpeg-static/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=ffmpeg-static
pkgver=1.0
-pkgrel=1
+pkgrel=2
epoch=1
pkgdesc='Complete and free Internet live audio and video broadcasting solution for GNU/Linux, with static library'
arch=(i686 x86_64 mips64el)
diff --git a/pcr/gtkmm-utils/PKGBUILD b/pcr/gtkmm-utils/PKGBUILD
new file mode 100644
index 000000000..e3fdfd4a0
--- /dev/null
+++ b/pcr/gtkmm-utils/PKGBUILD
@@ -0,0 +1,27 @@
+# Contributor: TDY <tdy@gmx.com>
+# Contributor: Michele Vascellari <michele.vascellari@gmail.com>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=gtkmm-utils
+pkgver=0.4.1
+pkgrel=2
+pkgdesc="High level utility functions/classes/widgets for gtkmm and glibmm"
+arch=('i686' 'x86_64')
+url="http://gtkmm-utils.googlecode.com/"
+license=('GPL')
+depends=('gtkmm')
+makedepends=('pkgconfig>=0.9.0')
+source=(http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.gz
+ $pkgname-glib.diff)
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -Np1 -i "$srcdir/$pkgname-glib.diff"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/pcr/gtkmm-utils/gtkmm-utils-glib.diff b/pcr/gtkmm-utils/gtkmm-utils-glib.diff
new file mode 100644
index 000000000..fbe21bb3f
--- /dev/null
+++ b/pcr/gtkmm-utils/gtkmm-utils-glib.diff
@@ -0,0 +1,25 @@
+diff -Naur gtkmm-utils-0.4.1~/glibmm-utils/date.cc gtkmm-utils-0.4.1/glibmm-utils/date.cc
+--- gtkmm-utils-0.4.1~/glibmm-utils/date.cc 2012-11-21 11:43:42.726346909 -0600
++++ gtkmm-utils-0.4.1/glibmm-utils/date.cc 2012-11-21 11:44:27.172760954 -0600
+@@ -25,7 +25,7 @@
+
+ #include <sys/time.h>
+
+-#include <glib/gmessages.h>
++#include <glib.h>
+
+ #include <glibmm/convert.h>
+ #include <glibmm/date.h>
+diff -Naur gtkmm-utils-0.4.1~/glibmm-utils/ustring.cc gtkmm-utils-0.4.1/glibmm-utils/ustring.cc
+--- gtkmm-utils-0.4.1~/glibmm-utils/ustring.cc 2012-11-21 11:43:42.726346909 -0600
++++ gtkmm-utils-0.4.1/glibmm-utils/ustring.cc 2012-11-21 11:44:55.645930936 -0600
+@@ -20,8 +20,7 @@
+ */
+
+ #include <cstring> // for g++ 4.3
+-#include <glib/gmem.h>
+-#include <glib/gmessages.h>
++#include <glib.h>
+ #include "ustring.h"
+
+ namespace Glib {
diff --git a/pcr/libav/PKGBUILD b/pcr/libav/PKGBUILD
new file mode 100644
index 000000000..6da6f14bd
--- /dev/null
+++ b/pcr/libav/PKGBUILD
@@ -0,0 +1,114 @@
+# $Id$
+# Maintainer : Ionut Biru <ibiru@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Contributor: Paul Mattal <paul@archlinux.org>
+# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+
+static=false
+pkgbase=libav
+if [[ $static == true ]] || [[ $static == 1 ]] || [[ $static == enable ]]; then
+ pkgname=libav-static
+ pkgflag=-static
+ staticdesc=', with static library'
+elif [[ $static == false ]] || [[ $static == 0 ]] || [[ $static == disable ]]; then
+ pkgname=libav
+fi
+pkgver=0.8.4
+pkgrel=3
+pkgdesc="Complete and free Internet live audio and video broadcasting solution for GNU/Linux$staticdesc"
+arch=(
+ i686
+ x86_64
+ mips64el
+)
+url="http://$pkgbase.org/"
+license=(
+ GPL
+)
+depends=(
+ alsa-lib
+ bzip2
+ gsm
+ lame
+ libpulse
+ libtheora
+ libva
+ libvorbis
+ libvpx
+ opencore-amr
+ openjpeg
+ rtmpdump
+ schroedinger
+ sdl
+ speex
+ x264
+ xvidcore
+ zlib
+)
+makedepends=(
+ yasm
+ libvdpau
+)
+source=(
+ http://$pkgbase.org/releases/$pkgbase-$pkgver.tar.gz
+)
+sha512sums=(
+ d402c7d586708e29b92340c4d03d8431fe607f0b88c2762cc95671786cdb9a7221968164b571e11086b53b2169f3a657c6106dc769c04a1a035429d011e72610
+)
+
+build() {
+ cd $pkgbase-$pkgver
+
+ ./configure \
+ --prefix=/opt/$pkgname \
+ --enable-libmp3lame \
+ --enable-libvorbis \
+ --enable-libxvid \
+ --enable-libx264 \
+ --enable-libvpx \
+ --enable-libtheora \
+ --enable-libgsm \
+ --enable-libspeex \
+ --enable-postproc \
+ --enable-shared \
+ --enable-x11grab \
+ --enable-libopencore_amrnb \
+ --enable-libopencore_amrwb \
+ --enable-libschroedinger \
+ --enable-libopenjpeg \
+ --enable-librtmp \
+ --enable-libpulse \
+ --enable-gpl \
+ --enable-version3 \
+ --enable-runtime-cpudetect \
+ --disable-debug \
+ --enable-static
+
+ make
+ make tools/qt-faststart
+ make doc/ffmpeg.1
+ make doc/av{play,server}.1
+}
+
+package() {
+ cd $pkgbase-$pkgver
+ make DESTDIR=$pkgdir install install-man
+ install -m755 -d $pkgdir/etc/ld.so.conf.d
+ install -m755 -d $pkgdir/usr/bin
+ install -m755 -d $pkgdir/usr/share/man/man1
+ install -Dm755 tools/qt-faststart $pkgdir/opt/$pkgname/bin
+ ln -s /opt/$pkgname/bin/avconv $pkgdir/usr/bin/avconv$pkgflag
+ ln -s /opt/$pkgname/bin/avplay $pkgdir/usr/bin/avplay$pkgflag
+ ln -s /opt/$pkgname/bin/avprobe $pkgdir/usr/bin/avprobe$pkgflag
+ ln -s /opt/$pkgname/bin/avserver $pkgdir/usr/bin/avserver$pkgflag
+ ln -s /opt/$pkgname/bin/ffmpeg $pkgdir/usr/bin/ffmpeg-$pkgname
+ ln -s /opt/$pkgname/bin/qt-faststart $pkgdir/usr/bin/qt-faststart-$pkgname
+ ln -s /opt/$pkgname/share/man/man1/avconv.1 $pkgdir/usr/share/man/man1/avconv$pkgflag.1
+ ln -s /opt/$pkgname/share/man/man1/avplay.1 $pkgdir/usr/share/man/man1/avplay$pkgflag.1
+ ln -s /opt/$pkgname/share/man/man1/avprobe.1 $pkgdir/usr/share/man/man1/avprobe$pkgflag.1
+ ln -s /opt/$pkgname/share/man/man1/avserver.1 $pkgdir/usr/share/man/man1/avserver$pkgflag.1
+ ln -s /opt/$pkgname/share/man/man1/ffmpeg.1 $pkgdir/usr/share/man/man1/ffmpeg-$pkgname.1
+ echo /opt/libav$pkgflag/lib > $pkgdir/etc/ld.so.conf.d/libav$pkgflag.conf
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/log4cxx/PKGBUILD b/pcr/log4cxx/PKGBUILD
new file mode 100644
index 000000000..c77813e56
--- /dev/null
+++ b/pcr/log4cxx/PKGBUILD
@@ -0,0 +1,24 @@
+pkgname=log4cxx
+pkgver=0.10.0
+pkgrel=2
+pkgdesc="A C++ port of Log4j"
+url="http://logging.apache.org/log4cxx"
+license="APACHE"
+depends=('apr-util' 'libxml2')
+arch=('i686' 'x86_64')
+makedepends=('autoconf' 'automake' 'libtool' 'patch' 'zip' 'gzip' 'sed')
+
+source=(http://archive.apache.org/dist/logging/$pkgname/$pkgver/apache-$pkgname-$pkgver.tar.gz
+ log4cxx-0.10.0-missing_includes.patch)
+md5sums=('b30ffb8da3665178e68940ff7a61084c'
+ 'dfa17719a57b19f12cbef94419a2aac8')
+
+build() {
+ cd $startdir/src/apache-$pkgname-$pkgver
+
+ patch -p1 < $startdir/log4cxx-0.10.0-missing_includes.patch
+
+ ./configure --prefix=/usr --disable-static
+ make || return 1
+ make DESTDIR=$startdir/pkg install
+}
diff --git a/pcr/log4cxx/log4cxx-0.10.0-missing_includes.patch b/pcr/log4cxx/log4cxx-0.10.0-missing_includes.patch
new file mode 100644
index 000000000..9f3534ccc
--- /dev/null
+++ b/pcr/log4cxx/log4cxx-0.10.0-missing_includes.patch
@@ -0,0 +1,38 @@
+diff -Naur apache-log4cxx-0.10.0.orig/src/examples/cpp/console.cpp apache-log4cxx-0.10.0/src/examples/cpp/console.cpp
+--- apache-log4cxx-0.10.0.orig/src/examples/cpp/console.cpp 2008-04-01 00:34:52.000000000 +0200
++++ apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2008-05-06 05:40:52.000000000 +0200
+@@ -15,7 +15,10 @@
+ * limitations under the License.
+ */
+
+-#include <stdlib.h>
++#include <cstdio>
++#include <cstdlib>
++#include <cstring>
++#include <stdint.h>
+ #include <log4cxx/logger.h>
+ #include <log4cxx/consoleappender.h>
+ #include <log4cxx/simplelayout.h>
+diff -Naur apache-log4cxx-0.10.0.orig/src/main/cpp/inputstreamreader.cpp apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp
+--- apache-log4cxx-0.10.0.orig/src/main/cpp/inputstreamreader.cpp 2008-04-01 00:34:09.000000000 +0200
++++ apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp 2008-05-06 05:32:31.000000000 +0200
+@@ -21,6 +21,8 @@
+ #include <log4cxx/helpers/pool.h>
+ #include <log4cxx/helpers/bytebuffer.h>
+
++#include <cstring>
++
+ using namespace log4cxx;
+ using namespace log4cxx::helpers;
+
+diff -Naur apache-log4cxx-0.10.0.orig/src/main/cpp/socketoutputstream.cpp apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp
+--- apache-log4cxx-0.10.0.orig/src/main/cpp/socketoutputstream.cpp 2008-04-01 00:34:09.000000000 +0200
++++ apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp 2008-05-06 05:35:55.000000000 +0200
+@@ -20,6 +20,8 @@
+ #include <log4cxx/helpers/socket.h>
+ #include <log4cxx/helpers/bytebuffer.h>
+
++#include <cstring>
++
+ using namespace log4cxx;
+ using namespace log4cxx::helpers;
diff --git a/pcr/mediatomb/PKGBUILD b/pcr/mediatomb/PKGBUILD
new file mode 100644
index 000000000..f07e12748
--- /dev/null
+++ b/pcr/mediatomb/PKGBUILD
@@ -0,0 +1,63 @@
+# Contributor: Peter Richard Lewis <plewis@aur.archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+# Contributor: Nikhil Bysani <nikron@gmail.com>
+# Contributor: Mika Hynnä <igheax@gmail.com>
+# Contributor: Jonathan Conder <jonno.conder@gmail.com>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=mediatomb
+pkgver=0.12.1
+pkgrel=11
+pkgdesc="Free UPnP/DLNA media server"
+arch=('i686' 'x86_64')
+url="http://mediatomb.cc/"
+license=('GPL')
+depends=('file' 'curl' 'ffmpegthumbnailer' 'js' 'libexif' 'libmp4v2' 'sqlite3' 'taglib' 'libmysqlclient')
+optdepends=('mysql: to store your music database in mysql')
+backup=('etc/conf.d/mediatomb')
+install=mediatomb.install
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+ 'mediatomb.rc'
+ 'mediatomb.conf'
+ 'gcc46.patch'
+ 'tonewjs.patch'
+ 'jsparse.patch'
+ 'libav_0.7_support.patch'
+ 'libmp4v2_191_p497.patch'
+ 'libavformat.patch')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -Np1 -i "$srcdir/gcc46.patch"
+ patch -Np1 -i "$srcdir/tonewjs.patch"
+ patch -Np1 -i "$srcdir/jsparse.patch"
+ patch -Np1 -i "$srcdir/libav_0.7_support.patch"
+ patch -Np1 -i "$srcdir/libmp4v2_191_p497.patch"
+ patch -Np1 -i "$srcdir/libavformat.patch"
+
+ ./configure --prefix=/usr \
+ --enable-mysql \
+ --enable-libmagic \
+ --enable-libjs \
+ --enable-ffmpeg
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+
+ install -D -m0755 "$srcdir/mediatomb.rc" "$pkgdir/etc/rc.d/mediatomb"
+ install -D -m0755 "$srcdir/mediatomb.conf" "$pkgdir/etc/conf.d/mediatomb"
+ install -d "$pkgdir/var/lib/mediatomb"
+}
+sha256sums=('31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd'
+ '1a67a1deb8a41467fe9bbf66358a255f0df97b0170a5fc3d48c1f768c8d328b9'
+ 'ba9753a4a380d4c717c987efec03a3c6d401d3ff93a6fced28098adbd3a44cc9'
+ '0c02a20032f0c296800b1bb9644638970c2dedbc5ab7141d66a637235e9da6ce'
+ '2cd8f5628c3a38b290526f008bae351b90211825f86e5959bf95f140748de574'
+ 'd9a3062858900d32b977f0d50d168fd7d36785b6ecc038c019e661e27f7b1c17'
+ 'c6523e8bf5e2da89b7475d6777ef9bffe7d089752ef2f7b27b5e39a4130fb0ff'
+ 'd39c2f9aab051c5447461718fd0ec72cf5982f6c920a4a985a50831f34babe84'
+ '76b11706d70ed8f5e157d96ca441c90c46c42176102fcb651b4ab1102b61bfee')
diff --git a/pcr/mediatomb/gcc46.patch b/pcr/mediatomb/gcc46.patch
new file mode 100644
index 000000000..0f4fe490f
--- /dev/null
+++ b/pcr/mediatomb/gcc46.patch
@@ -0,0 +1,10 @@
+--- a/src/zmm/object.h
++++ b/src/zmm/object.h
+@@ -33,6 +33,7 @@
+ #define __ZMM_OBJECT_H__
+
+ #include <new> // for size_t
++#include <cstddef>
+ #include "atomic.h"
+
+ namespace zmm
diff --git a/pcr/mediatomb/jsparse.patch b/pcr/mediatomb/jsparse.patch
new file mode 100644
index 000000000..9938939b0
--- /dev/null
+++ b/pcr/mediatomb/jsparse.patch
@@ -0,0 +1,144 @@
+diff -rup mediatomb-0.12.1/src/scripting/js_functions.cc ../mediatomb-0.12.1/src/scripting/js_functions.cc
+--- mediatomb-0.12.1/src/scripting/js_functions.cc 2011-06-29 21:51:13.641025479 -0400
++++ ../mediatomb-0.12.1/src/scripting/js_functions.cc 2011-06-29 21:49:21.071800273 -0400
+@@ -51,15 +51,28 @@ extern "C" {
+ JSBool
+ js_print(JSContext *cx, uintN argc, jsval *argv)
+ {
+- uintN i;
++ uintN i, j;
+ JSString *str;
+
+ for (i = 0; i < argc; i++)
+ {
+- str = JS_ValueToString(cx, argv[i]);
++ String fmtStr;
++ for (j = 0; j < argc; j++)
++ {
++ if (j == i)
++ fmtStr = fmtStr + "S";
++ else
++ fmtStr = fmtStr + "*";
++ }
++ if(!JS_ConvertArguments(cx, 1, JS_ARGV(cx, argv), fmtStr.c_str(), &str))
++ {
++ log_debug("Could not parse input arguments\n");
++ return JS_TRUE;
++ }
++
+ if (!str)
+ return JS_TRUE;
+- argv[i] = STRING_TO_JSVAL(str);
++
+ char * log_str = JS_EncodeString(cx, str);
+ log_js("%s\n", log_str);
+ JS_free(cx, log_str);
+@@ -116,24 +129,54 @@ js_addCdsObject(JSContext *cx, uintN arg
+ {
+ try
+ {
+- jsval arg;
+- JSString *str;
+- String path;
+- String containerclass;
++ // Inputs from native code
++ JSObject *js_cds_obj = NULL;
++ JSString *str = NULL;
++ JSString *cont = NULL;
+
+- JSObject *js_cds_obj;
++ String path = nil;
++ String containerclass = nil;
++
++ JSObject *obj = JS_THIS_OBJECT(cx, argv);
+ JSObject *js_orig_obj = NULL;
+ Ref<CdsObject> orig_object;
+
+ Ref<StringConverter> p2i;
+ Ref<StringConverter> i2i;
++ switch (argc)
++ {
++ case 0:
++ log_debug("No input arguments given\n");
++ return JS_FALSE;
++ case 1:
++ if(!JS_ConvertArguments(cx, 1, JS_ARGV(cx, argv), "o", &js_cds_obj))
++ {
++ log_debug("Could not parse input arguments\n");
++ return JS_TRUE;
++ }
++ break;
++ case 2:
++ if(!JS_ConvertArguments(cx, 2, JS_ARGV(cx, argv), "oS", &js_cds_obj, &str))
++ {
++ log_debug("Could not parse input arguments\n");
++ return JS_TRUE;
++ }
++ break;
++ default:
++ if(!JS_ConvertArguments(cx, 3, JS_ARGV(cx, argv), "oSS", &js_cds_obj, &str, &cont))
++ {
++ log_debug("Could not parse input arguments\n");
++ return JS_TRUE;
++ }
++ break;
++ }
+
+- Script *self = (Script *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv));
++ Script *self = (Script *)JS_GetPrivate(cx, obj);
+
+ if (self == NULL)
+ {
+ log_debug("Could not retrieve class instance from global object\n");
+- return JS_FALSE;
++ return JS_TRUE;
+ }
+
+ if (self->whoami() == S_PLAYLIST)
+@@ -144,23 +187,14 @@ js_addCdsObject(JSContext *cx, uintN arg
+ {
+ i2i = StringConverter::i2i();
+ }
+-
+- arg = argv[0];
+- if (!JSVAL_IS_OBJECT(arg))
+- return JS_TRUE;
+- if (!JS_ValueToObject(cx, arg, &js_cds_obj))
+- return JS_TRUE;
+
+- // root it
+- argv[0] = OBJECT_TO_JSVAL(js_cds_obj);
+
+- str = JS_ValueToString(cx, argv[1]);
+ if (!str)
+ path = _("/");
+ else
+ path = JS_EncodeString(cx, str);
+
+- JSString *cont = JS_ValueToString(cx, argv[2]);
++
+ if (cont)
+ {
+ containerclass = JS_EncodeString(cx, cont);
+@@ -169,9 +203,9 @@ js_addCdsObject(JSContext *cx, uintN arg
+ }
+
+ if (self->whoami() == S_PLAYLIST)
+- js_orig_obj = self->getObjectProperty(JS_THIS_OBJECT(cx, argv), _("playlist"));
++ js_orig_obj = self->getObjectProperty(obj, _("playlist"));
+ else if (self->whoami() == S_IMPORT)
+- js_orig_obj = self->getObjectProperty(JS_THIS_OBJECT(cx, argv), _("orig"));
++ js_orig_obj = self->getObjectProperty(obj, _("orig"));
+
+ if (js_orig_obj == NULL)
+ {
+@@ -179,9 +213,6 @@ js_addCdsObject(JSContext *cx, uintN arg
+ return JS_TRUE;
+ }
+
+- // root it
+- argv[1] = OBJECT_TO_JSVAL(js_orig_obj);
+-
+ orig_object = self->jsObject2cdsObject(js_orig_obj, self->getProcessedObject());
+ if (orig_object == nil)
+ return JS_TRUE;
diff --git a/pcr/mediatomb/libav_0.7_support.patch b/pcr/mediatomb/libav_0.7_support.patch
new file mode 100644
index 000000000..e25697c50
--- /dev/null
+++ b/pcr/mediatomb/libav_0.7_support.patch
@@ -0,0 +1,64 @@
+=== modified file 'src/metadata/ffmpeg_handler.cc'
+--- old/src/metadata/ffmpeg_handler.cc 2010-08-25 17:07:03 +0000
++++ new/src/metadata/ffmpeg_handler.cc 2011-05-19 04:33:32 +0000
+@@ -89,6 +89,33 @@
+
+ Ref<StringConverter> sc = StringConverter::m2i();
+
++ /* Tabs are 4 characters here */
++ typedef struct {const char *avname; metadata_fields_t field;} mapping_t;
++ static const mapping_t mapping[] =
++ {
++ {"title", M_TITLE},
++ {"artist", M_ARTIST},
++ {"album", M_ALBUM},
++ {"date", M_DATE},
++ {"genre", M_GENRE},
++ {"comment", M_DESCRIPTION},
++ {"track", M_TRACKNUMBER},
++ {NULL, M_MAX},
++ };
++
++ if (!pFormatCtx->metadata)
++ return;
++ for (const mapping_t *m = mapping; m->avname != NULL; m++)
++ {
++ AVMetadataTag *tag = NULL;
++ tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0);
++ if (tag && tag->value && tag->value[0])
++ {
++ log_debug("Added metadata %s: %s\n", m->avname, tag->value);
++ item->setMetadata(MT_KEYS[m->field].upnp, sc->convert(tag->value));
++ }
++ }
++ /* Old algorithm (doesn't work with libav >= 0.7)
+ if (strlen(pFormatCtx->title) > 0)
+ {
+ log_debug("Added metadata title: %s\n", pFormatCtx->title);
+@@ -131,6 +158,7 @@
+ item->setMetadata(MT_KEYS[M_TRACKNUMBER].upnp,
+ sc->convert(String::from(pFormatCtx->track)));
+ }
++ */
+ }
+
+ // ffmpeg library calls
+@@ -178,7 +206,7 @@
+ for(i=0; i<pFormatCtx->nb_streams; i++)
+ {
+ AVStream *st = pFormatCtx->streams[i];
+- if((st != NULL) && (videoset == false) && (st->codec->codec_type == CODEC_TYPE_VIDEO))
++ if((st != NULL) && (videoset == false) && (st->codec->codec_type == AVMEDIA_TYPE_VIDEO))
+ {
+ if (st->codec->codec_tag > 0)
+ {
+@@ -209,7 +237,7 @@
+ *y = st->codec->height;
+ }
+ }
+- if(st->codec->codec_type == CODEC_TYPE_AUDIO)
++ if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+ {
+ // Increase number of audiochannels
+ audioch++;
+
diff --git a/pcr/mediatomb/libavformat.patch b/pcr/mediatomb/libavformat.patch
new file mode 100644
index 000000000..96685ea15
--- /dev/null
+++ b/pcr/mediatomb/libavformat.patch
@@ -0,0 +1,52 @@
+--- mediatomb-0.12.1.orig/src/metadata/ffmpeg_handler.cc 2012-06-18 02:50:35.000000000 -0400
++++ mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc 2012-06-18 02:59:02.000000000 -0400
+@@ -107,8 +107,8 @@
+ return;
+ for (const mapping_t *m = mapping; m->avname != NULL; m++)
+ {
+- AVMetadataTag *tag = NULL;
+- tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0);
++ AVDictionaryEntry *tag = NULL;
++ tag = av_dict_get(pFormatCtx->metadata, m->avname, NULL, 0);
+ if (tag && tag->value && tag->value[0])
+ {
+ log_debug("Added metadata %s: %s\n", m->avname, tag->value);
+@@ -278,7 +278,7 @@
+ int x = 0;
+ int y = 0;
+
+- AVFormatContext *pFormatCtx;
++ AVFormatContext *pFormatCtx = avformat_alloc_context();
+
+ // Suppress all log messages
+ av_log_set_callback(FfmpegNoOutputStub);
+@@ -286,15 +286,15 @@
+ // Register all formats and codecs
+ av_register_all();
+
+- // Open video file
+- if (av_open_input_file(&pFormatCtx,
+- item->getLocation().c_str(), NULL, 0, NULL) != 0)
++ // Open video file
++ if (avformat_open_input(&pFormatCtx,
++ item->getLocation().c_str(), NULL, NULL) != 0)
+ return; // Couldn't open file
+
+ // Retrieve stream information
+- if (av_find_stream_info(pFormatCtx) < 0)
++ if (avformat_find_stream_info(pFormatCtx,NULL) < 0)
+ {
+- av_close_input_file(pFormatCtx);
++ avformat_close_input(&pFormatCtx);
+ return; // Couldn't find stream information
+ }
+ // Add metadata using ffmpeg library calls
+@@ -303,7 +303,7 @@
+ addFfmpegResourceFields(item, pFormatCtx, &x, &y);
+
+ // Close the video file
+- av_close_input_file(pFormatCtx);
++ avformat_close_input(&pFormatCtx);
+ }
+
+ Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t *data_size)
diff --git a/pcr/mediatomb/libmp4v2_191_p497.patch b/pcr/mediatomb/libmp4v2_191_p497.patch
new file mode 100644
index 000000000..6a6b51e1e
--- /dev/null
+++ b/pcr/mediatomb/libmp4v2_191_p497.patch
@@ -0,0 +1,187 @@
+diff -urN old/src/metadata/libmp4v2_handler.cc new/src/metadata/libmp4v2_handler.cc
+--- old/src/metadata/libmp4v2_handler.cc 2012-04-05 01:46:26.000000000 +0200
++++ new/src/metadata/libmp4v2_handler.cc 2012-04-05 02:01:24.000000000 +0200
+@@ -65,29 +65,28 @@
+ static void addMetaField(metadata_fields_t field, MP4FileHandle mp4, Ref<CdsItem> item)
+ {
+ String value;
+- char* mp4_retval = NULL;
+- u_int16_t track;
+- u_int16_t total_tracks;
+-
+ Ref<StringConverter> sc = StringConverter::i2i();
+
++ const MP4Tags* new_tags = MP4TagsAlloc();
++
++ if (!MP4TagsFetch(new_tags, mp4))
++ return;
++
+ switch (field)
+ {
+ case M_TITLE:
+- MP4GetMetadataName(mp4, &mp4_retval);
++ value = new_tags->name;
+ break;
+ case M_ARTIST:
+- MP4GetMetadataArtist(mp4, &mp4_retval);
++ value = new_tags->artist;
+ break;
+ case M_ALBUM:
+- MP4GetMetadataAlbum(mp4, &mp4_retval);
++ value = new_tags->album;
+ break;
+ case M_DATE:
+- MP4GetMetadataYear(mp4, &mp4_retval);
+- if (mp4_retval)
++ value = new_tags->releaseDate;
++ if (value.length() > 0)
+ {
+- value = mp4_retval;
+- free(mp4_retval);
+ if (string_ok(value))
+ value = value + "-01-01";
+ else
+@@ -95,34 +94,31 @@
+ }
+ break;
+ case M_GENRE:
+- MP4GetMetadataGenre(mp4, &mp4_retval);
++ value = new_tags->genre;
+ break;
+ case M_DESCRIPTION:
+- MP4GetMetadataComment(mp4, &mp4_retval);
++ value = new_tags->comments;
+ break;
+ case M_TRACKNUMBER:
+- MP4GetMetadataTrack(mp4, &track, &total_tracks);
+- if (track > 0)
++ if (new_tags->track)
+ {
+- value = String::from(track);
+- item->setTrackNumber((int)track);
++ value = String::from(new_tags->track->index);
++ item->setTrackNumber((int)new_tags->track->index);
+ }
+ else
++ {
++ MP4TagsFree( new_tags );
+ return;
++ }
+ break;
+ default:
++ MP4TagsFree( new_tags );
+ return;
+ }
+
+- if ((field != M_DATE) && (field != M_TRACKNUMBER) &&
+- (mp4_retval))
+- {
+- value = mp4_retval;
+- free(mp4_retval);
+- }
+-
++ MP4TagsFree( new_tags );
+ value = trim_string(value);
+-
++
+ if (string_ok(value))
+ {
+ item->setMetadata(MT_KEYS[field].upnp, sc->convert(value));
+@@ -190,14 +186,19 @@
+ }
+
+ #if defined(HAVE_MAGIC)
+- u_int8_t *art_data;
+- u_int32_t art_data_len;
++ void *art_data = 0;
++ u_int32_t art_data_len = 0;
+ String art_mimetype;
++
++ const MP4Tags* new_tags = MP4TagsAlloc();
++ MP4TagsFetch(new_tags, mp4);
++ if (new_tags->artworkCount)
++ {
++ art_data = new_tags->artwork->data;
++ art_data_len = new_tags->artwork->size;
++ }
+ #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
+- if (MP4GetMetadataCoverArtCount(mp4) &&
+- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
+-#else
+- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len);
++ if (new_tags->artworkCount && art_data_len > 0)
+ #endif
+ {
+ if (art_data)
+@@ -211,11 +212,10 @@
+ }
+ catch (Exception ex)
+ {
+- free(art_data);
++ MP4TagsFree(new_tags);
+ throw ex;
+ }
+
+- free(art_data);
+ if (art_mimetype != _(MIMETYPE_DEFAULT))
+ {
+ Ref<CdsResource> resource(new CdsResource(CH_MP4));
+@@ -225,6 +225,7 @@
+ }
+ }
+ }
++ MP4TagsFree(new_tags);
+ #endif
+ MP4Close(mp4);
+ }
+@@ -249,26 +250,35 @@
+
+ if (ctype != ID3_ALBUM_ART)
+ throw _Exception(_("LibMP4V2Handler: got unknown content type: ") + ctype);
++
++ const MP4Tags* new_tags = MP4TagsAlloc();
++ if (MP4TagsFetch(new_tags, mp4))
++ {
+ #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
+- if (!MP4GetMetadataCoverArtCount(mp4))
+- throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
++ if (!new_tags->artworkCount)
++ throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
+ #endif
+- u_int8_t *art_data;
+- u_int32_t art_data_len;
+- if (MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
+- {
+- if (art_data)
++ void *art_data = 0;
++ u_int32_t art_data_len;
++
++ const MP4TagArtwork* art = new_tags->artwork;
++ art_data = art->data;
++ art_data_len = art->size;
++ if (art)
+ {
+- *data_size = (off_t)art_data_len;
+- Ref<IOHandler> h(new MemIOHandler((void *)art_data, art_data_len));
+- free(art_data);
+- return h;
++ if (art_data)
++ {
++ *data_size = (off_t)art_data_len;
++ Ref<IOHandler> h(new MemIOHandler(art_data, art_data_len));
++ MP4TagsFree(new_tags);
++ return h;
++ }
+ }
++ MP4TagsFree(new_tags);
+ }
+-
+ throw _Exception(_("LibMP4V2Handler: could not serve album art "
+- "for file") + item->getLocation() +
+- " - embedded image not found");
++ "for file") + item->getLocation() +
++ " - embedded image not found");
+ }
+
+ #endif // HAVE_LIBMP4V2
+De binära filerna old/src/metadata/.libmp4v2_handler.cc.swp och new/src/metadata/.libmp4v2_handler.cc.swp skiljer
diff --git a/pcr/mediatomb/mediatomb.conf b/pcr/mediatomb/mediatomb.conf
new file mode 100644
index 000000000..798018d2a
--- /dev/null
+++ b/pcr/mediatomb/mediatomb.conf
@@ -0,0 +1,23 @@
+#
+# Parameters to be passed to mediatomb
+#
+
+# Port to listen on
+MT_PORT='50500'
+
+# User and group to run as
+MT_USER='nobody'
+MT_GROUP='nobody'
+
+# Location of the PID file
+MT_PIDFILE='/var/run/mediatomb.pid'
+
+# Location of the log file
+MT_LOGFILE='/var/log/mediatomb.log'
+
+# Location of the config file/database
+MT_HOME='/var/lib/mediatomb'
+MT_CFGDIR='.mediatomb'
+
+# User defined command line options
+MT_OPTIONS=''
diff --git a/pcr/mediatomb/mediatomb.install b/pcr/mediatomb/mediatomb.install
new file mode 100644
index 000000000..56f6ef92c
--- /dev/null
+++ b/pcr/mediatomb/mediatomb.install
@@ -0,0 +1,9 @@
+post_install() {
+ echo 'Warning: the MediaTomb web interface exposes your filesystem to the network'
+ echo 'For maximum security, set <ui enabled="no"> in your MediaTomb config file'
+}
+
+post_upgrade() {
+ # TODO: disable next update
+ post_install
+}
diff --git a/pcr/mediatomb/mediatomb.rc b/pcr/mediatomb/mediatomb.rc
new file mode 100644
index 000000000..7b93012cd
--- /dev/null
+++ b/pcr/mediatomb/mediatomb.rc
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/mediatomb
+
+MT_OPTIONS="-p $MT_PORT -u $MT_USER -g $MT_GROUP -P $MT_PIDFILE \
+ -l $MT_LOGFILE -m $MT_HOME -f $MT_CFGDIR $MT_OPTIONS"
+
+case "$1" in
+ start)
+ stat_busy "Starting Mediatomb UPnP Media Server"
+
+ chown "$MT_USER:$MT_GROUP" "$MT_HOME"
+
+ if ! pidof -o %PPID /usr/bin/mediatomb &> /dev/null; then
+ rm -f "$MT_PIDFILE"
+ fi
+
+ PID="$(cat "$MT_PIDFILE" 2> /dev/null)"
+
+ if [ -z "$PID" ] && /usr/bin/mediatomb -d $MT_OPTIONS; then
+ add_daemon mediatomb
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping Mediatomb UPnP Media Server"
+
+ PID="$(cat "$MT_PIDFILE" 2> /dev/null)"
+
+ if [ -n "$PID" ] && kill "$PID" &> /dev/null; then
+ rm -f "$MT_PIDFILE"
+ rm_daemon mediatomb
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+
+ restart)
+ "$0" stop
+ sleep 1
+ "$0" start
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ ;;
+esac
+exit 0
diff --git a/pcr/mediatomb/tonewjs.patch b/pcr/mediatomb/tonewjs.patch
new file mode 100644
index 000000000..115968530
--- /dev/null
+++ b/pcr/mediatomb/tonewjs.patch
@@ -0,0 +1,564 @@
+diff -up mediatomb-0.12.1-back/build/Makefile.in.tonewjs mediatomb-0.12.1-back/build/Makefile.in
+--- mediatomb-0.12.1-back/build/Makefile.in.tonewjs 2010-04-08 00:40:15.000000000 +0200
++++ mediatomb-0.12.1-back/build/Makefile.in 2011-04-19 17:17:01.343509944 +0200
+@@ -257,7 +257,7 @@ CURL_LIBS = @CURL_LIBS@
+ CXX = @CXX@
+ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
+-CXXFLAGS = @CXXFLAGS@
++CXXFLAGS = -fpermissive @CXXFLAGS@
+ CYGPATH_W = @CYGPATH_W@
+ DB_AUTOCREATE_OPTION_ENABLED = @DB_AUTOCREATE_OPTION_ENABLED@
+ DB_AUTOCREATE_OPTION_REQUESTED = @DB_AUTOCREATE_OPTION_REQUESTED@
+diff -up mediatomb-0.12.1-back/src/scripting/import_script.cc.tonewjs mediatomb-0.12.1-back/src/scripting/import_script.cc
+--- mediatomb-0.12.1-back/src/scripting/import_script.cc.tonewjs 2011-04-18 13:10:48.000000000 +0200
++++ mediatomb-0.12.1-back/src/scripting/import_script.cc 2011-04-18 13:29:36.000000000 +0200
+@@ -53,8 +53,8 @@ ImportScript::ImportScript(Ref<Runtime>
+ try
+ {
+ load(scriptPath);
+- root = JS_NewScriptObject(cx, script);
+- JS_AddNamedRoot(cx, &root, "ImportScript");
++ root = JS_NewObject(cx, NULL, script, NULL);
++ JS_AddNamedObjectRoot(cx, &root, "ImportScript");
+ }
+ catch (Exception ex)
+ {
+@@ -117,7 +117,7 @@ ImportScript::~ImportScript()
+ #endif
+
+ if (root)
+- JS_RemoveRoot(cx, &root);
++ JS_RemoveObjectRoot(cx, &root);
+
+ #ifdef JS_THREADSAFE
+ JS_EndRequest(cx);
+diff -up mediatomb-0.12.1-back/src/scripting/js_functions.cc.tonewjs mediatomb-0.12.1-back/src/scripting/js_functions.cc
+--- mediatomb-0.12.1-back/src/scripting/js_functions.cc.tonewjs 2011-04-18 13:29:55.000000000 +0200
++++ mediatomb-0.12.1-back/src/scripting/js_functions.cc 2011-04-19 16:48:04.009229611 +0200
+@@ -49,7 +49,7 @@ using namespace zmm;
+ extern "C" {
+
+ JSBool
+-js_print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
++js_print(JSContext *cx, uintN argc, jsval *argv)
+ {
+ uintN i;
+ JSString *str;
+@@ -60,19 +60,21 @@ js_print(JSContext *cx, JSObject *obj, u
+ if (!str)
+ return JS_TRUE;
+ argv[i] = STRING_TO_JSVAL(str);
+- log_js("%s\n", JS_GetStringBytes(str));
++ char * log_str = JS_EncodeString(cx, str);
++ log_js("%s\n", log_str);
++ JS_free(cx, log_str);
+ }
+ return JS_TRUE;
+ }
+
+ JSBool
+-js_copyObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
++js_copyObject(JSContext *cx, uintN argc, jsval *argv)
+ {
+ jsval arg;
+ JSObject *js_cds_obj;
+ JSObject *js_cds_clone_obj;
+
+- Script *self = (Script *)JS_GetPrivate(cx, obj);
++ Script *self = (Script *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv));
+
+ try
+ {
+@@ -91,7 +93,7 @@ js_copyObject(JSContext *cx, JSObject *o
+
+ self->cdsObject2jsObject(cds_obj, js_cds_clone_obj);
+
+- *rval = OBJECT_TO_JSVAL(js_cds_clone_obj);
++ JS_SET_RVAL(cx, argv, OBJECT_TO_JSVAL(js_cds_clone_obj));
+
+ return JS_TRUE;
+
+@@ -110,7 +112,7 @@ js_copyObject(JSContext *cx, JSObject *o
+ }
+
+ JSBool
+-js_addCdsObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
++js_addCdsObject(JSContext *cx, uintN argc, jsval *argv)
+ {
+ try
+ {
+@@ -126,7 +128,7 @@ js_addCdsObject(JSContext *cx, JSObject
+ Ref<StringConverter> p2i;
+ Ref<StringConverter> i2i;
+
+- Script *self = (Script *)JS_GetPrivate(cx, obj);
++ Script *self = (Script *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv));
+
+ if (self == NULL)
+ {
+@@ -156,20 +158,20 @@ js_addCdsObject(JSContext *cx, JSObject
+ if (!str)
+ path = _("/");
+ else
+- path = JS_GetStringBytes(str);
++ path = JS_EncodeString(cx, str);
+
+ JSString *cont = JS_ValueToString(cx, argv[2]);
+ if (cont)
+ {
+- containerclass = JS_GetStringBytes(cont);
++ containerclass = JS_EncodeString(cx, cont);
+ if (!string_ok(containerclass) || containerclass == "undefined")
+ containerclass = nil;
+ }
+
+ if (self->whoami() == S_PLAYLIST)
+- js_orig_obj = self->getObjectProperty(obj, _("playlist"));
++ js_orig_obj = self->getObjectProperty(JS_THIS_OBJECT(cx, argv), _("playlist"));
+ else if (self->whoami() == S_IMPORT)
+- js_orig_obj = self->getObjectProperty(obj, _("orig"));
++ js_orig_obj = self->getObjectProperty(JS_THIS_OBJECT(cx, argv), _("orig"));
+
+ if (js_orig_obj == NULL)
+ {
+@@ -285,8 +287,7 @@ js_addCdsObject(JSContext *cx, JSObject
+ JSString *str2 = JS_NewStringCopyN(cx, tmp.c_str(), tmp.length());
+ if (!str2)
+ return JS_TRUE;
+- *rval = STRING_TO_JSVAL(str2);
+-
++ JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(str2));
+ return JS_TRUE;
+ }
+ catch (ServerShutdownException se)
+@@ -302,7 +303,7 @@ js_addCdsObject(JSContext *cx, JSObject
+ return JS_TRUE;
+ }
+
+-static JSBool convert_charset_generic(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval, charset_convert_t chr)
++static JSBool convert_charset_generic(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, charset_convert_t chr)
+ {
+ try
+ {
+@@ -321,7 +322,7 @@ static JSBool convert_charset_generic(JS
+ {
+ str = JS_ValueToString(cx, argv[0]);
+ if (str)
+- result = JS_GetStringBytes(str);
++ result = JS_EncodeString(cx, str);
+ }
+
+ if (result != nil)
+@@ -330,7 +331,7 @@ static JSBool convert_charset_generic(JS
+ JSString *str2 = JS_NewStringCopyN(cx, result.c_str(), result.length());
+ if (!str2)
+ return JS_TRUE;
+- *rval = STRING_TO_JSVAL(str2);
++ JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(str2));
+ }
+ }
+ catch (ServerShutdownException se)
+@@ -347,24 +348,23 @@ static JSBool convert_charset_generic(JS
+ }
+
+
+-JSBool js_f2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
++JSBool js_f2i(JSContext *cx, uintN argc, jsval *argv)
+ {
+- return convert_charset_generic(cx, obj, argc, argv, rval, F2I);
++ return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, F2I);
+ }
+
+-JSBool js_m2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
++JSBool js_m2i(JSContext *cx, uintN argc, jsval *argv)
+ {
+- return convert_charset_generic(cx, obj, argc, argv, rval, M2I);
+-}
++ return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, M2I); }
+
+-JSBool js_p2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
++JSBool js_p2i(JSContext *cx, uintN argc, jsval *argv)
+ {
+- return convert_charset_generic(cx, obj, argc, argv, rval, P2I);
++ return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, P2I);
+ }
+
+-JSBool js_j2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
++JSBool js_j2i(JSContext *cx, uintN argc, jsval *argv)
+ {
+- return convert_charset_generic(cx, obj, argc, argv, rval, J2I);
++ return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, J2I);
+ }
+
+ } // extern "C"
+diff -up mediatomb-0.12.1-back/src/scripting/js_functions.h.tonewjs mediatomb-0.12.1-back/src/scripting/js_functions.h
+--- mediatomb-0.12.1-back/src/scripting/js_functions.h.tonewjs 2010-03-25 15:58:05.000000000 +0100
++++ mediatomb-0.12.1-back/src/scripting/js_functions.h 2011-04-18 13:59:29.000000000 +0200
+@@ -40,18 +40,18 @@
+ extern "C" {
+
+ /// \brief Log output.
+-JSBool js_print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
++JSBool js_print(JSContext *cx, uintN argc, jsval *argv);
+
+ /// \brief Adds an object to the database.
+-JSBool js_addCdsObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
++JSBool js_addCdsObject(JSContext *cx, uintN argc, jsval *argv);
+
+ /// \brief Makes a copy of an CDS object.
+-JSBool js_copyObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
++JSBool js_copyObject(JSContext *cx, uintN argc, jsval *argv);
+
+-JSBool js_f2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
+-JSBool js_m2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
+-JSBool js_p2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
+-JSBool js_j2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
++JSBool js_f2i(JSContext *cx, uintN argc, jsval *argv);
++JSBool js_m2i(JSContext *cx, uintN argc, jsval *argv);
++JSBool js_p2i(JSContext *cx, uintN argc, jsval *argv);
++JSBool js_j2i(JSContext *cx, uintN argc, jsval *argv);
+
+ } // extern "C"
+
+diff -up mediatomb-0.12.1-back/src/scripting/playlist_parser_script.cc.tonewjs mediatomb-0.12.1-back/src/scripting/playlist_parser_script.cc
+--- mediatomb-0.12.1-back/src/scripting/playlist_parser_script.cc.tonewjs 2011-04-18 13:34:14.000000000 +0200
++++ mediatomb-0.12.1-back/src/scripting/playlist_parser_script.cc 2011-04-18 13:51:59.000000000 +0200
+@@ -46,9 +46,9 @@ using namespace zmm;
+ extern "C" {
+
+ static JSBool
+-js_readln(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
++js_readln(JSContext *cx, uintN argc, jsval *argv)
+ {
+- PlaylistParserScript *self = (PlaylistParserScript *)JS_GetPrivate(cx, obj);
++ PlaylistParserScript *self = (PlaylistParserScript *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv));
+
+ String line;
+
+@@ -69,7 +69,7 @@ js_readln(JSContext *cx, JSObject *obj,
+
+ JSString *jsline = JS_NewStringCopyZ(cx, line.c_str());
+
+- *rval = STRING_TO_JSVAL(jsline);
++ JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(jsline));
+
+ return JS_TRUE;
+ }
+@@ -93,8 +93,8 @@ PlaylistParserScript::PlaylistParserScri
+
+ String scriptPath = ConfigManager::getInstance()->getOption(CFG_IMPORT_SCRIPTING_PLAYLIST_SCRIPT);
+ load(scriptPath);
+- root = JS_NewScriptObject(cx, script);
+- JS_AddNamedRoot(cx, &root, "PlaylistScript");
++ root = JS_NewObject(cx, NULL, script, NULL);
++ JS_AddNamedObjectRoot(cx, &root, "PlaylistScript");
+ }
+ catch (Exception ex)
+ {
+@@ -245,7 +245,7 @@ PlaylistParserScript::~PlaylistParserScr
+ #endif
+
+ if (root)
+- JS_RemoveRoot(cx, &root);
++ JS_RemoveObjectRoot(cx, &root);
+
+ #ifdef JS_THREADSAFE
+ JS_EndRequest(cx);
+diff -up mediatomb-0.12.1-back/src/scripting/script.cc.tonewjs mediatomb-0.12.1-back/src/scripting/script.cc
+--- mediatomb-0.12.1-back/src/scripting/script.cc.tonewjs 2011-04-18 13:53:07.000000000 +0200
++++ mediatomb-0.12.1-back/src/scripting/script.cc 2011-04-19 18:26:34.460338804 +0200
+@@ -87,7 +87,7 @@ String Script::getProperty(JSObject *obj
+ str = JS_ValueToString(cx, val);
+ if (! str)
+ return nil;
+- return JS_GetStringBytes(str);
++ return JS_EncodeString(cx, str);
+ }
+
+ int Script::getBoolProperty(JSObject *obj, String name)
+@@ -427,14 +427,14 @@ static JSFunctionSpec js_global_function
+ try
+ {
+ common_script = _load(common_scr_path);
+- common_root = JS_NewScriptObject(cx, common_script);
+- JS_AddNamedRoot(cx, &common_root, "common-script");
++ common_root = JS_NewObject(cx, NULL, common_script, NULL);
++ JS_AddNamedObjectRoot(cx, &common_root, "common-script");
+ _execute(common_script);
+ }
+ catch (Exception e)
+ {
+ if (common_root)
+- JS_RemoveRoot(cx, &common_root);
++ JS_RemoveObjectRoot(cx, &common_root);
+
+ log_js("Unable to load %s: %s\n", common_scr_path.c_str(),
+ e.getMessage().c_str());
+@@ -460,7 +460,7 @@ Script::~Script()
+ JS_BeginRequest(cx);
+ #endif
+ if (common_root)
+- JS_RemoveRoot(cx, &common_root);
++ JS_RemoveObjectRoot(cx, &common_root);
+
+ /*
+ * scripts are unrooted and will be cleaned up by GC
+@@ -504,11 +504,11 @@ void Script::initGlobalObject()
+ static JSClass global_class =
+ {
+ "global", /* name */
+- JSCLASS_HAS_PRIVATE, /* flags */
++ JSCLASS_HAS_PRIVATE | JSCLASS_GLOBAL_FLAGS,/* flags */
+ JS_PropertyStub, /* add property */
+ JS_PropertyStub, /* del property */
+ JS_PropertyStub, /* get property */
+- JS_PropertyStub, /* set property */
++ JS_StrictPropertyStub, /* set property */
+ JS_EnumerateStandardClasses, /* enumerate */
+ JS_ResolveStub, /* resolve */
+ JS_ConvertStub, /* convert */
+@@ -517,7 +517,7 @@ void Script::initGlobalObject()
+ };
+
+ /* create the global object here */
+- glob = JS_NewObject(cx, &global_class, NULL, NULL);
++ glob = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL);
+ if (! glob)
+ throw _Exception(_("Scripting: could not initialize glboal class"));
+
+@@ -539,12 +539,12 @@ void Script::defineFunctions(JSFunctionS
+ throw _Exception(_("Scripting: JS_DefineFunctions failed"));
+ }
+
+-JSScript *Script::_load(zmm::String scriptPath)
++JSObject *Script::_load(zmm::String scriptPath)
+ {
+ if (glob == NULL)
+ initGlobalObject();
+
+- JSScript *scr;
++ JSObject *scr;
+
+ String scriptText = read_text_file(scriptPath);
+
+@@ -571,14 +571,11 @@ JSScript *Script::_load(zmm::String scri
+
+ void Script::load(zmm::String scriptPath)
+ {
+- if (script)
+- JS_DestroyScript(cx, script);
+-
+ script = _load((scriptPath));
+ }
+
+
+-void Script::_execute(JSScript *scr)
++void Script::_execute(JSObject *scr)
+ {
+ jsval ret_val;
+
+@@ -662,7 +659,7 @@ Ref<CdsObject> Script::jsObject2cdsObjec
+ JSObject *js_meta = getObjectProperty(js, _("meta"));
+ if (js_meta)
+ {
+- JS_AddNamedRoot(cx, &js_meta, "meta");
++ JS_AddNamedObjectRoot(cx, &js_meta, "meta");
+ /// \todo: only metadata enumerated in MT_KEYS is taken
+ for (int i = 0; i < M_MAX; i++)
+ {
+@@ -687,7 +684,7 @@ Ref<CdsObject> Script::jsObject2cdsObjec
+ }
+ }
+ }
+- JS_RemoveRoot(cx, &js_meta);
++ JS_RemoveObjectRoot(cx, &js_meta);
+ }
+
+ // stuff that has not been exported to js
+diff -up mediatomb-0.12.1-back/src/scripting/script.h.tonewjs mediatomb-0.12.1-back/src/scripting/script.h
+--- mediatomb-0.12.1-back/src/scripting/script.h.tonewjs 2011-04-18 12:56:14.000000000 +0200
++++ mediatomb-0.12.1-back/src/scripting/script.h 2011-04-18 12:56:51.000000000 +0200
+@@ -66,8 +66,8 @@ public:
+ JSRuntime *rt;
+ JSContext *cx;
+ JSObject *glob;
+- JSScript *script;
+- JSScript *common_script;
++ JSObject *script;
++ JSObject *common_script;
+
+ public:
+ Script(zmm::Ref<Runtime> runtime);
+@@ -115,8 +115,8 @@ private:
+ JSObject *common_root;
+
+ void initGlobalObject();
+- JSScript *_load(zmm::String scriptPath);
+- void _execute(JSScript *scr);
++ JSObject *_load(zmm::String scriptPath);
++ void _execute(JSObject *scr);
+ zmm::Ref<StringConverter> _p2i;
+ zmm::Ref<StringConverter> _j2i;
+ zmm::Ref<StringConverter> _f2i;
+--- mediatomb-0.12.1/configure.tonewjs 2011-07-04 20:20:00.290227110 +1200
++++ mediatomb-0.12.1/configure 2011-07-04 20:20:28.186894644 +1200
+@@ -23784,14 +23784,14 @@ if test "x$ac_cv_lib_smjs_JS_NewObject"
+
+ else
+
+- LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs $ADD_PTHREAD_CFLAGS"
+- { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs" >&5
+-$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
+-if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then
++ LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs185 $ADD_PTHREAD_CFLAGS"
++ { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs185" >&5
++$as_echo_n "checking for JS_NewObject in -lmozjs185... " >&6; }
++if test "${ac_cv_lib_mozjs185_JS_NewObject+set}" = set; then
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lmozjs $LIBS"
++LIBS="-lmozjs185 $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -23835,12 +23835,12 @@ $as_echo "$ac_try_echo") >&5
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+- ac_cv_lib_mozjs_JS_NewObject=yes
++ ac_cv_lib_mozjs185_JS_NewObject=yes
+ else
+ $as_echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+- ac_cv_lib_mozjs_JS_NewObject=no
++ ac_cv_lib_mozjs185_JS_NewObject=no
+ fi
+
+ rm -rf conftest.dSYM
+@@ -23848,12 +23848,12 @@ rm -f core conftest.err conftest.$ac_obj
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
+-$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
+-if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then
++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs185_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_mozjs185_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_mozjs185_JS_NewObject" = x""yes; then
+
+- JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs"
+- MOZLIB=mozjs
++ JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs185"
++ MOZLIB=mozjs185
+
+ else
+
+@@ -24020,13 +24020,13 @@ if test "x$ac_cv_lib_smjs_JS_NewObject"
+ else
+
+ unset ac_cv_lib_smjs_JS_NewObject
+- { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs" >&5
+-$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
+-if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then
++ { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs185" >&5
++$as_echo_n "checking for JS_NewObject in -lmozjs185... " >&6; }
++if test "${ac_cv_lib_mozjs185_JS_NewObject+set}" = set; then
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lmozjs $LIBS"
++LIBS="-lmozjs185 $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -24070,12 +24070,12 @@ $as_echo "$ac_try_echo") >&5
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+- ac_cv_lib_mozjs_JS_NewObject=yes
++ ac_cv_lib_mozjs185_JS_NewObject=yes
+ else
+ $as_echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+- ac_cv_lib_mozjs_JS_NewObject=no
++ ac_cv_lib_mozjs185_JS_NewObject=no
+ fi
+
+ rm -rf conftest.dSYM
+@@ -24083,12 +24083,12 @@ rm -f core conftest.err conftest.$ac_obj
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
+-$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
+-if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then
++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs185_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_mozjs185_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_mozjs185_JS_NewObject" = x""yes; then
+
+- MOZLIB=mozjs
+- JS_LIBS="-lmozjs"
++ MOZLIB=mozjs185
++ JS_LIBS="-lmozjs185"
+
+ else
+
+@@ -24239,15 +24239,15 @@ if test "x$ac_cv_lib_smjs_JS_NewObject"
+
+ else
+
+- LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
+- unset ac_cv_lib_mozjs_JS_NewObject
+- { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs" >&5
+-$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
+-if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then
++ LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs185"
++ unset ac_cv_lib_mozjs185_JS_NewObject
++ { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs185" >&5
++$as_echo_n "checking for JS_NewObject in -lmozjs185... " >&6; }
++if test "${ac_cv_lib_mozjs185_JS_NewObject+set}" = set; then
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lmozjs $LIBS"
++LIBS="-lmozjs185 $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -24291,12 +24291,12 @@ $as_echo "$ac_try_echo") >&5
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+- ac_cv_lib_mozjs_JS_NewObject=yes
++ ac_cv_lib_mozjs185_JS_NewObject=yes
+ else
+ $as_echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+- ac_cv_lib_mozjs_JS_NewObject=no
++ ac_cv_lib_mozjs185_JS_NewObject=no
+ fi
+
+ rm -rf conftest.dSYM
+@@ -24304,12 +24304,12 @@ rm -f core conftest.err conftest.$ac_obj
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
+-$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
+-if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then
++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs185_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_mozjs185_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_mozjs185_JS_NewObject" = x""yes; then
+
+- JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs"
+- MOZLIB=mozjs
++ JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs185"
++ MOZLIB=mozjs185
+
+ else
+
diff --git a/pcr/pactools/PKGBUILD b/pcr/pactools/PKGBUILD
new file mode 100644
index 000000000..d05953b99
--- /dev/null
+++ b/pcr/pactools/PKGBUILD
@@ -0,0 +1,18 @@
+# Contributor: Pierluigi <pierluigi88@gmail.com>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=pactools
+pkgver=0.8.2
+pkgrel=1
+pkgdesc="A collection of the best tools for pacman"
+arch=('i686' 'x86_64')
+url="http://pierloz.com/pactools"
+license=("GPL")
+depends=('perl' 'bash' 'python')
+source=(pactools pt-pacman-cage pt-pacman-uncage pt-pacsize \
+pt-deptree pt-pacman-info pt-repolist pt-pacfix)
+
+build() {
+ install -d $pkgdir/usr/bin
+ install -m 755 $srcdir/* $pkgdir/usr/bin
+}
diff --git a/pcr/pactools/pactools b/pcr/pactools/pactools
new file mode 100755
index 000000000..1fe3ddbe8
--- /dev/null
+++ b/pcr/pactools/pactools
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+green() {
+ echo -e "\033[1;32m${1}\033[1;0m"
+ }
+
+red() {
+ echo -e "\033[1;31m${1}\033[1;0m"
+ }
+
+
+echo 'pactools is a set of useful tools for pacman'
+echo
+echo 'Tools installed:'
+echo
+green ' * pt-pacman-cage'
+echo ' by: ody'
+echo ' A script to keep the pacman db in a contiguous as possible'
+echo ' place on your hd to make reading it quicker.'
+echo ' Attention: be sure to have the module loop loaded in rc.conf'
+echo ' WEB: http://bbs.archlinux.org/viewtopic.php?id=20385'
+echo
+green ' * pt-pacman-uncage'
+echo ' by: ody'
+echo ' To uncage your pacman db, after pt-pacman-cage.'
+echo ' Use only if you have problem with pt-pacman-cage and you'
+echo ' want to come back to standard db system'
+echo ' WEB: http://bbs.archlinux.org/viewtopic.php?id=20385'
+echo
+green ' * pt-pacsize'
+echo ' by: hads'
+echo ' How much disk space do my installed packages use?'
+echo ' This script answers to the question.'
+echo ' WEB: http://bbs.archlinux.org/viewtopic.php?id=20971'
+echo
+green ' * pt-deptree'
+echo ' by: skoal'
+echo ' A visual representation of packages dependencies'
+echo ' WEB: http://bbs.archlinux.org/viewtopic.php?id=10283'
+echo
+green ' * pt-pacman-info'
+echo ' by: Pvel Varela Rodrguez [aka NeOnsKuLL]'
+echo ' List the names of configured repos in your pacman.conf'
+echo ' Calculates the total number of available packages'
+echo ' in each repo;'
+echo ' calculates the number of installed packages.'
+echo ' WEB: http://bbs.archlinux.org/viewtopic.php?id=23124'
+echo
+green ' * pt-repolist'
+echo ' by: dtw'
+echo ' Shows installed packages from a certain repo.'
+echo ' USAGE: pt-repolist <reponame> [all]'
+echo ' <reponame> is the repository name'
+echo ' [all] to include also NOT installed packages.'
+echo ' WEB: http://bbs.archlinux.org/viewtopic.php?id=12369'
+echo
+green ' * pt-pacfix'
+echo ' by: pierluigi and fixed by Chris.Giles'
+echo ' A script to list all the packages currently installed,'
+echo ' according to /var/log/pacman.log'
+echo ' WEB: http://bbs.archlinux.org/viewtopic.php?pid=227510'
+echo
+red 'Please remember: pactools comes with NO WARRANTY, use at your own risk'
diff --git a/pcr/pactools/pt-deptree b/pcr/pactools/pt-deptree
new file mode 100755
index 000000000..edb6f538b
--- /dev/null
+++ b/pcr/pactools/pt-deptree
@@ -0,0 +1,54 @@
+#!/bin/sh
+# Pacman Dependency Tree
+# does NOT handle group names -> unexpected results.
+# Package names using aliases, like x-server, should work.
+# Breaks on circular dependencies -> you better hit ctrl-c.
+
+export LC_ALL=en_US
+
+progname=`basename $0`
+pacexec='pacman'
+leafnull='None'
+branch=""
+vbranch="| "
+vprune=" "
+hbranch="+---"
+
+_showdep () {
+
+ # Try to use specific pkg req
+ if $pacexec -Qi $1 &> /dev/null ; then
+ # Grab deps list|from "Depends"|Remove Tag \| specific version req's.
+ deplist=`$pacexec -Qi $1|grep Depends|sed 's/^.*: \|>[^ ]*//g;s/ $//'`
+ else # Oops! Failed on alias, try this...
+ deplist=`$pacexec -Qs $1 | sed '1!d;s/\(^.*\/\)\(.*\)\( .*$\)/\2/'`
+ fi
+
+ [ "x$deplist" = "x$leafnull" ] && return
+
+ while [ -n "$deplist" ]
+ do
+ set -- $deplist && echo "$branch$hbranch$1"
+ if [ $# -gt 1 ] ; then
+ branch=${branch}$vbranch
+ else
+ branch=${branch}$vprune
+ fi
+
+ _showdep $1
+
+ deplist=${*:2}
+ branch=${branch:0:${#branch}-${#vprune}}
+ done
+}
+
+branch=$vprune
+
+for pkg in `$pacexec -Q $1 | sed 's/ .*//'`
+do
+ echo $pkg
+ _showdep $pkg
+done
+
+unset _showdep && set --
+exit 0
diff --git a/pcr/pactools/pt-pacfix b/pcr/pactools/pt-pacfix
new file mode 100755
index 000000000..cd128331e
--- /dev/null
+++ b/pcr/pactools/pt-pacfix
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+#
+# pacfix.py: a script by pierluigi to list all the packages currently installed according to /var/log/pacman.log
+# 2008-07-04: Modified by Chris Giles to prevent failure when "pacman.log" has lines with only two words
+
+
+pkg=[]
+
+logfile = open("/var/log/pacman.log","r")
+log=logfile.readlines()
+for myline in log:
+ myarray = myline.strip("\n").split(" ")
+ if len(myarray) >= 3 :
+ if (myarray[2]=="installed" or myarray[2]=="upgraded"):
+ if (pkg.count(myarray[3])==0):
+ pkg.append(myarray[3])
+ if (myarray[2]=="removed"):
+ if (pkg.count(myarray[3])!=0):
+ pkg.remove(myarray[3])
+pkg.sort()
+for p in pkg:
+ print(p)
diff --git a/pcr/pactools/pt-pacman-cage b/pcr/pactools/pt-pacman-cage
new file mode 100755
index 000000000..f9248e496
--- /dev/null
+++ b/pcr/pactools/pt-pacman-cage
@@ -0,0 +1,152 @@
+#!/bin/bash
+#
+# pacman-cage
+#
+# Copyright (c) 2002-2006 by Andrew Rose <rose.andrew@gmail.com>
+# I used Judds pacman-optimise as a framework.
+#
+# 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.
+#
+
+myver='2.9.8.1'
+dbroot="/var/lib/pacman"
+pacmandb="/var/lib/pacman.db"
+
+usage() {
+ echo "pacman-cage $myver"
+ echo "usage: $0 pacman_db_size(MB)"
+ echo
+ echo "pacman-cage creates a loopbacked filesystem in a contigious file."
+ echo "This will give better response times when using pacman"
+ echo "A safe value for pacman_db_size should be > 40"
+ echo
+ echo "If you are unsure, use this:"
+ echo " $0 60"
+ echo
+}
+
+die() {
+ echo "pacman-cage: $*" >&2
+ exit 1
+}
+
+die_r() {
+ rm -f /tmp/pacman.lck
+ die $*
+}
+
+loop_check=`zcat /proc/config.gz | grep CONFIG_BLK_DEV_LOOP | cut -d\= -f2`
+
+if [ "$loop_check" == "m" ]; then
+ if [ `lsmod | grep loop | cut -d\ -f1` != "loop" ]; then
+ echo "Error. You have to load the module 'loop' in rc.conf."
+ exit 1
+ fi
+fi
+
+if [ "$loop_check" == "CONFIG_BLK_DEV_LOOP" ]; then
+ echo "Error. Your kernel config doesn't include CONFIG_BLK_DEV_LOOP."
+ exit 1
+fi
+
+
+if [ "$#" != "1" ]; then echo "wrong number of parameters" 1>&2 ; usage; exit 0; fi
+
+if [ "$1" != "" ]; then
+ if [ "$1" = "-h" -o "$1" = "--help" ]; then
+ usage
+ exit 0
+ fi
+ dbsize=$1
+fi
+
+if [ "`id -u`" != 0 ]; then
+ die "You must be root to cage the database"
+fi
+
+# make sure pacman isn't running
+if [ -f /tmp/pacman.lck ]; then
+ die "Pacman lockfile was found. Cannot run while pacman is running."
+fi
+# make sure pacman.db hasnt already been made
+if [ -f $pacmandb ]; then
+ die "$pacmandb already exists!."
+fi
+
+if [ ! -d $dbroot ]; then
+ die "$dbroot does not exist or is not a directory"
+fi
+
+# don't let pacman run while we do this
+touch /tmp/pacman.lck
+
+# step 1: sum the old db
+echo "==> md5sum'ing the old database..."
+find $dbroot -type f | sort | xargs md5sum >/tmp/pacsums.old
+
+echo "==> creating pacman.db loopback file..."
+dd if=/dev/zero of=$pacmandb bs=1M count=$dbsize > /dev/null 2>&1
+
+echo "==> creating ext2 -O dir_index -b 1024 -m 0 on $pacmandb..."
+yes | mkfs.ext2 -O dir_index -b 1024 -i 1024 -m 0 -F $pacmandb > /dev/null 2>&1
+
+echo "==> creating temporary mount point /mnt/tmp-pacman.."
+mkdir /mnt/tmp-pacman
+
+echo "==> mounting pacman.db to temporary mount point..."
+mount -o loop $pacmandb /mnt/tmp-pacman
+
+echo "==> copying pacman database to temporary mount point..."
+cp -a /var/lib/pacman/. /mnt/tmp-pacman
+
+echo "==> unmounting temporary mount point..."
+umount /mnt/tmp-pacman
+
+echo "==> removing temporary mount point..."
+rmdir /mnt/tmp-pacman
+
+echo "==> moving old /var/lib/pacman to /var/lib/pacman.bak..."
+mv /var/lib/pacman /var/lib/pacman.bak
+
+echo "==> createing new pacman db mount point @ $dbroot..."
+mkdir $dbroot
+
+echo "==> Mounting new pacman db..."
+mount -o loop $pacmandb $dbroot
+
+echo "==> md5sum'ing the new database..."
+find $dbroot -type f | sort | xargs md5sum >/tmp/pacsums.new
+
+echo "==> checking integrity..."
+diff /tmp/pacsums.old /tmp/pacsums.new >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ # failed, move the old one back into place
+ umount $dbroot
+ rm $pacmandb
+ mv $dbroot.bak $dbroot
+ die_r "integrity check FAILED, reverting to old database"
+fi
+
+echo "==> Updating /etc/fstab to reflect changes..."
+echo "$pacmandb $dbroot ext2 loop,defaults 0 0" >> /etc/fstab
+
+rm -f /tmp/pacman.lck /tmp/pacsums.old /tmp/pacsums.new
+
+echo
+echo "Finished. Your pacman database has been caged!. May the speedy pacman be with you."
+echo
+
+exit 0
diff --git a/pcr/pactools/pt-pacman-info b/pcr/pactools/pt-pacman-info
new file mode 100755
index 000000000..c2c82f219
--- /dev/null
+++ b/pcr/pactools/pt-pacman-info
@@ -0,0 +1,77 @@
+#!/bin/sh
+# pacman-info
+# /usr/bin/pacman-info
+# GPL v2
+# neonskull [at] gmail.com
+
+VERSION="0.1"
+AUTHOR="Pvel Varela Rodrguez [aka NeOnsKuLL]"
+
+usage()
+{
+echo "pacman-info v$VERSION"
+echo "usage: `basename $0` [OPTION]
+
+OPTIONS:
+ -cr|--configured-repos List the names of configured repos in your
+ pacman.conf
+
+ -a|--all Calculates the total number of available
+ packages in your repos
+
+ -br|--by-repo Calculates the total number of available
+ packages in each repo
+
+ -i|--installed Calculates the number of installed packages
+
+ -f|--full Generates a full Report
+
+ -h|--help Show this message
+
+ -v|--version Show version
+"
+}
+
+[ "$#" -lt 1 ] && PARAM="-h";
+[ "$#" -gt 1 ] && PARAM="*";
+[ "$#" -eq 1 ] && PARAM="$1";
+
+case $PARAM in
+ "-a"|"--all")
+ echo -e "Repositories information (total of packages in repos): `pacman -Sl|wc -l`"
+ ;;
+ "-cr"|"--configured-repos")
+ echo "Repositories information (name of configured repos):"
+ pacman -Sl|awk '{print $1}'|cut -d"/" -f 2|uniq -c|awk '{print "* " $2}'
+ ;;
+ "-br"|"--by-repo")
+ echo "Repositories information (number of packages by repo):"
+ pacman -Sl|awk '{print $1}'|cut -d"/" -f 2|uniq -c|awk '{print ":: "$2 "\t-> " $1 "\tpkgs"}'
+ ;;
+ "-i"|"--installed")
+ echo -e "System information (total of installed packages): `pacman -Q|wc -l`"
+ ;;
+ "-f"|"--full")
+ echo -e "Full Report about Repositories and Packages for Archlinux"
+ echo -e "Node name: `uname -n`\n"
+ $0 -cr
+ echo
+ $0 -a
+ echo
+ $0 -br
+ echo
+ $0 -i
+ echo
+ echo -e "Generated using `$0 -v` by $AUTHOR"
+ ;;
+ "-h"|"--help")
+ usage
+ ;;
+ "-v"|"--version")
+ echo "`basename $0` v$VERSION"
+ ;;
+ *)
+ echo "Error! Unknown parameter."
+ usage
+ ;;
+esac
diff --git a/pcr/pactools/pt-pacman-uncage b/pcr/pactools/pt-pacman-uncage
new file mode 100755
index 000000000..12b7e41d3
--- /dev/null
+++ b/pcr/pactools/pt-pacman-uncage
@@ -0,0 +1,108 @@
+
+#!/bin/bash
+#
+# pacman-uncage
+#
+# Copyright (c) 2002-2006 by Andrew Rose <rose.andrew@gmail.com>
+# I used Judds pacman-optimise as a framework.
+#
+# 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.
+#
+
+myver='2.9.8'
+dbroot="/var/lib/pacman"
+tmproot="/var/lib/pacman.new"
+pacmandb="/var/lib/pacman.db"
+
+usage() {
+ echo "pacman-uncage $myver"
+ echo "usage: $0 [pacman_db_root]"
+ echo
+ echo "pacman-uncage returns your pacman db to the generic style."
+ echo
+}
+
+die() {
+ echo "pacman-uncage: $*" >&2
+ exit 1
+}
+
+die_r() {
+ rm -f /tmp/pacman.lck
+ die $*
+}
+
+if [ "$1" != "" ]; then
+ if [ "$1" = "-h" -o "$1" = "--help" ]; then
+ usage
+ exit 0
+ fi
+ dbroot=$1
+fi
+
+if [ "`id -u`" != 0 ]; then
+ die "You must be root to uncage the database"
+fi
+
+# make sure pacman isn't running
+if [ -f /tmp/pacman.lck ]; then
+ die "Pacman lockfile was found. Cannot run while pacman is running."
+fi
+
+if [ ! -d $dbroot ]; then
+ die "$dbroot does not exist or is not a directory"
+fi
+
+# don't let pacman run while we do this
+touch /tmp/pacman.lck
+
+# step 1: sum the old db
+echo "==> md5sum'ing the old database..."
+find $dbroot -type f | sort | xargs md5sum >/tmp/pacsums.old
+
+echo "==> copying pacman.db contents back, note: the time needed to get a brew is now."
+mkdir $tmproot
+cp -a $dbroot/. $tmproot
+
+echo "==> unmounting old dbroot and moving new one in"
+umount $dbroot
+rmdir $dbroot
+mv $tmproot $dbroot
+
+echo "==> md5sum'ing the new database..."
+find $dbroot -type f | sort | xargs md5sum >/tmp/pacsums.new
+
+echo "==> checking integrity..."
+diff /tmp/pacsums.old /tmp/pacsums.new >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ # failed, move the old one back into place
+ rm -rf $dbroot
+ mkdir $dbroot
+ mount -a
+ die_r "integrity check FAILED, reverting to old database"
+fi
+
+echo "==> Removing old pacman.db"
+rm $pacmandb
+
+rm -f /tmp/pacman.lck /tmp/pacsums.old /tmp/pacsums.new
+
+echo
+echo "Finished. Your pacman database has been uncaged!. Welcome home."
+echo "You will need to remove the old mount line from your /etc/fstab"
+echo
+
+exit 0
diff --git a/pcr/pactools/pt-pacsize b/pcr/pactools/pt-pacsize
new file mode 100755
index 000000000..e70a34597
--- /dev/null
+++ b/pcr/pactools/pt-pacsize
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+##AUTHOR: hads
+##See: http://bbs.archlinux.org/viewtopic.php?t=20971
+
+for i in /var/lib/pacman/local/*; do
+ PKG=`echo $i | cut -d '/' -f 6`
+ SIZE=`grep -A 1 SIZE $i/desc | tail -1`
+ if [ -x /usr/bin/bc ]; then
+ if [ $SIZE -gt 1024 ]; then
+ if [ $SIZE -gt 1048576 ]; then
+ SIZE=`echo "scale=1;$SIZE/1048576" | bc`M
+ else
+ SIZE=`echo "scale=1;$SIZE/1024" | bc`K
+ fi
+ else
+ SIZE={$SIZE}B
+ fi
+ fi
+ echo "$PKG | $SIZE"
+done
diff --git a/pcr/pactools/pt-repolist b/pcr/pactools/pt-repolist
new file mode 100755
index 000000000..5f15fe462
--- /dev/null
+++ b/pcr/pactools/pt-repolist
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+pacman -Qi >./all_files
+
+if [ -z "$1" ] ; then
+ echo -e "\033[0;37mNo repo given!"
+ echo " usage: scriptname reponame"
+fi
+
+reponame=$1
+list=$1_list
+pacman -Sl $reponame >./$list
+sed -i "s|\$reponame |g|" ./$list
+repo=`cat ./$list | cut --fields 2 --delim " "`
+
+for pkg in $repo ; do
+ if [[ $(cat ./all_files | grep -w "$pkg") ]] ; then
+ echo -e "\033[0;34m$pkg\033[0;37m is installed"
+ echo "$pkg" >>./installed_files
+ elif [ "$2" == "all" ] ; then
+ echo -e "\033[0;31m$pkg\033[0;37m is NOT installed"
+ fi
+done
+
+echo
+echo -n "Would you like to save the names of these pkgs to a file? (Y/n) "
+read choice
+if [ "$choice" == "Y" -o "$choice" == "y" ] ; then
+ echo "Currently in `pwd`"
+ echo -n " Save as: "
+ read filename
+ if [ -z $filename ] ; then
+ echo "No name given saved as ./installed_files_$reponame"
+ cp -u ./installed_files ./installed_files_$reponame
+ else
+ cp -u ./installed_files $filename
+ fi
+ rm ./installed_files
+else
+ rm ./installed_files
+fi
+rm ./$list ./all_files
diff --git a/pcr/perl-file-find-rule/PKGBUILD b/pcr/perl-file-find-rule/PKGBUILD
new file mode 100644
index 000000000..7953217a3
--- /dev/null
+++ b/pcr/perl-file-find-rule/PKGBUILD
@@ -0,0 +1,27 @@
+# Contributor: Blaž Tomažič <blaz.tomazic@gmail.com>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=perl-file-find-rule
+_realname=File-Find-Rule
+pkgver=0.33
+pkgrel=1
+pkgdesc="Perl/CPAN Module File::Find::Rule."
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://search.cpan.org/dist/File-Find-Rule/"
+depends=('perl-text-glob' 'perl-number-compare' 'perl')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/R/RC/RCLAMP/${_realname}-${pkgver}.tar.gz)
+
+build() {
+ cd $startdir/src/${_realname}-$pkgver
+ # install module in vendor directories.
+ 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/pcr/perl-iptables-chainmgr/PKGBUILD b/pcr/perl-iptables-chainmgr/PKGBUILD
new file mode 100644
index 000000000..e45a1faf3
--- /dev/null
+++ b/pcr/perl-iptables-chainmgr/PKGBUILD
@@ -0,0 +1,22 @@
+# Contributor: Weirch Sodora <sodora@gmail.com>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.IO>
+
+pkgname=perl-iptables-chainmgr
+pkgver=1.2
+pkgrel=1
+pkgdesc="IPTables::ChainMgr - Perl extension for manipulating iptables and ip6tables policies"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/~mrash/IPTables-ChainMgr/"
+license=('GPL' 'PerlArtistic')
+depends=('perl' 'iptables' 'perl-iptables-parse>=0.9' 'perl-netaddr-ip>=4.0')
+options=('!emptydirs')
+source=(http://search.cpan.org/CPAN/authors/id/M/MR/MRASH/IPTables-ChainMgr-$pkgver.tar.gz)
+
+build() {
+ cd $startdir/src/IPTables-ChainMgr-$pkgver
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make install DESTDIR=$startdir/pkg || return 1
+ find $startdir/pkg -name '.packlist' -delete
+ find $startdir/pkg -name '*.pod' -delete
+}
diff --git a/pcr/perl-number-compare/PKGBUILD b/pcr/perl-number-compare/PKGBUILD
new file mode 100644
index 000000000..64566aa10
--- /dev/null
+++ b/pcr/perl-number-compare/PKGBUILD
@@ -0,0 +1,27 @@
+# Contributor: Blaž Tomažič <blaz.tomazic@gmail.com>
+# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io>
+
+pkgname=perl-number-compare
+_realname=Number-Compare
+pkgver=0.03
+pkgrel=1
+pkgdesc="Perl/CPAN Module Number::Compare."
+arch=('i686' 'x86_64')
+license=('unknown')
+url="http://search.cpan.org/dist/Number-Compare/"
+depends=('perl')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/R/RC/RCLAMP/${_realname}-${pkgver}.tar.gz)
+
+build() {
+ cd $startdir/src/${_realname}-$pkgver
+ # install module in vendor directories.
+ 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/pcr/perl-text-glob/PKGBUILD b/pcr/perl-text-glob/PKGBUILD
new file mode 100644
index 000000000..194ab831c
--- /dev/null
+++ b/pcr/perl-text-glob/PKGBUILD
@@ -0,0 +1,51 @@
+# CPAN Name : Text-Glob
+# Contributor: Alan Young <harleypig@gmail.com>
+# Generator : CPANPLUS::Dist::Arch 1.21
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname='perl-text-glob'
+pkgver='0.09'
+pkgrel='2'
+pkgdesc="match globbing patterns against text"
+arch=('any')
+license=('PerlArtistic' 'GPL')
+options=('!emptydirs')
+depends=('perl')
+makedepends=()
+url='http://search.cpan.org/dist/Text-Glob'
+source=('http://search.cpan.org/CPAN/authors/id/R/RC/RCLAMP/Text-Glob-0.09.tar.gz')
+md5sums=('1daa10e087f891c49b720a5c551a024b')
+sha512sums=('9b729e4ece88ad79e1b637c7f35e5e1ecae3fd7f62c408ed4f3fcac2e8e8afff32d7d805e1b0269800aada5ae609d03335d42ac54def2797d301e91fa488ae47')
+_distdir="${srcdir}/Text-Glob-0.09"
+
+build() {
+ ( export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
+ PERL_AUTOINSTALL=--skipdeps \
+ PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
+ PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
+ MODULEBUILDRC=/dev/null
+
+ cd "$_distdir"
+ /usr/bin/perl Build.PL
+ /usr/bin/perl Build
+ )
+}
+
+check() {
+ cd "$_distdir"
+ ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
+ /usr/bin/perl Build test
+ )
+}
+
+package() {
+ cd "$_distdir"
+ /usr/bin/perl Build install
+ find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
+}
+
+# Local Variables:
+# mode: shell-script
+# sh-basic-offset: 2
+# End:
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/perl-unix-syslog/PKGBUILD b/pcr/perl-unix-syslog/PKGBUILD
new file mode 100644
index 000000000..5f4acd962
--- /dev/null
+++ b/pcr/perl-unix-syslog/PKGBUILD
@@ -0,0 +1,33 @@
+# Contributor: Justin Davis <jrcd83@gmail.com>
+# Generator : CPANPLUS::Dist::Arch 1.04
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.IO>
+
+pkgname='perl-unix-syslog'
+pkgver='1.1'
+pkgrel='1'
+pkgdesc="Interface to syslog functions in a C-library"
+arch=('any')
+license=('PerlArtistic' 'GPL')
+options=('!emptydirs')
+depends=('glibc>=2.12.1' 'perl')
+url='http://search.cpan.org/dist/Unix-Syslog'
+source=('http://search.cpan.org/CPAN/authors/id/M/MH/MHARNISCH/Unix-Syslog-1.1.tar.gz')
+
+build() {
+ PERL=/usr/bin/perl
+ DIST_DIR="${srcdir}/Unix-Syslog-1.1"
+ export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
+ PERL_AUTOINSTALL=--skipdeps \
+ PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
+ PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
+ MODULEBUILDRC=/dev/null
+
+ { cd "$DIST_DIR" &&
+ $PERL Makefile.PL &&
+ make &&
+ make test &&
+ make install;
+ } || return 1;
+
+ find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
+}
diff --git a/pcr/psad/PKGBUILD b/pcr/psad/PKGBUILD
new file mode 100644
index 000000000..145625e89
--- /dev/null
+++ b/pcr/psad/PKGBUILD
@@ -0,0 +1,66 @@
+# Maintainer: Artur Wojcik <xartii at gmail dot com>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.IO>
+
+pkgname=psad
+pkgver=2.2
+pkgrel=2
+pkgdesc="A collection of three lightweight system daemons (two main daemons and one helper daemon) that run on Linux machines and analyze iptables log messages to detect port scans and other suspicious traffic"
+arch=('i686 x86_64')
+url="http://cipherdyne.org/psad/"
+license=('GPL')
+depends=('perl-bit-vector' 'perl-date-calc' 'perl-iptables-chainmgr' 'perl-iptables-parse' 'perl-net-ipv4addr' 'perl-storable' 'perl-unix-syslog' 'net-tools')
+source=("http://cipherdyne.org/psad/download/$pkgname-$pkgver.tar.gz" "responses" "psad-sysvinit.archlinux" "psad-systemdinit.archlinux" "psad.patch1")
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ cp $srcdir/psad-sysvinit.archlinux init-scripts/psad-init.archlinux
+ if [ ! -e responses ]; then
+ ln $srcdir/responses responses -s;
+ fi
+ patch -p1 -i $srcdir/psad.patch1
+
+ #Create the dirs it will need to make the program
+ mkdir -p $pkgdir/etc/psad \
+ $pkgdir/etc/rc.d \
+ $pkgdir/usr/bin \
+ $pkgdir/usr/sbin \
+ $pkgdir/usr/share/man/man8 \
+ $pkgdir/var/lib/psad \
+ $pkgdir/var/log/psad \
+ $pkgdir/var/run/psad \
+ $pkgdir/usr/lib/psad \
+ $pkgdir/usr/lib/systemd/system
+ #Set the config dirs
+ sed -e "s|'/usr/sbin'|'$pkgdir/usr/sbin'|" \
+ -e "s|'/usr/bin'|'$pkgdir/usr/bin'|" \
+ -e "s|my \$mpath = \"/usr/share/man/man\$section\";|my \$mpath = \"$pkgdir/usr/share/man/man\$section\";|" \
+ ./install.pl -i
+ sed -e "s|/var/log/psad|$pkgdir&|" \
+ -e "s|/var/run/psad|$pkgdir&|" \
+ -e "s|/var/lib/psad|$pkgdir&|" \
+ -e "s|/usr/lib/psad|$pkgdir&|" \
+ -e "s|/etc/psad|$pkgdir&|" \
+ -e "s|/usr/bin/whois_psad|$pkgdir&|" \
+ -e "s|/usr/sbin/fwcheck_psad|$pkgdir&|" \
+ -e "s|/usr/sbin/psadwatchd|$pkgdir&|" \
+ -e "s|/usr/sbin/kmsgsd|$pkgdir&|" \
+ -e "s|/usr/sbin/psad|$pkgdir&|" \
+ ./psad.conf -i
+
+ #hope that things work
+ ./install.pl --init-dir "$pkgdir/etc/rc.d/" < responses
+
+ #add the systemd service file
+ cp $srcdir/psad-systemdinit.archlinux $pkgdir/usr/lib/systemd/system/psad.service
+
+ # Fix the config
+ sed -e "s|$pkgdir||" $pkgdir/etc/psad/psad.conf -i
+ sed -e "s|$pkgdir||" $pkgdir/var/log/psad/install.log -i
+
+ #Set correct permissions
+ chmod 0700 $pkgdir/var/lib/psad
+
+
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/psad/psad-systemdinit.archlinux b/pcr/psad/psad-systemdinit.archlinux
new file mode 100644
index 000000000..991aa7423
--- /dev/null
+++ b/pcr/psad/psad-systemdinit.archlinux
@@ -0,0 +1,12 @@
+[Unit]
+Description=Port scan attack detector
+After=iptables.service
+
+[Service]
+ExecStart=/usr/sbin/psad
+ExecStop=/usr/sbin/psad --Kill
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pcr/psad/psad-sysvinit.archlinux b/pcr/psad/psad-sysvinit.archlinux
new file mode 100644
index 000000000..6b4e76042
--- /dev/null
+++ b/pcr/psad/psad-sysvinit.archlinux
@@ -0,0 +1,52 @@
+#!/bin/bash
+#
+# Startup script for psad
+#
+# chkconfig: 345 99 05
+# description: The Port Scan Attack Detector (psad)
+# processname: psad
+# pidfile: /var/run/psad.pid
+# config: /etc/psad/psad.conf
+#
+# $Id: psad-init.archlinux
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/sshd
+
+PID=`cat /var/run/psad.pid`
+# See how we were called.
+case "$1" in
+start)
+ stat_busy "Starting psad"
+ [ -z "$PID" ] && /usr/sbin/psad
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ #let psad take care of the pid; we don't need to
+ add_daemon psad
+ stat_done
+ fi
+ ;;
+stop)
+ stat_busy "Stopping psad"
+ /usr/sbin/psad --Kill
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ #let psad take care of the pid; we don't need to
+ rm_daemon psad
+ stat_done
+ fi
+ ;;
+status)
+ /usr/sbin/psad --Status
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+*)
+ echo "Usage: psad {start|stop|status|restart}"
+ exit 1
+esac
diff --git a/pcr/psad/psad.patch1 b/pcr/psad/psad.patch1
new file mode 100644
index 000000000..98ddd9a60
--- /dev/null
+++ b/pcr/psad/psad.patch1
@@ -0,0 +1,37 @@
+--- psad-2.2/install.pl 2012-04-21 04:43:46.000000000 +0200
++++ psad-2.2/install.pl 2012-10-13 16:05:03.302818330 +0200
+@@ -752,6 +752,8 @@
+ $init_file = 'init-scripts/psad-init.fedora';
+ } elsif ($distro eq 'gentoo') {
+ $init_file = 'init-scripts/psad-init.gentoo';
++ } elsif ($distro eq 'archlinux') {
++ $init_file = 'init-scripts/psad-init.archlinux';
+ } else {
+ $init_file = 'init-scripts/psad-init.generic';
+ }
+@@ -773,13 +775,14 @@
+ if ($preserve_rv) {
+ &logr("\n[+] psad has been installed (with your original config merged).\n");
+ } else {
+- &logr("\n[+] psad has been installed.\n");
++ &logr("\n[+] psad has been compiled.\n");
++ &logr("\n[+] use pacman -U to install.\n");
+ }
+ if ($installed_init_script) {
+ if ($init_dir) {
+- &logr("\n[+] To start psad, run \"${init_dir}/psad start\"\n");
++ #&logr("\n[+] To start psad, run \"${init_dir}/psad start\"\n");
+ } else {
+- &logr("\n[+] To start psad, run ${USRSBIN_DIR}/psad\"\n");
++ #&logr("\n[+] To start psad, run ${USRSBIN_DIR}/psad\"\n");
+ }
+ }
+
+@@ -1748,6 +1751,7 @@
+
+ sub get_distro() {
+ return 'gentoo' if -e '/etc/gentoo-release';
++ return 'archlinux' if -e '/etc/archlinux-release';
+ if (-e '/etc/issue') {
+ ### Red Hat Linux release 6.2 (Zoot)
+ open ISSUE, '< /etc/issue' or
diff --git a/pcr/psad/responses b/pcr/psad/responses
new file mode 100644
index 000000000..715dfaf1a
--- /dev/null
+++ b/pcr/psad/responses
@@ -0,0 +1,7 @@
+n
+n
+y
+n
+n
+n
+
diff --git a/pcr/pulledpork/PKGBUILD b/pcr/pulledpork/PKGBUILD
new file mode 100644
index 000000000..db7aa9d0d
--- /dev/null
+++ b/pcr/pulledpork/PKGBUILD
@@ -0,0 +1,19 @@
+# Contributor: Isaac C. Aronson <i@pingas.org>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=pulledpork
+pkgver=0.6.1
+pkgrel=3
+pkgdesc="Tool to automatically update rules for snort"
+arch=('any')
+url="http://code.google.com/p/pulledpork"
+license=('GPL')
+depends=('perl' 'perl-lwp-protocol-https' 'perl-crypt-ssleay' 'perl-archive-tar' 'perl-switch')
+optdepends=('snort')
+source=(http://pulledpork.googlecode.com/files/pulledpork-0.6.1.tar.gz)
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ install -Dm644 etc/pulledpork.conf $pkgdir/etc/pulledpork.conf
+ install -Dm755 pulledpork.pl $pkgdir/usr/sbin/pulledpork.pl
+}
diff --git a/pcr/python2-empy/PKGBUILD b/pcr/python2-empy/PKGBUILD
new file mode 100644
index 000000000..3c4cd7bee
--- /dev/null
+++ b/pcr/python2-empy/PKGBUILD
@@ -0,0 +1,20 @@
+# Contributor: Andrew Conkling <andrewski@fr.st>
+# Contributor: hauptmech <hauptmech@gmail.com>
+# Maintainer : Parabola GNU / LInux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=python2-empy
+realname=empy
+pkgver=3.3
+pkgrel=2
+pkgdesc="A powerful and robust templating system for Python."
+arch=(i686 x86_64)
+url="http://www.alcyone.com/software/empy"
+depends=('python2')
+license=('LGPL')
+source=("http://www.alcyone.com/software/empy/empy-$pkgver.tar.gz")
+
+build() {
+ cd $startdir/src/empy-$pkgver
+ python2 setup.py install --prefix=$startdir/pkg/usr
+}
+
diff --git a/pcr/python2-rospkg/PKGBUILD b/pcr/python2-rospkg/PKGBUILD
new file mode 100644
index 000000000..cf6116ba0
--- /dev/null
+++ b/pcr/python2-rospkg/PKGBUILD
@@ -0,0 +1,23 @@
+# Contributor: Somebody <somebody[at]foo[dot]tld>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+_name=rospkg
+pkgname=python2-rospkg
+pkgver=1.0.15
+pkgrel=1
+pkgdesc="provides basic utilities for querying information about ROS packages, stacks, and distributions."
+url="http://ros.org/doc/api/rospkg/html/python_api.html"
+arch=('x86_64' 'i686')
+license=('BSD')
+depends=('python2')
+optdepends=()
+makedepends=('python2-distribute')
+conflicts=()
+replaces=()
+backup=()
+source=(http://pr.willowgarage.com/downloads/${_name}/${_name}-${pkgver}.tar.gz)
+
+build() {
+ cd ${srcdir}/${_name}-${pkgver}
+ find -type f -print0 | xargs -0 sed -i -e 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/env python2/g'
+ python2 setup.py install --root="${pkgdir}" --optimize=1 || return 1
+}
diff --git a/pcr/rosinstall/PKGBUILD b/pcr/rosinstall/PKGBUILD
new file mode 100644
index 000000000..3f91dbe6c
--- /dev/null
+++ b/pcr/rosinstall/PKGBUILD
@@ -0,0 +1,21 @@
+# Contributor: Georg Bremer <pkgbuild@dschoordsch.de>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgdesc='Tool to download/boostrap the ROS stack'
+url='http://www.ros.org/'
+
+pkgname='rosinstall'
+pkgver='0.6.20'
+pkgrel='1'
+arch=('i686' 'x86_64')
+license=('BSD')
+depends=('python2' 'cmake' 'wget' 'vcstools'
+ 'git' 'python2-distribute' 'python2-yaml')
+
+source=("http://pr.willowgarage.com/downloads/$pkgname/$pkgname-$pkgver.tar.gz")
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's/env python /env python2 /' src/rosinstall/setupfiles.py
+ python2 setup.py install --root=$pkgdir --optimize=1
+}
diff --git a/pcr/snort/PKGBUILD b/pcr/snort/PKGBUILD
new file mode 100644
index 000000000..2439a1c73
--- /dev/null
+++ b/pcr/snort/PKGBUILD
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 78820 2012-10-25 06:47:28Z foutrelis $
+# Contributor: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Hugo Doria <hugo@archlinux.org>
+# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
+# Contributor: dorphell <dorphell@archlinux.org>
+# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=snort
+pkgver=2.9.3.1
+pkgrel=1
+pkgdesc='A lightweight network intrusion detection system.'
+arch=('i686' 'x86_64')
+url='http://www.snort.org'
+license=('GPL')
+depends=('libdaq' 'libdnet' 'libpcap' 'pcre' 'zlib')
+makedepends=('ca-certificates')
+backup=('etc/conf.d/snort'
+ 'etc/snort/snort.conf'
+ 'etc/snort/threshold.conf'
+ 'etc/snort/confreference.config'
+ 'etc/snort/classification.config')
+options=('!makeflags' '!libtool')
+install='snort.install'
+source=("http://www.snort.org/dl/snort-current/${pkgname}-${pkgver}.tar.gz"{,.sig}
+ 'snort'
+ 'snort.conf.d')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr --sysconfdir=/etc/snort --with-libpcap-includes=/usr/include/pcap \
+ --without-mysql --without-postgresql --without-oracle --without-odbc --enable-zlib \
+ --enable-ipv6
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ mkdir -p "${pkgdir}/"{etc/rc.d,etc/snort/rules}
+
+ install -d -m755 "${pkgdir}/var/log/snort"
+ install -D -m644 etc/{*.conf*,*.map} "${pkgdir}/etc/snort/"
+ install -D -m644 "${srcdir}/snort.conf.d" "${pkgdir}/etc/conf.d/snort"
+ install -D -m755 "${srcdir}/snort" "${pkgdir}/etc/rc.d/snort"
+
+ sed -i 's#/usr/local/lib/#/usr/lib/#' "${pkgdir}/etc/snort/snort.conf"
+}
diff --git a/pcr/snort/snort b/pcr/snort/snort
new file mode 100644
index 000000000..5dfa72fbf
--- /dev/null
+++ b/pcr/snort/snort
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# source application-specific settings
+[ -f /etc/conf.d/snort ] && . /etc/conf.d/snort
+
+PID=`pidof -o %PPID /usr/bin/snort`
+case "$1" in
+ start)
+ stat_busy "Starting Intrusion Database System: SNORT"
+ [ -z "$PID" ] && /usr/bin/snort ${SNORT_OPTIONS} -u ${USER} -g ${GROUP} \
+ -i ${INTERFACE} -c ${SNORT_CONF}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon snort
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping Intrusion Database System: SNORT"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon snort
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/pcr/snort/snort.conf.d b/pcr/snort/snort.conf.d
new file mode 100644
index 000000000..86b566abc
--- /dev/null
+++ b/pcr/snort/snort.conf.d
@@ -0,0 +1,21 @@
+#
+# Parameters to be passed to snort
+#
+
+# options taken from Fedora
+# http://cvs.fedoraproject.org/viewcvs/devel/snort/sysconfig.snort?rev=1.2&view=markup
+
+# Where is the snort.conf file.
+SNORT_CONF="/etc/snort/snort.conf"
+
+# What user account should we run under.
+USER="snort"
+
+# What group account should we run under.
+GROUP="snort"
+
+# define the interface we listen on
+INTERFACE="eth0"
+
+# If you are using prelude, delete the '-A fast' option
+SNORT_OPTIONS="-A fast -b -l /var/log/snort -D -p"
diff --git a/pcr/snort/snort.install b/pcr/snort/snort.install
new file mode 100644
index 000000000..673f22c6c
--- /dev/null
+++ b/pcr/snort/snort.install
@@ -0,0 +1,26 @@
+post_install() {
+ getent group snort >/dev/null || usr/sbin/groupadd -g 29 snort
+ getent passwd snort >/dev/null || usr/sbin/useradd -c 'Snort user' -u 29 -g snort -d /var/log/snort -s /bin/false snort
+ usr/bin/passwd -l snort &>/dev/null
+
+ [ -f var/log/snort/alert ] || : >var/log/snort/alert
+ chown snort.snort var/log/snort/ -R
+
+cat << _EOF
+
+>>> You have to edit the HOME_NET variable in the /etc/snort/snort.conf file to reflect your local network.
+>>> If you do not change it, snort may not work.
+
+_EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/userdel snort &>/dev/null
+ usr/sbin/groupdel snort &>/dev/null
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/ttf-roboto/PKGBUILD b/pcr/ttf-roboto/PKGBUILD
new file mode 100644
index 000000000..9085985d7
--- /dev/null
+++ b/pcr/ttf-roboto/PKGBUILD
@@ -0,0 +1,25 @@
+# Maintainer: Michael Düll <mail@akurei.me> PGP-Key: D6777412 - Fingerprint: C972 8B50 9411 BBE1 5CA5 9906 5103 71F3 D677 7412
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=ttf-roboto
+pkgver=20121102
+pkgrel=1
+pkgdesc='The new system font of Android 4, Codename "Ice Cream Sandwich".'
+arch=('any')
+license=('APACHE')
+url="https://developer.android.com/design/style/typography.html"
+depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')
+install=$pkgname.install
+source=(
+ "https://developer.android.com/downloads/design/Roboto_Hinted_20120823.zip"
+)
+
+package()
+{
+ install -d $pkgdir/usr/share/fonts/TTF/
+ install -m644 *.ttf $pkgdir/usr/share/fonts/TTF/
+ install -d $pkgdir/usr/share/licenses/$pkgname/
+ install -m644 $srcdir/COPYING.txt $pkgdir/usr/share/licenses/$pkgname/
+}
+
+sha512sums=('ce4af34d0a23dd4076d033dcb03f17335eb83317da72b45257291be3aa34ff589405bfdfb768faca769d401a9091b63e5f195704ed69874d7d17289ca436a785')
diff --git a/pcr/ttf-roboto/ttf-roboto.install b/pcr/ttf-roboto/ttf-roboto.install
new file mode 100644
index 000000000..7dde94b45
--- /dev/null
+++ b/pcr/ttf-roboto/ttf-roboto.install
@@ -0,0 +1,15 @@
+post_install() {
+ echo -n "Updating font cache... "
+ fc-cache -f > /dev/null
+ mkfontscale /usr/share/fonts/TTF
+ mkfontdir /usr/share/fonts/TTF
+ echo "done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/pcr/vcstools/PKGBUILD b/pcr/vcstools/PKGBUILD
new file mode 100644
index 000000000..3eb123ffa
--- /dev/null
+++ b/pcr/vcstools/PKGBUILD
@@ -0,0 +1,33 @@
+# Contributor: Georg Bremer <pkgbuild@dschoordsch.de>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+pkgname=('vcstools')
+pkgver=0.1.24
+pkgrel=1
+pkgdesc=""
+arch=('any')
+url="http://ros.org/"
+license=('BSD')
+groups=()
+depends=('python2' 'python2-yaml' 'python2-distribute')
+makedepends=()
+optdepends=()
+provides=()
+conflicts=()
+replaces=()
+backup=()
+options=()
+install=
+source=("http://pr.willowgarage.com/downloads/vcstools/vcstools-$pkgver.tar.gz")
+
+noextract=()
+
+build() {
+ echo ""
+}
+
+package() {
+ cd "$srcdir/vcstools-$pkgver"
+ python2 setup.py install --root "$pkgdir"
+}
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/vuurmuur/PKGBUILD b/pcr/vuurmuur/PKGBUILD
new file mode 100644
index 000000000..8aed82655
--- /dev/null
+++ b/pcr/vuurmuur/PKGBUILD
@@ -0,0 +1,139 @@
+# vim:set ts=2 sw=2 et ft=sh tw=100: expandtab
+# Contributor: Piotr Rogoża <rogoza dot piotr at gmail dot com>
+# Contributor: skydrome <skydrome@i2pmail.org>
+# Contributor: Valere Monseur <valere_monseur@hotmail.com>
+# Contributor: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
+# Contributor: (asper, noob
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.IO>
+
+pkgname=vuurmuur
+_pkgname=Vuurmuur
+pkgver=0.7
+pkgrel=1
+pkgdesc='powerful front-end for iptables aimed at system-administrators who need a decent firewall, but dont have netfilter specific knowledge'
+arch=('i686' 'x86_64')
+url='http://www.vuurmuur.org'
+license=('GPL')
+install='vuurmuur.install'
+depends=('iptables' 'ncurses' 'libjpeg')
+optdepends=('conntrack-tools: for connection tracking'
+ 'iproute2: for traffic shapping'
+ 'iptrafvol: for traffic volume logging')
+conflicts=(vuurmuur-devel)
+backup=('etc/vuurmuur/config.conf'
+ 'etc/vuurmuur/modules.conf'
+ 'etc/vuurmuur/vuurmuur_conf.conf'
+ 'etc/vuurmuur/plugins/textdir.conf'
+ 'etc/logrotate.d/vuurmuur')
+source=(
+ftp://ftp.vuurmuur.org/releases/$pkgver/${_pkgname}-$pkgver.tar.gz
+modules.conf
+vuurmuur.rc
+vuurmuur.service
+vuurmuur.script
+)
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ for archive in libvuurmuur vuurmuur vuurmuur_conf; do
+ [[ ! -d "$archive" ]] &&
+ tar xzf ${archive}-${pkgver}.tar.gz
+ done
+
+ msg "building vuurmuur libraries..."
+ pushd libvuurmuur-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make
+ popd
+
+ msg "building vuurmuur..."
+ pushd vuurmuur-${pkgver}
+ sed -i 's|-rpath|-rpath-link|' configure
+ LDFLAGS+="-L${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src \
+ -L${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src/.libs \
+ -Wl,-rpath=/usr/lib/${pkgname}/plugins" \
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --with-libvuurmuur-includes="${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src" \
+ --with-libvuurmuur-libraries="${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src"
+ make
+ popd
+
+ msg "building vuurmuur_conf..."
+ pushd vuurmuur_conf-${pkgver}
+ sed -i 's|-rpath|-rpath-link|' configure
+ LDFLAGS+="-L${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src \
+ -L${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src/.libs \
+ -Wl,-rpath=/usr/lib/${pkgname}/plugins" \
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --with-libvuurmuur-includes="${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src" \
+ --with-libvuurmuur-libraries="${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/src"
+ make
+ popd
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ pushd libvuurmuur-${pkgver}
+ make DESTDIR=${pkgdir} install
+ popd
+
+ pushd vuurmuur-${pkgver}
+ make DESTDIR=${pkgdir} install
+ popd
+
+ pushd vuurmuur_conf-${pkgver}
+ make DESTDIR=${pkgdir} install
+ popd
+
+ # make directory structure
+ install -dm700 ${pkgdir}/etc/${pkgname}
+ install -dm700 ${pkgdir}/etc/${pkgname}/plugins
+ install -dm700 ${pkgdir}/etc/logrotate.d/
+ install -dm755 ${pkgdir}/usr/share/${pkgname}/textdir/{interfaces,services,zones,rules}
+ install -dm700 ${pkgdir}/var/log/${pkgname}
+
+ # install daemon and log
+ install -Dm755 ${srcdir}/vuurmuur.rc ${pkgdir}/etc/rc.d/${pkgname}
+ install -Dm644 ${pkgdir}/usr/share/${pkgname}/scripts/vuurmuur-logrotate ${pkgdir}/etc/logrotate.d/${pkgname}
+
+ # install systemd's files
+ install -Dm755 $srcdir/vuurmuur.script $pkgdir/usr/lib/systemd/scripts/vuurmuur
+ install -Dm644 $srcdir/vuurmuur.service $pkgdir/usr/lib/systemd/system/vuurmuur.service
+
+ # install configuration
+ install -Dm600 ${pkgdir}/usr/share/vuurmuur/config/config.conf.sample \
+ ${pkgdir}/etc/${pkgname}/config.conf
+ install -Dm600 ${srcdir}/modules.conf ${pkgdir}/etc/${pkgname}/modules.conf
+ install -Dm600 ${pkgdir}/usr/share/vuurmuur/config/vuurmuur_conf.conf.sample \
+ ${pkgdir}/etc/${pkgname}/${pkgname}_conf.conf
+
+ sed -i ${pkgdir}/etc/${pkgname}/config.conf \
+ -e 's|"/sbin/tc|"/usr/sbin/tc|' \
+ -e 's|"/sbin/ip6tables|"/usr/sbin/ip6tables|' \
+ -e 's|"/sbin/iptables|"/usr/sbin/iptables|' \
+ -e 's|"/sbin/ip6tables-restore|"/usr/sbin/ip6tables-restore|' \
+ -e 's|"/sbin/iptables-restore|"/usr/sbin/iptables-restore|' \
+ -e 's|"/var/log/messages|"/var/log/iptables.log|'
+
+ sed -i ${pkgdir}/etc/${pkgname}/${pkgname}_conf.conf \
+ -e 's|"/usr/bin/iptrafvol.pl|"/usr/sbin/iptrafvol.pl|'
+
+
+ echo "LOCATION=\"/etc/${pkgname}/textdir\"" > ${pkgdir}/etc/${pkgname}/plugins/textdir.conf
+
+ # default firewall setup in /usr/share
+ touch ${pkgdir}/usr/share/${pkgname}/textdir/rules/rules.conf
+ touch ${pkgdir}/usr/share/${pkgname}/textdir/rules/blocklist.conf
+
+ cp -R ${srcdir}/${_pkgname}-${pkgver}/zones/* ${pkgdir}/usr/share/${pkgname}/textdir/zones/
+ mv ${pkgdir}/usr/share/${pkgname}/services/* ${pkgdir}/usr/share/${pkgname}/textdir/services/
+
+ # install licenses
+ install -Dm644 ${srcdir}/${_pkgname}-${pkgver}/lib${pkgname}-${pkgver}/COPYING \
+ ${pkgdir}/usr/share/licenses/lib${pkgname}/COPYING
+ install -Dm644 ${srcdir}/${_pkgname}-${pkgver}/${pkgname}-${pkgver}/COPYING \
+ ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
+ install -Dm644 ${srcdir}/${_pkgname}-${pkgver}/${pkgname}_conf-${pkgver}/COPYING \
+ ${pkgdir}/usr/share/licenses/${pkgname}_conf/COPYING
+}
diff --git a/pcr/vuurmuur/modules.conf b/pcr/vuurmuur/modules.conf
new file mode 100644
index 000000000..eda78a036
--- /dev/null
+++ b/pcr/vuurmuur/modules.conf
@@ -0,0 +1,3 @@
+# modules loaded by vuurmuur daemon
+# ip_queue => not found
+MODULES_TO_LOAD="ip_tables iptable_filter iptable_mangle iptable_nat ip_conntrack ipt_state ip_conntrack_ftp ip_nat_ftp"
diff --git a/pcr/vuurmuur/vuurmuur.install b/pcr/vuurmuur/vuurmuur.install
new file mode 100644
index 000000000..0f596b8c9
--- /dev/null
+++ b/pcr/vuurmuur/vuurmuur.install
@@ -0,0 +1,27 @@
+post_install() {
+ if [[ ! -d /etc/vuurmuur/textdir ]]; then
+ # copy default firewall setup
+ cp -R /usr/share/vuurmuur/textdir /etc/vuurmuur/
+
+ # set permissions and ownership
+ chown -R root:root /etc/vuurmuur
+ chmod -R o=rwX,go= /etc/vuurmuur
+ chown -R root:root /var/log/vuurmuur
+ chmod -R o=rwX,go= /var/log/vuurmuur
+
+ echo
+ echo "Default firewall setup has been installed in /etc/vuurmuur/textdir"
+ echo
+ echo "You can now setup your network topology and firewall rules using vuurmuur_conf"
+ echo "Don't forget to add 'vuurmuur' in /etc/rc.conf"
+ echo
+ echo "Usefull documentation can be found at http://www.vuurmuur.org"
+ echo
+ fi
+}
+
+post_remove () {
+ echo
+ echo "Your firewall setup has been left unchanged in /etc/vuurmuur/textdir"
+ echo
+}
diff --git a/pcr/vuurmuur/vuurmuur.rc b/pcr/vuurmuur/vuurmuur.rc
new file mode 100644
index 000000000..3b4d3e99e
--- /dev/null
+++ b/pcr/vuurmuur/vuurmuur.rc
@@ -0,0 +1,114 @@
+#!/bin/bash
+# vi: ft=sh
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# PID file
+VUURMUURPID='/run/vuurmuur.pid'
+VUURMUURLOGPID='/run/vuurmuur_log.pid'
+case $1 in
+start)
+ # initialize
+ stat_busy "Starting Vuurmuur Firewall"
+ STATUS="ok"
+
+ # check if vuurmuur is configured
+ IFNUM=`/usr/bin/vuurmuur_script --list --interface any | wc -l`
+ if [ $IFNUM = 0 ]; then
+ stat_busy "Please configure Vuurmuur first by defining at least one interface."
+ stat_fail
+ exit 1
+ fi
+
+ # load modules
+ . /etc/vuurmuur/modules.conf
+ for MODULE in `echo $MODULES_TO_LOAD`; do
+ /sbin/modprobe $MODULE &>/dev/null
+ if [ $? != 0 ]; then
+ stat_busy "Error when loading module $MODULE. Check log files."
+ stat_fail
+ exit 1
+ fi
+ done
+
+ # start vuurmuur daemon
+ if [ ! -f $VUURMUURPID ]; then
+ /usr/bin/vuurmuur -l
+ if [ $? != 0 ]; then
+ stat_busy "Error when starting Vuurmuur daemon. Check log files."
+ STATUS="failed"
+ fi
+ else
+ PID=`cat $VUURMUURPID | cut -d " " -f 1`
+ stat_busy "Error when starting Vuurmuur daemon. Already running at pid $PID."
+ STATUS="failed"
+ fi
+
+ # start vuurmuur log parsing daemon
+ if [ ! -f $VUURMUURLOGPID ]; then
+ /usr/bin/vuurmuur_log
+ if [ $? != 0 ]; then
+ stat_busy "Error when starting Vuurmuur log parsing daemon. Check log files."
+ STATUS="failed"
+ fi
+ else
+ PID=`cat $VUURMUURLOGPID | cut -d " " -f 1`
+ stat_busy "Error when starting Vuurmuur log parsing daemon. Already running at pid $PID."
+ STATUS="failed"
+ fi
+
+ # finalize
+ if [ $STATUS = "ok" ]; then
+ add_daemon vuurmuur
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+stop)
+ # initialize
+ stat_busy "Stopping Vuurmuur Firewall"
+ STATUS="ok"
+
+ # stop vuurmuur log parsing daemon
+ PID=`cat $VUURMUURLOGPID | cut -d " " -f 1`
+ if [[ ! -z $PID ]] && kill "$PID" &>/dev/null; then
+ rm -f $VUURMUURLOGPID
+ else
+ stat_busy "Error when stopping Vuurmuur log parsing daemon. Check log files."
+ STATUS="failed"
+ fi
+
+ # stop vuurmuur daemon
+ PID=`cat $VUURMUURPID | cut -d " " -f 1`
+ if [[ ! -z $PID ]] && kill "$PID" &>/dev/null; then
+ rm -f $VUURMUURPID
+ else
+ stat_busy "Error when stopping Vuurmuur daemon. Check log files."
+ STATUS="failed"
+ fi
+
+ # finalize
+ if [ $STATUS = "ok" ]; then
+ rm_daemon vuurmuur
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+restart)
+ $0 stop
+ $0 start
+ ;;
+
+*)
+ echo "Usage: $0 {start|stop|restart}" >&2
+ exit 1
+
+esac
+exit 0
diff --git a/pcr/vuurmuur/vuurmuur.script b/pcr/vuurmuur/vuurmuur.script
new file mode 100644
index 000000000..a643d6fbd
--- /dev/null
+++ b/pcr/vuurmuur/vuurmuur.script
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+VUURMUURPID='/run/vuurmuur.pid'
+VUURMUURLOGPID='/run/vuurmuur_log.pid'
+start() {
+ IFNUM=`/usr/bin/vuurmuur_script --list --interface any | wc -l`
+ if [ $IFNUM = 0 ]; then
+ echo "Please configure Vuurmuur first by defining at least one interface."
+ exit 1
+ fi
+
+ # load modules
+ . /etc/vuurmuur/modules.conf
+ for MODULE in `echo $MODULES_TO_LOAD`; do
+ /sbin/modprobe $MODULE &>/dev/null
+ if [ $? != 0 ]; then
+ echo "Error when loading module $MODULE. Check log files."
+ exit 1
+ fi
+ done
+
+ # start vuurmuur daemon
+ if [ ! -f $VUURMUURPID ]; then
+ /usr/bin/vuurmuur -l
+ if [ $? != 0 ]; then
+ echo "Error when starting Vuurmuur daemon. Check log files."
+ STATUS="failed"
+ fi
+ else
+ PID=`cat $VUURMUURPID | cut -d " " -f 1`
+ echo "Error when starting Vuurmuur daemon. Already running at pid $PID."
+ STATUS="failed"
+ fi
+
+ # start vuurmuur log parsing daemon
+ if [ ! -f $VUURMUURLOGPID ]; then
+ /usr/bin/vuurmuur_log
+ if [ $? != 0 ]; then
+ echo "Error when starting Vuurmuur log parsing daemon. Check log files."
+ STATUS="failed"
+ fi
+ else
+ PID=`cat $VUURMUURLOGPID | cut -d " " -f 1`
+ echo "Error when starting Vuurmuur log parsing daemon. Already running at pid $PID."
+ STATUS="failed"
+ fi
+
+ # finalize
+ if [ $STATUS = "failed" ]; then
+ exit 1
+ fi
+}
+stop() {
+ # initialize
+ echo "Stopping Vuurmuur Firewall"
+ STATUS="ok"
+
+ # stop vuurmuur log parsing daemon
+ PID=`cat $VUURMUURLOGPID | cut -d " " -f 1`
+ if [[ ! -z $PID ]] && kill "$PID" &>/dev/null; then
+ rm -f $VUURMUURLOGPID
+ else
+ echo "Error when stopping Vuurmuur log parsing daemon. Check log files."
+ STATUS="failed"
+ fi
+
+ # stop vuurmuur daemon
+ PID=`cat $VUURMUURPID | cut -d " " -f 1`
+ if [[ ! -z $PID ]] && kill "$PID" &>/dev/null; then
+ rm -f $VUURMUURPID
+ else
+ echo "Error when stopping Vuurmuur daemon. Check log files."
+ STATUS="failed"
+ fi
+
+ # finalize
+ if [ $STATUS = "false" ]; then
+ exit 1
+ fi
+}
+restart() {
+ $0 stop
+ $0 start
+}
+
+case $1 in
+ start|stop|restart) "$1" ;;
+esac
diff --git a/pcr/vuurmuur/vuurmuur.service b/pcr/vuurmuur/vuurmuur.service
new file mode 100644
index 000000000..3defcaa82
--- /dev/null
+++ b/pcr/vuurmuur/vuurmuur.service
@@ -0,0 +1,13 @@
+# vi: ft=systemd
+[Unit]
+Description=Powerful front-end for iptables
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/lib/systemd/scripts/vuurmuur start
+ExecStop=/usr/lib/systemd/scripts/vuurmuur stop
+ExecReload=/usr/lib/systemd/scripts/vuurmuur restart
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pcr/xtables-addons/PKGBUILD b/pcr/xtables-addons/PKGBUILD
new file mode 100644
index 000000000..0b652408a
--- /dev/null
+++ b/pcr/xtables-addons/PKGBUILD
@@ -0,0 +1,35 @@
+# Contributor: Vladimir Kutyavin <vlkut@bk.ru>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.IO>
+
+pkgname=xtables-addons
+pkgver=1.46
+pkgrel=1
+pkgdesc="Successor to patch-o-matic(-ng). Additional extensions for iptables, ip6tables, etc. CHAOS, TARPIT, TEE, DELUDE and other targets; condition, geoip, ipp2p and other matches. Includes ipset package."
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://xtables-addons.sourceforge.net/"
+depends=('iptables>=1.4.3' 'glibc')
+makedepends=('linux-api-headers' 'linux-headers')
+conflicts=(ipset)
+replaces=(ipset)
+provides=(ipset)
+source=(http://download.sourceforge.net/project/xtables-addons/Xtables-addons/$pkgver/$pkgname-$pkgver.tar.xz)
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/iptables \
+ --sysconfdir=/etc \
+ --with-xtlibdir=/usr/lib/iptables \
+ --mandir=/usr/share/man
+ make || return 1
+ make DESTDIR=$pkgdir install || return 1
+ chmod a-x $pkgdir/usr/lib/iptables/*.so
+ #remove ipset there is a ipset package
+# rm \
+# $pkgdir/usr/lib/iptables/libipset_* \
+# $pkgdir/usr/sbin/ipset
+# $pkgdir/usr/share/man/man8/ipset.8
+# rmdir $pkgdir/usr/sbin
+}