-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheasyRNG.spec.in
117 lines (97 loc) · 2.97 KB
/
easyRNG.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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
Summary: Random number generators and distributions for C and Fortran
Name: easyRNG
Version: @VERSION@
Release: 1%{?dist}
License: BSD
Group: System Environment/Libraries
Source: https://github.com/tschoonj/easyRNG/releases/download/easyRNG-%{version}/easyRNG-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: https://tschoonj.github.io/easyRNG
Requires: libstdc++
BuildRequires: libstdc++-devel
BuildRequires: gcc-c++
BuildRequires: gcc
%if 0%{?rhel} != 7
BuildRequires: gcc-gfortran
BuildRequires: meson
Requires: libgfortran
%endif
BuildRequires: doxygen
%description
easyRNG consists of a wrapper around C++11's random templates, providing random number generators and distributions, with an API modelled after the GNU Scientific Library.
%package devel
Summary: Random number generators and distributions for C and Fortran: development package
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: gcc
Requires: pkgconfig
%if 0%{?rhel} != 7
Requires: gcc-gfortran
%endif
%description devel
easyRNG consists of a wrapper around C++11's random templates, providing random number generators and distributions, with an API modelled after the GNU Scientific Library.
This package contains the necessary headers and libraries to start developing with easyRNG.
%package doc
Summary: Random number generators and distributions for C and Fortran: documentation
Group: Development/Libraries
Requires: %{name}%{?_isa}-devel = %{version}-%{release}
%description doc
easyRNG consists of a wrapper around C++11's random templates, providing random number generators and distributions, with an API modelled after the GNU Scientific Library.
This package contains the easyRNG documentation in html format.
%prep
%if 0%{?rhel} != 7
%setup -q -n %{name}-%{version}
%else
%setup -q
%endif
%build
%if 0%{?rhel} != 7
%meson
%meson_build
%else
%configure --disable-static
#necessary to fix rpath issues during rpmbuild
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make
%endif
%install
%if 0%{?rhel} != 7
%meson_install
%else
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
libtool --finish $RPM_BUILD_ROOT%{_libdir}
find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f
%endif
%check
%if 0%{?rhel} != 7
%meson_test
%else
export LD_LIBRARY_PATH=$PWD/src/.libs
make check
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if %{defined ldconfig_scriptlets}
%ldconfig_scriptlets
%else
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files
%defattr(-, root, root)
%{_libdir}/libeasyRNG*.so.*
%files devel
%defattr(-, root, root)
%{_libdir}/*so
%{_libdir}/pkgconfig/*
%{_includedir}/*
%files doc
%defattr(-,root,root,-)
%{_datadir}/doc/easyRNG/*
%changelog
* Fri Jun 21 2019 Tom Schoonjans <[email protected]>
- Add support for meson build system
* Fri Aug 19 2016 Tom Schoonjans <[email protected]>
- Initial spec file