mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
network/tntnet: Updated for version 2.1, various cleanups.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
parent
6b513bedf3
commit
5635c60b89
3 changed files with 37 additions and 4 deletions
27
network/tntnet/doinst.sh
Normal file
27
network/tntnet/doinst.sh
Normal file
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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=""
|
||||
|
|
Loading…
Reference in a new issue