libmetalink/libmetalink.spec

113 lines
2.7 KiB
RPMSpec
Raw Normal View History

# 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
Patch1: libmetalink-llong_max.patch
URL: https://launchpad.net/libmetalink
Group: System/Libraries
License: MIT
BuildRoot: %{_tmppath}/build-%{name}-%{version}
BuildRequires: gcc make glibc-devel pkgconfig
BuildRequires: libxml2-devel
%if 0%{?suse_version} >= 1030
BuildRequires: libexpat-devel
%else
BuildRequires: expat
%endif
BuildRequires: autoconf automake libtool
%if 0%{?suse_version} >= 1030
BuildRequires: licenses
%endif
%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
%if 0%{?suse_version} >= 1030
Requires: licenses
%endif
%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}"
%patch1
%if 0%{?suse_version} < 1000
%__sed -i 's|-fvisibility=hidden||g' lib/metalink/Makefile*
%endif
%build
%configure \
--disable-static \
--with-libexpat \
--with-libxml2
%__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: