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