summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD37
-rw-r--r--prey-node-client.install24
3 files changed, 25 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 06f8090221df..1f3ed0db5885 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = prey-node-client
pkgdesc = Remote tracking and monitoring application for laptops, smartphones, and other electronic devices
pkgver = 1.10.11
- pkgrel = 1
+ pkgrel = 2
url = https://preyproject.com/
install = prey-node-client.install
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 53c17c7007b6..ba7ea0ff38ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,17 +3,17 @@
pkgname=prey-node-client
pkgver=1.10.11
-pkgrel=1
+pkgrel=2
pkgdesc="Remote tracking and monitoring application for laptops, smartphones, and other electronic devices"
url="https://preyproject.com/"
arch=('x86_64' 'i686')
license=('GPL3')
depends=('nodejs' 'mpg123' 'xawtv' 'scrot' 'openssh' 'wireless_tools' 'lsb-release' 'python' 'networkmanager' 'npm' 'gtk3' 'python-gobject')
provides=('prey-tracker')
-install='prey-node-client.install'
+install="${pkgname}.install"
source=('prey-tracker' 'fix-symlink-path-and-disable-auto-updates.patch' 'fix-lock.patch')
-source_x86_64=("https://downloads.preyproject.com/prey-client-releases/node-client/$pkgver/prey-linux-$pkgver-x64.zip")
-source_i686=("https://downloads.preyproject.com/prey-client-releases/node-client/$pkgver/prey-linux-$pkgver-x86.zip")
+source_x86_64=("https://downloads.preyproject.com/prey-client-releases/node-client/${pkgver}/prey-linux-${pkgver}-x64.zip")
+source_i686=("https://downloads.preyproject.com/prey-client-releases/node-client/${pkgver}/prey-linux-${pkgver}-x86.zip")
sha256sums=('41f29d334e7671b07cfdc848b2752ccc51710471285e8ebe61c07faa0d36160d'
'0ec04bab461633885aa30ec673322e80c582b2478aab376f938a42fa75500707'
'd4df726fb87b652b352ca44ddb78afe0e16e40dc130753d86c2cbfa92ac2781d')
@@ -21,28 +21,23 @@ sha256sums_x86_64=('e0991e83d46290dede40ee2134fda344b8690cf3e5a69df19394d95ae1aa
sha256sums_i686=('21416f91ccebcc1f44927231d2a00606e44113a861b79bd117c6172aa5ede803')
package() {
- cd "$srcdir/prey-$pkgver"
-
- # Now, we use prey's node, so we don't delete bin/node
- # --------------------------------
- # 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
+ cd "${srcdir}/prey-${pkgver}"
# Fix symlink path, and default-disable automatic updates
- patch -p0 < ${srcdir}/fix-symlink-path-and-disable-auto-updates.patch
+ patch -p0 -i ${srcdir}/fix-symlink-path-and-disable-auto-updates.patch
# Fix broken lock
- patch -p0 < ${srcdir}/fix-lock.patch
+ patch -p0 -i ${srcdir}/fix-lock.patch
+
+ install -dm755 "${pkgdir}/opt/${pkgname}"
+ cp -r ./* "${pkgdir}/opt/prey-node-client/"
+
+ install -d ${pkgdir}/usr/share/licenses/${pkgname}
+ ln -s "/opt/${pkgname}/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
- 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"
+ install -dm755 "${pkgdir}/usr/bin/"
- mkdir -p "$pkgdir/usr/bin/"
# Binary prey named as prey-tracker
- # ln -s /opt/prey-node-client/bin/prey "$pkgdir/usr/bin/prey-tracker"
- cp "$srcdir/prey-tracker" "$pkgdir/usr/bin/prey-tracker"
+ cp "${srcdir}/prey-tracker" "${pkgdir}/usr/bin/prey-tracker"
}
-# vim:set ts=2 sw=2 et:
+# vim:set ts=2 sw=2 et:
diff --git a/prey-node-client.install b/prey-node-client.install
index da628748439b..bb83c0cc8b16 100644
--- a/prey-node-client.install
+++ b/prey-node-client.install
@@ -1,22 +1,14 @@
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_project config gui\""
- echo
- 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 "$@"'
+ /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-tracker config gui\""
}
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"
+ /opt/prey-node-client/bin/prey config hooks pre_uninstall
+ userdel prey
}