diff options
-rwxr-xr-x | PKGBUILD | 14 | ||||
-rw-r--r-- | post.install | 2 | ||||
-rw-r--r-- | set_paths.sh | 5 |
3 files changed, 11 insertions, 10 deletions
@@ -10,12 +10,12 @@ url="https://github.com/openmc-dev/openmc" license=('MIT') install="post.install" -source=("${pkgname}::git+${url}.git" "set_paths.sh" "openmc.sh") +source=("${pkgname}::git+${url}.git" "openmc.sh") pkgver() { cd "$pkgname" git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } -md5sums=('SKIP' 'SKIP' 'SKIP') +md5sums=('SKIP' 'SKIP') depends=( python-lxml @@ -64,7 +64,11 @@ build() { package() { cd $srcdir/${pkgname}/build make DESTDIR="$pkgdir/" install + + # make repository available in install location cp -r $srcdir/${pkgname} $pkgdir/opt/openmc - cp $srcdir/set_paths.sh $pkgdir/opt/openmc - cp $srcdir/openmc.sh $pkgdir/opt/openmc -}
\ No newline at end of file + + # make non-standard paths persist + cp $srcdir/openmc.sh $pkgdir/etc/profile.d + chmod 755 /etc/profile.d/openmc.sh +} diff --git a/post.install b/post.install index 190e1cf3c40c..bb8b6ab9cf6e 100644 --- a/post.install +++ b/post.install @@ -2,7 +2,7 @@ post_install() { # installed to opt, inform user how to set paths _path_msg="\nINFO: OpenMC and its dependencies were installed to the non-standard location /opt. Run the following command \ before attempting to use openmc:\n\n \ - 'sudo bash /opt/openmc/set_paths.sh && source /etc/profile' \n" + source /etc/profile \n" echo -e $_path_msg } diff --git a/set_paths.sh b/set_paths.sh index 3a8327895ccf..28ebbf38c513 100644 --- a/set_paths.sh +++ b/set_paths.sh @@ -15,7 +15,4 @@ export_openmc_cross_sections="export OPENMC_CROSS_SECTIONS=$var/cross_sections.x eval $export_path eval $export_pythonpath eval $export_ld_library_path -eval $export_openmc_cross_sections - -# set for future sessions -cp openmc.sh /etc/profile.d
\ No newline at end of file +eval $export_openmc_cross_sections
\ No newline at end of file |