summaryrefslogtreecommitdiff
path: root/pcr/mediatomb/PKGBUILD
blob: 562f7fc19024d84a88c11a433a1e31b7d481cff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Contributor: Martin Villagra <mvillagra0@gmail.com>
# 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>
# Contributor: Peter Richard Lewis <plewis@aur.archlinux.org>
# Maintainer : Parabola GNU / Linux-libre Aurélien DESBRIÈRES <aurelien@hackers.camp>

pkgname=mediatomb
pkgver=0.12.1
pkgrel=12
pkgdesc="Free UPnP/DLNA media server"
arch=('i686' 'x86_64' 'armv6h')
url="http://mediatomb.cc/"
license=('GPL')
depends=('file' 'curl' 'ffmpegthumbnailer' 'libexif' 'libmp4v2' 'sqlite3' 'taglib' 'libmariadbclient' 'js185')
optdepends=('mariadb: to store your music database in mariadb')
backup=('etc/conf.d/mediatomb')
install=mediatomb.install
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
        'mediatomb.service'
        'mediatomb-mariadb.service'
        'mediatomb.conf'
        'gcc46.patch'
        'tonewjs.patch'
        'jsparse.patch'
        'libav_0.7_support.patch'
        'libmp4v2_191_p497.patch'
        'libavformat.patch'
        'symlinks.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"
  patch -Np1 -i "$srcdir/symlinks.patch"

  ./configure --prefix=/usr \
              --enable-mysql \
              --enable-libmagic \
              --enable-libjs \
              --enable-ffmpeg
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install

  install -D -m0644 "$srcdir/mediatomb.service" "$pkgdir/usr/lib/systemd/system/mediatomb.service"
  install -D -m0644 "$srcdir/mediatomb-mariadb.service" "$pkgdir/usr/lib/systemd/system/mediatomb-mariadb.service"
  install -D -m0644 "$srcdir/mediatomb.conf" "$pkgdir/etc/conf.d/mediatomb"
}