summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2011-01-16 19:11:42 +0100
committerFlorian Pritz <bluewind@xssn.at>2011-01-16 19:11:42 +0100
commit4c66bed4eae4053d1ac0302034b000b06e6bda77 (patch)
treeae67bf47696bb038ed00e3ca7740aa503022c47e
parent1caa1d5eb39e6d1b0bf96af4be1e095b31495305 (diff)
downloadaur-packages-4c66bed4eae4053d1ac0302034b000b06e6bda77.tar.gz
aur-packages-4c66bed4eae4053d1ac0302034b000b06e6bda77.tar.xz
add cower
Signed-off-by: Florian Pritz <bluewind@xssn.at>
-rw-r--r--cower/PKGBUILD34
-rw-r--r--cower/set_curlopt_nosignal.patch22
2 files changed, 56 insertions, 0 deletions
diff --git a/cower/PKGBUILD b/cower/PKGBUILD
new file mode 100644
index 0000000..9198ed8
--- /dev/null
+++ b/cower/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Dave Reisner <d@falconindy.com>
+
+pkgname=cower
+pkgver=2.9.9
+pkgrel=2
+pkgdesc="A simple AUR agent with a pretentious name"
+arch=('i686' 'x86_64')
+url="http://github.com/falconindy/cower"
+license=('GPL')
+depends=('curl' 'yajl' 'pacman')
+makedepends=('perl')
+source=("https://github.com/downloads/falconindy/$pkgname/$pkgname-$pkgver.tar.gz"
+ "set_curlopt_nosignal.patch")
+md5sums=('557c52ccca82c89118d892bd7a3e5786'
+ '2d6b5c0a2a11ce13736ec566365cbae5')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ if readelf -s /usr/lib/libalpm.so | grep -q alpm_find_satisfier; then
+ PMCHECK=-D_HAVE_ALPM_FIND_SATISFIER
+ fi
+
+ patch -Np1 < "$srcdir"/set_curlopt_nosignal.patch
+
+ make PMCHECK=$PMCHECK
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make PREFIX=/usr DESTDIR=${pkgdir} install
+}
+
+# vim: ft=sh syn=sh
diff --git a/cower/set_curlopt_nosignal.patch b/cower/set_curlopt_nosignal.patch
new file mode 100644
index 0000000..76d7456
--- /dev/null
+++ b/cower/set_curlopt_nosignal.patch
@@ -0,0 +1,22 @@
+commit 9d7537ef064a23ed57551aa04283c398fc8d07f1
+Author: Dave Reisner <d@falconindy.com>
+Date: Thu Dec 30 20:14:36 2010 -0500
+
+ set CURLOPT_NOSIGNAL on all curl handles
+
+ As per curl_easy_setopt(3), this is particularly crucial of multi
+ threaded apps (hey that's us) which use timeouts to avoid sending them
+ signals and behaving badly (e.g. causing segfaults).
+
+diff --git a/cower.c b/cower.c
+index 7ba747c..23ff9bc 100644
+--- a/cower.c
++++ b/cower.c
+@@ -585,6 +585,7 @@ CURL *curl_create_easy_handle() {
+
+ curl_easy_setopt(handle, CURLOPT_USERAGENT, COWER_USERAGENT);
+ curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 10L);
++ curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1L);
+ curl_easy_setopt(handle, CURLOPT_ENCODING, "deflate, gzip");
+
+ return(handle);