summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Scott2014-06-12 20:48:52 -0700
committerIan Scott2014-06-12 20:48:52 -0700
commitb787244c0153c284c6ea1a102b016b0022516655 (patch)
tree5fab5ef12cec9c7d36739391ee56b21c6f4b5194
downloadaur-b787244c0153c284c6ea1a102b016b0022516655.tar.gz
merging pianod into subdirectory
-rw-r--r--.SRCINFO27
-rw-r--r--NOTES2
-rw-r--r--PKGBUILD41
-rw-r--r--mtim.patch17
-rw-r--r--patch-json-c-0.12.diff97
5 files changed, 184 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cc4a7cf73ed1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = pianod
+ pkgdesc = Pandora Client Daemon
+ pkgver = 158
+ pkgrel = 2
+ url = http://deviousfish.com/pianod/
+ arch = x86_64
+ arch = i686
+ license = mit
+ depends = mksh
+ depends = libao
+ depends = libgcrypt
+ depends = gnutls
+ depends = json-c
+ depends = faad2
+ depends = libmad
+ depends = libbsd
+ backup = etc/pianod.startscript
+ backup = etc/pianod.env
+ source = http://deviousfish.com/Downloads/pianod/pianod-158.tar.gz
+ source = mtim.patch
+ source = patch-json-c-0.12.diff
+ md5sums = 68ed14772e0caa1391da5aac9bbbf056
+ md5sums = a4f433a16ea2bc9a64dde9b035507b97
+ md5sums = a93d668815249a36710df53c9ca5a789
+
+pkgname = pianod
+
diff --git a/NOTES b/NOTES
new file mode 100644
index 000000000000..44cf47be73e8
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,2 @@
+mtim.patch was my own work (easy)
+https://trac.macports.org/browser/trunk/dports/audio/pianod/files/patch-json-c-0.12.diff
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..41ba8786e71c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Ian D. Scott <ian@perebruin.com>
+pkgname=pianod
+pkgver=158
+pkgrel=2
+pkgdesc="Pandora Client Daemon"
+url="http://deviousfish.com/pianod/"
+arch=('x86_64' 'i686')
+license=('mit')
+depends=('mksh' 'libao' 'libgcrypt' 'gnutls' 'json-c' 'faad2' 'libmad' 'libbsd')
+source=("http://deviousfish.com/Downloads/pianod/${pkgname}-${pkgver}.tar.gz"
+ "mtim.patch"
+ "patch-json-c-0.12.diff")
+md5sums=('68ed14772e0caa1391da5aac9bbbf056'
+ 'a4f433a16ea2bc9a64dde9b035507b97'
+ 'a93d668815249a36710df53c9ca5a789')
+backup=('etc/pianod.startscript' 'etc/pianod.env')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}/contrib"
+ sed -i 's|/bin/ksh|/bin/mksh|' piano runmix
+ cd ..
+ patch -p1 -i ../mtim.patch
+ patch -p0 -i ../patch-json-c-0.12.diff
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+ install -Dm644 contrib/pianod.service "$pkgdir/usr/lib/systemd/system/pianod.service"
+ install -Dm644 contrib/pianod.env "$pkgdir/etc/pianod.env"
+ install -Dm644 contrib/startscript-example "$pkgdir/etc/pianod.startscript"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/mtim.patch b/mtim.patch
new file mode 100644
index 000000000000..4ba5c7778dc7
--- /dev/null
+++ b/mtim.patch
@@ -0,0 +1,17 @@
+diff -ru a/src/libfootball/fb_http.c b/src/libfootball/fb_http.c
+--- a/src/libfootball/fb_http.c
++++ b/src/libfootball/fb_http.c
+@@ -926,10 +926,10 @@
+
+ /* Send the header */
+ /* Date formatted per RFC2616 sec 3.3.1: Sun, 06 Nov 1994 08:49:37 GMT */
+- gmtime_r (&info.st_mtimespec.tv_sec, &modtime);
++ gmtime_r (&info.st_mtim.tv_sec, &modtime);
+ strftime (date, sizeof (date), "%a, %d %b %Y %H:%M:%S GMT", &modtime);
+- info.st_mtimespec.tv_sec += 86400;
+- gmtime_r (&info.st_mtimespec.tv_sec, &exptime);
++ info.st_mtim.tv_sec += 86400;
++ gmtime_r (&info.st_mtim.tv_sec, &exptime);
+ strftime (expiration, sizeof (expiration), "%a, %d %b %Y %H:%M:%S GMT", &exptime);
+
+ char *header;
diff --git a/patch-json-c-0.12.diff b/patch-json-c-0.12.diff
new file mode 100644
index 000000000000..8bc2793c070b
--- /dev/null
+++ b/patch-json-c-0.12.diff
@@ -0,0 +1,97 @@
+Fix build with json-c 0.12+
+http://lists.deviousfish.com/pipermail/pianod-deviousfish.com/2014q2/000590.html
+--- configure.ac.orig 2014-04-20 05:41:25.000000000 -0500
++++ configure.ac 2014-06-01 04:18:33.000000000 -0500
+@@ -37,7 +37,7 @@
+ [AC_MSG_WARN([No pkg-config for libao])])
+ PKG_CHECK_MODULES([mad], [mad],,
+ [AC_MSG_WARN([No pkg-config for libmad])])
+-PKG_CHECK_MODULES([json], [json],,
++PKG_CHECK_MODULES([json], [json-c],,
+ [AC_MSG_WARN([No pkg-config for libjson (aka libjson0, json-c)])])
+
+ # Network communication stuff:
+@@ -46,12 +46,8 @@
+ AC_CHECK_LIB([gnutls], [gnutls_record_recv],,
+ [AC_MSG_ERROR([Cannot find required library: libgnutls (aka gnutls)],1)])
+
+-# Bloody json library may be linked via -ljson, or -ljson-c depending on
+-# the platform. Try both.
+-AC_CHECK_LIB([json], [json_object_new_string],,
+- [AC_CHECK_LIB([json-c], [json_object_new_string],,
+- [AC_MSG_ERROR([Cannot find required library: libjson (aka libjson0, json-c)])])
+- ])
++AC_CHECK_LIB([json-c], [json_object_new_string],,
++ [AC_MSG_ERROR([Cannot find required library: libjson-c],1)])
+
+
+ # Audio-related libraries:
+@@ -130,12 +126,9 @@
+
+
+ # Checks for header files.
+-AC_CHECK_HEADERS([arpa/inet.h fcntl.h crypt.h gcrypt.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/socket.h unistd.h json/json.h json.h])
++AC_CHECK_HEADERS([arpa/inet.h fcntl.h crypt.h gcrypt.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/socket.h unistd.h json-c/json.h])
+
+
+-AM_CONDITIONAL([HAVE_JSON_JSON_H],[test "$ac_cv_header_json_json_h" = 'yes'])
+-AM_CONDITIONAL([HAVE_JSON_H],[test "$ac_cv_header_json_h" = 'yes'])
+-
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_HEADER_STDBOOL
+ AC_C_INLINE
+--- src/libpiano/Makefile.am.orig 2013-09-17 22:49:05.000000000 -0500
++++ src/libpiano/Makefile.am 2014-06-01 04:22:33.000000000 -0500
+@@ -8,17 +8,7 @@
+ request_assert = -DNDEBUG
+ endif
+
+-# This contortion is necessary to minimize library customizations.
+-# Add defines to the command line since the library reads its
+-# private config.h, not the main one from configure.
+-if HAVE_JSON_JSON_H
+-have_json_json_h = -DHAVE_JSON_JSON_H=1
+-endif
+-if HAVE_JSON_H
+-have_json_h = -DHAVE_JSON_H=1
+-endif
+-
+-libpiano_a_CPPFLAGS = $(json_CFLAGS) -I../include -DGCRYPT_NO_DEPRECATED $(request_assert) $(have_json_json_h) $(have_json_h)
++libpiano_a_CPPFLAGS = $(json_CFLAGS) -I../include -DGCRYPT_NO_DEPRECATED $(request_assert)
+ libpiano_a_SOURCES = crypt.c piano.c request.c response.c list.c \
+ config.h piano.h crypt.h piano_private.h
+
+--- src/libpiano/request.c.orig 2014-03-17 18:54:27.000000000 -0500
++++ src/libpiano/request.c 2014-06-01 04:12:38.000000000 -0500
+@@ -26,14 +26,7 @@
+ #define _DARWIN_C_SOURCE /* strdup() on OS X */
+ #endif
+
+-#ifdef HAVE_JSON_JSON_H
+-#include <json/json.h>
+-#elif defined (HAVE_JSON_H)
+ #include <json.h>
+-#else
+-#error json library not found.
+-#endif
+-
+ #include <assert.h>
+ #include <stdio.h>
+ #include <string.h>
+--- src/libpiano/response.c.orig 2013-11-12 14:16:57.000000000 -0600
++++ src/libpiano/response.c 2014-06-01 04:13:00.000000000 -0500
+@@ -26,14 +26,7 @@
+ #define _DARWIN_C_SOURCE /* strdup() on OS X */
+ #endif
+
+-#ifdef HAVE_JSON_JSON_H
+-#include <json/json.h>
+-#elif defined (HAVE_JSON_H)
+ #include <json.h>
+-#else
+-#error json library not found.
+-#endif
+-
+ #include <string.h>
+ #include <assert.h>
+ #include <time.h>