bc89d59dbc05c26fca7109c2a237765d6e3251ff
[platform/upstream/libzio.git] / packaging / libzio.spec
1 Name:           libzio
2 Version:        0.99
3 Release:        0
4 License:        GPL-2.0+
5 Summary:        A Library for Accessing Compressed Text Files
6 Group:          System/Libraries
7 Source:         %{name}-%{version}.tar.bz2
8 Source2:        baselibs.conf
9 BuildRequires:  bzip2-devel
10 BuildRequires:  xz
11 BuildRequires:  xz-devel
12 BuildRequires:  zlib-devel
13
14 %description
15 Libzio provides a wrapper function for reading or writing gzip or bzip2
16 files with FILE streams.
17
18 %package        devel
19 Summary:        Libzio development files
20 Group:          Development/Libraries/C and C++
21 Requires:       libzio = %{version}
22
23 %description    devel
24 Libzio development files including zio.h, the manual page fzopen(3),
25 and static library.
26
27 %prep
28 %setup -q
29
30 %build
31 make %{?_smp_mflags} noweak
32
33 %check
34 make testt
35 make tests
36 for comp in gzip bzip2 lzma xz
37 do
38     $comp -c < fzopen.3.in > fzopen.test
39     ./testt fzopen.test | cmp fzopen.3.in -
40     cat fzopen.test | ./tests ${comp:0:1} | cmp fzopen.3.in -
41 done
42
43 %install
44 make DESTDIR=%{buildroot} install libdir=%{_libdir} mandir=%{_mandir}
45
46 %post -p /sbin/ldconfig
47
48 %postun -p /sbin/ldconfig
49
50 %files
51 %defattr(-,root,root)
52 %{_libdir}/libzio.so.0
53 %{_libdir}/libzio.so.%{version}
54
55 %files devel
56 %defattr(-,root,root)
57 %doc README COPYING
58 %{_libdir}/libzio.a
59 %{_libdir}/libzio.so
60 %{_mandir}/man3/fzopen.3*
61 /usr/include/zio.h
62
63 %changelog