| 1 | # This file is part of the YAZ toolkit
|
|---|
| 2 | # Copyright (C) Index Data
|
|---|
| 3 | # See the file LICENSE for details.
|
|---|
| 4 | # spec file for YAZ
|
|---|
| 5 |
|
|---|
| 6 | %define idmetaversion %(. ./IDMETA; echo $VERSION)
|
|---|
| 7 |
|
|---|
| 8 | Name: yaz
|
|---|
| 9 | Summary: Z39.50 Programs
|
|---|
| 10 | Version: 5.30.3
|
|---|
| 11 | Release: 3%{?dist}
|
|---|
| 12 | # determine system
|
|---|
| 13 | %if !0%{?os2_version}
|
|---|
| 14 | %define is_redhat5 %(grep 'release 5' /etc/redhat-release >/dev/null 2>&1 && echo 1 || echo 0)
|
|---|
| 15 | %define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
|
|---|
| 16 | %define is_suse %(test -e /etc/SuSE-release >/dev/null && echo 1 || echo 0)
|
|---|
| 17 | %define is_suse11 %(grep 'VERSION = 11' /etc/SuSE-release >/dev/null 2>&1 && echo 1 || echo 0)
|
|---|
| 18 | %define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
|
|---|
| 19 | %define is_os2 %(test -e /@unixroot/etc/os2-release && echo 1 || echo 0)
|
|---|
| 20 | %endif
|
|---|
| 21 |
|
|---|
| 22 | Patch0: filepath-os2.patch
|
|---|
| 23 | Patch1: tpath-os2.patch
|
|---|
| 24 | Patch2: makefile-os2.patch
|
|---|
| 25 | Patch3: yaz-asncomp-os2.patch
|
|---|
| 26 | Patch4: tcpip_os2.patch
|
|---|
| 27 |
|
|---|
| 28 | Requires: readline, libyaz5 = %{version}
|
|---|
| 29 |
|
|---|
| 30 | License: BSD
|
|---|
| 31 | Group: Applications/Internet
|
|---|
| 32 | Vendor: Index Data ApS <info@indexdata.dk>
|
|---|
| 33 | %if !0%{?os2_version}
|
|---|
| 34 | Source: yaz-%{version}.tar.gz
|
|---|
| 35 | %else
|
|---|
| 36 | %scm_source github https://github.com/Tellie/yaz-os2 %{version}-os2
|
|---|
| 37 | %endif
|
|---|
| 38 |
|
|---|
| 39 | BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|---|
| 40 | Prefix: %{_prefix}
|
|---|
| 41 |
|
|---|
| 42 | %if !0%{?os2_version}
|
|---|
| 43 | #%define TCPWRAPPER tcp_wrappers-devel
|
|---|
| 44 | %if %is_redhat5
|
|---|
| 45 | %define TCPWRAPPER tcp_wrappers
|
|---|
| 46 | %endif
|
|---|
| 47 |
|
|---|
| 48 | %if %is_suse
|
|---|
| 49 | %define TCPWRAPPER tcpd-devel
|
|---|
| 50 | %endif
|
|---|
| 51 |
|
|---|
| 52 | %if %is_suse11
|
|---|
| 53 | BuildRequires: libgnutls-devel
|
|---|
| 54 | %endif
|
|---|
| 55 | %endif
|
|---|
| 56 |
|
|---|
| 57 | BuildRequires: gnutls-devel
|
|---|
| 58 | BuildRequires: pkgconfig
|
|---|
| 59 | BuildRequires: libxml2-devel
|
|---|
| 60 | BuildRequires: libxslt-devel
|
|---|
| 61 | BuildRequires: readline-devel
|
|---|
| 62 | BuildRequires: libicu-devel
|
|---|
| 63 | BuildRequires: wget
|
|---|
| 64 |
|
|---|
| 65 | Packager: Adam Dickmeiss <adam@indexdata.dk>
|
|---|
| 66 | URL: http://www.indexdata.com/yaz
|
|---|
| 67 | %description
|
|---|
| 68 | This package contains both a test-server and clients (normal & ssl)
|
|---|
| 69 | for the ANSI/NISO Z39.50 protocol for Information Retrieval.
|
|---|
| 70 |
|
|---|
| 71 | %package -n libyaz5
|
|---|
| 72 | Summary: Z39.50 Library
|
|---|
| 73 | Group: Libraries
|
|---|
| 74 | Requires: libxslt, libicu
|
|---|
| 75 |
|
|---|
| 76 | %description -n libyaz5
|
|---|
| 77 |
|
|---|
| 78 | YAZ is a library for the ANSI/NISO Z39.50 protocol for Information
|
|---|
| 79 | Retrieval.
|
|---|
| 80 |
|
|---|
| 81 | %if !0%{?os2_version}
|
|---|
| 82 | %post -n libyaz5 -p /sbin/ldconfig
|
|---|
| 83 | %postun -n libyaz5 -p /sbin/ldconfig
|
|---|
| 84 | %endif
|
|---|
| 85 |
|
|---|
| 86 | %package -n libyaz5-devel
|
|---|
| 87 | Summary: Z39.50 Library - development package
|
|---|
| 88 | Group: Development/Libraries
|
|---|
| 89 | Requires: libyaz5 = %{version}, libxml2-devel, libxslt-devel, libicu-devel
|
|---|
| 90 | Conflicts: libyaz-devel, libyaz4-devel
|
|---|
| 91 |
|
|---|
| 92 | %description -n libyaz5-devel
|
|---|
| 93 |
|
|---|
| 94 | Development libraries and includes for the libyaz package.
|
|---|
| 95 | %package -n yaz-illclient
|
|---|
| 96 | Summary: ILL client
|
|---|
| 97 | Group: Applications/Communication
|
|---|
| 98 | Requires: readline, libyaz5 = %{version}
|
|---|
| 99 |
|
|---|
| 100 | %description -n yaz-illclient
|
|---|
| 101 | yaz-illclient: an ISO ILL client.
|
|---|
| 102 | %package -n yaz-icu
|
|---|
| 103 | Summary: Command line utility for ICU utilities of YAZ
|
|---|
| 104 | Group: Applications/Communication
|
|---|
| 105 | Requires: libyaz5 = %{version}
|
|---|
| 106 |
|
|---|
| 107 | %description -n yaz-icu
|
|---|
| 108 | The yaz-icu program is a command-line based client which exposes the ICU
|
|---|
| 109 | chain facility of YAZ.
|
|---|
| 110 |
|
|---|
| 111 | %prep
|
|---|
| 112 | %scm_setup
|
|---|
| 113 | %patch0 -p0 -b .os2~
|
|---|
| 114 | %patch1 -p1 -b .tpath~
|
|---|
| 115 | %patch2 -p0 -b .makefile~
|
|---|
| 116 | %patch3 -p0 -b .asncomp~
|
|---|
| 117 | %patch4 -p0 -b .tcpip~
|
|---|
| 118 |
|
|---|
| 119 | %build
|
|---|
| 120 | buildconf.sh
|
|---|
| 121 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 122 | export LIBS="-lcx"
|
|---|
| 123 |
|
|---|
| 124 | CFLAGS="$RPM_OPT_FLAGS" \
|
|---|
| 125 | ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \
|
|---|
| 126 | --enable-shared --without-memcached --disable-static --with-xslt --with-gnutls --with-icu --with-xml2 --with-iconv
|
|---|
| 127 |
|
|---|
| 128 | %if !0%{?os2_version}
|
|---|
| 129 | %make CFLAGS="$RPM_OPT_FLAGS"
|
|---|
| 130 | %else
|
|---|
| 131 | make %{?_smp_mflags}
|
|---|
| 132 | %endif
|
|---|
| 133 |
|
|---|
| 134 | %install
|
|---|
| 135 | rm -fr ${RPM_BUILD_ROOT}
|
|---|
| 136 | make install DESTDIR=${RPM_BUILD_ROOT}
|
|---|
| 137 | rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
|
|---|
| 138 |
|
|---|
| 139 | %check
|
|---|
| 140 | export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/src/.libs
|
|---|
| 141 | make -k check
|
|---|
| 142 |
|
|---|
| 143 | %clean
|
|---|
| 144 | rm -fr ${RPM_BUILD_ROOT}
|
|---|
| 145 |
|
|---|
| 146 | %files
|
|---|
| 147 | %defattr(-,root,root)
|
|---|
| 148 | %doc README.md LICENSE NEWS
|
|---|
| 149 | %{_bindir}/yaz-client.exe
|
|---|
| 150 | %{_bindir}/yaz-ztest.exe
|
|---|
| 151 | %{_bindir}/zoomsh.exe
|
|---|
| 152 | %{_bindir}/yaz-marcdump.exe
|
|---|
| 153 | %{_bindir}/yaz-iconv.exe
|
|---|
| 154 | %{_bindir}/yaz-json-parse.exe
|
|---|
| 155 | %{_bindir}/yaz-url.exe
|
|---|
| 156 | %{_bindir}/yaz-record-conv.exe
|
|---|
| 157 | %{_mandir}/man1/yaz-client.*
|
|---|
| 158 | %{_mandir}/man1/yaz-json-parse.*
|
|---|
| 159 | %{_mandir}/man1/yaz-url.*
|
|---|
| 160 | %{_mandir}/man8/yaz-ztest.*
|
|---|
| 161 | %{_mandir}/man1/zoomsh.*
|
|---|
| 162 | %{_mandir}/man1/yaz-marcdump.*
|
|---|
| 163 | %{_mandir}/man1/yaz-iconv.*
|
|---|
| 164 | %{_mandir}/man1/yaz-record-conv.*
|
|---|
| 165 | %{_mandir}/man7/yaz-log.*
|
|---|
| 166 | %{_mandir}/man7/bib1-attr.*
|
|---|
| 167 |
|
|---|
| 168 | %files -n libyaz5
|
|---|
| 169 | %defattr(-,root,root)
|
|---|
| 170 | %{_libdir}/*.dll
|
|---|
| 171 |
|
|---|
| 172 | %files -n libyaz5-devel
|
|---|
| 173 | %defattr(-,root,root)
|
|---|
| 174 | %{_bindir}/yaz-config
|
|---|
| 175 | %{_bindir}/yaz-asncomp
|
|---|
| 176 | %{_includedir}/yaz
|
|---|
| 177 | %{_libdir}/pkgconfig/yaz*.pc
|
|---|
| 178 | %{_libdir}/*.a
|
|---|
| 179 | %{_datadir}/aclocal/yaz.m4
|
|---|
| 180 | %{_mandir}/man1/yaz-asncomp.*
|
|---|
| 181 | %{_mandir}/man7/yaz.*
|
|---|
| 182 | %{_mandir}/man?/yaz-config.*
|
|---|
| 183 | %{_datadir}/doc/yaz
|
|---|
| 184 | %{_datadir}/yaz
|
|---|
| 185 |
|
|---|
| 186 | %files -n yaz-illclient
|
|---|
| 187 | %defattr(-,root,root)
|
|---|
| 188 | %{_bindir}/yaz-illclient.exe
|
|---|
| 189 | %{_mandir}/man1/yaz-illclient.*
|
|---|
| 190 |
|
|---|
| 191 | %files -n yaz-icu
|
|---|
| 192 | %defattr(-,root,root)
|
|---|
| 193 | %{_bindir}/yaz-icu.exe
|
|---|
| 194 | %{_mandir}/man1/yaz-icu.*
|
|---|
| 195 |
|
|---|
| 196 | %changelog
|
|---|
| 197 | * Tue Oct 20 2020 Elbert Pol <elbert.pol@gmail.com> - 5.30.3-3
|
|---|
| 198 | - Add the forgotten %{dist}
|
|---|
| 199 |
|
|---|
| 200 | * Sun Oct 18 2020 Elbert Pol <elbert.pol@gmail.com> - 5.30.3-2
|
|---|
| 201 | - Update to own github source
|
|---|
| 202 | - Updated the spec file
|
|---|
| 203 |
|
|---|
| 204 | * Sat Aug 01 2020 Elbert Pol <elbert.pol@gmail.com> - 5.30.3-1
|
|---|
| 205 | - Updated to latest source
|
|---|
| 206 | - Updated the spec file
|
|---|
| 207 | - Added patched to get is build and to get the test build
|
|---|
| 208 |
|
|---|
| 209 | * Thu Jul 26 2018 Elbert Pol <elbert.pol@gmail.com> -5.26.1-4
|
|---|
| 210 | - Updated to latest Xslt and Xml2
|
|---|
| 211 |
|
|---|
| 212 | * Wed Jul 25 2018 Elbert Pol <elbert.pol@gmail.com> -5.26.1-3
|
|---|
| 213 | - Add $(exeext) for tclsh
|
|---|
| 214 |
|
|---|
| 215 | * Sat Jul 14 2018 Elbert Pol <elbert.pol@gmail.com> - 5.26.1-2
|
|---|
| 216 | - remove some dependicies
|
|---|
| 217 |
|
|---|
| 218 | * Sat Jul 14 2018 Elbert Pol <elbert.pol@gmail.com> - 5.26.1-1
|
|---|
| 219 | - Initial build for OS2
|
|---|
| 220 |
|
|---|