diff options
author | dobedobedo | 2021-08-20 15:32:56 +0300 |
---|---|---|
committer | dobedobedo | 2021-08-20 15:32:56 +0300 |
commit | b01d8f13b74dcc993cfdd65d924693d76edf45cd (patch) | |
tree | 11427e6ab551acebe2f2cadfebad01b20dbbf3c0 | |
parent | 1ede3a28eeac7275c946e7656a18707983bc9dd9 (diff) | |
download | aur-b01d8f13b74dcc993cfdd65d924693d76edf45cd.tar.gz |
Change the licence rehostable directory
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | agisoft-metashape.install | 16 |
3 files changed, 22 insertions, 2 deletions
@@ -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 @@ -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 |