network/reaver: Updated for version 1.6.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Willy Sudiarto Raharjo 2017-07-22 17:35:38 +07:00
parent d1771970c7
commit 31039999eb
3 changed files with 20 additions and 38 deletions

View file

@ -1,14 +0,0 @@
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...
}
config etc/reaver/reaver.db.new

View file

@ -22,15 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=reaver PRGNAM=reaver
VERSION=${VERSION:-1.3} SRCNAM=reaver-wps-fork-t6x
VERSION=${VERSION:-1.6.1}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$( uname -m )" in case "$( uname -m )" in
i?86) ARCH=i486 ;; i?86) ARCH=i586 ;;
arm*) ARCH=arm ;; arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;; *) ARCH=$( uname -m ) ;;
esac esac
@ -44,8 +44,8 @@ DOCS="../docs/LICENSE ../docs/README"
# LIBDIRSUFFIX is not strictly needed, I'll leave it here for future # LIBDIRSUFFIX is not strictly needed, I'll leave it here for future
# improvements # improvements
if [ "$ARCH" = "i486" ]; then if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686" SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -66,15 +66,15 @@ set -e
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM-$VERSION rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION cd $SRCNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-exec chmod 755 {} \; -o \ -o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-exec chmod 644 {} \; -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# one more directory # one more directory
cd src cd src
@ -82,16 +82,13 @@ cd src
CFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \
./configure \ ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--build=$ARCH-slackware-linux --build=$ARCH-slackware-linux
make make
# make install is b0rked make install DESTDIR=$PKG
mkdir -p $PKG/usr/sbin
install -o 0 -g 0 -m 0755 walsh $PKG/usr/sbin/walsh
install -o 0 -g 0 -m 0755 reaver $PKG/usr/sbin/reaver
# not really sure how to handle future reaver.db updates
mkdir -p $PKG/etc/reaver
install -o 0 -g 0 -m 0644 reaver.db $PKG/etc/reaver/reaver.db.new
mkdir -p $PKG/usr/man/man1 mkdir -p $PKG/usr/man/man1
install -o 0 -g 0 -m 0644 ../docs/reaver.1.gz $PKG/usr/man/man1/reaver.1.gz install -o 0 -g 0 -m 0644 ../docs/reaver.1.gz $PKG/usr/man/man1/reaver.1.gz
@ -104,7 +101,6 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -1,8 +1,8 @@
PRGNAM="reaver" PRGNAM="reaver"
VERSION="1.3" VERSION="1.6.1"
HOMEPAGE="https://code.google.com/p/reaver-wps/" HOMEPAGE="https://github.com/t6x/reaver-wps-fork-t6x"
DOWNLOAD="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/reaver-wps/reaver-1.3.tar.gz" DOWNLOAD="https://github.com/t6x/reaver-wps-fork-t6x/archive/v1.6.1/reaver-wps-fork-t6x-1.6.1.tar.gz"
MD5SUM="6ec7dbb11b67e1b4a20f2ceba5f69547" MD5SUM="8251f387287ef7150fd90021d0aed4ec"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="" REQUIRES=""