summaryrefslogtreecommitdiff
path: root/community/ushare/PKGBUILD
blob: 98f8bc5ccec156a13527a4454757cfc91296f97c (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
# $Id: PKGBUILD 51319 2011-07-07 10:51:58Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
# Contributor: kastor <kastor@fobos.org.ar>

pkgname=ushare
pkgver=1.1a
pkgrel=14
pkgdesc="A free UPnP A/V Media Server for Linux"
url="http://ushare.geexbox.org"
license=('GPL2')
arch=('i686' 'x86_64')
depends=('libupnp' 'libdlna' 'sudo')
backup=('etc/ushare/ushare.conf'
	'etc/conf.d/ushare')
install=ushare.install
source=("http://ushare.geexbox.org/releases/${pkgname}-${pkgver}.tar.bz2"
	"ushare"
	"upnp-build-fix.patch"
	"ushare-config.patch")
md5sums=('5bbcdbf1ff85a9710fa3d4e82ccaa251'
         'e3cf0a44b0280da4966177c21e49361c'
         '32c29f9f673e8b3a3d9e7bf5e60febbc'
         '5243475c0cebc5db49296b2f3691085b')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  sed -i -e \
    "s%^INSTALL=\"/usr/bin/install -c\"$%INSTALL=\"$(which install) -c\"%" \
    configure
  patch -p1 <$srcdir/upnp-build-fix.patch
  patch -p1 <$srcdir/ushare-config.patch
  ./configure --prefix=/usr --sysconfdir=/etc/ushare \
    --enable-dlna --with-libdlna-dir=/usr/include/libavformat
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
  rm -rf ${pkgdir}/etc/${pkgname}/init.d
  install -m 0755 -D ${srcdir}/ushare ${pkgdir}/etc/rc.d/ushare
  install -d -m 0755 ${pkgdir}/etc/conf.d/
  cat >${pkgdir}/etc/conf.d/ushare <<EOF
#PARAMS="-c /tmp -i eth0"
PARAMS=
USHARE_USER=ushare
EOF
  install -D -m0644 src/ushare.1 $pkgdir/usr/share/man/man1/ushare.1
}