summaryrefslogtreecommitdiff
path: root/pcr/ums/PKGBUILD
blob: 5894c65d18cc94e65f8a98714eb3cbecd4736b7d (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
59
60
61
62
63
64
# Contributor (Arch)     : Red Squirrel <iam at redsquirrel87 dot com>
# Maintainer  (Parabola) : Aurélien DESBRIÈRES <aurelien@hackers.camp> 
# Based on PMS PKGBUILD

pkgname=ums
pkgver=4.0.0
pkgrel=1
pkgdesc="Universal Media Server: a DLNA-compliant UPnP Media Server."
arch=('i686' 'x86_64')
url="http://www.universalmediaserver.com/"
license=('GPL2')
depends=('mplayer' 'ffmpeg' 'mencoder' 'libmediainfo' 'java-runtime')
makedepends=("unzip")
[ "$CARCH" = "i686" ] && \
optdepends=("vlc: For Internet video/audio")
[ "$CARCH" = "x86_64" ] && \
optdepends=("vlc: Internet video/audio support"
            "dcraw: thumbnails creation support"
            "lib32-gcc-libs: tsMuxeR support"
            "lib32-glibc: tsMuxeR support")
backup=(opt/ums/UMS.conf \
        opt/ums/WEB.conf)
source=("http://downloads.sourceforge.net/project/unimediaserver/Official%20Releases/Linux/UMS-$pkgver-a1.tgz")

package() {
  mkdir -p $pkgdir/opt/ums
  mkdir $pkgdir/opt/ums/database
  mkdir -p $pkgdir/usr/bin
  chmod -R 755 $srcdir/$pkgname-$pkgver-a1/plugins $srcdir/$pkgname-$pkgver-a1/documentation
  cp -r $srcdir/$pkgname-$pkgver-a1/* $pkgdir/opt/ums/
  chmod +x $pkgdir/opt/ums/UMS.sh \
           $pkgdir/opt/ums/linux/tsMuxeR
  touch $pkgdir/opt/ums/UMS.conf
  touch $pkgdir/opt/ums/debug.log
  chgrp users $pkgdir/opt/ums/UMS.conf \
              $pkgdir/opt/ums/WEB.conf \
              $pkgdir/opt/ums/debug.log \
              $pkgdir/opt/ums/database

  chmod g+w $pkgdir/opt/ums/UMS.conf \
            $pkgdir/opt/ums/WEB.conf \
            $pkgdir/opt/ums/debug.log \
            $pkgdir/opt/ums/database 

  unzip -q -u $srcdir/$pkgname-$pkgver-a1/ums.jar -d ums_jar
  install -d -m 755 $pkgdir/usr/share/pixmaps
  install -D -m 644 $srcdir/ums_jar/resources/images/logo.png $pkgdir/usr/share/pixmaps/ums.png

  cat > ums.desktop << EoF
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Universal Media Server
Comment=A DLNA-compliant UPnP Media Server.
Exec=/opt/ums/UMS.sh
Icon=ums.png
Terminal=false
Type=Application
Categories=Java;Multimedia;AudioVideo;
EoF

  install -D -m 644 $srcdir/ums.desktop $pkgdir/usr/share/applications/ums.desktop

}