summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilippo Falezza2024-01-23 19:38:37 +0100
committerFilippo Falezza2024-01-23 19:38:37 +0100
commitbc6e3486b9d1fd25c89b73bb057d42fa2d412dfd (patch)
tree0976f0138e9f6de9b114a424a8ae1e65eff8da3c
parent7b04663327725b081a04ffeb5744264e25cfe5dd (diff)
downloadaur-bc6e3486b9d1fd25c89b73bb057d42fa2d412dfd.tar.gz
incorporated cleanup of older duplicated libraries
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--geant4-full.install24
3 files changed, 27 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aaab18f94ae9..1f1a05331615 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = geant4-full
pkgdesc = A simulation toolkit for particle physics interactions - includes all the optional libraries
pkgver = 11.2.0
- pkgrel = 1
+ pkgrel = 2
url = http://geant4.cern.ch/
install = geant4-full.install
arch = x86_64
@@ -42,7 +42,7 @@ pkgbase = geant4-full
source = geant4-full.install
source = SoQt.patch
sha256sums = 46ad7fab3c5cb4bd0bdd77dd6d3e2283184819235bcbc01b2d117d81b35596a6
- sha256sums = f679f4d7b3a58aad3f3f6b6915041219fcfe568e2e6aea263a991cb93ca394d0
+ sha256sums = b6762a387db18c4c4ad260d1cc09c3f1dd635d9abb17f7544b63dd658622a2ae
sha256sums = 3b5a899436e0f0a614a17604166a0946bf2e206ef66e1161522337a5be7a8d08
pkgname = geant4-full
diff --git a/PKGBUILD b/PKGBUILD
index 165a6892df79..625eba8281e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname='geant4-full'
pkgver=11.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="A simulation toolkit for particle physics interactions - includes all the optional libraries"
depends=(
'cmake>=3.16'
@@ -52,7 +52,7 @@ source=(
)
sha256sums=(
"46ad7fab3c5cb4bd0bdd77dd6d3e2283184819235bcbc01b2d117d81b35596a6"
- "f679f4d7b3a58aad3f3f6b6915041219fcfe568e2e6aea263a991cb93ca394d0"
+ "8e1485871e05ef4194d43a1c58fb973820e19288963ff3536f6e8032a746a0fe"
"3b5a899436e0f0a614a17604166a0946bf2e206ef66e1161522337a5be7a8d08"
)
install="geant4-full.install"
diff --git a/geant4-full.install b/geant4-full.install
index 73a8f30ffd56..ebdd5a23146e 100644
--- a/geant4-full.install
+++ b/geant4-full.install
@@ -13,14 +13,36 @@ post_upgrade(){
[ "$(ls $file_check)" ] && mkdir -p $G4LIBRARY_PATH && mv $G4LIBRARY_BACKUP/* $G4LIBRARY_PATH && rmdir $G4LIBRARY_BACKUP && rm $file_check
#TODO: need to automatically cleanup old libraries from the Library folder
+
+ PREVFILE=NONE
+ PREVFILEBASE=NONE
+
+ for file in $(ls /opt/Geant4/Libraries)
+ do
+ CURRFILEBASE=$(echo $file | sed -e "s/[0-9]*.[0-9]$//")
+ CURRFILE=$file
+ if [[ $CURRFILEBASE == $PREVFILEBASE ]]
+ then
+ sudo rm -Rf /opt/Geant4/Libraries/$PREVFILE && echo "removing old $PREVFILE"
+ fi
+ PREVFILE=$CURRFILE
+ PREVFILEBASE=$CURRFILEBASE
+ #echo "$CURRFILE $CURRFILEBASE $PREVFILE $PREVFILEBASE"
+ done
+
}
post_install(){
ln -s /usr/include/Geant4/CLHEP /usr/include/CLHEP
ln -s /usr/include/Geant4/PTL /usr/include/PTL
}
+
+pre_remove(){
+ echo "Backing up Geant4 Libraries. To remove them, please run\n $ sudo rm -Rf /opt/Geant4/Libraries/G4ABLA3.3"
+ mv /opt/Geant4/Libraries /opt/Geant4/Lib-backup
+}
+
post_remove(){
rm /usr/include/CLHEP
rm /usr/include/PTL
- rm /opt/Geant4 -Rf
}