exit if state file cannot be written
[idzebra-moved-to-github.git] / idzebra.spec
1 Name: idzebra-2.0
2 Version: 2.0.49
3 Release: 1indexdata
4 Requires: lib%{name}-modules = %{version}
5 License: GPL
6 Group: Applications/Databases
7 Vendor: Index Data ApS <info@indexdata.dk>
8 Source: idzebra-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/idzebra-%{version}-root
10 Packager: Adam Dickmeiss <adam@indexdata.dk>
11 URL: http://www.indexdata.dk/zebra/
12 BuildRequires: libyaz4-devel >= 4.2.0
13 BuildRequires: expat-devel, bzip2-devel, tcl, zlib-devel
14 Summary: High-performance, structured text indexing and retrival engine.
15
16 %description
17 Zebra is a high-performance, general-purpose structured text indexing
18 and retrieval engine. It reads structured records in a variety of input
19 formats (eg. email, XML, MARC) and allows access to them through exact
20 boolean search expressions and relevance-ranked free-text queries. 
21
22 %package -n lib%{name}
23 Summary: Zebra libraries
24 Group: Libraries
25 Requires: libyaz4 bzip2-libs
26 %description -n lib%{name}
27 Libraries for the Zebra search engine.
28 %post -p /sbin/ldconfig 
29 %postun -p /sbin/ldconfig 
30
31 %package -n lib%{name}-modules
32 Summary: Zebra modules
33 Group: Libraries
34 Requires: lib%{name} = %{version} expat tcl
35 %description -n lib%{name}-modules
36 Modules for the Zebra search engine.
37
38 %package -n lib%{name}-devel
39 Summary: Zebra development libraries
40 Group: Development/Libraries
41 Requires: lib%{name} = %{version} libyaz4-devel bzip2-devel 
42 %description -n lib%{name}-devel
43 Development libraries for the Zebra search engine.
44
45 %prep
46 %setup -n idzebra-%{version}
47
48 %build
49
50 CFLAGS="$RPM_OPT_FLAGS" \
51  ./configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir}\
52         --enable-shared --with-yaz=/usr/bin
53 make CFLAGS="$RPM_OPT_FLAGS"
54
55 %install
56 rm -fr ${RPM_BUILD_ROOT}
57 make prefix=${RPM_BUILD_ROOT}/usr mandir=${RPM_BUILD_ROOT}/%{_mandir} \
58         libdir=${RPM_BUILD_ROOT}/%{_libdir} install
59 rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
60 rm ${RPM_BUILD_ROOT}/%{_bindir}/zebraidx
61 rm ${RPM_BUILD_ROOT}/%{_mandir}/man1/zebraidx.*
62 rm ${RPM_BUILD_ROOT}/%{_bindir}/zebrasrv
63 rm ${RPM_BUILD_ROOT}/%{_mandir}/man8/zebrasrv.*
64 rm ${RPM_BUILD_ROOT}/%{_mandir}/man1/idzebra-config.*
65
66 %clean
67 rm -fr ${RPM_BUILD_ROOT}
68
69 %files
70 %defattr(-,root,root)
71 %doc README LICENSE.zebra NEWS
72 %config /usr/share/idzebra-2.0/tab
73 %{_bindir}/zebrasrv-*
74 %{_bindir}/zebraidx-*
75 %{_bindir}/idzebra-abs2dom*
76 /usr/share/doc/idzebra-2.0
77 %{_mandir}/*/zebraidx-*
78 %{_mandir}/*/zebrasrv-*
79 %{_mandir}/*/idzebra-abs2dom*
80 /usr/share/idzebra-2.0-examples
81
82 %files -n lib%{name}
83 %{_libdir}/*.so.*
84
85 %files -n lib%{name}-modules
86 %{_libdir}/idzebra-2.0/modules/*
87
88 %files -n lib%{name}-devel
89 %{_bindir}/idzebra-config-*
90 %{_includedir}/idzebra-2.0
91 %{_libdir}/*.so
92 %{_libdir}/*.a
93 %{_mandir}/*/idzebra-config-*
94 /usr/share/aclocal/*.m4
95