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