Files
w3c-libwww/w3c-libwww.spec

222 lines
6.6 KiB
RPMSpec

#
# spec file for package w3c-libwww
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define soname 0
Name: w3c-libwww
Version: 5.4.1
Release: 0
Summary: W3C HTTP library of common code
License: W3C (see: http://www.w3.org/Consortium/Legal/copyright-software.html)
Group: System/Libraries
Url: http://www.w3.org/Library
#cvs -d :pserver:anonymous@dev.w3.org:/sources/public login
#after which you type "anonymous" as password.
#cvs -d :pserver:anonymous@dev.w3.org:/sources/public -z3 checkout libwww
Source: w3c-libwww-20061204.tar.bz2
Patch1: w3c-libwww-5.4.1-incdir.patch
Patch2: w3c-libwww-ppc64.patch
Patch3: w3c-libwww-md5.patch
Patch4: w3c-libwww-makefile.patch
Patch5: w3c-libwww-multiarch.patch
Patch6: w3c-libwww-fix_protos.patch
Patch7: w3c-libwww-HTRDF.patch
Patch8: w3c-libwww-UndefinedOp.patch
Patch9: w3c-libwww-sslv2.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1030
BuildRequires: libexpat-devel
%else
BuildRequires: expat
%endif
%description
Libwww is a general-purpose Web API written in C for Unix and Windows (Win32).
With a highly extensible and layered API, it can accommodate many different
types of applications including clients, robots, etc. The purpose of libwww
is to provide a highly optimized HTTP sample implementation as well as other
Internet protocols and to serve as a testbed for protocol experiments.
%package devel
Summary: Libraries and header files for programs that use libwww
Group: Development/Libraries
Requires: w3c-libwww = %{version}
Requires: zlib-devel
%if 0%{?suse_version} >= 1030
Requires: libexpat-devel
%else
Requires: expat
%endif
%description devel
Static libraries and header files for libwww, which are available as public
libraries.
%package apps
Summary: Applications built using Libwww Web Library
Group: Productivity/Networking/Web/Utilities
Requires: %{name} = %{version}
%description apps
Web applications built using Libwww: Robot, Command line tool,
line mode browser. The Robot can crawl web sites faster, and
with lower load, than any other web walker that we know of,
due to its extensive pipelining and use of HTTP/1.1.
The command line tool (w3c) is very useful for manipulation of
Web sites that implement more than just HTTP GET (e.g. PUT,
POST, etc.).
The line mode browser is a minimal line mode web browser;
often useful to convert to ascii text. Currently unavailable
until someone updates it to some new interfaces. (hint, hint...)
%prep
%setup -q -n libwww
%patch1 -p1
%patch2 -p1 -b .ppc64
%patch3
%patch4
%patch5
%patch6
%patch7 -p1
%patch8 -p1
%patch9 -p1
rm -rf modules/expat
touch wwwconf.h.in
chmod 0644 Icons/*/*.gif
%build
autoreconf -fi
echo timestamp > stamp-h.in
export CFLAGS="%{optflags} -fPIC"
export CPPFLAGS="%{optflags} -fPIC"
%configure --enable-shared --disable-static --with-gnu-ld --with-regex --with-zlib --with-ssl --enable-reentrant --with-expat=no
export tagname=CC
# Omit unused direct shared library dependencies.
sed -i 's! \\\$compiler_flags !\0-Wl,--as-needed !g' libtool
# cannot figure out what to do to this mix of -l and libraries supplied
# with full path. Local builds are fine, resetting SUSE_ASNEEDED solves this
export SUSE_ASNEEDED=0
make %{?_smp_mflags}
%install
export tagname=CC
# manual install of this lib.
install -d %{buildroot}%{_libdir}
for ext in so so.0 so.0.0.0; do
install Library/src/.libs/libwwwxml.$ext \
%{buildroot}%{_libdir}/libwwwxml.$ext
done
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
chmod 0755 %{buildroot}%{_libdir}/lib*.so.*
install -p -m644 wwwconf.h "%{buildroot}%{_includedir}/w3c-libwww/"
# multiarch timestamps
touch -r README.html \
%{buildroot}%{_bindir}/libwww-config \
%{buildroot}%{_includedir}/w3c-libwww/wwwconf.h
# rename:
mv "%{buildroot}%{_bindir}"/{,w3c-}www
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc COPYRIGH ChangeLog
%doc *.html Icons/*/*.gif
%{_libdir}/libmd5.so.%{soname}
%{_libdir}/libmd5.so.%{soname}.*
%{_libdir}/libpics.so.%{soname}
%{_libdir}/libpics.so.%{soname}.*
%{_libdir}/libwwwapp.so.%{soname}
%{_libdir}/libwwwapp.so.%{soname}.*
%{_libdir}/libwwwcache.so.%{soname}
%{_libdir}/libwwwcache.so.%{soname}.*
%{_libdir}/libwwwcore.so.%{soname}
%{_libdir}/libwwwcore.so.%{soname}.*
%{_libdir}/libwwwdir.so.%{soname}
%{_libdir}/libwwwdir.so.%{soname}.*
%{_libdir}/libwwwfile.so.%{soname}
%{_libdir}/libwwwfile.so.%{soname}.*
%{_libdir}/libwwwftp.so.%{soname}
%{_libdir}/libwwwftp.so.%{soname}.*
%{_libdir}/libwwwgopher.so.%{soname}
%{_libdir}/libwwwgopher.so.%{soname}.*
%{_libdir}/libwwwhtml.so.%{soname}
%{_libdir}/libwwwhtml.so.%{soname}.*
%{_libdir}/libwwwhttp.so.%{soname}
%{_libdir}/libwwwhttp.so.%{soname}.*
%{_libdir}/libwwwinit.so.%{soname}
%{_libdir}/libwwwinit.so.%{soname}.*
%{_libdir}/libwwwmime.so.%{soname}
%{_libdir}/libwwwmime.so.%{soname}.*
%{_libdir}/libwwwmux.so.%{soname}
%{_libdir}/libwwwmux.so.%{soname}.*
%{_libdir}/libwwwnews.so.%{soname}
%{_libdir}/libwwwnews.so.%{soname}.*
%{_libdir}/libwwwssl.so.%{soname}
%{_libdir}/libwwwssl.so.%{soname}.*
%{_libdir}/libwwwstream.so.%{soname}
%{_libdir}/libwwwstream.so.%{soname}.*
%{_libdir}/libwwwtelnet.so.%{soname}
%{_libdir}/libwwwtelnet.so.%{soname}.*
%{_libdir}/libwwwtrans.so.%{soname}
%{_libdir}/libwwwtrans.so.%{soname}.*
%{_libdir}/libwwwutils.so.%{soname}
%{_libdir}/libwwwutils.so.%{soname}.*
%{_libdir}/libwwwzip.so.%{soname}
%{_libdir}/libwwwzip.so.%{soname}.*
%{_libdir}/libwwwxml.so.%{soname}
%{_libdir}/libwwwxml.so.%{soname}.*
%{_datadir}/w3c-libwww
%files apps
%defattr(-,root,root)
%{_bindir}/webbot
%{_bindir}/w3c
%{_bindir}/w3c-www
%files devel
%defattr(-,root,root)
%{_bindir}/libwww-config
%{_libdir}/lib*.so
%{_includedir}/wwwconf.h
%{_includedir}/w3c-libwww
%changelog