summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD49
-rw-r--r--heasoft-nodata.install18
3 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9cf8f596084d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = heasoft-nodata
+ pkgdesc = NASA high energy astrophysics library, without xspec model data
+ pkgver = 6.27.2
+ pkgrel = 1
+ url = https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/
+ install = heasoft-nodata.install
+ arch = x86_64
+ license = NASA
+ license = GPL
+ makedepends = glibc
+ makedepends = gcc-fortran
+ makedepends = perl
+ makedepends = python-numpy
+ depends = ncurses
+ depends = readline
+ depends = libxpm
+ depends = libidn
+ optdepends = python-numpy: python binding
+ provides = heasoft
+ source = https://heasarc.gsfc.nasa.gov/FTP/software/lheasoft/lheasoft6.27.2/heasoft-6.27.2src_no_xspec_modeldata.tar.gz
+ md5sums = 329391bc543414e6bb41f3f15cd646a9
+
+pkgname = heasoft-nodata
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dd27cc199064
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Monson Shao <holymonson@gmail.com>
+
+pkgname=heasoft-nodata
+_pkgname=heasoft
+pkgver=6.27.2
+pkgrel=1
+# _mod should be '', '_no_xspec_modeldata' or '_plus_older_xspec_modeldata'
+_mod='_no_xspec_modeldata'
+pkgdesc="NASA high energy astrophysics library, without xspec model data"
+makedepends=("glibc" "gcc-fortran" "perl" "python-numpy")
+depends=("ncurses" "readline" "libxpm" "libidn")
+optdepends=("python-numpy: python binding")
+provides=(${_pkgname})
+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}/heasoft-${pkgver}src${_mod}.tar.gz")
+
+# You could use below to get offical md5
+# curl -s ${source}.md5 | awk '{print "md5sums=(", $1, ")"}'
+md5sums=( 329391bc543414e6bb41f3f15cd646a9 )
+
+install="${pkgname}.install"
+
+build() {
+ cd "$srcdir/${_pkgname}-${pkgver}/BUILD_DIR" || return
+
+ ./configure --prefix="/opt/${_pkgname}" --build="${CHOST}"
+
+ # parallel builds may fail
+ make -j1
+}
+
+package(){
+ local glibcver HEADAS
+
+ cd "$srcdir/${_pkgname}-${pkgver}/BUILD_DIR" || return
+
+ make -j1 DESTDIR="$pkgdir" install
+
+ glibcver=$(ldd --version | sed -n 's/ldd (GNU libc) //p')
+ HEADAS="/opt/${_pkgname}/${CHOST}-libc${glibcver}"
+
+ install -d "$pkgdir/etc/profile.d"
+ cat > "$pkgdir/etc/profile.d/heasoft.sh" <<EOF
+export HEADAS="${HEADAS}"
+alias heainit='. "${HEADAS}/headas-init.sh"'
+EOF
+}
diff --git a/heasoft-nodata.install b/heasoft-nodata.install
new file mode 100644
index 000000000000..d957978bba07
--- /dev/null
+++ b/heasoft-nodata.install
@@ -0,0 +1,18 @@
+post_install(){
+
+ cat <<'EOF'
+source /etc/profile.d/heasoft.sh and initialize heasoft before use:
+
+$ heainit
+OR
+$ source "${HEADAS}/headas-init.sh"
+
+EOF
+
+}
+
+post_upgrade(){
+
+ post_install
+
+}