summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxpt2015-06-10 23:27:57 -0300
committerxpt2015-06-10 23:27:57 -0300
commit65c3341d64d28140faea5531689443c704e364f0 (patch)
treeaf6d21ab2e35504d6d4e07637b2f87bc850ba2a5
downloadaur-65c3341d64d28140faea5531689443c704e364f0.tar.gz
Initial import
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD41
-rw-r--r--prey-node-client.install22
-rw-r--r--prey-node-client.patch70
4 files changed, 162 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5fd813fcc88
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = prey-node-client
+ pkgdesc = Remote tracking and monitoring application for laptops, smartphones, and other electronic devices
+ pkgver = 1.3.10
+ pkgrel = 1
+ url = https://preyproject.com/
+ install = prey-node-client.install
+ arch = x86_64
+ arch = i686
+ license = GPLv3
+ depends = nodejs
+ depends = mpg123
+ depends = xawtv
+ depends = scrot
+ depends = openssh
+ depends = wireless_tools
+ depends = lsb-release
+ depends = python2
+ depends = pygtk
+ depends = networkmanager
+ replaces = prey-tracker
+ source = prey-node-client.patch
+ sha256sums = 1b296df026b6f2fd4278e4457e20e305122c69f524dfa39ed5e4e559de536252
+ source_x86_64 = https://s3.amazonaws.com/prey-releases/node-client/1.3.10/prey-linux-1.3.10-x64.zip
+ sha256sums_x86_64 = 2173450552360ec9b9e1520179e4a9a751d04b8daf21f007e3f344e56d505ce3
+ source_i686 = https://s3.amazonaws.com/prey-releases/node-client/1.3.10/prey-linux-1.3.10-x86.zip
+ sha256sums_i686 = a31b24c9ff094e02078a6b5f5e274e32e0696ae0165c9a04bd23448ff66da1ad
+
+pkgname = prey-node-client
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b4f7d734589
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: xpt <user.xpt@gmail.com>
+pkgname=prey-node-client
+pkgver=1.3.10
+pkgrel=1
+pkgdesc="Remote tracking and monitoring application for laptops, smartphones, and other electronic devices"
+url="https://preyproject.com/"
+arch=('x86_64' 'i686')
+license=('GPLv3')
+depends=('nodejs' 'mpg123' 'xawtv' 'scrot' 'openssh' 'wireless_tools' 'lsb-release' 'python2' 'pygtk' 'networkmanager')
+replaces=('prey-tracker')
+# Should be used as soon as the bash client is renamed
+#provides=('prey-tracker')
+install='prey-node-client.install'
+source=('prey-node-client.patch')
+source_x86_64=("https://s3.amazonaws.com/prey-releases/node-client/${pkgver}/prey-linux-${pkgver}-x64.zip")
+source_i686=("https://s3.amazonaws.com/prey-releases/node-client/${pkgver}/prey-linux-${pkgver}-x86.zip")
+sha256sums=('1b296df026b6f2fd4278e4457e20e305122c69f524dfa39ed5e4e559de536252')
+sha256sums_x86_64=('2173450552360ec9b9e1520179e4a9a751d04b8daf21f007e3f344e56d505ce3')
+sha256sums_i686=('a31b24c9ff094e02078a6b5f5e274e32e0696ae0165c9a04bd23448ff66da1ad')
+
+
+package() {
+ cd "${srcdir}/prey-${pkgver}"
+
+ # We don't need the bundled node.js as we have it installed in the system.
+ # Conveniently, the bash script probes for node.js and automatically uses
+ # the system node if the bundled one is not found.
+ rm bin/node
+
+ # Fix symlink path, Python shebangs and default-disable automatic updates
+ patch -p0 < ../../prey-node-client.patch
+
+ mkdir -p "$pkgdir/opt/prey-node-client/"
+ cp -r ./* "$pkgdir/opt/prey-node-client/"
+ install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/license.txt"
+
+ mkdir -p "$pkgdir/usr/bin/"
+ ln -s /opt/prey-node-client/bin/prey "$pkgdir/usr/bin/prey"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/prey-node-client.install b/prey-node-client.install
new file mode 100644
index 00000000000..15900caa2de
--- /dev/null
+++ b/prey-node-client.install
@@ -0,0 +1,22 @@
+post_install() {
+ /opt/prey-node-client/bin/prey config hooks post_install >/dev/null
+ gpasswd -a prey video >/dev/null
+
+ echo
+ echo "You should now configure prey by either"
+ echo "*) editing /etc/prey/prey.conf, or"
+ echo "*) running \"prey config gui\""
+
+ echo "Prey use Python2, you need to see"
+ echo "https://wiki.archlinux.org/index.php/Python#Dealing_with_version_problem_in_build_scripts"
+ echo "Make the file /usr/local/bin/python, whith:"
+ echo -e '#!/bin/bash\nscript=$(readlink -f -- "$1")\ncase "$script" in (/opt/prey-node-client/*|/other/path)\nexec python2 "$@"\n;;\nesac\n\n\nexec python3 "$@"'
+
+}
+
+pre_remove() {
+ /opt/prey-node-client/bin/prey config hooks pre_uninstall
+ userdel prey
+ echo "if you created python script you can remove /usr/local/bin/python, please see"
+ echo "https://wiki.archlinux.org/index.php/Python#Dealing_with_version_problem_in_build_scripts"
+}
diff --git a/prey-node-client.patch b/prey-node-client.patch
new file mode 100644
index 00000000000..3441a879fb4
--- /dev/null
+++ b/prey-node-client.patch
@@ -0,0 +1,70 @@
+diff --git bin/prey bin/prey
+index 5b5203c..915abd7 100755
+--- bin/prey
++++ bin/prey
+@@ -4,11 +4,11 @@ PATH="$PATH:/usr/local/bin"
+ dir="$(dirname $0)"
+ [ -x "$dir/node" ] && node="$dir/node" || node="$(command -v node || command -v nodejs)"
+
+-# if current file is a symlink (e.g. installed via npm) we'll append
++# if current file is a symlink (e.g. installed via pacman) we'll append
+ # the relative path to where the package is actually installed.
+ if [ -n "$(readlink $0 2> /dev/null)" ]; then
+ rel="$(dirname $(readlink $0))"
+- dir="$dir/$rel"
++ dir="$rel"
+ fi
+
+ script="lib/agent/cli.js"
+diff --git lib/agent/actions/alert/linux/flash.py lib/agent/actions/alert/linux/flash.py
+index 38a26b2..e7ac631 100755
+--- lib/agent/actions/alert/linux/flash.py
++++ lib/agent/actions/alert/linux/flash.py
+@@ -1,10 +1,4 @@
+-#!/bin/sh
+-''':'
+-':'; python=$(command -v python)
+-':'; [ -z "$python" ] || [ -n "${python##*usr*}" ] && python="/usr/bin/python"
+-':'; exec "$python" "$0" "$@"
+-'''
+-
++#!/usr/bin/env python2
+ # coding: utf8
+
+ #############################################
+diff --git lib/conf/gui/linux/prey-config.py lib/conf/gui/linux/prey-config.py
+index f9f9eb4..66549ef 100755
+--- lib/conf/gui/linux/prey-config.py
++++ lib/conf/gui/linux/prey-config.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ ################################################
+ # Prey Configurator for Linux
+ # By Tomas Pollak
+diff --git prey.conf.default prey.conf.default
+index 2b2b141..d39a885 100644
+--- prey.conf.default
++++ prey.conf.default
+@@ -9,7 +9,7 @@ plugin_list = control-panel
+ auto_connect = false
+
+ # Allows Prey to auto-update itself when new versions are released.
+-auto_update = true
++auto_update = false
+
+ # Fetch edge releases before they reach the stable branch. No effect without auto_update.
+ download_edge = false
+diff --git lib/system/linux/index.js lib/system/linux/index.js
+index c68f3c2..0d8216d 100644
+--- lib/system/linux/index.js
++++ lib/system/linux/index.js_new
+@@ -39,6 +39,6 @@ exports.process_running = function(process_name, callback){
+
+ // restarts NetworkManager so it reconnects
+ exports.reconnect = function(callback){
+- var cmd = "service NetworkManager restart";
++ var cmd = "systemctl restart NetworkManager.service";
+ exec(cmd, callback);
+ };
+