summarylogtreecommitdiffstats
path: root/geant4-neutronxsdata.install
diff options
context:
space:
mode:
authorL.G. Sarmiento2015-06-14 19:40:04 +0200
committerL.G. Sarmiento2015-06-14 19:40:04 +0200
commit1806928685198042fa5d4c4a08d15afcdc0e4a5d (patch)
tree1d3128a4b9763edeb450257a45b192854b6c237b /geant4-neutronxsdata.install
downloadaur-geant4-neutronxsdata.tar.gz
Initial import
Diffstat (limited to 'geant4-neutronxsdata.install')
-rw-r--r--geant4-neutronxsdata.install35
1 files changed, 35 insertions, 0 deletions
diff --git a/geant4-neutronxsdata.install b/geant4-neutronxsdata.install
new file mode 100644
index 00000000000..ce0a32daf2e
--- /dev/null
+++ b/geant4-neutronxsdata.install
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+_varname='G4NEUTRONXSDATA'
+_packagename='geant4-neutronxsdata'
+_foldername='G4NEUTRONXS'
+_dataversion=1.4
+
+_add() {
+ echo "export ${_varname}=/usr/share/${_packagename}/${_foldername}${_dataversion}" >> /etc/profile.d/geant4.sh
+ echo "setenv ${_varname} /usr/share/${_packagename}/${_foldername}${_dataversion}" >> /etc/profile.d/geant4.csh
+}
+
+_remove() {
+ sed -i "/${_varname}/d" /etc/profile.d/geant4.sh
+ sed -i "/${_varname}/d" /etc/profile.d/geant4.csh
+}
+
+pre_install() {
+ _remove
+}
+post_install() {
+ _add
+}
+pre_upgrade() {
+ _remove
+}
+post_upgrade() {
+ _add
+}
+pre_remove() {
+ _remove
+}
+post_remove() {
+ _remove
+}