[Lunar-commits] <moonbase> ctcs: added version 1.4.1 to moonbase

Duncan Gibson engelsman at lunar-linux.org
Wed Mar 4 20:04:55 CET 2009


commit 0c039474efc3fe41532c6c52858d233041c5cf01
Author: Linus Swälas <lunar at linus.swalas.org>
Date:   Wed Mar 4 20:04:55 2009 +0100

    ctcs: added version 1.4.1 to moonbase
    
    initial version contains patch file to be moved to $PATCH_URL
    which, in a previous submission, was a here document in BUILD.
    
    Note: with SOURCE2 in /var/spool/lunar,
          downloads and patches SOURCE1, compiles and installs OK,
          interface starts but otherwise untested - engelsman
---
 zbeta/ctcs/BUILD                 |    7 +++++++
 zbeta/ctcs/DEPENDS               |    1 +
 zbeta/ctcs/DETAILS               |   18 ++++++++++++++++++
 zbeta/ctcs/ctcs-bind-local.patch |   20 ++++++++++++++++++++
 4 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/zbeta/ctcs/BUILD b/zbeta/ctcs/BUILD
new file mode 100644
index 0000000..d2ca3b0
--- /dev/null
+++ b/zbeta/ctcs/BUILD
@@ -0,0 +1,7 @@
+(
+	patch_it $SOURCE2 0 &&
+	prepare_install &&
+	install -g 0 -o 0 -m 0755 ctcs /usr/bin
+	install -g 0 -o 0 -m 644 readme.txt /usr/share/doc/$MODULE
+
+) > $C_FIFO 2>&1
diff --git a/zbeta/ctcs/DEPENDS b/zbeta/ctcs/DEPENDS
new file mode 100644
index 0000000..cf82292
--- /dev/null
+++ b/zbeta/ctcs/DEPENDS
@@ -0,0 +1 @@
+optional_depends "ctorrent" "a" "b" "quite pointless without it"
diff --git a/zbeta/ctcs/DETAILS b/zbeta/ctcs/DETAILS
new file mode 100644
index 0000000..38de921
--- /dev/null
+++ b/zbeta/ctcs/DETAILS
@@ -0,0 +1,18 @@
+          MODULE=ctcs
+         VERSION=1.4.1
+          SOURCE=${MODULE}-${VERSION}.tar.gz
+         SOURCE2=${MODULE}-bind-local.patch
+      SOURCE_URL=http://downloads.sourceforge.net/dtorrent/
+     SOURCE2_URL=$PATCH_URL
+#SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+      SOURCE_VFY=sha1:228090d17dbf00d32129f6a2fbc874314f525998
+     SOURCE2_VFY=sha1:36af96bde5b7932a88badca963021ed145b036e5
+        WEB_SITE="http://www.rahul.net/dholmes/ctorrent/ctcs.html"
+         ENTERED=20090226
+         UPDATED=20090304
+           SHORT="CTorrent Control Server"
+cat <<EOF
+Control Server for ctorrent. With this you can start several ctorrents
+running in the background, accessable through a web-interface on your
+local computer.
+EOF
diff --git a/zbeta/ctcs/ctcs-bind-local.patch b/zbeta/ctcs/ctcs-bind-local.patch
new file mode 100644
index 0000000..f84d2af
--- /dev/null
+++ b/zbeta/ctcs/ctcs-bind-local.patch
@@ -0,0 +1,20 @@
+--- ctcs.orig	2008-04-26 22:18:06.000000000 +0200
++++ ctcs	2009-02-27 01:50:17.000000000 +0100
+@@ -105,2 +105,3 @@
+ my $port = 2780;
++my $listen = "127.0.0.1";
+ my $proto = getprotobyname('tcp');
+@@ -113,2 +114,3 @@
+ 	elsif (/^-i$/) { $bwinterval = shift(); }
++	elsif (/^-l$/) { $listen = shift(); }
+ 	elsif (/^-p$/) { $port = shift(); }
+@@ -135,3 +137,3 @@
+ 	pack("l", 1)) 	|| die "setsockopt: $!";
+-bind(Server, sockaddr_in($port, INADDR_ANY))	|| die "bind: $!";
++bind(Server, sockaddr_in($port, inet_aton($listen)))	|| die "bind: $!";
+ listen(Server,SOMAXCONN) 				|| die "listen: $!";
+@@ -2475,3 +2477,3 @@
+ sub usage {
+-	print "Usage:  $0 [-d <dlimit>] [-u <ulimit>] [-i <interval>] [-p <port>] [-P]\r\n";
++	print "Usage:  $0 [-d <dlimit>] [-u <ulimit>] [-i <interval>] [-l <address>] [-p <port>] [-P]\r\n";
+ }


More information about the Lunar-commits mailing list