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