summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordobedobedo2021-08-20 15:32:56 +0300
committerdobedobedo2021-08-20 15:32:56 +0300
commitb01d8f13b74dcc993cfdd65d924693d76edf45cd (patch)
tree11427e6ab551acebe2f2cadfebad01b20dbbf3c0
parent1ede3a28eeac7275c946e7656a18707983bc9dd9 (diff)
downloadaur-b01d8f13b74dcc993cfdd65d924693d76edf45cd.tar.gz
Change the licence rehostable directory
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD6
-rw-r--r--agisoft-metashape.install16
3 files changed, 22 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 02c90770f53b..e9bcfafcf465 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = agisoft-metashape
pkgdesc = Photogrammetric processing of digital images and 3D spatial data generation software. Standard edition
pkgver = 1.7.4
- pkgrel = 2
+ pkgrel = 3
url = https://www.agisoft.com/
install = agisoft-metashape.install
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index b8c5088882c6..c1bc8ef61191 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgname=metashape
pkgname=agisoft-${_pkgname}
pkgver=1.7.4
-pkgrel=2
+pkgrel=3
pkgdesc="Photogrammetric processing of digital images and 3D spatial data generation software. Standard edition"
arch=('x86_64')
url="https://www.agisoft.com/"
@@ -106,6 +106,10 @@ package() {
# Create executables in /usr/bin
install -Dm755 "$srcdir/agisoft-metashape" "$pkgdir/usr/bin/agisoft-metashape"
+ # Set the rehostable directory and environment variables in executables for activation
+ mkdir -p "${pkgdir}/opt/agisoft/${_pkgname}/rehostable"
+ sed -i '/export LD_LIBRARY_PATH/a\\nAGISOFT_REHOST_PATH=\$dirname/rehostable\nexport AGISOFT_REHOST_PATH' "${pkgdir}/opt/agisoft/${_pkgname}/metashape.sh"
+
# Set correct permission
chmod -R g=u "$pkgdir/opt/agisoft/${_pkgname}"
chmod -R o=u "$pkgdir/opt/agisoft/${_pkgname}"
diff --git a/agisoft-metashape.install b/agisoft-metashape.install
index 01cc11c38d73..7cbffaac60a7 100644
--- a/agisoft-metashape.install
+++ b/agisoft-metashape.install
@@ -11,6 +11,22 @@ post_install() {
echo
}
+pre_upgrade() {
+ echo "Deactivating the product..."
+ agisoft-metashape --deactivate 2>/dev/null
+}
+
+post_upgrade() {
+ echo
+ echo "This upgrade change the rehostable directory for activation"
+ echo
+ echo "Therefore, we deactivated the licence to avoid it becomes invalid"
+ echo
+ echo "Please use sudo agisoft-metashape --activate to reactivate your licence"
+ echo
+ echo "This behaviour will be removed in the next release"
+}
+
pre_remove() {
echo "Deactivating the product..."
agisoft-metashape --deactivate 2>/dev/null