updated on Sat Jan 21 20:03:50 UTC 2012
[aur-mirror.git] / mediatomb-svn / PKGBUILD
blob8286a9a73e232480dcb5bd5fa7e00a2dacc37011
1 # Contributor: Lukas Sabota <punkrockguy318@comcast.net>
2 # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
3 # Contributor: nikron nikron<at>nikron<dot>net
4 # Maintainer: Jonathan Conder <jonno dot conder at gmail dot com>
6 pkgname=mediatomb-svn
7 pkgver=2103
8 pkgrel=1
9 pkgdesc="Free UPnP/DLNA media server"
10 arch=('i686' 'x86_64')
11 url="http://mediatomb.cc/"
12 license=('GPL')
13 depends=('js' 'libexif' 'taglib' 'sqlite3' 'curl' 'ffmpegthumbnailer')
14 makedepends=('subversion')
15 conflicts=('mediatomb')
16 provides=('mediatomb=0.12.1')
17 backup=('etc/conf.d/mediatomb')
18 source=('mediatomb.rc'
19         'mediatomb.conf'
20         'libmp4v2_handler.cc.patch'
21         'gcc46.patch'
22         'tonewjs.patch'
23         'libav_0.7_support.patch')
24 md5sums=('4ad9a7d76b909d2c2220c65479a86043'
25          'bec297e4178332a26b42bbde873b94cd'
26          '9e3ed6c1f94b2b392fd8f15e4d0930f6'
27          '0ae34c0d73b76e3d215887834c3c08cf'
28          '03c446b29ec62e27e94fd85e142f3379'
29          '88144653ff2dc602bcb737f59b2421ce')
31 _svntrunk="https://mediatomb.svn.sourceforge.net/svnroot/mediatomb/trunk/mediatomb"
32 _svnmod='mediatomb'
34 build() {
35   cd "$srcdir"
37   if [ -d "$_svnmod/.svn" ]; then
38     (cd "$_svnmod" && svn up -r "$pkgver")
39   else
40     svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
41   fi
43   msg "SVN checkout done or server timeout"
44   msg "Starting make..."
46   rm -rf "$srcdir/$_svnmod-build"
47   cp -r "$_svnmod" "$_svnmod-build"
48   cd "$_svnmod-build"
50   patch 'src/metadata/libmp4v2_handler.cc' < "$srcdir/libmp4v2_handler.cc.patch"
51   patch -Np1 -i "$srcdir/gcc46.patch"
52   patch -Np1 -i "$srcdir/tonewjs.patch"
53   patch -Np1 -i "$srcdir/libav_0.7_support.patch"
55   autoreconf -i
56   ./configure --prefix=/usr \
57               --disable-mysql \
58               --enable-libmagic \
59               --enable-libjs \
60               --enable-ffmpeg
61   make || bash
64 package() {
65   cd "$srcdir/$_svnmod-build"
67   make DESTDIR="$pkgdir/" install
69   install -D -m0755 "$srcdir/mediatomb.rc" "$pkgdir/etc/rc.d/mediatomb"
70   install -D -m0755 "$srcdir/mediatomb.conf" "$pkgdir/etc/conf.d/mediatomb"
71   mkdir -p "$pkgdir/var/lib/mediatomb"