2009-11-02 00:49:04 +01:00
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
%define soname 1
|
|
|
|
|
|
|
|
Name: libmetalink
|
|
|
|
Version: 0.0.3
|
|
|
|
Release: 0
|
|
|
|
Summary: Metalink Library
|
|
|
|
Source: http://launchpad.net/libmetalink/trunk/%{version}/+download/libmetalink-%{version}.tar.bz2
|
2009-11-07 00:22:14 +01:00
|
|
|
Patch1: libmetalink-llong_max.patch
|
2009-11-02 00:49:04 +01:00
|
|
|
URL: https://launchpad.net/libmetalink
|
|
|
|
Group: System/Libraries
|
|
|
|
License: MIT
|
|
|
|
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
|
|
|
BuildRequires: gcc make glibc-devel pkgconfig
|
2009-11-08 22:07:53 +01:00
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
%if 0%{?suse_version} >= 1030
|
|
|
|
BuildRequires: libexpat-devel
|
|
|
|
%else
|
|
|
|
BuildRequires: expat
|
|
|
|
%endif
|
2009-11-02 00:49:04 +01:00
|
|
|
BuildRequires: autoconf automake libtool
|
2009-11-02 00:56:03 +01:00
|
|
|
%if 0%{?suse_version} >= 1030
|
2009-11-02 00:49:04 +01:00
|
|
|
BuildRequires: licenses
|
2009-11-02 00:56:03 +01:00
|
|
|
%endif
|
2009-11-02 00:49:04 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Libmetalink is a Metalink library written in C language. It is intended to
|
|
|
|
provide the programs written in C to add Metalink functionality such as parsing
|
|
|
|
Metalink XML files.
|
|
|
|
|
|
|
|
%package -n libmetalink%{soname}
|
|
|
|
Summary: Metalink Library
|
|
|
|
Group: System/Libraries
|
2009-11-02 00:56:03 +01:00
|
|
|
%if 0%{?suse_version} >= 1030
|
2009-11-02 00:49:04 +01:00
|
|
|
Requires: licenses
|
2009-11-02 00:56:03 +01:00
|
|
|
%endif
|
2009-11-02 00:49:04 +01:00
|
|
|
|
|
|
|
%description -n libmetalink%{soname}
|
|
|
|
Libmetalink is a Metalink library written in C language. It is intended to
|
|
|
|
provide the programs written in C to add Metalink functionality such as parsing
|
|
|
|
Metalink XML files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Tatsuhiro Tsujikawa <tujikawa@users.sourceforge.net>
|
|
|
|
|
|
|
|
%package -n libmetalink-devel
|
|
|
|
Summary: Metalink Library
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libmetalink%{soname} = %{version}
|
|
|
|
|
|
|
|
%description -n libmetalink-devel
|
|
|
|
Libmetalink is a Metalink library written in C language. It is intended to
|
|
|
|
provide the programs written in C to add Metalink functionality such as parsing
|
|
|
|
Metalink XML files.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n "libmetalink-%{version}"
|
2009-11-07 00:22:14 +01:00
|
|
|
%patch1
|
2009-11-02 00:49:04 +01:00
|
|
|
|
2009-11-02 01:22:23 +01:00
|
|
|
%if 0%{?suse_version} < 1000
|
|
|
|
%__sed -i 's|-fvisibility=hidden||g' lib/metalink/Makefile*
|
|
|
|
%endif
|
|
|
|
|
2009-11-02 00:49:04 +01:00
|
|
|
%build
|
|
|
|
%configure \
|
2009-11-08 22:07:53 +01:00
|
|
|
--disable-static \
|
|
|
|
--with-libexpat \
|
|
|
|
--with-libxml2
|
2009-11-02 00:49:04 +01:00
|
|
|
|
|
|
|
%__make %{?jobs:-j%{jobs}}
|
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
|
|
|
%__rm -rf "%{buildroot}%{_datadir}/doc"
|
|
|
|
%__rm "%{buildroot}%{_libdir}"/*.la
|
|
|
|
|
|
|
|
h=/usr/share/doc/licenses/md5/$(md5sum COPYING|cut -f1 -d" ")
|
|
|
|
test -e "$h" && %__ln_s -f "$h" COPYING
|
|
|
|
|
|
|
|
%post -n libmetalink%{soname} -p /sbin/ldconfig
|
|
|
|
%postun -n libmetalink%{soname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%check
|
|
|
|
%__make test
|
|
|
|
|
|
|
|
%clean
|
|
|
|
%__rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%files -n libmetalink%{soname}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS ChangeLog COPYING README
|
|
|
|
%{_libdir}/libmetalink.so.%{soname}
|
|
|
|
%{_libdir}/libmetalink.so.%{soname}.*
|
|
|
|
|
|
|
|
%files -n libmetalink-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/metalink
|
|
|
|
%{_libdir}/libmetalink.so
|
|
|
|
%{_libdir}/pkgconfig/libmetalink.pc
|
|
|
|
%doc %{_mandir}/man3/metalink*.3*
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
# vim: set sw=3 ts=3 noet:
|
|
|
|
# Local Variables:
|
|
|
|
# mode: rpm-spec
|
|
|
|
# tab-width: 3
|
|
|
|
# End:
|