diff options
author | Caleb Maclennan | 2014-05-19 23:16:39 +0300 |
---|---|---|
committer | Caleb Maclennan | 2014-05-19 23:16:39 +0300 |
commit | 915f5fd9b829a9c952eeaefbaa96fcd370a46e62 (patch) | |
tree | 7e90b69d6fd826b24c25901a9537d54414a072bc | |
parent | 3f2a99e16dd21f46198d7aa78a4f8b5cbf64e5a5 (diff) | |
download | aur-915f5fd9b829a9c952eeaefbaa96fcd370a46e62.tar.gz |
update stund to 0.97 and cleanup build
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | fix_non_i386.patch | 20 |
3 files changed, 44 insertions, 37 deletions
@@ -1,13 +1,15 @@ pkgbase = stund pkgdesc = STUN Server and Client - pkgver = 0.96 - pkgrel = 0 + pkgver = 0.97 + pkgrel = 1 url = http://downloads.sourceforge.net/project/stun/stun/ arch = x86_64 arch = i686 license = GPL2 - source = http://downloads.sourceforge.net/project/stun/stun/0.96/stund_0.96_Aug13.tgz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fstun%2F&ts=1299326697&use_mirror=puzzle - md5sums = 3273abb1a6f299f4e611b658304faefa + source = http://iweb.dl.sourceforge.net/project/stun/stun/0.97/stund-0.97.tgz + source = fix_non_i386.patch + md5sums = 097fd27829e357c005afcafd51564bd1 + md5sums = da4912d40ab4fb58c2800c2260bf3a5e pkgname = stund @@ -1,47 +1,32 @@ +# Maintainer: Caleb Maclennan <caleb@alerque.com> +# +# Any suggestions welcome; please submit paches via Github: +# https://github.com/alerque/aur/tree/master/git-annex-bin + pkgname=stund -pkgver=0.96 -pkgrel=0 +pkgver=0.97 +pkgrel=1 pkgdesc="STUN Server and Client" url="http://downloads.sourceforge.net/project/stun/stun/" -source=("http://downloads.sourceforge.net/project/stun/stun/0.96/stund_0.96_Aug13.tgz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fstun%2F&ts=1299326697&use_mirror=puzzle") +source=("http://iweb.dl.sourceforge.net/project/stun/stun/0.97/stund-0.97.tgz" "fix_non_i386.patch") makedepends=() optdepends=() - arch=('x86_64' 'i686') license=('GPL2') -md5sums=('3273abb1a6f299f4e611b658304faefa') +md5sums=('097fd27829e357c005afcafd51564bd1' + 'da4912d40ab4fb58c2800c2260bf3a5e') -build() { - cd $srcdir/$pkgname +package() { + cd "$srcdir/$pkgname" - if [ `uname -m` = 'x86_64' ] - then echo '@DPATCH@' >> fix_non_i386.patch - echo 'diff -urNad stun-0.96~/stun.cxx stun-0.96/stun.cxx' >> fix_non_i386.patch - echo '--- stun-0.96~/stun.cxx 2005-08-14 00:39:03.000000000 +0000' >> fix_non_i386.patch - echo '+++ stun-0.96/stun.cxx 2006-01-03 00:54:33.000000000 +0000' >> fix_non_i386.patch - echo '@@ -669,16 +669,8 @@' >> fix_non_i386.patch - echo ' tick = hightick;' >> fix_non_i386.patch - echo ' tick <<= 32;' >> fix_non_i386.patch - echo ' tick |= lowtick;' >> fix_non_i386.patch - echo '-#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) )' >> fix_non_i386.patch - echo '- asm("rdtsc" : "=A" (tick));' >> fix_non_i386.patch - echo '-#elif defined (__SUNPRO_CC) || defined( __sparc__ ) ' >> fix_non_i386.patch - echo '- tick = gethrtime();' >> fix_non_i386.patch - echo '-#elif defined(__MACH__) ' >> fix_non_i386.patch - echo '- int fd=open("/dev/random",O_RDONLY);' >> fix_non_i386.patch - echo '- read(fd,&tick,sizeof(tick));' >> fix_non_i386.patch - echo '- closesocket(fd);' >> fix_non_i386.patch - echo ' #else' >> fix_non_i386.patch - echo '-# error Need some way to seed the random number generator ' >> fix_non_i386.patch - echo '+ tick = time(NULL);' >> fix_non_i386.patch - echo ' #endif ' >> fix_non_i386.patch - echo ' int seed = int(tick);' >> fix_non_i386.patch - echo ' #ifdef WIN32' >> fix_non_i386.patch - patch --strip 1 < fix_non_i386.patch - fi + if [ `uname -m` = 'x86_64' ]; then + patch < $srcdir/fix_non_i386.patch + fi make all || return 1 - mkdir $pkgdir/usr/bin -p + + mkdir -p $pkgdir/usr/bin + cp server $pkgdir/usr/bin/stund || return 1 cp client $pkgdir/usr/bin/stunc || return 1 } diff --git a/fix_non_i386.patch b/fix_non_i386.patch new file mode 100644 index 000000000000..2b86e1ca7247 --- /dev/null +++ b/fix_non_i386.patch @@ -0,0 +1,20 @@ +--- stun.cxx~ 2012-01-26 13:02:46.000000000 +0200 ++++ stun.cxx 2014-05-19 23:00:16.896870461 +0300 +@@ -669,16 +669,8 @@ + tick = hightick; + tick <<= 32; + tick |= lowtick; +-#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) ) +- asm("rdtsc" : "=A" (tick)); +-#elif defined (__SUNPRO_CC) || defined( __sparc__ ) +- tick = gethrtime(); +-#elif defined(__MACH__) || defined(__linux) +- int fd=open("/dev/random",O_RDONLY); +- read(fd,&tick,sizeof(tick)); +- closesocket(fd); + #else +-# error Need some way to seed the random number generator ++ tick = time(NULL); + #endif + int seed = int(tick); + #ifdef WIN32 |