1. James Mills
  2. ports

Commits

James Mills  committed 6468020

btpd: 0.13 -> 0.16

  • Participants
  • Parent commits d770a72
  • Branches default

Comments (0)

Files changed (5)

File btpd/.footprint

View file
+drwxr-xr-x	root/root	etc/
+-rw-r--r--	root/root	etc/btpd.conf
+drwxr-xr-x	root/root	etc/rc.d/
+-rwxr-xr-x	root/root	etc/rc.d/btpd
 drwxr-xr-x	root/root	usr/
 drwxr-xr-x	root/root	usr/bin/
 -rwxr-xr-x	root/root	usr/bin/btcli
 -rwxr-xr-x	root/root	usr/bin/btinfo
 -rwxr-xr-x	root/root	usr/bin/btpd
+drwxr-xr-x	root/root	usr/man/
+drwxr-xr-x	root/root	usr/man/man1/
+-rw-r--r--	root/root	usr/man/man1/btcli.1.gz
+-rw-r--r--	root/root	usr/man/man1/btinfo.1.gz
+-rw-r--r--	root/root	usr/man/man1/btpd.1.gz

File btpd/.md5sum

View file
-0d9c4a672eea6f298fa6e44d94da1657  btpd-0.13.tar.gz
+fe042aae8d7c515ecd855673d1c2b33e  btpd-0.16.tar.gz
+56036e80a9c5505865e77cee3eb01600  btpd.conf
+3f3ba00e5d42f705494c46f8c7538b39  btpd.rc

File btpd/Pkgfile

View file
 # Description: The BitTorrent Protocol Daemon
 # URL:         http://www.murmeldjur.se/btpd/
 # Maintainer:  James Mills, prologic at shortcircuit dot net dot au
-# Packager:    James Mills, prologic at shortcircuit dot net dot au
 #
-# Depends on:	libevent, openssl, curl
+# Depends on:  libevent openssl curl
 
 name=btpd
-version=0.13
+version=0.16
 release=1
-source=(http://www.murmeldjur.se/$name/$name-$version.tar.gz)
+source=(
+    http://cloud.github.com/downloads/$name/$name/$name-$version.tar.gz
+    btpd.rc
+    btpd.conf
+)
+
 
 build() {
-	cd $name-$version
-	./configure --prefix=/usr
-	make
-	make DESTDIR=$PKG install
-	chown -R root:root $PKG
+    cd $name-$version
+
+    # Configure
+    ./configure \
+        --prefix=/usr \
+        --mandir=/usr/man
+
+    # Build
+    make
+
+    # Package
+    make DESTDIR=$PKG install
+    install -D -m 755 $SRC/btpd.rc $PKG/etc/rc.d/btpd
+    install -D -m 644 $SRC/btpd.conf $PKG/etc/btpd.conf
+
+    chown -R root:root $PKG
 }

File btpd/btpd.conf

View file
+#
+# Arguments to be passed to the BitTorrent Protocol Daemon
+#
+
+# example: BTPD_ARGS="--bw-in 1000 --bw-out 100 -p 6881"
+BTPD_ARGS=""

File btpd/btpd.rc

View file
+#!/bin/sh
+#
+# /etc/rc.d/btpd: start/stop btpd daemon
+#
+
+source /etc/btpd.conf
+
+case $1 in
+start)
+    /usr/bin/btpd $BTPD_ARGS &> /dev/null
+	fi
+	/usr/sbin/sshd
+	;;
+stop)
+    /usr/bin/btcli kill &> /dev/null
+	;;
+restart)
+	$0 stop
+	sleep 2
+	$0 start
+	;;
+*)
+	echo "usage: $0 [start|stop|restart]"
+	;;
+esac
+
+# End of file