From 67f29fa640c77eb4c7ee0e40be4d22e6d44677678b9b663a408eae1bebac48b0 Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Fri, 15 May 2020 10:39:47 +0000 Subject: [PATCH] Accepting request 802722 from home:badshah400:GW LSC Algorithm Frame Library for gravitational wave data analysis OBS-URL: https://build.opensuse.org/request/show/802722 OBS-URL: https://build.opensuse.org/package/show/science/lalframe?expand=0&rev=1 --- .gitattributes | 23 ++++ .gitignore | 1 + lalframe-1.5.0.tar.xz | 3 + lalframe-build-octave44-with-swig3.patch | 23 ++++ lalframe.changes | 57 ++++++++ lalframe.spec | 167 +++++++++++++++++++++++ 6 files changed, 274 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 lalframe-1.5.0.tar.xz create mode 100644 lalframe-build-octave44-with-swig3.patch create mode 100644 lalframe.changes create mode 100644 lalframe.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/lalframe-1.5.0.tar.xz b/lalframe-1.5.0.tar.xz new file mode 100644 index 0000000..541db51 --- /dev/null +++ b/lalframe-1.5.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2c81201c36e64fe9467ac139374fe8fa793c56e48611e90fe6beca3a24f85dc +size 7319768 diff --git a/lalframe-build-octave44-with-swig3.patch b/lalframe-build-octave44-with-swig3.patch new file mode 100644 index 0000000..0ceeedb --- /dev/null +++ b/lalframe-build-octave44-with-swig3.patch @@ -0,0 +1,23 @@ +Index: lal-6.21.0/gnuscripts/lalsuite_swig.m4 +=================================================================== +--- lal-6.21.0.orig/gnuscripts/lalsuite_swig.m4 ++++ lal-6.21.0/gnuscripts/lalsuite_swig.m4 +@@ -318,18 +318,6 @@ AC_DEFUN([LALSUITE_USE_SWIG_OCTAVE],[ + ]) + ]) + +- # debian buster has patched swig-3.0.12-2 to support octave 4.4, +- # so we ignore this requirement on that platform +- cat /etc/issue | grep -Eiq "debian .*(10|buster)" +- AS_IF([test $? -ne 0],[ +- LALSUITE_VERSION_COMPARE([${octave_version}],[>=],[4.4.0],[ +- LALSUITE_VERSION_COMPARE([${swig_min_version}],[<],[4.0.0],[ +- swig_min_version=4.0.0 +- swig_min_version_info="for Octave version ${octave_version}" +- ]) +- ]) +- ]) +- + # determine where to install Octave bindings: take versioned site .oct file + # directory given by octave-config, and strip off prefix; thus, if LALSuite + # is installed in the same directory as Octave, .oct files will be found by diff --git a/lalframe.changes b/lalframe.changes new file mode 100644 index 0000000..a79dd71 --- /dev/null +++ b/lalframe.changes @@ -0,0 +1,57 @@ +------------------------------------------------------------------- +Mon May 11 15:17:37 UTC 2020 - Atri Bhattacharya + +- Improve Summary. + +------------------------------------------------------------------- +Wed Apr 22 18:32:19 UTC 2020 - Atri Bhattacharya + +- BuildRequires: python-xml only for openSUSE <= 15.2 since + python2 is disabled for newer openSUSE. + +------------------------------------------------------------------- +Sun Feb 2 23:22:26 UTC 2020 - Atri Bhattacharya + +- Update to version 1.5.0: + * O3b release +- Rebase lalframe-build-octave44-with-swig3.patch for updated + version. + +------------------------------------------------------------------- +Mon Sep 30 16:03:28 UTC 2019 - Atri Bhattacharya + +- Build for python2 and python3 + +------------------------------------------------------------------- +Mon Jul 22 13:54:48 UTC 2019 - Atri Bhattacharya + +- Update to version 1.4.5 + * O3 release. +- Rebase lal-frame-build-octave44-with-swig3.patch to conform to + upstream's reworking for swig and octave version tests. + +------------------------------------------------------------------- +Fri Feb 8 13:32:26 UTC 2019 - badshah400@gmail.com + +- Switch builds to python2; add python-xml BuildRequires. + +------------------------------------------------------------------- +Thu Feb 7 14:56:54 UTC 2019 - badshah400@gmail.com + +- Update Requires for octave-%{name}. + +------------------------------------------------------------------- +Thu Feb 7 14:39:58 UTC 2019 - badshah400@gmail.com + +- Update Requires for -devel pkg and python modules. + +------------------------------------------------------------------- +Wed Feb 6 07:14:48 UTC 2019 - badshah400@gmail.com + +- Add lalframe-build-octave44-with-swig3.patch: allow building + octave bindings with swig 3.0.x rather than requiring swig 4.x. + +------------------------------------------------------------------- +Wed Nov 28 18:03:47 UTC 2018 - badshah400@gmail.com + +- Initial Package. diff --git a/lalframe.spec b/lalframe.spec new file mode 100644 index 0000000..f57a372 --- /dev/null +++ b/lalframe.spec @@ -0,0 +1,167 @@ +# +# spec file for package lalframe +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define shlib lib%{name}11 +Name: lalframe +Version: 1.5.0 +Release: 0 +Summary: LSC Algorithm Frame Library for gravitational wave data analysis +License: GPL-2.0-or-later +Group: Productivity/Scientific/Physics +URL: https://wiki.ligo.org/Computing/DASWG/LALSuite +Source: http://software.ligo.org/lscsoft/source/lalsuite/lalframe-%{version}.tar.xz +# PATCH-FIX-UPSTREAM lalframe-build-octave44-with-swig3.patch badshah400@gmail.com -- Allow building octave bindings with swig 3.0.x rather than requiring swig 4.x +Patch0: lalframe-build-octave44-with-swig3.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module lal >= 6.21.0} +BuildRequires: %{python_module numpy-devel} +BuildRequires: %{python_module numpy} +%if 0%{?suse_version} < 1550 +BuildRequires: python-xml +%endif +BuildRequires: fdupes +BuildRequires: ldas-tools-framecpp-devel +BuildRequires: libframe-devel +BuildRequires: libtool +BuildRequires: octave-devel +BuildRequires: octave-lal >= 6.21.0 +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: swig +BuildRequires: pkgconfig(lal) >= 6.21.0 +Requires: python-lal +Requires: python-numpy +%python_subpackages + +%description +The LSC Algorithm Frame Library for gravitational wave data analysis. + +%package -n %{shlib} +Summary: Shared library for LAL Frame +Group: Productivity/Scientific/Physics + +%description -n %{shlib} +This package contains the shared-object libraries needed to run applications +that use the LAL Frame library. + +%package -n %{name}-devel +Summary: Development files for LAL Frame +Group: Development/Libraries/C and C++ +Requires: %{shlib} = %{version} +Requires: ldas-tools-framecpp-devel +Requires: libframe-devel +Requires: pkgconfig(lal) + +%description -n %{name}-devel +This package contains sources and header files needed to build applications +that use the LAL Frame library. + +%package -n octave-lalframe +Summary: Octave bindings for LAL Frame +Group: Productivity/Scientific/Physics +Requires: octave-lal +%requires_eq octave-cli + +%description -n octave-lalframe +This package provides the necessary files for using LAL Frame with octave. + +%prep +%autosetup -p1 + +%build +autoreconf -fvi + +%{python_expand # Necessary to run %%configure with both py2 and py3 +export PYTHON=$python +mkdir ../${PYTHON}_build +cp -pr ./ ../${PYTHON}_build +pushd ../${PYTHON}_build +%configure --enable-swig +make %{?_smp_mflags} +popd +} + +%install +%{python_expand # py2 and py3 make_install +export PYTHON=$python +pushd ../${PYTHON}_build +%make_install +popd +} + +# SECTION EXPORT LAL SPECIFIC ENV VARIABLES +# We do not use upstream's env files because they also set more generic +# variables (e.g. PATH) which may ruin setups + +# NUKE UPSTREAM ENV SCRIPTS +rm %{buildroot}%{_sysconfdir}/%{name}-user-env.* + +cat << EOF >> %{name}.sh +export LALFRAME_PREFIX=%{_prefix} +export LALFRAME_DATADIR=%{_datadir}/%{name} +EOF + +cat << EOF >> %{name}.csh +setenv LALFRAME_PREFIX "%{_prefix}" +setenv LALFRAME_DATADIR "%{_datadir}/%{name}" +EOF + +cat << EOF >> %{name}.fish +set LALFRAME_PREFIX (echo "%{_prefix}" | %{_bindir}/sed -e 's| |:|g;') +set LALFRAME_DATADIR (echo "%{_datadir}/%{name}" | %{_bindir}/sed -e 's| |:|g;') +EOF + +install -D -m0644 %{name}.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh +install -D -m0644 %{name}.csh %{buildroot}%{_sysconfdir}/profile.d/%{name}.csh +install -D -m0644 %{name}.fish %{buildroot}%{_sysconfdir}/profile.d/%{name}.fish + +# /SECTION + +# SECTION REMOVE STATIC LIB AND LIBTOOL ARCHIVE +find %{buildroot}%{_libdir}/ -name "*.a" -delete -print +find %{buildroot} -type f -name "*.la" -delete -print +# /SECTION + +%python_expand %fdupes %{buildroot}%{$python_sitearch}/%{name}/ + +%post -n %{shlib} -p /sbin/ldconfig +%postun -n %{shlib} -p /sbin/ldconfig + +%files -n %{shlib} +%{_libdir}/*.so.* + +%files -n %{name}-devel +%doc AUTHORS README.md +%license COPYING +%{_bindir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/* +%{_mandir}/man1/*.1%{?ext_man} +%config %{_sysconfdir}/profile.d/%{name}.* + +%files -n octave-%{name} +%dir %{_libdir}/octave/*/site +%dir %{_libdir}/octave/*/site/oct +%dir %{_libdir}/octave/*/site/oct/* +%{_libdir}/octave/*/site/oct/*/*.oct + +%files %{python_files} +%{python_sitearch}/* + +%changelog