bayeswave.spec.in 3.53 KB
Newer Older
James Clark's avatar
James Clark committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Name: @PROJECT_NAME@
Version: @PROJECT_VERSION@
Release: 1%{?dist}
Summary: @PROJECT_DESCRIPTION@
License: GPLv2
Source: http://software.ligo.org/lscsoft/source/%{name}-%{version}.tar.xz
URL: https://git.ligo.org/lscsoft/bayeswave
Packager: Duncan Macleod <duncan.macleod@ligo.org>
Prefix: %{_prefix}

# -- build requires ---------

BuildRequires: gcc, gcc-c++, glibc
BuildRequires: cmake3 >= 3.12.0
BuildRequires: make
BuildRequires: help2man
BuildRequires: gsl-devel
BuildRequires: fftw-devel
BuildRequires: lal-devel
BuildRequires: lalframe-devel
BuildRequires: lalsimulation-devel
BuildRequires: lalinference-devel

24 25 26 27 28 29 30
Requires: fftw
Requires: gsl
Requires: lal
Requires: lalframe
Requires: lalsimulation
Requires: lalinference

James Clark's avatar
James Clark committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
# -- package definitions ----

%description
A Bayesian algorithm designed to robustly distinguish gravitational wave
signals from noise and instrumental glitches without relying on any prior
assumptions of waveform morphology.  

BayesWave produces posterior probability distributions directly on
gravitational wave signals and instrumental glitches, allowing robust,
morphology-independent waveform reconstruction.


%package devel
Summary: Files and documentation needed for compiling bayeswave programs
Requires: %{name} = %{version}
46 47 48 49 50 51
Requires: fftw-devel
Requires: gsl-devel
Requires: lal-devel
Requires: lalframe-devel
Requires: lalsimulation-devel
Requires: lalinference-devel
James Clark's avatar
James Clark committed
52 53 54 55 56
%description devel
A Bayesian algorithm designed to robustly distinguish gravitational wave
signals from noise and instrumental glitches without relying on any prior
assumptions of waveform morphology.

57
This package contains the files needed for building bayeswave programs
James Clark's avatar
James Clark committed
58 59 60 61

# -- build stages -----------

%prep
Adam Mercer's avatar
Adam Mercer committed
62
%setup -n %{name}-%{version}
James Clark's avatar
James Clark committed
63 64 65

%build
%cmake3 \
Adam Mercer's avatar
Adam Mercer committed
66
  -DCMAKE_BUILD_TYPE=Release .
James Clark's avatar
James Clark committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
%make_build

%install
%make_install
# man pages
mkdir -vp %{buildroot}%{_mandir}/man1
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}:${LD_LIBRARY_PATH}"
help2man --source %{name} --version-string %{version} \
         --section 1 --no-info --no-discard-stderr \
         --output %{buildroot}%{_mandir}/man1/BayesWave.1 %{buildroot}%{_bindir}/BayesWave
help2man --source %{name} --version-string %{version} \
         --section 1 --no-info --no-discard-stderr \
         --output %{buildroot}%{_mandir}/man1/BayesWaveCleanFrame.1 %{buildroot}%{_bindir}/BayesWaveCleanFrame
help2man --source %{name} --version-string %{version} \
         --section 1 --no-info --no-discard-stderr \
         --output %{buildroot}%{_mandir}/man1/BayesWavePost.1 %{buildroot}%{_bindir}/BayesWavePost
help2man --source %{name} --version-string %{version} \
         --section 1 --no-info --no-discard-stderr \
         --output %{buildroot}%{_mandir}/man1/BayesWaveToLALPSD.1 %{buildroot}%{_bindir}/BayesWaveToLALPSD

%check
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}:${LD_LIBRARY_PATH}"
export PKG_CONFIG_PATH="%{buildroot}%{_libdir}/pkgconfig:${PKG_CONFIG_PATH}"
# run each executable with no args (equivalent of --help)
%{buildroot}%{_bindir}/BayesWave
%{buildroot}%{_bindir}/BayesWaveCleanFrame
%{buildroot}%{_bindir}/BayesWavePost
%{buildroot}%{_bindir}/BayesWaveToLALPSD
# run pkg-config to check metadata
pkg-config --modversion @PROJECT_NAME@

%clean
rm -rf %{buildroot}

# -- files ------------------

%files
%{_bindir}/*
%{_libdir}/*.so.*
%{_mandir}/man1/*

%files devel
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*

# -- changelog --------------

# dates should be formatted using: 'date +"%a %b %d %Y"'
%changelog
* Thu Jun 6 2019 Duncan Macleod <duncan.macleod@ligo.org> 1.3.0-1
- Rework packaging for cmake