diff options
author | Ilya Ponetayev <inste@mail.ru> | 2010-05-12 17:42:54 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 17:42:54 +0200 |
commit | 27bfeb10fd8aae59c3f44b1880c0e8e51154d3b6 (patch) | |
tree | f88b19643b69eea366ce84c6568ad564a2deb796 /network/3proxy | |
parent | 33156cac27b7ac0b7fcf105aec88d6b449f27da3 (diff) |
network/3proxy: Updated for version 0.6
Diffstat (limited to 'network/3proxy')
-rw-r--r-- | network/3proxy/3proxy.SlackBuild | 99 | ||||
-rw-r--r-- | network/3proxy/3proxy.cfg.sample | 34 | ||||
-rw-r--r-- | network/3proxy/3proxy.info | 8 | ||||
-rw-r--r-- | network/3proxy/3proxy.x86.i386.flags.diff.gz | bin | 347 -> 0 bytes | |||
-rw-r--r-- | network/3proxy/3proxy.x86.i486.flags.diff.gz | bin | 342 -> 0 bytes | |||
-rw-r--r-- | network/3proxy/3proxy.x86_64.flags.diff.gz | bin | 331 -> 0 bytes | |||
-rw-r--r-- | network/3proxy/patches/Makefile.Linux.patch | 21 | ||||
-rw-r--r-- | network/3proxy/patches/add3proxyuser.sh.patch | 15 | ||||
-rw-r--r-- | network/3proxy/patches/fix_etcdir.patch | 12 | ||||
-rw-r--r-- | network/3proxy/patches/fixup_manpages.patch | 33 | ||||
-rw-r--r-- | network/3proxy/rc.3proxy | 58 | ||||
-rw-r--r-- | network/3proxy/slack-desc | 16 |
12 files changed, 227 insertions, 69 deletions
diff --git a/network/3proxy/3proxy.SlackBuild b/network/3proxy/3proxy.SlackBuild index 7bfcc8d1bf0a..79bc16e01cc1 100644 --- a/network/3proxy/3proxy.SlackBuild +++ b/network/3proxy/3proxy.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for 3proxy -# Copyright 2008 Ilya INSTE Ponetayev, <inste@mail.ru> +# Copyright 2008, 2009 Ilya INSTE Ponetayev, <inste@mail.ru> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,11 +21,9 @@ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Modified by Slackbuilds.org PRGNAM=3proxy -VERSION=${VERSION:-0.5.3k} +VERSION=${VERSION:-0.6} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -35,17 +33,14 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i386 -mtune=i686" - OPTPATCH="3proxy.x86.i386.flags.diff.gz" -elif [ "$ARCH" = "i486" ]; then +if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" - OPTPATCH="3proxy.x86.i486.flags.diff.gz" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - OPTPATCH="3proxy.x86_64.flags.diff.gz" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" fi set -e @@ -53,62 +48,52 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP +rm -rf $PRGNAM rm -rf $PRGNAM-$VERSION -mkdir $PRGNAM-$VERSION -cd $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tgz -chown -R root:root . -find . \ - \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -# installing correct Makefile -zcat $CWD/$OPTPATCH | patch -p2 -ln -s Makefile.unix Makefile - -# Build and install: -make - -mkdir $PKG/usr -mkdir $PKG/usr/bin -cp src/3proxy $PKG/usr/bin -cp src/dighosts $PKG/usr/bin -cp src/ftppr $PKG/usr/bin -cp src/mycrypt $PKG/usr/bin -cp src/pop3p $PKG/usr/bin -cp src/proxy $PKG/usr/bin -cp src/socks $PKG/usr/bin -cp src/tcppm $PKG/usr/bin -cp src/udppm $PKG/usr/bin -mkdir $PKG/usr/man -mkdir $PKG/usr/man/man3 -mkdir $PKG/usr/man/man8 -cp man/*.8 $PKG/usr/man/man8 -cp man/*.3 $PKG/usr/man/man3 - -chmod 755 -R $PKG/usr/bin -chmod 755 -R $PKG/usr/man -chown root.root -R $PKG - -# Strip binaries: +cd $PRGNAM-$VERSION + +patch -p1 < $CWD/patches/Makefile.Linux.patch +patch -p1 < $CWD/patches/fix_etcdir.patch +patch -p1 < $CWD/patches/add3proxyuser.sh.patch +patch -p1 < $CWD/patches/fixup_manpages.patch + +make -f Makefile.Linux \ + EXTRA_CFLAGS="$SLKCFLAGS" \ + prefix=/usr \ + man_prefix=/usr + +make install -f Makefile.Linux \ + EXTRA_CFLAGS="$SLKCFLAGS" \ + prefix=/usr \ + man_prefix=/usr \ + DESTDIR=$PKG + +# I think I fixed all the references to /usr/local/etc and such in the +# source, but time will tell... :-) --rworkman +mv $PKG/usr/etc $PKG +cat $CWD/3proxy.cfg.sample > $PKG/etc/3proxy/3proxy.cfg.sample + +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.3proxy > $PKG/etc/rc.d/rc.3proxy.new +chmod 0755 $PKG/etc/rc.d/rc.3proxy.new + ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) -# Compress and link manpages. ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) -# Add a documentation directory: -mkdir -p $PKG/usr/doc/${PRGNAM}-$VERSION +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - Changelog License Readme Release.notes doc cfg \ - $PKG/usr/doc/${PRGNAM}-$VERSION + Changelog authors copying Readme news doc cfg contrib scripts \ + $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/network/3proxy/3proxy.cfg.sample b/network/3proxy/3proxy.cfg.sample new file mode 100644 index 000000000000..e77fe2f403a4 --- /dev/null +++ b/network/3proxy/3proxy.cfg.sample @@ -0,0 +1,34 @@ +#!/usr/bin/3proxy + +# Sample config + +daemon +pidfile /var/run/3proxy.pid +nscache 65536 +nserver 127.0.0.1 + +monitor /etc/3proxy/3proxy.cfg +monitor /etc/3proxy/counters +monitor /etc/3proxy/passwd +monitor /etc/3proxy/bandlimiters + +log /var/log/3proxy.log D +rotate 60 + + +users $/etc/3proxy/passwd + +include /etc/3proxy/counters +include /etc/3proxy/bandlimiters + +auth strong +deny * * 127.0.0.1 +allow * +proxy -n +socks +flush +allow admin + +admin -p8080 + + diff --git a/network/3proxy/3proxy.info b/network/3proxy/3proxy.info index a0f2f7086f12..08e47cda672e 100644 --- a/network/3proxy/3proxy.info +++ b/network/3proxy/3proxy.info @@ -1,8 +1,8 @@ PRGNAM="3proxy" -VERSION="0.5.3k" +VERSION="0.6" HOMEPAGE="http://3proxy.ru/" -DOWNLOAD="http://3proxy.ru/0.5.3k/3proxy-0.5.3k.tgz" -MD5SUM="4749c88201ba540707bcfc65fa34f316" +DOWNLOAD="http://3proxy.ru/0.6/3proxy-0.6.tgz" +MD5SUM="2ebd9c06939021f6c2aca31d67782f71" MAINTAINER="Ilya Ponetayev" EMAIL="inste@mail.ru" -APPROVED="David Somero" +APPROVED="rworkman" diff --git a/network/3proxy/3proxy.x86.i386.flags.diff.gz b/network/3proxy/3proxy.x86.i386.flags.diff.gz Binary files differdeleted file mode 100644 index fa0bf2b641a7..000000000000 --- a/network/3proxy/3proxy.x86.i386.flags.diff.gz +++ /dev/null diff --git a/network/3proxy/3proxy.x86.i486.flags.diff.gz b/network/3proxy/3proxy.x86.i486.flags.diff.gz Binary files differdeleted file mode 100644 index be6d1b0e1dae..000000000000 --- a/network/3proxy/3proxy.x86.i486.flags.diff.gz +++ /dev/null diff --git a/network/3proxy/3proxy.x86_64.flags.diff.gz b/network/3proxy/3proxy.x86_64.flags.diff.gz Binary files differdeleted file mode 100644 index 4ac21aad30ac..000000000000 --- a/network/3proxy/3proxy.x86_64.flags.diff.gz +++ /dev/null diff --git a/network/3proxy/patches/Makefile.Linux.patch b/network/3proxy/patches/Makefile.Linux.patch new file mode 100644 index 000000000000..e8705daee3f6 --- /dev/null +++ b/network/3proxy/patches/Makefile.Linux.patch @@ -0,0 +1,21 @@ +diff -Nur 3proxy-0.6.orig/Makefile.Linux 3proxy-0.6/Makefile.Linux +--- 3proxy-0.6.orig/Makefile.Linux 2008-09-30 08:58:43.000000000 -0500 ++++ 3proxy-0.6/Makefile.Linux 2009-06-24 12:01:44.148796740 -0500 +@@ -11,7 +11,7 @@ + BUILDDIR = + CC = gcc + +-CFLAGS = -Wall -g -O2 -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL ++CFLAGS = -Wall -g $(EXTRA_CFLAGS) -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL + COUT = -o + LN = gcc + DCFLAGS = -fpic +@@ -69,7 +69,7 @@ + + install-bin: + $(INSTALL_BIN) -d $(BINDIR) +- $(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR) ++ $(INSTALL_BIN) $(INSTALL_OBJS) $(BINDIR) + + install-etc-dir: + $(INSTALL_BIN) -d $(ETCDIR) diff --git a/network/3proxy/patches/add3proxyuser.sh.patch b/network/3proxy/patches/add3proxyuser.sh.patch new file mode 100644 index 000000000000..8a0ca8800686 --- /dev/null +++ b/network/3proxy/patches/add3proxyuser.sh.patch @@ -0,0 +1,15 @@ +diff -Nur 3proxy-0.6.orig/scripts/add3proxyuser.sh 3proxy-0.6/scripts/add3proxyuser.sh +--- 3proxy-0.6.orig/scripts/add3proxyuser.sh 2007-06-11 03:18:12.000000000 -0500 ++++ 3proxy-0.6/scripts/add3proxyuser.sh 2009-06-24 12:27:33.614202884 -0500 +@@ -1,8 +1,8 @@ + #!/bin/sh + if [ $4 ]; then +- echo $1:`/usr/local/etc/3proxy/bin/mycrypt $$ $2` >> /usr/local/etc/3proxy/passwd +- echo countin \"`wc -l /usr/local/etc/3proxy/counters|awk '{print $1}'`/$1\" D $3 $1 >> /usr/local/etc/3proxy/counters +- echo bandlimin $4 $1 >> /usr/local/etc/3proxy/bandlimiters ++ echo $1:`/usr/bin/mycrypt $$ $2` >> /etc/3proxy/passwd ++ echo countin \"$(wc -l /etc/3proxy/counters | awk '{print $1}')/$1\" D $3 $1 >> /etc/3proxy/counters ++ echo bandlimin $4 $1 >> /etc/3proxy/bandlimiters + else + echo usage: $0 username password day_limit bandwidth + echo " "day_limit - traffic limit in MB per day diff --git a/network/3proxy/patches/fix_etcdir.patch b/network/3proxy/patches/fix_etcdir.patch new file mode 100644 index 000000000000..1390d3c630b3 --- /dev/null +++ b/network/3proxy/patches/fix_etcdir.patch @@ -0,0 +1,12 @@ +diff -Nur 3proxy-0.6.orig/src/stringtable.c 3proxy-0.6/src/stringtable.c +--- 3proxy-0.6.orig/src/stringtable.c 2008-02-03 05:28:24.000000000 -0600 ++++ 3proxy-0.6/src/stringtable.c 2009-06-24 12:21:01.637499557 -0500 +@@ -38,7 +38,7 @@ + /* 24 */ NULL, + #ifndef TPROXY_CONF + #ifndef _WIN32 +-/* 25 */ (unsigned char *)"/usr/local/etc/3proxy/3proxy.cfg", ++/* 25 */ (unsigned char *)"/etc/3proxy/3proxy.cfg", + #else + /* 25 */ (unsigned char *)"3proxy.cfg", + #endif diff --git a/network/3proxy/patches/fixup_manpages.patch b/network/3proxy/patches/fixup_manpages.patch new file mode 100644 index 000000000000..90bfc86c6a91 --- /dev/null +++ b/network/3proxy/patches/fixup_manpages.patch @@ -0,0 +1,33 @@ +diff -Nur 3proxy-0.6.orig/man/3proxy.8 3proxy-0.6/man/3proxy.8 +--- 3proxy-0.6.orig/man/3proxy.8 2007-03-01 06:08:33.000000000 -0600 ++++ 3proxy-0.6/man/3proxy.8 2009-06-24 12:36:24.277595082 -0500 +@@ -84,7 +84,7 @@ + configuration from stdin. It makes it possible to use 3proxy.cfg file as + executable script just by setting +x mode and adding + .br +-#!/usr/local/3proxy/3proxy ++#!/usr/bin/3proxy + .br + as a first line in 3proxy.cfg + .TP +@@ -133,7 +133,7 @@ + wget to automate this task. + .SH FILES + .TP +-.I "/usr/local/3proxy/3proxy.cfg (3proxy.cfg)" ++.I "/etc/3proxy/3proxy.cfg (3proxy.cfg)" + .BR 3proxy + configuration file + .SH BUGS +diff -Nur 3proxy-0.6.orig/man/3proxy.cfg.3 3proxy-0.6/man/3proxy.cfg.3 +--- 3proxy-0.6.orig/man/3proxy.cfg.3 2009-02-02 04:00:11.000000000 -0600 ++++ 3proxy-0.6/man/3proxy.cfg.3 2009-06-24 12:37:03.844291883 -0500 +@@ -30,7 +30,7 @@ + File inclusion:
+ .br
+ You can include file by using $FILENAME macro (replace FILENAME with a path
+-to file, for example $/usr/local/etc/3proxy/conf.incl or
++to file, for example $/etc/3proxy/conf.incl or
+ $"c:\\Program Files\\3proxy\\include.cfg" Quotation is
+ required in last example because path contains space character.
+ For included file <CR> (end of line characters) is treated as space character
diff --git a/network/3proxy/rc.3proxy b/network/3proxy/rc.3proxy new file mode 100644 index 000000000000..1e9aac44a234 --- /dev/null +++ b/network/3proxy/rc.3proxy @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Slackware sysinit script for 3proxy + +# Copyright 2009 Ilya INSTE Ponetayev, <inste@mail.ru> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BIN="/usr/bin/3proxy" +CFG="/etc/3proxy/3proxy.cfg" +PID="/var/run/3proxy.pid" + +case "$1" in + start) + echo "Starting 3Proxy $BIN $CFG " + $BIN $CFG + ;; + + stop) + echo "Stopping 3Proxy" + if [ "$PID" ]; then + kill $(cat $PID) + else + killall 3proxy + fi + ;; + + restart|reload) + echo "Reloading 3Proxy" + if [ $PID ]; then + kill -s USR1 $(cat $PID) + else + killall -s USR1 3proxy + fi + ;; + + + *) + echo Usage: $0 "{start|stop|restart}" + exit 1 +esac + diff --git a/network/3proxy/slack-desc b/network/3proxy/slack-desc index 91f14281b8ec..452eb49e3ed4 100644 --- a/network/3proxy/slack-desc +++ b/network/3proxy/slack-desc @@ -8,12 +8,12 @@ |-----handy-ruler------------------------------------------------------| 3proxy: 3proxy (tiny free proxy server) 3proxy: -3proxy: 3Proxy tiny free proxy server previously known as 3[APA3A] tiny -3proxy: freeware proxy is really tiny cross-platform proxy servers set. -3proxy: It includes HTTP proxy with HTTPS and FTP support, SOCKSv4/ -3proxy: SOCKSv4.5/SOCKSv5 proxy (socks), POP3 proxy, SMTP proxy, -3proxy: AIM/ICQ proxy (icqpr), MSN messenger / Live messenger proxy +3proxy: 3Proxy tiny free proxy server previously known as 3[APA3A] is a small +3proxy: cross-platform proxy server set. It includes HTTP proxy with HTTPS +3proxy: and FTP support, SOCKSv4/SOCKSv4.5/SOCKSv5 proxy (socks), POP3 proxy, +3proxy: SMTP proxy, AIM/ICQ proxy (icqpr), MSN messenger/Live messenger proxy 3proxy: (msnpr), FTP proxy, caching DNS proxy, TCP and UDP portmappers. -3proxy: See Release Notes and Changes for features list. -3proxy: 3proxy licensed under GNU GPL v2. -3proxy: The webpage for 3proxy is: http://3proxy.ru/. +3proxy: 3proxy is licensed under the GNU GPL v2. +3proxy: +3proxy: Homepage: http://3proxy.ru/ +3proxy: |