Permalink
Browse files

dmapd: Major overhaul and cleanup of PKGBUILD

-Add original author as Maintainer
-Add myself as Contributor
-Add libexif as a depends (namcap was complaining)
-Clean up PKGBUILD variables to use quotes
-Set system config directory to /etc so dmapd can find its config (it is compiled as /usr/etc by default)
-Fix username in dmapd.conf to be compatible with Arch
  • Loading branch information...
1 parent 7e04a01 commit 8f414722ddb01d1a9a7362dc6a097bf22b08477a @alanorth committed May 25, 2013
Showing with 26 additions and 14 deletions.
  1. +23 −14 dmapd/PKGBUILD
  2. +3 −0 dmapd/dmapd.install
View
@@ -1,36 +1,45 @@
-# Contributor: Nicolas Quiénot < niQo at aur >
+# Maintainer: Nicolas Quiénot < niQo at aur >
+# Contributor: Alan Orth <alan.orth@gmail.com>
pkgname=dmapd
pkgver=0.0.51
-pkgrel=1
+pkgrel=2
pkgdesc="Serve DAAP (iTunes) and DPAP (iPhoto) shares from Linux"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
url="http://www.flyn.org/projects/dmapd/"
-license=(GPL)
-depends=('libdmapsharing' 'graphicsmagick')
+license=('GPL')
+depends=('libdmapsharing' 'graphicsmagick' 'libexif')
makedepends=()
options=('!libtool')
backup=('etc/dmapd.conf')
-source=(http://www.flyn.org/projects/$pkgname/$pkgname-$pkgver.tar.gz)
+source=("http://www.flyn.org/projects/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('6f6de9b3ca7cd9955902b5368f553e52')
+install=dmapd.install
build() {
cd "$srcdir/$pkgname-$pkgver"
- ./configure --prefix=/usr
+ ./configure --prefix=/usr --sysconfdir=/etc
+
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
- make DESTDIR="$pkgdir/" install
+ make DESTDIR="$pkgdir" install
- #create dmapd user
- mkdir -p ${pkgdir}/var/cache/dmapd/DAAP
+ # fix username in default config
+ sed -i 's/User=dmapd/User=daemon/' distro/dmapd.conf
- install -Dm644 "$srcdir/$pkgname-$pkgver"/distro/dmapd.conf ${pkgdir}/etc/dmapd.conf || return 1
- install -Dm755 "$srcdir/$pkgname-$pkgver"/distro/dmapd.service ${pkgdir}/usr/lib/systemd/system/dmapd.service || return 1
-}
+ # create cache directories
+ install -d ${pkgdir}/var/cache/dmapd || return 1
+ install -d ${pkgdir}/var/cache/dmapd/DAAP || return 1
+ install -d ${pkgdir}/var/cache/dmapd/DPAP || return 1
-md5sums=('6f6de9b3ca7cd9955902b5368f553e52')
+ # copy distribution files
+ install -D -m 0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" || return 1
+ install -D -m 0644 distro/dmapd.conf ${pkgdir}/etc/dmapd.conf || return 1
+ install -D -m 0755 distro/dmapd.service ${pkgdir}/usr/lib/systemd/system/dmapd.service || return 1
+}
View
@@ -0,0 +1,3 @@
+post_install() {
+ chown -R daemon:daemon var/cache/dmapd &>/dev/null
+}

0 comments on commit 8f41472

Please sign in to comment.