From 098cbdb908a3ca58a09879e786df38ebe5a1c898 Mon Sep 17 00:00:00 2001
From: Cecil Hugh Watson <knoppmyth@gmail.com>
Date: Tue, 3 Feb 2009 16:52:59 -0800
Subject: Initial inclusion of Torrentflux.

---
 abs/extra-testing/community/torrentflux/PKGBUILD   | 51 ++++++++++++++++++
 .../srclinks.3EkGqGLxe/torrentflux/PKGBUILD        |  1 +
 .../torrentflux/torrentflux.install                |  1 +
 .../community/torrentflux/torrentflux.install      | 60 ++++++++++++++++++++++
 4 files changed, 113 insertions(+)
 create mode 100644 abs/extra-testing/community/torrentflux/PKGBUILD
 create mode 120000 abs/extra-testing/community/torrentflux/srclinks.3EkGqGLxe/torrentflux/PKGBUILD
 create mode 120000 abs/extra-testing/community/torrentflux/srclinks.3EkGqGLxe/torrentflux/torrentflux.install
 create mode 100644 abs/extra-testing/community/torrentflux/torrentflux.install

diff --git a/abs/extra-testing/community/torrentflux/PKGBUILD b/abs/extra-testing/community/torrentflux/PKGBUILD
new file mode 100644
index 0000000..54d35b5
--- /dev/null
+++ b/abs/extra-testing/community/torrentflux/PKGBUILD
@@ -0,0 +1,51 @@
+# 'Maintainer': Mikko Sepp�l� <t-r-a-y@mbnet.fi> aka Neverth
+
+pkgname=torrentflux
+pkgver=2.4
+pkgrel=2
+pkgdesc="TorrentFlux is a free php based Torrent client that runs on a web server. Manage all of your Torrents remotely or locally."
+arch=(i686 x86_64)
+url="http://www.torrentflux.com/"
+license=(GPL)
+# You still need your favorite httpd, I do not wish to force it.
+depends=('mysql' 'php' 'python' 'pycrypto')
+makedepends=('findutils')
+conflicts=('torrentflux2')
+backup=('opt/torrentflux/config.php')
+install=(torrentflux.install)
+source=("http://mesh.dl.sourceforge.net/sourceforge/torrentflux/${pkgname}_${pkgver}.tar.gz" "torrentflux.install")
+md5sums=('8fdc3952bc2ece9f10bcee299b2aeb16' 'f14ebd47dd41c7949411973c2f74f4fd')
+
+build()
+{
+        cd $startdir/src/${pkgname}_${pkgver}
+        install -d $startdir/pkg/opt/torrentflux
+	
+	# This thing is compressed in windows? fix permissions later..
+        cp -R html/* $startdir/pkg/opt/torrentflux/
+        cp -R sql $startdir/pkg/opt/torrentflux
+
+	cd $startdir/pkg
+	# Our group
+        chgrp -R daemon opt/torrentflux
+        chmod -R 775 opt/torrentflux
+	
+	# Our mysqluser, we dont want root here :p
+        sed -re 's/root/torrentfluxie/' -i opt/torrentflux/config.php
+	
+	cd opt/torrentflux
+        # Permissions...
+        find ./ -name \*php -exec chmod 444 '{}' \;
+        find ./ -name \*png -exec chmod 444 '{}' \; 
+        find ./ -name \*gif -exec chmod 444 '{}' \;
+       # They dont want to read this
+        chmod 660 config.php
+        chmod 444 favicon.ico dtree.css *.js blank.html TF_BitTornado/index.html images/*{gif,png,ico,html} searchEngines/* themes/index.html downloads/index.html
+        # We dont touch to adodb, leave it for customizer, as so we leave subdirs for now
+
+        # Upgrade files
+        install -D -m444 $startdir/src/${pkgname}_${pkgver}/upgrades/upgrade21_22.php $startdir/pkg/opt/torrentflux/upgradeflux21_22.php
+        install -D -m444 $startdir/src/${pkgname}_${pkgver}/upgrades/upgrade22_23.php $startdir/pkg/opt/torrentflux/upgradeflux22_23.php
+        install -D -m444 $startdir/src/${pkgname}_${pkgver}/upgrades/upgrade23_24.php $startdir/pkg/opt/torrentflux/upgradeflux23_24.php
+}
+
diff --git a/abs/extra-testing/community/torrentflux/srclinks.3EkGqGLxe/torrentflux/PKGBUILD b/abs/extra-testing/community/torrentflux/srclinks.3EkGqGLxe/torrentflux/PKGBUILD
new file mode 120000
index 0000000..45a9d6a
--- /dev/null
+++ b/abs/extra-testing/community/torrentflux/srclinks.3EkGqGLxe/torrentflux/PKGBUILD
@@ -0,0 +1 @@
+/data/LinHES-PKGBUILD/abs/extra-testing/community/torrentflux/PKGBUILD
\ No newline at end of file
diff --git a/abs/extra-testing/community/torrentflux/srclinks.3EkGqGLxe/torrentflux/torrentflux.install b/abs/extra-testing/community/torrentflux/srclinks.3EkGqGLxe/torrentflux/torrentflux.install
new file mode 120000
index 0000000..8ce21bd
--- /dev/null
+++ b/abs/extra-testing/community/torrentflux/srclinks.3EkGqGLxe/torrentflux/torrentflux.install
@@ -0,0 +1 @@
+/data/LinHES-PKGBUILD/abs/extra-testing/community/torrentflux/torrentflux.install
\ No newline at end of file
diff --git a/abs/extra-testing/community/torrentflux/torrentflux.install b/abs/extra-testing/community/torrentflux/torrentflux.install
new file mode 100644
index 0000000..2aa50aa
--- /dev/null
+++ b/abs/extra-testing/community/torrentflux/torrentflux.install
@@ -0,0 +1,60 @@
+post_install() {
+  cat << EOF
+OK. So youre about to install torrentflux? Postgresql and mysql are supported.
+Instructions are for mysql so lets use it? ok? 
+Remove mysql from depencies if you dont like.
+(mysqlcommands might need '-u root -p' depending on your setup)
+
+1. You need to create mysql database for it
+mysqladmin create torrentflux 
+(eg. 'mysqladmin -u root -p create torrentflux' if needed)
+
+2. Load the script that creates tables and such 
+(.sql files for postgresql are here too!)
+mysql torrentflux < /opt/torrentflux/sql/mysql_torrentflux.sql
+
+3. Edit the config.php located in /opt/torrentflux/html
+
+4. Point your fav http server to use this,
+(eg. use vhosts for apache or create symlink to /opt/torrentflux from 
+somewhere that http server can access)
+
+5. Our database user is "torrentfluxie"
+(use mysql_setpermission to give rights for him)
+mysql_setpermission -u mysqlroot
+hit 5 in menu and choose torrentflux as database
+give torrentfluxie as user and give password if you want 
+(if you do this, you need to set the password to /opt/torrentflux/config.php:
+$cfg["db_pass"] = "yourpass";)
+localhost is good choice for host 
+(we dont need password always if we got private comp)
+
+6. Safemode must be off in php.ini (/etc/php.ini)
+
+httpd server must support php and mysql, you can look for archwiki 
+if you dont know howto enable them.
+Notice that the httpd server should belong to daemon group 
+(one way or another)
+EOF
+}
+
+post_upgrade() {
+ cat << EOF
+To upgrade your database, use files in /opt/torrentflux/
+(eg for 2.2 -> 2.4 go from browser to http://yourtorrentfuxdomain.and.path/upgradeflux22_23.php 
+and do the same on upgradeflux23_24.php file)
+All your old information should stay trough the upgrades
+When it tells you to remove the files, just chmod them to 000 and they will not harm.
+EOF
+}
+
+pre_remove() {
+  /bin/echo "Remember to remove mysql tables if you want :p"
+  /bin/echo "mysqladmin -f drop torrentflux" 
+  /bin/echo "(remeber -u root -p, hope it worked)"
+}
+
+op=$1
+shift
+
+$op $*
-- 
cgit v0.12