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