summaryrefslogtreecommitdiff
path: root/staging
diff options
context:
space:
mode:
Diffstat (limited to 'staging')
-rw-r--r--staging/cabal-install/PKGBUILD36
-rw-r--r--staging/dmraid/PKGBUILD44
-rw-r--r--staging/dmraid/dmraid.install14
-rw-r--r--staging/dmraid/dmraid.service16
-rw-r--r--staging/dmraid/dmraid_hook14
-rw-r--r--staging/dmraid/dmraid_install22
-rw-r--r--staging/dmraid/dmraid_tmpfiles1
-rw-r--r--staging/ekiga/PKGBUILD39
-rw-r--r--staging/ekiga/ekiga.install22
-rw-r--r--staging/ekiga/gcc47.patch99
-rw-r--r--staging/ghc/PKGBUILD120
-rw-r--r--staging/ghc/build.mk175
-rw-r--r--staging/ghc/ghc.install10
-rwxr-xr-xstaging/ghc/print-provides-replaces.sh38
-rw-r--r--staging/ghc/silence-gen_contents_index.diff10
-rw-r--r--staging/haskell-http/PKGBUILD40
-rw-r--r--staging/haskell-http/haskell-http.install18
-rw-r--r--staging/haskell-mtl/PKGBUILD38
-rw-r--r--staging/haskell-mtl/haskell-mtl.install18
-rw-r--r--staging/haskell-network/PKGBUILD40
-rw-r--r--staging/haskell-network/haskell-network.install18
-rw-r--r--staging/haskell-parsec/PKGBUILD39
-rw-r--r--staging/haskell-parsec/haskell-parsec.install18
-rw-r--r--staging/haskell-random/PKGBUILD37
-rw-r--r--staging/haskell-random/haskell-random.install18
-rw-r--r--staging/haskell-text/PKGBUILD38
-rw-r--r--staging/haskell-text/haskell-text.install18
-rw-r--r--staging/haskell-transformers/PKGBUILD39
-rw-r--r--staging/haskell-transformers/haskell-transformers.install18
-rw-r--r--staging/haskell-zlib/PKGBUILD40
-rw-r--r--staging/haskell-zlib/haskell-zlib.install18
-rw-r--r--staging/lm_sensors/PKGBUILD55
-rw-r--r--staging/lm_sensors/daemonarg.patch50
-rw-r--r--staging/lm_sensors/fancontrol.rc35
-rw-r--r--staging/lm_sensors/fancontrol.service9
-rw-r--r--staging/lm_sensors/healthd46
-rw-r--r--staging/lm_sensors/healthd.conf17
-rw-r--r--staging/lm_sensors/healthd.rc52
-rw-r--r--staging/lm_sensors/linux_3.0.patch11
-rw-r--r--staging/lm_sensors/sensord.conf4
-rw-r--r--staging/lm_sensors/sensord.rc37
-rw-r--r--staging/lm_sensors/sensors.rc119
-rw-r--r--staging/opal/PKGBUILD30
-rw-r--r--staging/opal/opal-ffmpeg.patch194
-rw-r--r--staging/opencv/PKGBUILD118
-rw-r--r--staging/openssh/PKGBUILD2
-rw-r--r--staging/openssh/sshd@.service8
-rw-r--r--staging/ptlib/PKGBUILD34
-rw-r--r--staging/smartmontools/PKGBUILD46
-rw-r--r--staging/smartmontools/smartd.conf1
-rwxr-xr-xstaging/smartmontools/smartd.rc39
51 files changed, 2021 insertions, 1 deletions
diff --git a/staging/cabal-install/PKGBUILD b/staging/cabal-install/PKGBUILD
new file mode 100644
index 000000000..30bffb560
--- /dev/null
+++ b/staging/cabal-install/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+
+pkgname=cabal-install
+pkgver=0.14.0
+pkgrel=2
+pkgdesc="The command-line interface for Cabal and Hackage."
+url="http://hackage.haskell.org/package/cabal-install"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+makedepends=('haskell-http=4000.2.3-1' 'haskell-zlib=0.5.3.3-4' 'haskell-mtl=2.1.1-1' 'haskell-network=2.3.0.14-1' 'haskell-random=1.0.1.1-2')
+depends=('ghc' 'gmp' 'zlib')
+source=(http://hackage.haskell.org/packages/archive/cabal-install/$pkgver/cabal-install-$pkgver.tar.gz)
+md5sums=('638514bd1a5792d75866481852148ae5')
+
+build() {
+ cd cabal-install-${pkgver}
+ runhaskell Setup configure --enable-shared --enable-split-objs --enable-executable-stripping --prefix=/usr
+ runhaskell Setup build
+}
+
+package() {
+ cd cabal-install-${pkgver}
+ runhaskell Setup copy --destdir=$pkgdir
+
+ # rm license installed to wrong location
+ rm -rf ${pkgdir}/usr/share/doc
+
+ install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+
+ # add bash completion
+ install -d ${pkgdir}/usr/share/bash-completion/completions
+ install -m644 bash-completion/cabal \
+ ${pkgdir}/usr/share/bash-completion/completions
+}
diff --git a/staging/dmraid/PKGBUILD b/staging/dmraid/PKGBUILD
new file mode 100644
index 000000000..f50754782
--- /dev/null
+++ b/staging/dmraid/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 161388 2012-06-10 18:50:00Z dreisner $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+#Contributor: Urs Wolfer <uwolfer @ fwo.ch>
+
+pkgname=dmraid
+pkgver=1.0.0.rc16.3
+pkgrel=6
+pkgdesc="Device mapper RAID interface"
+url="http://people.redhat.com/~heinzm/sw/dmraid/"
+conflicts=('mkinitcpio<0.7')
+depends=('device-mapper>=2.0.54')
+arch=('i686' 'x86_64')
+license=('GPL')
+source=(#ftp://ftp.archlinux.org/other/dmraid/$pkgname-$pkgver.tar.bz2
+ http://people.redhat.com/~heinzm/sw/dmraid/src/$pkgname-1.0.0.rc16-3.tar.bz2
+ dmraid_install
+ dmraid_hook
+ dmraid_tmpfiles
+ dmraid.service)
+install=dmraid.install
+md5sums=('819338fcef98e8e25819f0516722beeb'
+ '2297d23cee1aef23ec6ad8d6d1870356'
+ 'faec669dc85f87187b45b5d3968efe2c'
+ '56a8bb0ece8d206cd8efb504ee072ddd'
+ 'de0af1fdb9ed4c109b8119160167d2e9')
+
+build() {
+ cd "$pkgname/1.0.0.rc16-3/$pkgname"
+ ./configure --enable-led --enable-intel_led
+ make
+}
+
+package() {
+ cd "$pkgname/1.0.0.rc16-3/$pkgname"
+ make DESTDIR="$pkgdir" prefix=/usr libdir=/usr/lib mandir=/usr/share/man includedir=/usr/include install
+ install -D -m644 "$srcdir"/dmraid_install "$pkgdir"/usr/lib/initcpio/install/dmraid
+ install -D -m644 "$srcdir"/dmraid_hook "$pkgdir"/usr/lib/initcpio/hooks/dmraid
+ install -D -m644 "$srcdir"/dmraid_tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/dmraid.conf
+
+ # fix permissions
+ chmod 644 "$pkgdir"/usr/include/dmraid/* "$pkgdir"/usr/lib/libdmraid.a
+
+ install -Dm644 "$srcdir/dmraid.service" "$pkgdir/usr/lib/systemd/system/dmraid.service"
+}
diff --git a/staging/dmraid/dmraid.install b/staging/dmraid/dmraid.install
new file mode 100644
index 000000000..64899e785
--- /dev/null
+++ b/staging/dmraid/dmraid.install
@@ -0,0 +1,14 @@
+post_upgrade() {
+ if [ "$(vercmp $2 1.0.0.rc15)" -lt 0 ]; then
+ # important upgrade notice
+ echo ">>>"
+ echo ">>> IMPORTANT DMRAID UPGRADE NOTICE"
+ echo ">>> -------------------------------"
+ echo ">>> Version 1.0.0.rc15 and greater introduce a new name scheme:"
+ echo ">>> You need to add an additional 'p' in front of your number."
+ echo ">>> e.g. <yourname><number> --> <yourname>p<number>"
+ echo ">>> firsthd1 --> firsthdp1"
+ echo ">>> Please change your bootloader and fstab accordingly."
+ echo ">>>"
+ fi
+}
diff --git a/staging/dmraid/dmraid.service b/staging/dmraid/dmraid.service
new file mode 100644
index 000000000..1fd142ff2
--- /dev/null
+++ b/staging/dmraid/dmraid.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Assemble FakeRAID arrays
+DefaultDependencies=no
+Requires=systemd-udev-settle.service
+After=systemd-udev-settle.service
+Before=basic.target shutdown.target
+Conflicts=shutdown.target
+
+[Service]
+ExecStart=/sbin/dmraid --ignorelocking --activate y -Z
+Type=oneshot
+TimeoutSec=0
+RemainAfterExit=true
+
+[Install]
+WantedBy=basic.target
diff --git a/staging/dmraid/dmraid_hook b/staging/dmraid/dmraid_hook
new file mode 100644
index 000000000..37283e83e
--- /dev/null
+++ b/staging/dmraid/dmraid_hook
@@ -0,0 +1,14 @@
+#!/usr/bin/ash
+
+run_hook() {
+ modprobe -a -q dm-mod dm-mirror >/dev/null 2>&1
+ msg ":: Activating dmraid arrays..."
+ # prevent any event monitoring calls with -I
+ if [ "$quiet" = "y" ]; then
+ dmraid -ay -I -Z >/dev/null
+ else
+ dmraid -ay -I -Z
+ fi
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/staging/dmraid/dmraid_install b/staging/dmraid/dmraid_install
new file mode 100644
index 000000000..d3238c1f7
--- /dev/null
+++ b/staging/dmraid/dmraid_install
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+build() {
+ add_module 'dm-mod'
+ add_module 'dm-mirror'
+
+ add_binary 'dmraid'
+ add_binary 'dmsetup'
+ add_file "/usr/lib/udev/rules.d/10-dm.rules"
+ add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook loads the necessary modules for a dmraid root device.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/staging/dmraid/dmraid_tmpfiles b/staging/dmraid/dmraid_tmpfiles
new file mode 100644
index 000000000..4f21ac1fc
--- /dev/null
+++ b/staging/dmraid/dmraid_tmpfiles
@@ -0,0 +1 @@
+d /run/lock/dmraid 1777 root root
diff --git a/staging/ekiga/PKGBUILD b/staging/ekiga/PKGBUILD
new file mode 100644
index 000000000..d337f8f49
--- /dev/null
+++ b/staging/ekiga/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 161384 2012-06-10 16:19:42Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Tom K <tomk@runbox.com>
+
+pkgname=ekiga
+pkgver=3.3.2
+pkgrel=5
+pkgdesc="VOIP/Videoconferencing app with full SIP and H.323 support (GnomeMeeting expanded and renamed)"
+url="http://www.ekiga.org"
+license=(GPL)
+arch=(i686 x86_64)
+depends=('opal' 'boost-libs' 'libxv' 'libnotify' 'hicolor-icon-theme' 'avahi' 'gtk2' 'gconf')
+makedepends=('intltool' 'gnome-doc-utils' 'evolution-data-server' 'boost')
+optdepends=('evolution-data-server: Evolution integration')
+options=(!emptydirs)
+groups=('gnome-extra')
+install=ekiga.install
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
+ gcc47.patch)
+sha256sums=('d4dd47a47696c53e6f3839eef6e0e896dd3d07babb2e68ff8fe994d67ba8807a'
+ '9e3000016e1174be5d6cc60c89abeaeb61a98eb163a38abf11f4af4f2d6363ec')
+
+build() {
+ cd "$pkgname-$pkgver"
+ patch -Np1 -i "$srcdir/gcc47.patch"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-schemas-install \
+ --disable-scrollkeeper --enable-dbus
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 install
+
+ install -m755 -d "$pkgdir/usr/share/gconf/schemas"
+ gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain ekiga "$pkgdir"/etc/gconf/schemas/*.schemas
+ rm -f "$pkgdir"/etc/gconf/schemas/*.schemas
+}
diff --git a/staging/ekiga/ekiga.install b/staging/ekiga/ekiga.install
new file mode 100644
index 000000000..91f3a57a0
--- /dev/null
+++ b/staging/ekiga/ekiga.install
@@ -0,0 +1,22 @@
+pkgname=ekiga
+
+post_install() {
+ gconfpkg --install $pkgname
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ gconfpkg --uninstall $pkgname
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+}
diff --git a/staging/ekiga/gcc47.patch b/staging/ekiga/gcc47.patch
new file mode 100644
index 000000000..f12c37524
--- /dev/null
+++ b/staging/ekiga/gcc47.patch
@@ -0,0 +1,99 @@
+From f81a43f2c4ed5e5083e3a850bc7164d11a910358 Mon Sep 17 00:00:00 2001
+From: Eugen Dedu <Eugen.Dedu@pu-pm.univ-fcomte.fr>
+Date: Sat, 24 Mar 2012 09:17:40 +0000
+Subject: Fix compile error with gcc 4.7
+
+---
+diff --git a/lib/engine/account/bank-impl.h b/lib/engine/account/bank-impl.h
+index e16848e..b0a8775 100644
+--- a/lib/engine/account/bank-impl.h
++++ b/lib/engine/account/bank-impl.h
+@@ -203,7 +203,7 @@ template<typename AccountType>
+ void
+ Ekiga::BankImpl<AccountType>::add_account (boost::shared_ptr<AccountType> account)
+ {
+- add_object (account);
++ this->add_object (account);
+
+ account->questions.connect (boost::ref (questions));
+ }
+@@ -213,7 +213,7 @@ template<typename AccountType>
+ void
+ Ekiga::BankImpl<AccountType>::remove_account (boost::shared_ptr<AccountType> account)
+ {
+- remove_object (account);
++ this->remove_object (account);
+ }
+
+ #endif
+diff --git a/lib/engine/addressbook/book-impl.h b/lib/engine/addressbook/book-impl.h
+index 711d8d9..4fea7d5 100644
+--- a/lib/engine/addressbook/book-impl.h
++++ b/lib/engine/addressbook/book-impl.h
+@@ -204,7 +204,7 @@ void
+ Ekiga::BookImpl<ContactType>::add_contact (boost::shared_ptr<ContactType> contact)
+ {
+ contact->questions.connect (boost::ref (questions));
+- add_object (contact);
++ this->add_object (contact);
+ }
+
+
+@@ -212,7 +212,7 @@ template<typename ContactType>
+ void
+ Ekiga::BookImpl<ContactType>::remove_contact (boost::shared_ptr<ContactType> contact)
+ {
+- remove_object (contact);
++ this->remove_object (contact);
+ }
+
+ #endif
+diff --git a/lib/engine/addressbook/source-impl.h b/lib/engine/addressbook/source-impl.h
+index a30cd03..630236f 100644
+--- a/lib/engine/addressbook/source-impl.h
++++ b/lib/engine/addressbook/source-impl.h
+@@ -206,7 +206,7 @@ template<typename BookType>
+ void
+ Ekiga::SourceImpl<BookType>::add_book (boost::shared_ptr<BookType> book)
+ {
+- add_object (book);
++ this->add_object (book);
+
+ add_connection (book, book->contact_added.connect (boost::bind (boost::ref (contact_added), book, _1)));
+
+diff --git a/lib/engine/presence/cluster-impl.h b/lib/engine/presence/cluster-impl.h
+index 245a7c6..92074a8 100644
+--- a/lib/engine/presence/cluster-impl.h
++++ b/lib/engine/presence/cluster-impl.h
+@@ -147,7 +147,7 @@ Ekiga::ClusterImpl<HeapType>::add_heap (boost::shared_ptr<HeapType> heap)
+
+ add_connection (heap, heap->questions.connect (boost::ref (questions)));
+
+- add_object (heap);
++ this->add_object (heap);
+ }
+
+ template<typename HeapType>
+diff --git a/lib/engine/presence/heap-impl.h b/lib/engine/presence/heap-impl.h
+index d63c491..15fe86f 100644
+--- a/lib/engine/presence/heap-impl.h
++++ b/lib/engine/presence/heap-impl.h
+@@ -160,14 +160,14 @@ Ekiga::HeapImpl<PresentityType>::add_presentity (boost::shared_ptr<PresentityTyp
+ {
+ presentity->questions.connect (boost::ref (questions));
+
+- add_object (presentity);
++ this->add_object (presentity);
+ }
+
+ template<typename PresentityType>
+ void
+ Ekiga::HeapImpl<PresentityType>::remove_presentity (boost::shared_ptr<PresentityType> presentity)
+ {
+- remove_object (presentity);
++ this->remove_object (presentity);
+ }
+
+ #endif
+--
+cgit v0.9.0.2
diff --git a/staging/ghc/PKGBUILD b/staging/ghc/PKGBUILD
new file mode 100644
index 000000000..6f5793c63
--- /dev/null
+++ b/staging/ghc/PKGBUILD
@@ -0,0 +1,120 @@
+# $Id: PKGBUILD 161393 2012-06-11 00:03:29Z tdziedzic $
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Special note for devs looking to upgrade this package:
+# ghc places a unique hash for each library when it is built.
+# Libraries depend on versions specified by those hashes.
+# This implies that all libraries need to be rebuilt when ghc is rebuilt.
+
+pkgname=ghc
+pkgver=7.4.2
+pkgrel=1
+pkgdesc='The Glasgow Haskell Compiler'
+arch=('i686' 'x86_64')
+url='http://www.haskell.org/ghc/'
+license=('custom')
+# libffi might be needed in the future: http://hackage.haskell.org/trac/ghc/ticket/4496
+depends=('perl' 'gmp>=5.0' 'gcc') # 'libffi')
+makedepends=('ghc' 'perl' 'libxslt' 'docbook-xsl')
+checkdepends=('python2')
+install='ghc.install'
+# keep this otherwise a lot of tests will show as unexpected failures... need to investigate why using -jn for n > 1 does this...
+options=('!makeflags')
+# missing rtl?
+provides=('haskell-array=0.4.0.0'
+ 'haskell-base=4.5.1.0'
+ 'haskell-binary=0.5.1.0'
+ 'haskell-bin-package-db=0.0.0.0'
+ 'haskell-bytestring=0.9.2.1'
+ 'haskell-containers=0.4.2.1'
+ 'haskell-deepseq=1.3.0.0'
+ 'haskell-directory=1.1.0.2'
+ 'haskell-extensible-exceptions=0.1.1.4'
+ 'haskell-filepath=1.3.0.0'
+ 'haskell-ghc-prim=0.2.0.0'
+ 'haskell-haskell2010=1.1.0.1'
+ 'haskell-haskell98=2.0.0.1'
+ 'haskell-hoopl=3.8.7.3'
+ 'haskell-hpc=0.5.1.1'
+ 'haskell-integer-gmp=0.4.0.0'
+ 'haskell-old-locale=1.0.0.4'
+ 'haskell-old-time=1.1.0.0'
+ 'haskell-pretty=1.1.1.0'
+ 'haskell-process=1.1.0.1'
+ 'haskell-template-haskell=2.7.0.0'
+ 'haskell-time=1.4'
+ 'haskell-unix=2.5.1.1'
+ 'haskell-cabal=1.14.0'
+ )
+replaces=('haskell-array<0.4.0.0'
+ 'haskell-base<4.5.1.0'
+ 'haskell-binary<0.5.1.0'
+ 'haskell-bin-package-db<0.0.0.0'
+ 'haskell-bytestring<0.9.2.1'
+ 'haskell-containers<0.4.2.1'
+ 'haskell-deepseq<1.3.0.0'
+ 'haskell-directory<1.1.0.2'
+ 'haskell-extensible-exceptions<0.1.1.4'
+ 'haskell-filepath<1.3.0.0'
+ 'haskell-ghc-prim<0.2.0.0'
+ 'haskell-haskell2010<1.1.0.1'
+ 'haskell-haskell98<2.0.0.1'
+ 'haskell-hoopl<3.8.7.3'
+ 'haskell-hpc<0.5.1.1'
+ 'haskell-integer-gmp<0.4.0.0'
+ 'haskell-old-locale<1.0.0.4'
+ 'haskell-old-time<1.1.0.0'
+ 'haskell-pretty<1.1.1.0'
+ 'haskell-process<1.1.0.1'
+ 'haskell-template-haskell<2.7.0.0'
+ 'haskell-time<1.4'
+ 'haskell-unix<2.5.1.1'
+ 'haskell-cabal<1.14.0'
+ )
+source=("http://www.haskell.org/ghc/dist/${pkgver}/ghc-${pkgver}-src.tar.bz2"
+ "http://www.haskell.org/ghc/dist/${pkgver}/ghc-${pkgver}-testsuite.tar.bz2"
+ 'build.mk'
+ 'silence-gen_contents_index.diff')
+md5sums=('267462db5c5a7c245fb26361b77007c4'
+ '528005749c761fe6c12a0079bd84fb90'
+ '88ad4108c26f56fc38466d82aaf9a295'
+ '2ac480d025b706fc47acc58c54b246bb')
+
+build() {
+ cd ghc-${pkgver}
+
+ # Silence gen_contents_index for the common case.
+ # http://hackage.haskell.org/trac/ghc/ticket/5992
+ patch -Np1 -i ${srcdir}/silence-gen_contents_index.diff
+
+ cp ${srcdir}/build.mk mk/build.mk
+
+ ./configure \
+ --prefix=/usr
+
+ make
+}
+
+check() {
+ cd ghc-${pkgver}
+
+ # python2 rename
+ sed -e 's/PYTHON = python/&2/' -i testsuite/mk/boilerplate.mk
+ sed -e 's_#!/usr/bin/env python_&2_' -i testsuite/timeout/calibrate testsuite/timeout/timeout.py
+
+ # note: there is one test failure on i686 only: http://hackage.haskell.org/trac/ghc/ticket/5856
+ #make THREADS=9 test
+ make test
+ # might be some failures
+ #make fulltest
+}
+
+package() {
+ cd ghc-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ install -d ${pkgdir}/usr/share/licenses/ghc
+ install -m644 LICENSE \
+ ${pkgdir}/usr/share/licenses/ghc
+}
diff --git a/staging/ghc/build.mk b/staging/ghc/build.mk
new file mode 100644
index 000000000..73645a957
--- /dev/null
+++ b/staging/ghc/build.mk
@@ -0,0 +1,175 @@
+# -----------------------------------------------------------------------------
+# A Sample build.mk
+#
+# Uncomment one of the following BuildFlavour settings to get the desired
+# overall build type, and then tweak the options in the relevant section
+# below.
+
+# Uncomment one of these to select a build profile below:
+
+# Full build with max optimisation and everything enabled (very slow build)
+BuildFlavour = perf
+
+# Fast build with optimised libraries, no profiling (RECOMMENDED):
+#BuildFlavour = quick
+
+# Even faster build. NOT RECOMMENDED: the libraries will be
+# completely unoptimised, so any code built with this compiler
+# (including stage2) will run very slowly:
+#BuildFlavour = quickest
+
+# Profile the stage2 compiler:
+#BuildFlavour = prof
+
+# A development build, working on the stage 1 compiler:
+#BuildFlavour = devel1
+
+# A development build, working on the stage 2 compiler:
+#BuildFlavour = devel2
+
+# An unregisterised, optimised build of ghc, for porting:
+#BuildFlavour = unreg
+
+GhcLibWays = v
+
+# -------- 1. A Performance/Distribution build--------------------------------
+
+ifeq "$(BuildFlavour)" "perf"
+
+# perf matches the default settings, repeated here for comparison:
+
+SRC_HC_OPTS = -O -H64m
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O2 -fasm
+GhcHcOpts = -Rghc-timing
+GhcLibHcOpts = -O2
+GhcLibWays += p
+
+ifeq "$(PlatformSupportsSharedLibs)" "YES"
+GhcLibWays += dyn
+endif
+
+endif
+
+# -------- A Fast build ------------------------------------------------------
+
+ifeq "$(BuildFlavour)" "quickest"
+
+SRC_HC_OPTS = -H64m -O0 -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O0 -fasm
+GhcLibHcOpts = -O0 -fasm
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# -------- A Fast build with optimised libs ----------------------------------
+
+ifeq "$(BuildFlavour)" "quick"
+
+SRC_HC_OPTS = -H64m -O0 -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O0 -fasm
+GhcLibHcOpts = -O -fasm
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# -------- Profile the stage2 compiler ---------------------------------------
+
+ifeq "$(BuildFlavour)" "prof"
+
+SRC_HC_OPTS = -H64m -O0 -fasm
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O -fasm
+GhcLibHcOpts = -O -fasm
+
+GhcLibWays += p
+GhcProfiled = YES
+
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+
+# -------- A Development build (stage 1) -------------------------------------
+
+ifeq "$(BuildFlavour)" "devel1"
+
+SRC_HC_OPTS = -H64m -O -fasm
+GhcLibHcOpts = -O -dcore-lint
+GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
+GhcStage2HcOpts = -Rghc-timing -O -fasm
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+LAX_DEPENDENCIES = YES
+
+endif
+
+# -------- A Development build (stage 2) -------------------------------------
+
+ifeq "$(BuildFlavour)" "devel2"
+
+SRC_HC_OPTS = -H64m -O -fasm
+GhcLibHcOpts = -O -dcore-lint
+GhcStage1HcOpts = -Rghc-timing -O -fasm
+GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+LAX_DEPENDENCIES = YES
+
+# After stage 1 and the libraries have been built, you can uncomment this line:
+
+# stage=2
+
+# Then stage 1 will not be touched by the build system, until
+# you comment the line again. This is a useful trick for when you're
+# working on stage 2 and want to freeze stage 1 and the libraries for
+# a while.
+
+endif
+
+# -------- A Unregisterised build) -------------------------------------------
+
+ifeq "$(BuildFlavour)" "unreg"
+
+GhcUnregisterised = YES
+GhcWithNativeCodeGen = NO
+
+SRC_HC_OPTS = -O -H64m
+GhcStage1HcOpts = -O
+GhcStage2HcOpts = -O2
+GhcHcOpts = -Rghc-timing
+GhcLibHcOpts = -O2
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# -----------------------------------------------------------------------------
+# Other settings that might be useful
+
+# NoFib settings
+NoFibWays =
+STRIP_CMD = :
diff --git a/staging/ghc/ghc.install b/staging/ghc/ghc.install
new file mode 100644
index 000000000..c0200e4a6
--- /dev/null
+++ b/staging/ghc/ghc.install
@@ -0,0 +1,10 @@
+pre_upgrade() {
+ echo '==> Unregistering cabalized packages...'
+ [[ -d /usr/share/haskell ]] && find /usr/share/haskell -maxdepth 2 -name 'unregister.sh' -exec {} \;
+ echo '==> Done.'
+}
+
+post_upgrade() {
+ echo '==> All cabalized packages need to be reinstalled now.'
+ echo '==> See /usr/share/haskell/ and ghc-pkg list --user for a tentative list of affected packages.'
+}
diff --git a/staging/ghc/print-provides-replaces.sh b/staging/ghc/print-provides-replaces.sh
new file mode 100755
index 000000000..33d1da051
--- /dev/null
+++ b/staging/ghc/print-provides-replaces.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. PKGBUILD
+
+if [[ ! -d src/ghc-${pkgver}/libraries ]]; then
+ echo "error: no directory src/ghc-${pkgver}/libraries: You must extract the source tarball under src/"
+ exit 1
+fi
+
+declare -A exclude
+# no Win32 cause we're not building on windows
+exclude['Win32']=1
+# no integer-simple because we use integer-gmp
+exclude['integer-simple']=1
+# extract excluded libraries from ghc.mk
+for exclude_pkg in $(sed 's/PKGS_THAT_ARE_INTREE_ONLY := //p' -n src/ghc-${pkgver}/ghc.mk); do
+ exclude[${exclude_pkg}]=1
+done
+
+cd src/ghc-${pkgver}/libraries
+
+# $1 is the name of the variable
+# $2 is the string for the test, either '=' or '<'
+print_var() {
+ printf "$1=("
+ for pkg in $(ls ./*/*.cabal | awk -F '/' '{ print $2 }'); do
+ [[ ${exclude[${pkg}]} ]] && continue
+ version=$(awk 'tolower($0) ~ /^version:/ {print $2 }' $pkg/$pkg.cabal)
+ printf "'haskell-$pkg$2$version'\n "
+ done
+ # also add cabal
+ version=$(awk 'tolower($0) ~ /^version:/ { print $2 }' Cabal/Cabal/Cabal.cabal)
+ printf "'haskell-cabal$2$version'\n "
+ echo -e '\b)'
+}
+
+print_var 'provides' '='
+print_var 'replaces' '<'
diff --git a/staging/ghc/silence-gen_contents_index.diff b/staging/ghc/silence-gen_contents_index.diff
new file mode 100644
index 000000000..6d835f8fb
--- /dev/null
+++ b/staging/ghc/silence-gen_contents_index.diff
@@ -0,0 +1,10 @@
+--- ghc-7.4.2/libraries/gen_contents_index.original 2012-06-10 22:23:28.810059378 +0000
++++ ghc-7.4.2/libraries/gen_contents_index 2012-06-10 22:24:00.289814576 +0000
+@@ -47,7 +47,6 @@
+ esac
+
+ # Now create the combined contents and index pages
+-echo $HADDOCK_ARGS
+ $HADDOCK --gen-index --gen-contents -o . \
+ -t "Haskell Hierarchical Libraries" \
+ -p "prologue.txt" \
diff --git a/staging/haskell-http/PKGBUILD b/staging/haskell-http/PKGBUILD
new file mode 100644
index 000000000..fda58f3c9
--- /dev/null
+++ b/staging/haskell-http/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+
+_hkgname=HTTP
+pkgname=haskell-http
+pkgver=4000.2.3
+pkgrel=1
+pkgdesc="A library for client-side HTTP"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.4.2-1' 'sh' 'haskell-network=2.3.0.14-1' 'haskell-parsec=3.1.2-2' 'haskell-mtl=2.1.1-1')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('872a1e49c3701c61c354f76716d4e3e7')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/staging/haskell-http/haskell-http.install b/staging/haskell-http/haskell-http.install
new file mode 100644
index 000000000..fdebb1cb8
--- /dev/null
+++ b/staging/haskell-http/haskell-http.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-http
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/staging/haskell-mtl/PKGBUILD b/staging/haskell-mtl/PKGBUILD
new file mode 100644
index 000000000..4b2f73533
--- /dev/null
+++ b/staging/haskell-mtl/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+
+_hkgname=mtl
+pkgname=haskell-mtl
+pkgver=2.1.1
+pkgrel=1
+pkgdesc="Monad transformer library"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.4.2-1' 'sh' 'haskell-transformers=0.3.0.0-1')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz)
+install=${pkgname}.install
+md5sums=('0654be687f1492a2ff30cf6f3fb7eed0')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/staging/haskell-mtl/haskell-mtl.install b/staging/haskell-mtl/haskell-mtl.install
new file mode 100644
index 000000000..9325811e8
--- /dev/null
+++ b/staging/haskell-mtl/haskell-mtl.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-mtl
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/staging/haskell-network/PKGBUILD b/staging/haskell-network/PKGBUILD
new file mode 100644
index 000000000..f3a3cc022
--- /dev/null
+++ b/staging/haskell-network/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package generated by cabal2arch 0.7.6
+
+_hkgname=network
+pkgname=haskell-network
+pkgver=2.3.0.14
+pkgrel=1
+pkgdesc="Networking-related facilities"
+url="http://hackage.haskell.org/package/network"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.4.2-1' 'sh' 'haskell-parsec=3.1.2-2')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('1e45cc731647acff8b9c33bda085bf2a')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/staging/haskell-network/haskell-network.install b/staging/haskell-network/haskell-network.install
new file mode 100644
index 000000000..a56c31d0a
--- /dev/null
+++ b/staging/haskell-network/haskell-network.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-network
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/staging/haskell-parsec/PKGBUILD b/staging/haskell-parsec/PKGBUILD
new file mode 100644
index 000000000..2ab24a745
--- /dev/null
+++ b/staging/haskell-parsec/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# As generated by cabal2arch 0.7.6
+
+_hkgname=parsec
+pkgname=haskell-parsec
+pkgver=3.1.2
+pkgrel=2
+pkgdesc="Monadic parser combinators"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.4.2-1' 'sh' 'haskell-mtl=2.1.1-1' 'haskell-text=0.11.2.1-1')
+source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+install=${pkgname}.install
+md5sums=('c2a75dfd247ae4839e2602b62dc87487')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/staging/haskell-parsec/haskell-parsec.install b/staging/haskell-parsec/haskell-parsec.install
new file mode 100644
index 000000000..dfa0701b9
--- /dev/null
+++ b/staging/haskell-parsec/haskell-parsec.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-parsec
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/staging/haskell-random/PKGBUILD b/staging/haskell-random/PKGBUILD
new file mode 100644
index 000000000..56b110289
--- /dev/null
+++ b/staging/haskell-random/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+
+_hkgname=random
+pkgname=haskell-random
+pkgver=1.0.1.1
+pkgrel=2
+pkgdesc="A basic random number generation library"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.4.2-1' 'sh')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+install=${pkgname}.install
+md5sums=('9a249cfa7ff6793cbf2be06e9fcd7538')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
+
diff --git a/staging/haskell-random/haskell-random.install b/staging/haskell-random/haskell-random.install
new file mode 100644
index 000000000..b6d807e1a
--- /dev/null
+++ b/staging/haskell-random/haskell-random.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-random
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/staging/haskell-text/PKGBUILD b/staging/haskell-text/PKGBUILD
new file mode 100644
index 000000000..31811e339
--- /dev/null
+++ b/staging/haskell-text/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+
+_hkgname=text
+pkgname=haskell-text
+pkgver=0.11.2.1
+pkgrel=1
+pkgdesc="An efficient packed Unicode text type."
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.4.2-1' 'sh')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+install=${pkgname}.install
+md5sums=('77245df79d10ed5f896a9d3f5b17ee74')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/staging/haskell-text/haskell-text.install b/staging/haskell-text/haskell-text.install
new file mode 100644
index 000000000..620db3921
--- /dev/null
+++ b/staging/haskell-text/haskell-text.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-text
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/staging/haskell-transformers/PKGBUILD b/staging/haskell-transformers/PKGBUILD
new file mode 100644
index 000000000..96f762dc9
--- /dev/null
+++ b/staging/haskell-transformers/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 161398 2012-06-11 01:41:58Z tdziedzic $
+
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Contributor: Rémy Oudompheng <remy@archlinux.org>
+
+_hkgname=transformers
+pkgname=haskell-transformers
+pkgver=0.3.0.0
+pkgrel=1
+pkgdesc="Concrete functor and monad transformers"
+url="http://hackage.haskell.org/package/${_hkgname}"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.4.2-1' 'sh')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/$pkgver/${_hkgname}-$pkgver.tar.gz")
+install=${pkgname}.install
+md5sums=('852dc0b79cc2bcb39136287d3dd385e5')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared --prefix=/usr \
+ --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/staging/haskell-transformers/haskell-transformers.install b/staging/haskell-transformers/haskell-transformers.install
new file mode 100644
index 000000000..eec2af6e1
--- /dev/null
+++ b/staging/haskell-transformers/haskell-transformers.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-transformers
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/staging/haskell-zlib/PKGBUILD b/staging/haskell-zlib/PKGBUILD
new file mode 100644
index 000000000..11767ab97
--- /dev/null
+++ b/staging/haskell-zlib/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Thomas Dziedzic <gostrc@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
+# Package originally generated by cabal2arch 0.7.6
+
+_hkgname=zlib
+pkgname=haskell-zlib
+pkgver=0.5.3.3
+pkgrel=4
+pkgdesc="Compression and decompression in the gzip and zlib formats"
+url="http://hackage.haskell.org/package/zlib"
+license=('custom:BSD3')
+arch=('i686' 'x86_64')
+depends=('ghc=7.4.2-1' 'zlib' 'sh')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+install=${pkgname}.install
+md5sums=('1649e56d13ce2c6a6a9210227401dbbc')
+
+build() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
+ --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
+ --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${srcdir}/${_hkgname}-${pkgver}
+ install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
+ install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
+ install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
+ ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
+ runhaskell Setup copy --destdir=${pkgdir}
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
+}
diff --git a/staging/haskell-zlib/haskell-zlib.install b/staging/haskell-zlib/haskell-zlib.install
new file mode 100644
index 000000000..d387b7b65
--- /dev/null
+++ b/staging/haskell-zlib/haskell-zlib.install
@@ -0,0 +1,18 @@
+HS_DIR=usr/share/haskell/haskell-zlib
+post_install() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_upgrade() {
+ ${HS_DIR}/unregister.sh
+}
+post_upgrade() {
+ ${HS_DIR}/register.sh
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
+pre_remove() {
+ ${HS_DIR}/unregister.sh
+}
+post_remove() {
+ (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
+}
diff --git a/staging/lm_sensors/PKGBUILD b/staging/lm_sensors/PKGBUILD
new file mode 100644
index 000000000..35a5292a2
--- /dev/null
+++ b/staging/lm_sensors/PKGBUILD
@@ -0,0 +1,55 @@
+# $Id: PKGBUILD 161414 2012-06-11 02:28:41Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=lm_sensors
+pkgver=3.3.2
+pkgrel=3
+pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring"
+arch=('i686' 'x86_64')
+url="http://www.lm-sensors.org/"
+license=('GPL' 'LGPL')
+depends=('perl' 'sysfsutils')
+makedepends=('rrdtool')
+optdepends=('rrdtool: for logging with sensord')
+backup=('etc/sensors3.conf' 'etc/conf.d/healthd' 'etc/conf.d/sensord')
+options=('!emptydirs')
+source=(http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${pkgver}.tar.bz2{,.sig} \
+ sensors.rc fancontrol.rc healthd healthd.conf healthd.rc sensord.conf \
+ sensord.rc fancontrol.service daemonarg.patch linux_3.0.patch)
+sha1sums=('5d0f026ad763124e8c2ad733b6e1ad5e6473993d'
+ 'a486d9fb6c5b0aff4520f6312106c67f5163f1cf'
+ 'b2e664b9b87759991f02d0a1e8cac5e95098c0a5'
+ 'a068ac0a3115a6191a487e11422506baa922b40a'
+ '78b5cd36c3cb8e98b972cdd8c4a12687d79a79a8'
+ '6c4e8a2d89dd2fd3ca2f0f4f3b1230111e01b0fc'
+ 'e662881f5d3f3f35a1bc97ba45d2c471dd28c37f'
+ 'de8d4d65406815c389f8a04e2a8508a1ae6749c8'
+ '72a60251d1d55a67307dab4105d9f3f01a080af4'
+ '7a4a4d1442aeeba0ba8aefb742a3ef187b593f4c'
+ '34241388c4001bfb6e49b7e10da1217e29a258d6'
+ '5662828085cdd981f0dc7cf8f79d3d6e2b72f50c')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i -e 's|/etc/sysconfig|/etc/conf.d|' \
+ -e 's|/etc/init.d/lm_sensors|/etc/rc.d/sensors|' prog/{detect/sensors-detect,init/lm_sensors.service}
+ sed -i 's@\(/bin/systemctl\|/lib/systemd/system\)@/usr\1@g' prog/detect/sensors-detect
+ patch -p1 < ../daemonarg.patch
+ patch -p0 < ../linux_3.0.patch
+ make PREFIX=/usr
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make PROG_EXTRA=sensord BUILD_STATIC_LIB=0 \
+ PREFIX=/usr MANDIR=/usr/share/man DESTDIR="${pkgdir}" install
+ install -D -m644 prog/init/lm_sensors.service "${pkgdir}/usr/lib/systemd/system/lm_sensors.service"
+ install -D -m755 "${srcdir}/sensors.rc" "${pkgdir}/etc/rc.d/sensors"
+ install -D -m755 "${srcdir}/fancontrol.rc" "${pkgdir}/etc/rc.d/fancontrol"
+ install -D -m755 "${srcdir}/healthd" "${pkgdir}/usr/sbin/healthd"
+ install -D -m755 "${srcdir}/healthd.rc" "${pkgdir}/etc/rc.d/healthd"
+ install -D -m644 "${srcdir}/healthd.conf" "${pkgdir}/etc/conf.d/healthd"
+ install -D -m755 "${srcdir}/sensord.rc" "${pkgdir}/etc/rc.d/sensord"
+ install -D -m644 "${srcdir}/sensord.conf" "${pkgdir}/etc/conf.d/sensord"
+ install -D -m644 "${srcdir}/fancontrol.service" "${pkgdir}/usr/lib/systemd/system/fancontrol.service"
+}
diff --git a/staging/lm_sensors/daemonarg.patch b/staging/lm_sensors/daemonarg.patch
new file mode 100644
index 000000000..4b80cef19
--- /dev/null
+++ b/staging/lm_sensors/daemonarg.patch
@@ -0,0 +1,50 @@
+diff -ru lm_sensors-3.1.2-1/prog/pwm/fancontrol lm_sensors-3.1.2-1_pyropeter/usr/sbin/fancontrol
+--- lm_sensors-3.1.2-1/prog/pwm/fancontrol 2010-02-03 03:45:15.000000000 +0100
++++ lm_sensors-3.1.2-1_pyropeter/prog/pwm/fancontrol 2010-03-07 01:37:09.000000000 +0100
+@@ -5,7 +5,9 @@
+ #
+ # Version 0.70
+ #
+-# Usage: fancontrol [CONFIGFILE]
++# Usage: fancontrol [-D] [CONFIGFILE]
++#
++# (-D causes fancontrol to 'fork' to the background after some tests)
+ #
+ # Dependencies:
+ # bash, egrep, sed, cut, sleep, readlink, lm_sensors :)
+@@ -43,6 +45,12 @@
+ #DEBUG=1
+ MAX=255
+
++DAEMON=0
++if [ "$1" = "-D" ]; then
++ DAEMON=1
++ shift
++fi
++
+ declare -i pwmval
+
+ function LoadConfig {
+@@ -303,7 +311,6 @@
+ echo "File $PIDFILE exists, is fancontrol already running?"
+ exit 1
+ fi
+-echo $$ > "$PIDFILE"
+
+ # $1 = pwm file name
+ function pwmdisable()
+@@ -475,6 +482,14 @@
+ let fcvcount=$fcvcount+1
+ done
+
++if [ "$DAEMON" -gt 0 ]; then
++ echo "Forking..."
++ $0 $* &> /dev/null &
++ exit 0
++fi
++
++echo $$ > "$PIDFILE"
++
+ echo 'Starting automatic fan control...'
+
+ # main loop calling the main function at specified intervals
diff --git a/staging/lm_sensors/fancontrol.rc b/staging/lm_sensors/fancontrol.rc
new file mode 100644
index 000000000..8e98d06f2
--- /dev/null
+++ b/staging/lm_sensors/fancontrol.rc
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=$(pidof -o %PPID -x /usr/sbin/fancontrol)
+case "$1" in
+ start)
+ stat_busy "Starting fancontrol"
+ [ -z "$PID" ] && /usr/sbin/fancontrol -D &>/dev/null
+ if [ $? -gt 0 -o -n "$PID" ]; then
+ stat_fail
+ else
+ add_daemon fancontrol
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping fancontrol"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon fancontrol
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/lm_sensors/fancontrol.service b/staging/lm_sensors/fancontrol.service
new file mode 100644
index 000000000..c86b498f8
--- /dev/null
+++ b/staging/lm_sensors/fancontrol.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Fan control daemon
+
+[Service]
+PIDFile=/var/run/fancontrol.pid
+ExecStart=/usr/sbin/fancontrol
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/lm_sensors/healthd b/staging/lm_sensors/healthd
new file mode 100644
index 000000000..0315dd788
--- /dev/null
+++ b/staging/lm_sensors/healthd
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+#
+# /usr/sbin/healthd
+#
+
+. /etc/conf.d/healthd
+
+cmd="${ALARM_CMD}"
+addr="${ADMIN_EMAIL}"
+slp="${ALARM_SLEEP}"
+sensors="/usr/bin/sensors"
+
+
+while [ $# -gt 0 ] ; do
+ case "${1}" in
+ -c ) cmd="${2}" ; shift 2 ;;
+ -m ) addr="${2}" ; shift 2 ;;
+ -s ) slp="${2}" ; shift 2 ;;
+ * ) shift 1 ;;
+ esac
+done
+
+[ -n "${cmd}" ] && [ -n "$( which -- "${cmd%% *}" )" ] || \
+ [ -n "${addr}" ] || exit 1
+
+[ "${slp}" -ge 2 ] || slp=600
+
+while true ; do
+ sleep 15
+ message="$( $sensors )"
+ case "$message" in
+ '' ) message='Could not get any sensor values !' ;;
+ *ALARM* ) : ;;
+ * ) message='' ;;
+ esac
+ if [ -n "$message" ]; then
+ if [ -n "${addr}" ]; then
+ echo "$message" | mail -s \
+ "Sensors ALARM detected at host: $( hostname )" \
+ "${addr}"
+ fi
+ [ -z "${cmd}" ] || ${cmd} &
+ sleep ${slp}
+ fi
+done &
diff --git a/staging/lm_sensors/healthd.conf b/staging/lm_sensors/healthd.conf
new file mode 100644
index 000000000..a8b2c3fa3
--- /dev/null
+++ b/staging/lm_sensors/healthd.conf
@@ -0,0 +1,17 @@
+#
+# /etc/conf.d/healthd
+#
+
+# reset any pending alarms on startup
+ALARM_RESET="yes"
+
+# where to sent mails on alarm
+ADMIN_EMAIL="root"
+
+# Seconds to sleep when alarm detected before checking again
+# If you want to fill up your mail inbox set this to 2. ;-)
+ALARM_SLEEP=600
+
+# command to run in background on each alarm
+# N.B.: If you choose to use the beep command, you'll need to install it: pacman -S beep
+ALARM_CMD="beep -f 800 -l 500 -d 500 -r 600"
diff --git a/staging/lm_sensors/healthd.rc b/staging/lm_sensors/healthd.rc
new file mode 100644
index 000000000..7bb79519f
--- /dev/null
+++ b/staging/lm_sensors/healthd.rc
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#
+# /etc/rc.d/healthd
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/healthd
+
+maybe_alarm_reset() {
+ case "${ALARM_RESET}" in
+ yes) /usr/bin/sensors > /dev/null
+ ;;
+ no) true
+ ;;
+ *) false
+ esac
+ return $?
+}
+
+PID=$(pidof -x -o %PPID /usr/sbin/healthd)
+case "${1}" in
+ start)
+ stat_busy "Starting Health Daemon"
+ [ -z "${PID}" ] && maybe_alarm_reset && /usr/sbin/healthd &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo "${PID}" > /var/run/healthd.pid
+ add_daemon healthd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Health Daemon"
+ [ ! -z "${PID}" ] && kill ${PID} &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon healthd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *) echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/lm_sensors/linux_3.0.patch b/staging/lm_sensors/linux_3.0.patch
new file mode 100644
index 000000000..da02a3d49
--- /dev/null
+++ b/staging/lm_sensors/linux_3.0.patch
@@ -0,0 +1,11 @@
+--- prog/detect/sensors-detect 2011-08-02 10:23:46.000000000 +0200
++++ prog/detect/sensors-detect 2011-08-02 10:24:04.000000000 +0200
+@@ -2472,7 +2472,7 @@
+
+ sub initialize_kernel_version
+ {
+- `uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
++ `uname -r` =~ /(\d+)\.(\d+)(.*)/;
+ @kernel_version = ($1, $2, $3, $4);
+ chomp($kernel_arch = `uname -m`);
+
diff --git a/staging/lm_sensors/sensord.conf b/staging/lm_sensors/sensord.conf
new file mode 100644
index 000000000..a1cf091c1
--- /dev/null
+++ b/staging/lm_sensors/sensord.conf
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to sensord
+#
+SENSORD_ARGS=""
diff --git a/staging/lm_sensors/sensord.rc b/staging/lm_sensors/sensord.rc
new file mode 100644
index 000000000..e3ef4d26d
--- /dev/null
+++ b/staging/lm_sensors/sensord.rc
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/sensord
+
+PID=$(pidof -o %PPID /usr/sbin/sensord)
+case "$1" in
+ start)
+ stat_busy "Starting sensord"
+ [ -z "$PID" ] && /usr/sbin/sensord ${SENSORD_ARGS}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon sensord
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping sensord"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon sensord
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/lm_sensors/sensors.rc b/staging/lm_sensors/sensors.rc
new file mode 100644
index 000000000..4acde2202
--- /dev/null
+++ b/staging/lm_sensors/sensors.rc
@@ -0,0 +1,119 @@
+#!/bin/bash
+
+# description: sensors is used for monitoring motherboard sensor values.
+# config: /etc/conf.d/lm_sensors
+
+# See also the lm_sensors homepage at:
+# http://www2.lm-sensors.nu/~lm78/index.html
+
+# It uses a config file /etc/conf.d/lm_sensors that contains the modules to
+# be loaded/unloaded. That file is sourced into this one.
+
+# The format of that file a shell script that simply defines the modules
+# in order as normal shell variables with the special names:
+# MODULE_1, MODULE_2, MODULE_3, etc.
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PSENSORS=/usr/bin/sensors
+
+if $(grep -q sysfs /proc/mounts); then
+ WITHSYS=1
+else
+ WITHSYS=0
+fi
+
+if [ $WITHSYS == "0" ]; then
+ # If sensors isn't supported by the kernel, try loading the module...
+ [ -e /proc/sys/dev/sensors ] || /sbin/modprobe i2c-proc &>/dev/null
+
+ # Don't bother if /proc/sensors still doesn't exist, kernel doesn't have support for sensors.
+ if ! [ -e /proc/sys/dev/sensors ]; then
+ echo "lm_sensors: kernel does not have sensors support"
+ stat_fail
+ fi
+
+ # If sensors was not already running, unload the module...
+ [ -e /var/run/daemons/sensors ] || /sbin/modprobe -r i2c-proc &>/dev/null
+fi
+
+if [ -e /etc/conf.d/lm_sensors ]; then
+ CONFIG=/etc/conf.d/lm_sensors
+elif [ -e /etc/sysconfig/lm_sensors ]; then
+ # Moving config to new Arch-specific location
+ mv /etc/sysconfig/lm_sensors /etc/conf.d/lm_sensors
+ CONFIG=/etc/conf.d/lm_sensors
+fi
+
+case "$1" in
+ start)
+ stat_busy "Starting Up Sensors"
+
+ if [ -r "$CONFIG" ]; then
+ . "$CONFIG"
+ modules=$(grep \^MODULE_ $CONFIG | wc -l | tr -d ' ')
+ i=0
+ while [ $i -lt $modules ] ; do
+ module=$(eval echo '$'MODULE_$i)
+ # echo starting module __${module}__ #debug
+ /sbin/modprobe $module &>/dev/null
+ i=$(expr $i + 1)
+ done
+ fi
+
+ $PSENSORS -s
+
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon sensors
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Shutting Down Sensors"
+
+ if [ -r "$CONFIG" ]; then
+ . "$CONFIG"
+ modules=$(grep \^MODULE_ $CONFIG | wc -l | tr -d ' ')
+ i=$(expr $modules - 1)
+ while [ $i -ge 0 ] ; do
+ module=$(eval echo '$'MODULE_$i)
+ # echo stoping module __${module}__ #debug
+ /sbin/modprobe -r $module &>/dev/null
+ i=$(expr $i - 1)
+ done
+ fi
+
+ if [ $WITHSYS == "0" ]; then
+ /sbin/modprobe -r i2c-proc &>/dev/null
+ fi
+
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon sensors
+ stat_done
+ fi
+ ;;
+
+ status)
+ $PSENSORS
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ condrestart)
+ [ -e /var/run/daemons/sensors ] && $0 restart || :
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart|status|condrestart}"
+esac
+exit 0
diff --git a/staging/opal/PKGBUILD b/staging/opal/PKGBUILD
new file mode 100644
index 000000000..7bc062dbe
--- /dev/null
+++ b/staging/opal/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 161382 2012-06-10 15:56:57Z jgc $
+# Maintainer: Jan de Groot <jan@archlinux.org>
+# Contributor: Tom K <tomk@runbox.com>
+pkgname=opal
+pkgver=3.10.5
+pkgrel=1
+pkgdesc="Open Phone Abstraction Library"
+arch=(i686 x86_64)
+url="http://www.opalvoip.org"
+license=('GPL')
+depends=('ptlib' 'libtheora' 'x264' 'speex' 'gsm')
+makedepends=('ffmpeg')
+options=(!makeflags)
+source=(http://downloads.sourceforge.net/sourceforge/opalvoip/$pkgname-$pkgver.tar.bz2
+ opal-ffmpeg.patch)
+md5sums=('22b0d716ed1cbc935245539e0bbab38f' '53bb06a376fb57a306522bfa6a573217')
+
+build() {
+ cd "${srcdir}/opal-${pkgver}"
+ patch -Np1 -i "${srcdir}/opal-ffmpeg.patch"
+ CXXFLAGS="$CXXFLAGS -fpermissive" \
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make
+}
+
+package() {
+ cd "${srcdir}/opal-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ chmod 644 "${pkgdir}/usr/lib/libopal_s.a"
+}
diff --git a/staging/opal/opal-ffmpeg.patch b/staging/opal/opal-ffmpeg.patch
new file mode 100644
index 000000000..ebfd1f037
--- /dev/null
+++ b/staging/opal/opal-ffmpeg.patch
@@ -0,0 +1,194 @@
+diff -ru opal-3.10.5/plugins/video/H.263-1998/h263-1998.cxx opal-3.10.5.patched/plugins/video/H.263-1998/h263-1998.cxx
+--- opal-3.10.5/plugins/video/H.263-1998/h263-1998.cxx 2012-04-26 06:56:01.000000000 +0200
++++ opal-3.10.5.patched/plugins/video/H.263-1998/h263-1998.cxx 2012-06-10 16:39:35.447021150 +0200
+@@ -51,6 +51,7 @@
+ #endif
+
+ #include "h263-1998.h"
++#include <libavutil/opt.h>
+ #include <limits>
+ #include <iomanip>
+ #include <stdio.h>
+@@ -324,9 +325,9 @@
+ // Level 2+
+ // works with eyeBeam, signaled via non-standard "D"
+ if (atoi(value) == 1)
+- m_context->flags |= CODEC_FLAG_H263P_UMV;
++ av_opt_set_int(m_context->priv_data, "umv", 1, 0);
+ else
+- m_context->flags &= ~CODEC_FLAG_H263P_UMV;
++ av_opt_set_int(m_context->priv_data, "umv", 0, 0);
+ return;
+ }
+
+@@ -335,9 +336,9 @@
+ // Annex F: Advanced Prediction Mode
+ // does not work with eyeBeam
+ if (atoi(value) == 1)
+- m_context->flags |= CODEC_FLAG_OBMC;
++ av_opt_set_int(m_context->priv_data, "obmc", 1, 0);
+ else
+- m_context->flags &= ~CODEC_FLAG_OBMC;
++ av_opt_set_int(m_context->priv_data, "obmc", 0, 0);
+ return;
+ }
+ #endif
+@@ -367,9 +368,9 @@
+ // Annex K: Slice Structure
+ // does not work with eyeBeam
+ if (atoi(value) != 0)
+- m_context->flags |= CODEC_FLAG_H263P_SLICE_STRUCT;
++ av_opt_set_int(m_context->priv_data, "structured_slices", 1, 0);
+ else
+- m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT;
++ av_opt_set_int(m_context->priv_data, "structured_slices", 0, 0);
+ return;
+ }
+
+@@ -377,9 +378,9 @@
+ // Annex S: Alternative INTER VLC mode
+ // does not work with eyeBeam
+ if (atoi(value) == 1)
+- m_context->flags |= CODEC_FLAG_H263P_AIV;
++ av_opt_set_int(m_context->priv_data, "aiv", 1, 0);
+ else
+- m_context->flags &= ~CODEC_FLAG_H263P_AIV;
++ av_opt_set_int(m_context->priv_data, "aiv", 0, 0);
+ return;
+ }
+ }
+@@ -445,15 +446,6 @@
+ PTRACE(5, m_prefix, "qmax set to " << m_context->qmax);
+ PTRACE(5, m_prefix, "payload size set to " << m_context->rtp_payload_size);
+
+- #define CODEC_TRACER_FLAG(tracer, flag) \
+- PTRACE(4, m_prefix, #flag " is " << ((m_context->flags & flag) ? "enabled" : "disabled"));
+- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_UMV);
+- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_OBMC);
+- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_AC_PRED);
+- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_SLICE_STRUCT)
+- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_LOOP_FILTER);
+- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_AIV);
+-
+ return FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec) == 0;
+ }
+
+@@ -516,7 +508,7 @@
+
+ // Need to copy to local buffer to guarantee 16 byte alignment
+ memcpy(m_inputFrame->data[0], OPAL_VIDEO_FRAME_DATA_PTR(header), header->width*header->height*3/2);
+- m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? FF_I_TYPE : AV_PICTURE_TYPE_NONE;
++ m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_NONE;
+
+ /*
+ m_inputFrame->pts = (int64_t)srcRTP.GetTimestamp()*m_context->time_base.den/m_context->time_base.num/VIDEO_CLOCKRATE;
+@@ -598,13 +590,13 @@
+ m_context->rtp_callback = &H263_RFC2190_EncoderContext::RTPCallBack;
+ m_context->opaque = this; // used to separate out packets from different encode threads
+
+- m_context->flags &= ~CODEC_FLAG_H263P_UMV;
++ av_opt_set_int(m_context->priv_data, "umv", 0, 0);
+ m_context->flags &= ~CODEC_FLAG_4MV;
+ #if LIBAVCODEC_RTP_MODE
+ m_context->flags &= ~CODEC_FLAG_H263P_AIC;
+ #endif
+- m_context->flags &= ~CODEC_FLAG_H263P_AIV;
+- m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT;
++ av_opt_set_int(m_context->priv_data, "aiv", 0, 0);
++ av_opt_set_int(m_context->priv_data, "structured_slices", 0, 0);
+
+ return true;
+ }
+diff -ru opal-3.10.5/plugins/video/H.264/gpl/h264_helper.cxx opal-3.10.5.patched/plugins/video/H.264/gpl/h264_helper.cxx
+--- opal-3.10.5/plugins/video/H.264/gpl/h264_helper.cxx 2012-04-26 06:56:00.000000000 +0200
++++ opal-3.10.5.patched/plugins/video/H.264/gpl/h264_helper.cxx 2012-06-10 16:49:11.210568639 +0200
+@@ -25,6 +25,7 @@
+ #include <fstream>
+ #include <stdlib.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+
+
+ #ifndef PLUGINCODEC_TRACING
+diff -ru opal-3.10.5/plugins/video/H.264/h264-x264.cxx opal-3.10.5.patched/plugins/video/H.264/h264-x264.cxx
+--- opal-3.10.5/plugins/video/H.264/h264-x264.cxx 2012-04-26 06:56:00.000000000 +0200
++++ opal-3.10.5.patched/plugins/video/H.264/h264-x264.cxx 2012-06-10 17:04:19.695646950 +0200
+@@ -1035,13 +1035,10 @@
+ return false;
+
+ m_context->workaround_bugs = FF_BUG_AUTODETECT;
+- m_context->error_recognition = FF_ER_AGGRESSIVE;
+ m_context->idct_algo = FF_IDCT_H264;
+ m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
+ m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
+- m_context->flags2 = CODEC_FLAG2_BRDO |
+- CODEC_FLAG2_MEMC_ONLY |
+- CODEC_FLAG2_DROP_FRAME_TIMECODE |
++ m_context->flags2 = CODEC_FLAG2_DROP_FRAME_TIMECODE |
+ CODEC_FLAG2_SKIP_RD |
+ CODEC_FLAG2_CHUNKS;
+
+diff -ru opal-3.10.5/plugins/video/H.264/shared/x264wrap.cxx opal-3.10.5.patched/plugins/video/H.264/shared/x264wrap.cxx
+--- opal-3.10.5/plugins/video/H.264/shared/x264wrap.cxx 2012-04-26 06:56:00.000000000 +0200
++++ opal-3.10.5.patched/plugins/video/H.264/shared/x264wrap.cxx 2012-06-10 17:04:46.012171051 +0200
+@@ -33,6 +33,7 @@
+
+ #include <codec/opalplugin.hpp>
+ #include <stdio.h>
++#include <unistd.h>
+
+
+ #if defined(X264_LICENSED) || defined(GPL_HELPER_APP)
+diff -ru opal-3.10.5/plugins/video/MPEG4-ffmpeg/mpeg4.cxx opal-3.10.5.patched/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
+--- opal-3.10.5/plugins/video/MPEG4-ffmpeg/mpeg4.cxx 2012-04-26 06:56:02.000000000 +0200
++++ opal-3.10.5.patched/plugins/video/MPEG4-ffmpeg/mpeg4.cxx 2012-06-10 16:46:33.498089705 +0200
+@@ -101,8 +101,10 @@
+ #include <libavutil/bswap.h>
+ #include <libavcodec/mpegvideo.h>
+
++
+ #else /* LIBAVCODEC_HAVE_SOURCE_DIR */
+ #include LIBAVCODEC_HEADER
++#include <libavutil/opt.h>
+ #endif /* LIBAVCODEC_HAVE_SOURCE_DIR */
+ }
+
+@@ -589,17 +591,17 @@
+ m_avpicture->quality = m_videoQMin;
+
+ #ifdef USE_ORIG
+- m_avcontext->flags |= CODEC_FLAG_PART; // data partitioning
++ av_opt_set_int(m_avcontext->priv_data, "data_partitionin", 1, 0);
+ m_avcontext->flags |= CODEC_FLAG_4MV; // 4 motion vectors
+ #else
+ m_avcontext->max_b_frames=0; /*don't use b frames*/
+ m_avcontext->flags|=CODEC_FLAG_AC_PRED;
+- m_avcontext->flags|=CODEC_FLAG_H263P_UMV;
++ av_opt_set_int(m_avcontext->priv_data, "umv", 1, 0);
+ /*c->flags|=CODEC_FLAG_QPEL;*/ /*don't enable this one: this forces profile_level to advanced simple profile */
+ m_avcontext->flags|=CODEC_FLAG_4MV;
+ m_avcontext->flags|=CODEC_FLAG_GMC;
+ m_avcontext->flags|=CODEC_FLAG_LOOP_FILTER;
+- m_avcontext->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
++ av_opt_set_int(m_avcontext->priv_data, "structured_slices", 1, 0);
+ #endif
+ m_avcontext->opaque = this; // for use in RTP callback
+ }
+@@ -804,7 +806,7 @@
+ // Should the next frame be an I-Frame?
+ if ((flags & PluginCodec_CoderForceIFrame) || (m_frameNum == 0))
+ {
+- m_avpicture->pict_type = FF_I_TYPE;
++ m_avpicture->pict_type = AV_PICTURE_TYPE_I;
+ }
+ else // No IFrame requested, let avcodec decide what to do
+ {
+@@ -1325,7 +1327,7 @@
+
+ void MPEG4DecoderContext::SetStaticDecodingParams() {
+ m_avcontext->flags |= CODEC_FLAG_4MV;
+- m_avcontext->flags |= CODEC_FLAG_PART;
++ av_opt_set_int(m_avcontext->priv_data, "data_partitionin", 1, 0);
+ m_avcontext->workaround_bugs = 0; // no workaround for buggy implementations
+ }
+
diff --git a/staging/opencv/PKGBUILD b/staging/opencv/PKGBUILD
new file mode 100644
index 000000000..5d569a314
--- /dev/null
+++ b/staging/opencv/PKGBUILD
@@ -0,0 +1,118 @@
+# $Id: PKGBUILD 161376 2012-06-10 12:41:40Z schiv $
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgbase=opencv
+pkgname=('opencv' 'opencv-docs' 'opencv-samples')
+_realname=OpenCV
+pkgver=2.4.1
+pkgrel=2
+pkgdesc="Open Source Computer Vision Library"
+arch=('i686' 'x86_64')
+license=('BSD')
+url="http://opencv.willowgarage.com/"
+depends=('jasper' 'gstreamer0.10-base' 'openexr'
+ 'gtk2' 'xine-lib' 'libdc1394' 'v4l-utils')
+makedepends=('pkg-config' 'cmake' 'python2-numpy' 'eigen2')
+optdepends=('opencv-docs'
+ 'opencv-samples'
+ 'eigen2'
+ 'python2-numpy: Python 2.x interface')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/opencvlibrary/$_realname-${pkgver}.tar.bz2")
+md5sums=('144aafa12260150490ce77d8debc1a23')
+
+_cmakeopts=('-D CMAKE_BUILD_TYPE=Release'
+ '-D CMAKE_INSTALL_PREFIX=/usr'
+ '-D CMAKE_SKIP_RPATH=ON'
+ '-D BUILD_TESTS=OFF'
+ '-D ENABLE_SSE=ON'
+ '-D ENABLE_SSE2=ON'
+ '-D ENABLE_SSE3=OFF'
+ '-D ENABLE_SSSE3=OFF'
+ '-D ENABLE_SSE41=OFF'
+ '-D ENABLE_SSE42=OFF'
+ '-D BUILD_EXAMPLES=ON'
+ '-D INSTALL_C_EXAMPLES=ON'
+ '-D INSTALL_PYTHON_EXAMPLES=ON'
+ '-D WITH_XINE=ON'
+ '-D WITH_QT=OFF'
+ '-D WITH_QT_OPENGL=OFF'
+ '-D WITH_UNICAP=OFF'
+ '-D WITH_PVAPI=OFF'
+ '-D WITH_OPENNI=OFF'
+ '-D WITH_TBB=OFF'
+ '-D WITH_IPP=OFF'
+ '-D WITH_CUDA=OFF'
+ '-D USE_FAST_MATH=ON')
+
+build() {
+ cd "$srcdir/$_realname-$pkgver"
+
+ # x64, i.e "Athlon64" and upwards, can use SSE3
+ [ $CARCH = x86_64 ] && \
+ _cmakeopts=${_cmakeopts[@]/ENABLE_SSE3=OFF/ENABLE_SSE3=ON}
+
+ cmake ${_cmakeopts[@]} .
+
+ make
+}
+
+package_opencv() {
+ cd "$srcdir/$_realname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ # install license file
+ install -Dm644 "$srcdir/$_realname-$pkgver/doc/license.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ cd "$pkgdir/usr/share"
+
+ # prepare FSH-friendly dirs
+ if [ -d OpenCV ]; then
+ mv opencv/samples OpenCV/
+ rm -r opencv
+ mv OpenCV opencv
+ fi
+
+ # separate docs package; also be -R friendly
+ [ -d opencv/doc ] && mv opencv/doc "$srcdir/opencv-doc"
+
+ # separate samples package
+ [ -d opencv/samples ] && mv opencv/samples "$srcdir/opencv-samples"
+}
+
+package_opencv-docs() {
+ pkgdesc+=" (documentation)"
+ unset depends
+ unset optdepends
+ options=('docs')
+
+ cd "$srcdir"
+
+ mkdir -p "$pkgdir/usr/share/doc"
+ cp -r opencv-doc "$pkgdir/usr/share/doc/opencv"
+
+ # install license file
+ install -Dm644 "$srcdir/$_realname-$pkgver/doc/license.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_opencv-samples() {
+ pkgdesc+=" (samples)"
+ depends=('bash')
+ unset optdepends
+ unset options
+
+ cd "$srcdir"
+
+ mkdir -p "$pkgdir/usr/share/opencv"
+ cp -r opencv-samples "$pkgdir/usr/share/opencv/samples"
+
+ # install license file
+ install -Dm644 "$srcdir/$_realname-$pkgver/doc/license.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/openssh/PKGBUILD b/staging/openssh/PKGBUILD
index e921291d4..a492d3cb0 100644
--- a/staging/openssh/PKGBUILD
+++ b/staging/openssh/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 161305 2012-06-09 05:45:18Z bisson $
+# $Id: PKGBUILD 161379 2012-06-10 13:19:01Z bluewind $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
diff --git a/staging/openssh/sshd@.service b/staging/openssh/sshd@.service
new file mode 100644
index 000000000..2fd9b0814
--- /dev/null
+++ b/staging/openssh/sshd@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=OpenSSH Per-Connection Daemon
+After=sshdgenkeys.service
+
+[Service]
+ExecStart=-/usr/sbin/sshd -i
+StandardInput=socket
+StandardError=syslog
diff --git a/staging/ptlib/PKGBUILD b/staging/ptlib/PKGBUILD
new file mode 100644
index 000000000..d2901620b
--- /dev/null
+++ b/staging/ptlib/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 161375 2012-06-10 12:11:23Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=ptlib
+pkgver=2.10.5
+pkgrel=1
+pkgdesc="Portable Windows Library"
+arch=('i686' 'x86_64')
+url="http://www.opalvoip.org"
+license=('GPL')
+depends=('sdl' 'libpulse' 'v4l-utils' 'libldap')
+replaces=('pwlib')
+conflicts=('pwlib')
+source=(http://downloads.sourceforge.net/sourceforge/opalvoip/$pkgname-$pkgver.tar.bz2)
+md5sums=('20e0bc3cc85affed55e1481bf96c8c6b')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --libdir=/usr/lib \
+ --sysconfdir=/etc --localstatedir=/var \
+ --enable-opal --enable-plugins \
+ --enable-oss --enable-v4l2 \
+ --disable-avc --enable-sdl \
+ --enable-ipv6 --enable-v4l \
+ --enable-dc --disable-odbc \
+ --enable-expat --enable-httpforms
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
+md5sums=('a5a571457ff3a398995b34f66d6c3cbb')
diff --git a/staging/smartmontools/PKGBUILD b/staging/smartmontools/PKGBUILD
new file mode 100644
index 000000000..3028de4ca
--- /dev/null
+++ b/staging/smartmontools/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id: PKGBUILD 161354 2012-06-10 07:33:44Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Jeff Mickey <jeff@archlinux.org>
+# Contributor: Jani Talikka <jani.talikka@gmail.com>
+# Contributor: Ralf Barth <archlinux.org@haggy.org>
+
+pkgname=smartmontools
+pkgver=5.42
+pkgrel=4
+pkgdesc="Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives"
+url="http://smartmontools.sourceforge.net"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('gcc-libs' 'libcap-ng' 'bash')
+backup=('etc/smartd.conf'
+ 'etc/conf.d/smartd')
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'smartd.conf'
+ 'smartd.rc')
+md5sums=('4460bf9a79a1252ff5c00ba52cf76b2a'
+ '28c1b80c41dac52d433961dcfb4f70e0'
+ 'fb30e07f87f2c1d99532e018291ad3e8')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-drivedb \
+ --with-libcap-ng=yes \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ sed -i -e "s:sysconfig/smartmontools:conf.d/smartd:g" smartd.service
+ sed -i -e "s:smartd_opts:SMARTD_ARGS:g" smartd.service
+
+ make DESTDIR="${pkgdir}" install
+
+ rm -rf ${pkgdir}/etc/rc.d
+ install -Dm755 ${srcdir}/smartd.rc "${pkgdir}/etc/rc.d/smartd"
+ install -Dm644 ${srcdir}/smartd.conf "${pkgdir}/etc/conf.d/smartd"
+}
diff --git a/staging/smartmontools/smartd.conf b/staging/smartmontools/smartd.conf
new file mode 100644
index 000000000..f14870abf
--- /dev/null
+++ b/staging/smartmontools/smartd.conf
@@ -0,0 +1 @@
+SMARTD_ARGS=""
diff --git a/staging/smartmontools/smartd.rc b/staging/smartmontools/smartd.rc
new file mode 100755
index 000000000..16920db12
--- /dev/null
+++ b/staging/smartmontools/smartd.rc
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# source application-specific settings
+SMARTD_ARGS=
+[ -f /etc/conf.d/smartd ] && . /etc/conf.d/smartd
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+
+ start)
+ stat_busy "Starting smartd"
+ /usr/sbin/smartd ${SMARTD_ARGS} &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ add_daemon smartd
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping smartd"
+ kill -9 `pidof /usr/sbin/smartd` &>/dev/null
+ rm_daemon smartd
+ stat_done
+ ;;
+
+ restart)
+ stat_busy "Restarting smartd ..."
+ $0 stop
+ $0 start
+ stat_done
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac