Fix RPM build for RHEL 5.3
[yaz-moved-to-github.git] / yaz.spec.in
1 Summary: Z39.50 Programs
2 Name: yaz
3 Version: @VERSION@
4 Release: 1
5 Requires: libxslt gnutls readline libyaz3 = %{version}
6 License: BSD
7 Group: Applications/Internet
8 Vendor: Index Data ApS <info@indexdata.dk>
9 Source: yaz-%{version}.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-root
11 %define TCPWRAPPER tcpd-devel
12 %if "%{_vendor}" == "redhat"
13 # Fedora requires tcp_wrappers-devel .
14 %define TCPWRAPPER tcp_wrappers
15 %endif
16 BuildRequires: pkgconfig libxml2-devel libxslt-devel gnutls-devel readline-devel libicu-devel %{TCPWRAPPER}
17 Packager: Adam Dickmeiss <adam@indexdata.dk>
18 URL: http://www.indexdata.dk/yaz/
19
20 %description
21 This package contains both a test-server and clients (normal & ssl)
22 for the ANSI/NISO Z39.50 protocol for Information Retrieval.
23
24 %package -n libyaz3
25 Summary: Z39.50 Library
26 Group: Libraries
27 Requires: libxslt gnutls libicu
28
29 %description -n libyaz3
30 YAZ is a library for the ANSI/NISO Z39.50 protocol for Information
31 Retrieval.
32
33 %package -n libyaz3-devel
34 Summary: Z39.50 Library - development package
35 Group: Development/Libraries
36 Requires: libyaz3 = %{version} libxml2-devel libxslt-devel libicu-devel gnutls-devel %{TCPWRAPPER}
37 Conflicts: libyaz-devel
38
39 %description -n libyaz3-devel
40 Development libraries and includes for the libyaz package.
41
42 %package -n yaz-illclient
43 Summary: ILL client
44 Group: Applications/Communication
45 Requires: readline libyaz3 = %{version}
46
47 %description -n yaz-illclient
48 yaz-illclient: an ISO ILL client.
49
50 %package -n yaz-icu
51 Summary: Command line utility for ICU utilities of YAZ
52 Group: Applications/Communication
53 Requires: libyaz3 = %{version}
54
55 %description -n yaz-icu
56 The yaz-icu program is a command-line based client which exposes the ICU
57 chain facility of YAZ.
58
59 %prep
60 %setup
61
62 %build
63
64 CFLAGS="$RPM_OPT_FLAGS" \
65  ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \
66         --enable-shared --enable-tcpd --with-xslt --with-gnutls --with-icu
67 make CFLAGS="$RPM_OPT_FLAGS"
68
69 %install
70 rm -fr ${RPM_BUILD_ROOT}
71 make prefix=${RPM_BUILD_ROOT}/%{_prefix} mandir=${RPM_BUILD_ROOT}/%{_mandir} \
72         libdir=${RPM_BUILD_ROOT}/%{_libdir} install
73
74 %clean
75 rm -fr ${RPM_BUILD_ROOT}
76
77 %files
78 %defattr(-,root,root)
79 %doc README LICENSE NEWS
80 %{_bindir}/yaz-client
81 %{_bindir}/yaz-ztest
82 %{_bindir}/zoomsh
83 %{_bindir}/yaz-marcdump
84 %{_bindir}/yaz-iconv
85 %{_mandir}/man1/yaz-client.*
86 %{_mandir}/man8/yaz-ztest.*
87 %{_mandir}/man1/zoomsh.*
88 %{_mandir}/man1/yaz-marcdump.*
89 %{_mandir}/man1/yaz-iconv.*
90 %{_mandir}/man7/yaz-log.*
91 %{_mandir}/man7/bib1-attr.*
92
93 %files -n libyaz3
94 %defattr(-,root,root)
95 %{_libdir}/*.so.*
96
97 %files -n libyaz3-devel
98 %defattr(-,root,root)
99 %{_bindir}/yaz-config
100 %{_bindir}/yaz-asncomp
101 %{_includedir}/yaz
102 %{_libdir}/pkgconfig/yaz.pc
103 %{_libdir}/*.so
104 %{_libdir}/*.a
105 %{_libdir}/*.la
106 %{_datadir}/aclocal/yaz.m4
107 %{_mandir}/man1/yaz-asncomp.*
108 %{_mandir}/man7/yaz.*
109 %{_mandir}/man8/yaz-config.*
110 %{_datadir}/doc/yaz
111 %{_datadir}/yaz
112
113 %files -n yaz-illclient
114 %defattr(-,root,root)
115 %{_bindir}/yaz-illclient
116 %{_mandir}/man1/yaz-illclient.*
117
118 %files -n yaz-icu
119 %defattr(-,root,root)
120 %{_bindir}/yaz-icu
121 %{_mandir}/man1/yaz-icu.*