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