Add documentation about facets
[yaz-moved-to-github.git] / yaz.spec
1 # This file is part of the YAZ toolkit
2 # Copyright (C) Index Data
3 # See the file LICENSE for details.
4 #
5 # spec file for YAZ
6
7 %define idmetaversion %(. ./IDMETA; echo $VERSION|tr -d '\n')
8 Name: yaz
9 Summary: Z39.50 Programs
10 Version: %{idmetaversion}
11 Release: 1.indexdata
12
13 # determine system
14 %define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
15 %define is_suse %(test -e /etc/SuSE-release >/dev/null && echo 1 || echo 0)
16 %define is_suse11 %(grep 'VERSION = 11' /etc/SuSE-release >/dev/null 2>&1 && echo 1 || echo 0)
17 %define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
18 Requires: libxslt, gnutls, readline, libyaz5 = %{version}
19 License: BSD
20 Group: Applications/Internet
21 Vendor: Index Data ApS <info@indexdata.dk>
22 Source: yaz-%{version}.tar.gz
23 BuildRoot: %{_tmppath}/%{name}-%{version}-root
24 Prefix: %{_prefix}
25
26 %define TCPWRAPPER tcp_wrappers
27
28 %if %is_fedora
29 %define TCPWRAPPER tcp_wrappers-devel
30 %endif
31
32 %if %is_suse
33 %define TCPWRAPPER tcpd-devel
34 %endif
35
36 BuildRequires: %{TCPWRAPPER}
37
38 %if %is_suse11
39 BuildRequires: libgnutls-devel
40 %else
41 BuildRequires: gnutls-devel
42 %endif
43
44 BuildRequires: pkgconfig
45 BuildRequires: libxml2-devel
46 BuildRequires: libxslt-devel
47 BuildRequires: readline-devel
48 BuildRequires: libicu-devel
49 BuildRequires: libmemcached-devel
50 BuildRequires: libgcrypt-devel
51 Packager: Adam Dickmeiss <adam@indexdata.dk>
52 URL: http://www.indexdata.com/yaz
53
54 %description
55 This package contains both a test-server and clients (normal & ssl)
56 for the ANSI/NISO Z39.50 protocol for Information Retrieval.
57
58 %package -n libyaz5
59 Summary: Z39.50 Library
60 Group: Libraries
61 Requires: libxslt, gnutls, libicu, libmemcached, libgcrypt
62
63 %description -n libyaz5
64 YAZ is a library for the ANSI/NISO Z39.50 protocol for Information
65 Retrieval.
66
67 %post -n libyaz5 -p /sbin/ldconfig 
68 %postun -n libyaz5 -p /sbin/ldconfig 
69
70 %package -n libyaz5-devel
71 Summary: Z39.50 Library - development package
72 Group: Development/Libraries
73 Requires: libyaz5 = %{version}, libxml2-devel, libxslt-devel, libicu-devel
74 Conflicts: libyaz-devel, libyaz4-devel
75
76 %description -n libyaz5-devel
77 Development libraries and includes for the libyaz package.
78
79 %package -n yaz-illclient
80 Summary: ILL client
81 Group: Applications/Communication
82 Requires: readline, libyaz5 = %{version}
83
84 %description -n yaz-illclient
85 yaz-illclient: an ISO ILL client.
86
87 %package -n yaz-icu
88 Summary: Command line utility for ICU utilities of YAZ
89 Group: Applications/Communication
90 Requires: libyaz5 = %{version}
91
92 %description -n yaz-icu
93 The yaz-icu program is a command-line based client which exposes the ICU
94 chain facility of YAZ.
95
96 %prep
97 %setup
98
99 %build
100
101 CFLAGS="$RPM_OPT_FLAGS" \
102  ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \
103         --enable-shared --enable-tcpd --with-xslt --with-gnutls --with-icu
104 make CFLAGS="$RPM_OPT_FLAGS"
105
106 %install
107 rm -fr ${RPM_BUILD_ROOT}
108 make install DESTDIR=${RPM_BUILD_ROOT}
109 rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
110
111 %clean
112 rm -fr ${RPM_BUILD_ROOT}
113
114 %files
115 %defattr(-,root,root)
116 %doc README LICENSE NEWS
117 %{_bindir}/yaz-client
118 %{_bindir}/yaz-ztest
119 %{_bindir}/zoomsh
120 %{_bindir}/yaz-marcdump
121 %{_bindir}/yaz-iconv
122 %{_bindir}/yaz-json-parse
123 %{_bindir}/yaz-url
124 %{_mandir}/man1/yaz-client.*
125 %{_mandir}/man1/yaz-json-parse.*
126 %{_mandir}/man1/yaz-url.*
127 %{_mandir}/man8/yaz-ztest.*
128 %{_mandir}/man1/zoomsh.*
129 %{_mandir}/man1/yaz-marcdump.*
130 %{_mandir}/man1/yaz-iconv.*
131 %{_mandir}/man7/yaz-log.*
132 %{_mandir}/man7/bib1-attr.*
133
134 %files -n libyaz5
135 %defattr(-,root,root)
136 %{_libdir}/*.so.*
137
138 %files -n libyaz5-devel
139 %defattr(-,root,root)
140 %{_bindir}/yaz-config
141 %{_bindir}/yaz-asncomp
142 %{_includedir}/yaz
143 %{_libdir}/pkgconfig/yaz.pc
144 %{_libdir}/*.so
145 %{_libdir}/*.a
146 %{_datadir}/aclocal/yaz.m4
147 %{_mandir}/man1/yaz-asncomp.*
148 %{_mandir}/man7/yaz.*
149 %{_mandir}/man?/yaz-config.*
150 %{_datadir}/doc/yaz
151 %{_datadir}/yaz
152
153 %files -n yaz-illclient
154 %defattr(-,root,root)
155 %{_bindir}/yaz-illclient
156 %{_mandir}/man1/yaz-illclient.*
157
158 %files -n yaz-icu
159 %defattr(-,root,root)
160 %{_bindir}/yaz-icu
161 %{_mandir}/man1/yaz-icu.*