Blob Blame History Raw
%global compat_version 1.2.0

Name: libtalloc
Version: 2.0.1
Release: 4%{?dist}
Group: System Environment/Daemons
Summary: The talloc library
License: LGPLv3+
URL: http://talloc.samba.org/
Source0: http://samba.org/ftp/talloc/talloc-%{version}.tar.gz

# For compatibility with samba3x, we will rebuild the vesion of
# libtalloc.so.1 from the samba3x sources.
# The tarball is created with generate-talloc1-tarball.sh
# The original samba source tarball is:
# http://www.samba.org/samba/ftp/samba/samba-3.3.12.tar.gz
Source1: generate-talloc1-tarball.sh
Source2: libtalloc-%{compat_version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires: autoconf
BuildRequires: libxslt
BuildRequires: docbook-style-xsl

%description
A library that implements a hierarchical allocator with destructors.

%package devel
Group: Development/Libraries
Summary: Developer tools for the Talloc library
Requires: libtalloc = %{version}-%{release}

%description devel
Header files needed to develop programs that link against the Talloc library.

%prep
%setup -q -n talloc-%{version}
%setup -q -T -D -b 2 -n libtalloc-%{compat_version}

%build
cd $RPM_BUILD_DIR/talloc-%{version}
./autogen.sh
%configure
make %{?_smp_mflags}

cd $RPM_BUILD_DIR/libtalloc-%{compat_version}/talloc
./autogen.sh
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

# Compatibility library
cd $RPM_BUILD_DIR/libtalloc-%{compat_version}/talloc
make install DESTDIR=$RPM_BUILD_ROOT
ln -s libtalloc.so.%{compat_version} $RPM_BUILD_ROOT%{_libdir}/libtalloc.so.1

# Main library
# Some files installed by the compatibility library will be overwritten
# This is intentional
cd $RPM_BUILD_DIR/talloc-%{version}
make install DESTDIR=$RPM_BUILD_ROOT

ln -s libtalloc.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libtalloc.so.2
ln -s libtalloc.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libtalloc.so

rm -f $RPM_BUILD_ROOT%{_libdir}/libtalloc.a
rm -f $RPM_BUILD_ROOT/usr/share/swig/*/talloc.i


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_libdir}/libtalloc.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/talloc.h
%{_libdir}/libtalloc.so
%{_libdir}/pkgconfig/talloc.pc
%{_mandir}/man3/talloc.3.gz

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%changelog
* Mon Jun 14 2010 Stephen Gallagher <sgallagh@redhat.com> - 2.0.1-4
- Rebuild libtalloc from the samba3x sources
- Remove Conflicts: samba3x

* Thu May 27 2010 Stephen Gallagher <sgallagh@redhat.com> - 2.0.1-3
- Mark libtalloc as conflicting with samba3x
- The custom version of libtalloc required by samba3x is custom and
- incompatible with the compat lib.

* Mon Mar 29 2010 Stephen Gallagher <sgallagh@redhat.com> - 2.0.1-2
- Re-add the compat lib. We need it for compatibility with samba3x

* Tue Dec 15 2009 Simo Sorce <ssorce@redhat.com> - 2.0.1-1
- New version from upstream
- Also stop building the compat lib, it is not necessary anymore

* Tue Sep  8 2009 Simo Sorce <ssorce@redhat.com> - 2.0.0-0
- New version from upstream.
- Build also sover 1 compat library to ease packages migration

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jun 17 2009 Simo Sorce <ssorce@redhat.com> - 1.3.1-1
- Original tarballs had a screw-up, rebuild with new fixed tarballs from
  upstream.

* Tue Jun 16 2009 Simo Sorce <ssorce@redhat.com> - 1.3.1-0
- New Upstream release.

* Wed May 6 2009 Simo Sorce <ssorce@redhat.com> - 1.3.0-0
- First public independent release from upstream