/
chmlib.spec
70 lines (55 loc) · 1.76 KB
/
chmlib.spec
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
%define major 0
%define libname %mklibname chm %{major}
%define devname %mklibname -d chm
%define _disable_lto 1
Summary: A library for dealing with Microsoft ITSS/CHM format files
Name: chmlib
Version: 0.40
Release: 19
License: GPLv2
Group: System/Libraries
Url: http://www.jedrea.com/chmlib/
Source0: http://www.jedrea.com/chmlib/%{name}-%{version}.tar.bz2
Patch1: chmlib-0.37-morearchs.patch
Provides: libchm-bin
%description
CHMLIB is a library for dealing with Microsoft ITSS/CHM format files.
Right now, it is a very simple library, but sufficient for dealing with
all of the .chm files I've come across. Due to the fairly well-designed
indexing built into this particular file format, even a small library
is able to gain reasonably good performance indexing into ITSS archives.
Code runs on Linux, Windows, Solaris, and Irix.
%package -n %{libname}
Summary: A library for dealing with Microsoft ITSS/CHM format files
Group: System/Libraries
%description -n %{libname}
This package contains the shared library for %{name}.
%package -n %{devname}
Summary: A library for dealing with Microsoft ITSS/CHM format files
Group: Development/Other
Provides: %{name}-devel = %{version}
Requires: %{libname} = %{version}
Obsoletes: %{_lib}chm-static-devel
%description -n %{devname}
This package contains the development files for %{name}.
%prep
%setup -q
%patch1 -p0 -b .more_archs
%build
%configure2_5x \
--enable-static \
--enable-examples
export CFLAGS="%{optflags} -DCHM_MT -DCHM_USE_PREAD -DCHM_USE_IO64 -L.libs"
export LDFLAGS="%{ldflags} -lpthread"
%make
%install
install -d %{buildroot}{%{_libdir},%{_includedir}}
%makeinstall_std
%files
%{_bindir}/*
%files -n %{libname}
%{_libdir}/libchm.so.%{major}*
%files -n %{devname}
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/*.a