summaryrefslogtreecommitdiff
path: root/packaging/libaec.spec
blob: 9f1cf1d58c45ada3a3395531d8d448b911de63dd (plain)
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
116
117
118
119
#
# spec file for package libaec
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#


Name:           libaec
Version:        1.0.1
Release:        0
Summary:        Adaptive Entropy Coding library
#---License is BSD, however there is a non-enforced NASA patent on the
#---algorithm, see patent.txt
License:        BSD-2-Clause
Group:          Productivity/Archiving/Compression
Url:            https://gitlab.dkrz.de/k202009/libaec
Source0:        %{name}-%{version}.tar.gz
Source1001:	libaec.manifest

BuildRequires:  cmake
BuildRequires:  gcc-c++

%description
Libaec provides lossless compression of signed or unsigned integers
(samples) of sizes 1 to 32 bits wide. The library achieves best
results for low entropy data as often encountered in space imaging
instrument data or numerical model output from weather or climate
simulations.

%package -n libaec0
Summary:        Adaptive Entropy Coding library
Group:          System/Libraries

%description -n libaec0
Libaec provides lossless compression of signed or unsigned integers
(samples) of sizes 1 to 32 bits wide. The library achieves best
results for low entropy data as often encountered in space imaging
instrument data or numerical model output from weather or climate
simulations. While floating point representations are not directly
supported, they can also be efficiently coded by grouping exponents
and mantissa.

Libaec implements Golomb Rice coding as defined in the Space Data
System Standard documents 121.0-B-2 and 120.0-G-2.

%package devel
Summary:        Development files for libaec, a library for Adaptive Entropy Coding library
Group:          Development/Libraries/C and C++
Requires:       libaec0 = %{version}

%description devel
Devel files for libaec (Adaptive Entropy Coding library).

%package -n libsz2
Summary:        Lossless compression library for scientific data
Group:          System/Libraries

%description -n libsz2
Drop-in replacement for the SZIP library
(http://www.hdfgroup.org/doc_resource/SZIP).

%package -n sz2-devel
Summary:        Development files for libsz2
Group:          Development/Libraries/C and C++
Requires:       libaec-devel = %{version}
Requires:       libsz2 = %{version}
Provides:       libsz2-devel = %{version}
Obsoletes:      libsz2-devel < %{version}

%description -n sz2-devel
Header files for libsz2, a drop-in replacement for the
SZIP library (http://www.hdfgroup.org/doc_resource/SZIP).

%prep
%setup -q -T -a 0 -c
cp %{SOURCE1001} .

%build
%cmake -DCMAKE_C_FLAGS="%{optflags} -std=gnu99"
make %{?_smp_mflags}

%install
%make_install

%post -n libaec0 -p /sbin/ldconfig
%post -n libsz2 -p /sbin/ldconfig

%postun -n libaec0 -p /sbin/ldconfig
%postun -n libsz2 -p /sbin/ldconfig

%files -n libaec0
%manifest libaec.manifest
%doc README.md Copyright.txt doc/patent.txt
%{_bindir}/aec
%{_libdir}/libaec.so.0*

%files devel
%{_includedir}/libaec.h
%{_libdir}/libaec.so

%files -n libsz2
%manifest libaec.manifest
%doc README.SZIP
%{_libdir}/libsz.so.2*

%files -n sz2-devel
%{_includedir}/szlib.h
%{_libdir}/libsz.so