summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Gahde2017-01-20 16:38:44 +0100
committerJakob Gahde2017-01-20 16:38:44 +0100
commit921590e8445435c228798d42aa620b6488bfb086 (patch)
tree19d4a798f683817707fe9c12c8b7c3336063d783
parent7852fcf28e2b43f7ed0ef74296cacf1867fca360 (diff)
downloadaur-921590e8445435c228798d42aa620b6488bfb086.tar.gz
mediatomb 0.12.1-14: Package maintenance
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD41
-rw-r--r--mediatomb.install20
-rw-r--r--mediatomb.sysusers1
4 files changed, 40 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 16fcc5a2500..f328c828472 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Fri Jan 20 15:37:37 UTC 2017
pkgbase = mediatomb
pkgdesc = Free UPnP/DLNA media server
pkgver = 0.12.1
- pkgrel = 13
+ pkgrel = 14
url = http://mediatomb.cc/
install = mediatomb.install
arch = i686
@@ -20,6 +22,7 @@ pkgbase = mediatomb
optdepends = mariadb: to store your music database in mariadb
backup = etc/conf.d/mediatomb
source = http://downloads.sourceforge.net/mediatomb/mediatomb-0.12.1.tar.gz
+ source = mediatomb.sysusers
source = mediatomb.service
source = mediatomb-mariadb.service
source = mediatomb.conf
@@ -31,6 +34,7 @@ pkgbase = mediatomb
source = libavformat.patch
source = symlinks.patch
sha256sums = 31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd
+ sha256sums = 99e2602eebb9f5236107b0bee473a4187c7df7732745ad83542a3dcca9cb7d5a
sha256sums = e46de674e49aa85116a8ff127908f7bac21198ce7625404004b8b7832eccd3f4
sha256sums = 9c917f0d6e568ce0ad77c0ed17e4bbaabc0e7a1c0a3e4772b786fb1565db9768
sha256sums = 70e4a4b89cef9a7f6f5f800e1793a6cb807f52b39e5a17d0a91356608b95e62d
diff --git a/PKGBUILD b/PKGBUILD
index 3733c95cd94..88b12b0c923 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
-# Maintainer: S Leduc <sebastien@sleduc.fr>
+# Maintainer: Jakob Gahde <j5lx@fmail.co.uk>
+# Contributor: S Leduc <sebastien@sleduc.fr>
# Contributor: Martin Villagra <mvillagra0@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Nikhil Bysani <nikron@gmail.com>
@@ -8,7 +9,7 @@
pkgname=mediatomb
pkgver=0.12.1
-pkgrel=13
+pkgrel=14
pkgdesc="Free UPnP/DLNA media server"
arch=('i686' 'x86_64' 'armv6h')
url="http://mediatomb.cc/"
@@ -17,7 +18,8 @@ depends=('file' 'curl' 'ffmpegthumbnailer' 'libexif' 'libmp4v2' 'sqlite3' 'tagli
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"
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'mediatomb.sysusers'
'mediatomb.service'
'mediatomb-mariadb.service'
'mediatomb.conf'
@@ -29,6 +31,7 @@ source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
'libavformat.patch'
'symlinks.patch')
sha256sums=('31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd'
+ '99e2602eebb9f5236107b0bee473a4187c7df7732745ad83542a3dcca9cb7d5a'
'e46de674e49aa85116a8ff127908f7bac21198ce7625404004b8b7832eccd3f4'
'9c917f0d6e568ce0ad77c0ed17e4bbaabc0e7a1c0a3e4772b786fb1565db9768'
'70e4a4b89cef9a7f6f5f800e1793a6cb807f52b39e5a17d0a91356608b95e62d'
@@ -40,15 +43,20 @@ sha256sums=('31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd'
'76b11706d70ed8f5e157d96ca441c90c46c42176102fcb651b4ab1102b61bfee'
'72f7532d7cd827ab655df652d2912175739fe16d2b1ad989d987a0b147a1d2e8')
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 < "${srcdir}/gcc46.patch"
+ patch -Np1 < "${srcdir}/tonewjs.patch"
+ patch -Np1 < "${srcdir}/jsparse.patch"
+ patch -Np1 < "${srcdir}/libav_0.7_support.patch"
+ patch -Np1 < "${srcdir}/libmp4v2_191_p497.patch"
+ patch -Np1 < "${srcdir}/libavformat.patch"
+ patch -Np1 < "${srcdir}/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"
+ cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr \
--enable-mysql \
@@ -59,11 +67,12 @@ build() {
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="$pkgdir/" install
+ 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"
+ install -Dm644 "${srcdir}/mediatomb.sysusers" "${pkgdir}/usr/lib/sysusers.d/mediatomb.conf"
+ install -Dm644 "${srcdir}/mediatomb.service" "${pkgdir}/usr/lib/systemd/system/mediatomb.service"
+ install -Dm644 "${srcdir}/mediatomb-mariadb.service" "${pkgdir}/usr/lib/systemd/system/mediatomb-mariadb.service"
+ install -Dm644 "${srcdir}/mediatomb.conf" "${pkgdir}/etc/conf.d/mediatomb"
}
diff --git a/mediatomb.install b/mediatomb.install
index 27f71d5a465..cb343b45580 100644
--- a/mediatomb.install
+++ b/mediatomb.install
@@ -1,20 +1,18 @@
post_install() {
- post_upgrade
- passwd -l mediatomb &>/dev/null
+ systemd-sysusers mediatomb.conf
+ install -dm700 -omediatomb -gmediatomb /var/lib/mediatomb
+
echo 'Warning: the MediaTomb web interface exposes your filesystem to the network'
echo 'For maximum security, set <ui enabled="no"> in your MediaTomb config file'
}
post_upgrade() {
- # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files
- getent group mediatomb >/dev/null || groupadd -g 241 mediatomb &>/dev/null
- getent passwd mediatomb >/dev/null || useradd -c 'Mediatomb DLNA Server' -u 241 -g mediatomb -b '/var/lib' -m -s /bin/false mediatomb &>/dev/null
+ systemd-sysusers mediatomb.conf
- echo 'Attention: By default, MediaTomb now runs as its own user: mediatomb.'
- echo 'Ensuring ownership of /var/lib/mediatomb is mediatomb:mediatomb...'
- chown -R mediatomb:mediatomb /var/lib/mediatomb &>/dev/null
- echo
- echo 'Please note that the old rc script has been replaced with systemd service files.'
- echo
+ if [ $(vercmp $2 0.12.1-12) -lt 1 ]; then
+ echo 'Attention: By default, MediaTomb now runs as its own user: mediatomb.'
+ echo 'Ensuring ownership of /var/lib/mediatomb is mediatomb:mediatomb...'
+ chown -R mediatomb:mediatomb /var/lib/mediatomb &>/dev/null
+ fi
}
diff --git a/mediatomb.sysusers b/mediatomb.sysusers
new file mode 100644
index 00000000000..373b39a9103
--- /dev/null
+++ b/mediatomb.sysusers
@@ -0,0 +1 @@
+u mediatomb 241 "Mediatomb DLNA Server" /var/lib/mediatomb