[arch-commits] Commit in (6 files)

Sergej Pupykin spupykin at nymeria.archlinux.org
Wed Jan 15 11:29:24 UTC 2014


    Date: Wednesday, January 15, 2014 @ 12:29:23
  Author: spupykin
Revision: 104081

Added:
  udpxy/
  udpxy/repos/
  udpxy/trunk/
  udpxy/trunk/PKGBUILD
  udpxy/trunk/pidfile.patch
  udpxy/trunk/udpxy.service

---------------+
 PKGBUILD      |   37 +++++++++++++++++++++++++++++++++++++
 pidfile.patch |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 udpxy.service |   11 +++++++++++
 3 files changed, 96 insertions(+)

Added: udpxy/trunk/PKGBUILD
===================================================================
--- udpxy/trunk/PKGBUILD	                        (rev 0)
+++ udpxy/trunk/PKGBUILD	2014-01-15 11:29:23 UTC (rev 104081)
@@ -0,0 +1,37 @@
+# Contributor: Konstantin Shabanov <kes.eclipse at gmail.com>
+# Contributor: Evka
+# Maintainer: Jose Riha <jose 1711 gmail com>
+
+pkgname=udpxy
+pkgver=1.0.23.0
+_pkgver=1.0.23-0
+pkgrel=2
+pkgdesc="small-footprint UNIX/Linux daemon to relay multicast UDP traffic to client's TCP (HTTP) connection."
+arch=(i686 x86_64)
+url="http://udpxy.sf.net"
+license=('GPL3')
+source=(http://sourceforge.net/projects/$pkgname/files/$pkgname/Chipmunk-1.0/$pkgname.${_pkgver}-prod.tar.gz
+	$pkgname.service
+	pidfile.patch)
+md5sums=('3dd99ba264078e873cbe1d98369ed423'
+         '48993e68830724e3c78f8b4fb7690a15'
+         '833fc814391c965b2eccda500c0fe637'
+         '2154ba3871b708d90af11ceca081f7b9'
+         '7a268f58ee964895377c95d16c9c633a')
+
+prepare() {
+  cd "$srcdir/$pkgname-${_pkgver}"
+  patch -Np1 -i "${srcdir}/pidfile.patch"
+  sed -i '/ln -s $(INSTALLROOT)\/bin\/$(EXEC) $(INSTALLROOT)\/bin\/$(UDPXREC/s%$(INSTALLROOT)%/usr%' Makefile
+}
+
+build() {
+  cd "$srcdir/$pkgname-${_pkgver}"
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-${_pkgver}"
+  make INSTALLROOT="$pkgdir/usr" install
+  install -D -m644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
+}

Added: udpxy/trunk/pidfile.patch
===================================================================
--- udpxy/trunk/pidfile.patch	                        (rev 0)
+++ udpxy/trunk/pidfile.patch	2014-01-15 11:29:23 UTC (rev 104081)
@@ -0,0 +1,48 @@
+diff --git a/udpxy.c b/udpxy.c
+index 43f213a..8f0e30d 100644
+--- a/udpxy.c
++++ b/udpxy.c
+@@ -1423,7 +1423,7 @@ udpxy_main( int argc, char* const argv[] )
+                 }
+             }
+ 
+-            rc = set_pidfile( g_udpxy_app, port, pidfile, sizeof(pidfile) );
++            rc = set_pidfile( g_udpxy_app, pidfile, sizeof(pidfile) );
+             if( 0 != rc ) {
+                 mperror( g_flog, errno, "set_pidfile" );
+                 rc = ERR_INTERNAL; break;
+diff --git a/util.c b/util.c
+index 0ad34bb..6b7daf8 100644
+--- a/util.c
++++ b/util.c
+@@ -302,7 +302,7 @@ make_pidfile( const char* fpath, pid_t pid, FILE* log )
+  * (fail if destination directory is not writable)
+  */
+ int
+-set_pidfile( const char* appname, int port, char* buf, size_t len )
++set_pidfile( const char* appname, char* buf, size_t len )
+ {
+     int n = -1;
+ 
+@@ -311,7 +311,7 @@ set_pidfile( const char* appname, int port, char* buf, size_t len )
+     if( -1 == access(PIDFILE_DIR, W_OK ) )
+         return -1;
+ 
+-    n = snprintf( buf, len, "%s/%s%d.pid", PIDFILE_DIR, appname, port );
++    n = snprintf( buf, len, "%s/%s.pid", PIDFILE_DIR, appname );
+     if( n < 0 ) return EXIT_FAILURE;
+ 
+     buf[ len - 1 ] = '\0';
+diff --git a/util.h b/util.h
+index f274c7b..64a10d1 100644
+--- a/util.h
++++ b/util.h
+@@ -66,7 +66,7 @@ make_pidfile( const char* fpath, pid_t pid, FILE* log );
+  * (fail of destination directory is not writable)
+  */
+ int
+-set_pidfile( const char* appname, int port, char* buf, size_t len );
++set_pidfile( const char* appname, char* buf, size_t len );
+ 
+ /* write buffer to designated socket/file
+  * return number of bytes read/written or one of the error

Added: udpxy/trunk/udpxy.service
===================================================================
--- udpxy/trunk/udpxy.service	                        (rev 0)
+++ udpxy/trunk/udpxy.service	2014-01-15 11:29:23 UTC (rev 104081)
@@ -0,0 +1,11 @@
+[Unit]
+Description=UDP multicast to TCP (HTTP) relay proxy
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/udpxy.pid
+ExecStart=/usr/bin/udpxy -T -S -p 4022 -B 256kb
+
+[Install]
+WantedBy=multi-user.target




More information about the arch-commits mailing list