diff options
author | Reza Talebi <reza.talebi.73@outlook.com> | 2019-08-30 07:51:51 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-08-30 07:51:51 +0700 |
commit | ea94c6f09a575554f312fbf2a93437402a75f969 (patch) | |
tree | ea90bbce72e221a543f753a18d197e77d7a3c86b | |
parent | 995ea5181357a7d9e418af5dca9e8c6663a12301 (diff) | |
download | slackbuilds-ea94c6f09a575554f312fbf2a93437402a75f969.tar.gz |
network/nordvpn: Added (Protect your privacy online).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | network/nordvpn/README | 16 | ||||
-rw-r--r-- | network/nordvpn/doinst.sh | 9 | ||||
-rw-r--r-- | network/nordvpn/nordvpn.SlackBuild | 79 | ||||
-rw-r--r-- | network/nordvpn/nordvpn.info | 10 | ||||
-rw-r--r-- | network/nordvpn/rc.nordvpn | 91 | ||||
-rw-r--r-- | network/nordvpn/slack-desc | 19 |
6 files changed, 224 insertions, 0 deletions
diff --git a/network/nordvpn/README b/network/nordvpn/README new file mode 100644 index 0000000000..2f946e2f5e --- /dev/null +++ b/network/nordvpn/README @@ -0,0 +1,16 @@ +The NordVPN app for Linux protects your sensitive data with military-grade +encryption, so that whatever you do online stays secure and private. +More than 5000 servers worldwide. No logs of your online activity. +Secure up to 6 devices with a single account. +Access online content securely, with no restrictions. + +The following can be used to start/stop NordVPN automatically: +/etc/rc.d/rc.local + if [ -x /etc/rc.d/rc.nordvpn ]; then + /etc/rc.d/rc.nordvpn start + fi + +/etc/rc.d/rc.local_shutdown + if [ -x /etc/rc.d/rc.nordvpn ]; then + /etc/rc.d/rc.nordvpn stop + fi diff --git a/network/nordvpn/doinst.sh b/network/nordvpn/doinst.sh new file mode 100644 index 0000000000..1b37a9827f --- /dev/null +++ b/network/nordvpn/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/network/nordvpn/nordvpn.SlackBuild b/network/nordvpn/nordvpn.SlackBuild new file mode 100644 index 0000000000..717dc26a5c --- /dev/null +++ b/network/nordvpn/nordvpn.SlackBuild @@ -0,0 +1,79 @@ +#!/bin/sh +# +# Slackware build script for nordvpn. +# +# Copyright 2019 Reza Talebi, Shahin Shahr, Iran. +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=nordvpn +VERSION=${VERSION:-3.3.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +SRCNAM=$PRGNAM-stable + +set -e + +if [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + BITS="amd64" +else + echo "Package for $(uname -m) architecture is not available." + exit 1 +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-${VERSION} +mkdir -p $PRGNAM-${VERSION} +cd $PKG +rpm2cpio $CWD/$PRGNAM-${VERSION}-${BUILD}.${ARCH}.rpm | cpio -idmv +rm -rf etc +rm -rf usr/lib + +mv $PKG/usr/share/man $PKG/usr/ + +mkdir -p usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +mkdir -p $PKG/etc/rc.d/ +cat $CWD/rc.nordvpn > $PKG/etc/rc.d/rc.nordvpn + +cd $PKG +/sbin/makepkg -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/nordvpn/nordvpn.info b/network/nordvpn/nordvpn.info new file mode 100644 index 0000000000..248c8550cc --- /dev/null +++ b/network/nordvpn/nordvpn.info @@ -0,0 +1,10 @@ +PRGNAM="nordvpn" +VERSION="3.3.1-1" +HOMEPAGE="https://www.nordvpn.com/" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://repo.nordvpn.com/yum/nordvpn/centos/x86_64/Packages/n/nordvpn-3.3.1-1.x86_64.rpm" +MD5SUM_x86_64="114F64009DD791DC829E2B4D55A9F47D" +REQUIRES="" +MAINTAINER="Reza Talebi" +EMAIL="reza.talebi.73@outlook.com" diff --git a/network/nordvpn/rc.nordvpn b/network/nordvpn/rc.nordvpn new file mode 100644 index 0000000000..c59bb60073 --- /dev/null +++ b/network/nordvpn/rc.nordvpn @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +# Short-Description: Protect your privacy online and access media content with no regional restrictions. Strong encryption and no-log policy with 3000+ servers in 60+ countries. +### END INIT INFO + + +PRGNAM=nordvpn +PID=/var/run/$PRGNAM.pid +DAEMON=/usr/sbin/${PRGNAM}d +SOCK=/run/${PRGNAM}d.sock + + +# +# Function that starts the daemon +# +nordvpnd_start() +{ + rm -rf $SOCK + if [ -s $PID ]; then + echo "$PRGNAM is already running: $(cat $PID)" + exit 1 + fi + + if [ -x $DAEMON ]; then + echo "Starting $PRGNAM" + $DAEMON & + pidof $DAEMON > $PID + fi +} + +# +# Function that stops the daemon +# +nordvpnd_stop() +{ + if [ -s $PID ]; then + kill $(cat $PID) + rm -rf $PID $SOCK + echo "$PRGNAM has been stopped." + else + echo "$PRGNAM is not running." + fi +} + +# +# Function that restarts the daemon +# +nordvpnd_restart() +{ + echo "Stopping $PRGNAM" + sleep 1 + nordvpnd_stop + echo "$PRGNAM has been stopped." + sleep 1 + echo "Restarting $PRGNAM" + sleep 1 + nordvpnd_start + echo "$PRGNAM has been restarted." +} + +# +# Function that shows the current status of the daemon +# +nordvpnd_status() +{ + if [ -s $PID ]; then + echo "$PRGNAM is running: $(cat $PID)" + else + echo "$PRGNAM is not running." + fi +} + + +case "$1" in + start) + nordvpnd_start + ;; + stop) + nordvpnd_stop + ;; + restart) + nordvpnd_restart + ;; + status) + nordvpnd_status + ;; + *) + echo $"Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac diff --git a/network/nordvpn/slack-desc b/network/nordvpn/slack-desc new file mode 100644 index 0000000000..62ee422dbb --- /dev/null +++ b/network/nordvpn/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +nordvpn: nordvpn (Protect your privacy online.) +nordvpn: +nordvpn: The NordVPN app for Linux protects your sensitive data +nordvpn: with military-grade encryption, so that whatever you +nordvpn: do online stays secure and private. More than 5000 +nordvpn: servers worldwide. No logs of your online activity. +nordvpn: Secure up to 6 devices with a single account. +nordvpn: Access online content securely, with no restrictions. +nordvpn: +nordvpn: https://www.nordvpn.com/ +nordvpn: |