aboutsummaryrefslogtreecommitdiff
path: root/network/tntnet
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-17 00:05:58 +0200
committerdsomero <xgizzmo@slackbuilds.org>2012-09-16 19:44:44 -0400
commit5635c60b897c4bedbc79b22648ee9e8377c76d3d (patch)
tree958e2b14fda49968f54f8281db42f399b03cddbd /network/tntnet
parent6b513bedf346653bb7d8a9898e74e7995e136210 (diff)
network/tntnet: Updated for version 2.1, various cleanups.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/tntnet')
-rw-r--r--network/tntnet/doinst.sh27
-rw-r--r--network/tntnet/tntnet.SlackBuild10
-rw-r--r--network/tntnet/tntnet.info4
3 files changed, 37 insertions, 4 deletions
diff --git a/network/tntnet/doinst.sh b/network/tntnet/doinst.sh
new file mode 100644
index 000000000000..6a3d11314c82
--- /dev/null
+++ b/network/tntnet/doinst.sh
@@ -0,0 +1,27 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+config etc/tntnet/mime.conf.new
+config etc/tntnet/tntnet.conf.new
+preserve_perms etc/rc.d/rc.tntnet.new
diff --git a/network/tntnet/tntnet.SlackBuild b/network/tntnet/tntnet.SlackBuild
index d4c1c8492985..467f0d8beb8c 100644
--- a/network/tntnet/tntnet.SlackBuild
+++ b/network/tntnet/tntnet.SlackBuild
@@ -22,7 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=tntnet
-VERSION=${VERSION:-2.0}
+VERSION=${VERSION:-2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -58,7 +58,7 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-#rm -rf $PRGNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
@@ -85,6 +85,12 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+mv $PKG/etc/$PRGNAM/mime.conf{,.new}
+mv $PKG/etc/$PRGNAM/$PRGNAM.conf{,.new}
+sed -i "s|www-data|apache|" $PKG/etc/$PRGNAM/$PRGNAM.conf.new
+install -m 0755 -D $PKG/etc/init.d/$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
+rm -fr $PKG/etc/init.d
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/network/tntnet/tntnet.info b/network/tntnet/tntnet.info
index d5318308472e..febaa934c47d 100644
--- a/network/tntnet/tntnet.info
+++ b/network/tntnet/tntnet.info
@@ -1,7 +1,7 @@
PRGNAM="tntnet"
-VERSION="2.0"
+VERSION="2.1"
HOMEPAGE="http://www.tntnet.org/"
-DOWNLOAD="http://www.tntnet.org/download/tntnet-2.0.tar.gz"
+DOWNLOAD="http://www.tntnet.org/download/tntnet-2.1.tar.gz"
MD5SUM="8f7185eeed23e7ae6a9be314e2fc0d36"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""