summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Dallilar2020-04-16 11:21:22 +0200
committerYigit Dallilar2020-04-16 11:21:22 +0200
commit6cb669530fe72790855d8b055b14fe44650a2694 (patch)
tree8e197dfff5390203ccb3282fe24ed3d13900600e
parent4395e35406ee6999ac8a7f59dda95fbc7b01cf07 (diff)
downloadaur-6cb669530fe72790855d8b055b14fe44650a2694.tar.gz
v6.27-3
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD37
-rw-r--r--heasoft.install13
3 files changed, 28 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2d020b8cb8dd..139a9a23ec55 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,12 @@
pkgbase = heasoft
pkgdesc = NASA high energy astrophysics library
pkgver = 6.27
- pkgrel = 2
+ pkgrel = 3
url = https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/
install = heasoft.install
arch = x86_64
license = NASA
license = GPL
- makedepends = gcc
makedepends = glibc
makedepends = gcc-fortran
makedepends = perl
diff --git a/PKGBUILD b/PKGBUILD
index c4706ee7b944..eb92a143e9fd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,39 +1,40 @@
# Maintainer: Yigit Dallilar <yigit.dallilar@gmail.com>
-#
+#
# for _mod use either (src_no_xspec_modeldata or src) and dont forget to change sha256sums
pkgname=heasoft
pkgver=6.27
-pkgrel=2
-_mod="src_no_xspec_modeldata"
+pkgrel=3
+_mod="src_no_xspec_modeldata"
pkgdesc="NASA high energy astrophysics library"
-makedepends=("gcc" "glibc" "gcc-fortran" "perl" "python-numpy")
+makedepends=("glibc" "gcc-fortran" "perl" "python-numpy")
depends=("ncurses" "readline" "libxpm" "libidn")
url="https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/"
arch=('x86_64')
license=('NASA' 'GPL')
-source=(https://heasarc.gsfc.nasa.gov/FTP/software/lheasoft/lheasoft${pkgver}/${pkgname}-${pkgver}${_mod}.tar.gz)
+source=("https://heasarc.gsfc.nasa.gov/FTP/software/lheasoft/lheasoft${pkgver}/${pkgname}-${pkgver}${_mod}.tar.gz")
sha256sums=('a2359c2c765828eb9c1782769398e2a1f83cbcd3d46fb1be6b59a89b847cc5d4')
install="${pkgname}.install"
build() {
+ cd "$srcdir/${pkgname}-${pkgver}/BUILD_DIR"
- export CC=/usr/bin/gcc
- export CXX=/usr/bin/g++
- export FC=/usr/bin/gfortran
- export PERL=/usr/bin/perl
-
- cd $srcdir/${pkgname}-${pkgver}/BUILD_DIR
- ./configure --prefix=${pkgdir}/opt/${pkgname}
-
- make
+ ./configure --prefix="/opt/${pkgname}" --build=${CHOST}
+ make
}
package(){
+ local glibcver HEADAS
- cd $srcdir/${pkgname}-${pkgver}/BUILD_DIR
- make install
-
-}
+ cd "$srcdir/${pkgname}-${pkgver}/BUILD_DIR"
+
+ make DESTDIR="$pkgdir" install
+ glibcver=`ldd --version | sed -n 's/ldd (GNU libc) //p'`
+ HEADAS="/opt/${pkgname}/${CHOST}-libc${glibcver}"
+
+ install -d "$pkgdir"/{usr/bin,etc/profile.d}
+ ln -s "${HEADAS}/headas-init.sh" "$pkgdir/usr/bin/"
+ echo "export HEADAS=${HEADAS}" > "$pkgdir/etc/profile.d/heasoft.sh"
+}
diff --git a/heasoft.install b/heasoft.install
index 4aae7404bff2..5868b96a60cd 100644
--- a/heasoft.install
+++ b/heasoft.install
@@ -1,9 +1,12 @@
post_install(){
- _glibcver=$(pacman -Q glibc | cut -c7-10)
- echo -e "Add the following lines to your ~/.bashrc to initialize heasoft:\n"
- echo -e "\texport HEADAS=/opt/heasoft/x86_64-unknown-linux-gnu-libc${_glibcver}"
- echo -e "\talias heainit='source \$HEADAS/headas-init.sh'\n"
- echo -e "Then activate with 'heainit'"
+ echo -e "Initialize heasoft with /usr/bin/headas-init.sh before use.\n"
}
+
+post_upgrade(){
+
+ post_install
+
+}
+