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