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