File libtdb.spec of Package libtdb
#
# spec file for package samba-libs (Version 4.0.0)
#
# Copyright (c) 2007 Suman Manjunath
# Copyright (c) 2008 SUSE LINUX Products 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/
#
# norootforbuild
%define samba_version 4.0.0
%define samba_alpha alpha6
%define _pkgname libtdb
%define _libpkgname libtdb1
%define _pkgversion 1.1.3
%define _source_dirname tdb
%define _has_binary 1
%define _has_manpage 0
%define _has_py_module 1
BuildRequires: python-devel
%if %{_pkgname} == "libtevent"
BuildRequires: libtalloc-devel
%endif
# NOTES:
# talloc: binaries=no manpages=yes py_modules=no
# tdb: binaries=yes manpages=no py_modules=yes
# tevent: binaries=no manpages=no py_modules=yes
Name: %{_pkgname}
Version: 4.0.0
Release: 3.1
Summary: Samba external libraries
Group: Productivity/Networking/Samba
License: LGPL v3 or later
Source: samba-%{version}%{samba_alpha}.tar.gz
Url: http://www.samba.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{_libpkgname} = %{_pkgversion}
%description
This is a meta-package to provide the Samba external libraries.
Authors:
--------
The Samba Team <samba@samba.org>
%package -n %{_libpkgname}
Version: %{_pkgversion}
Release: 3.1
License: LGPL v3 or later
Summary: A generic summary for the Samba external libraries
Group: Productivity/Networking/Samba
AutoReqProv: on
%description -n %{_libpkgname}
A generic description for the Samba external libraries. This can be replaced
with more specific details for each of the external libraries.
Authors:
--------
The Samba Team <samba@samba.org>
%package -n %{_pkgname}-devel
Version: %{_pkgversion}
Release: 3.1
License: LGPL v3 or later
Summary: A generic summary for the Samba external libraries
Group: Development/Libraries/C and C++
Requires: %{_libpkgname} = %{_pkgversion}
AutoReqProv: on
%if %{_pkgname} == "libtevent"
Requires: libtalloc-devel
%endif
%description -n %{_pkgname}-devel
A generic description for the Samba external libraries. This can be replaced
with more specific details for each of the external libraries.
Authors:
--------
The Samba Team <samba@samba.org>
%prep
%setup -n samba-%{samba_version}%{samba_alpha}
%build
export CFLAGS="$RPM_OPT_FLAGS -fpie"
export CXXFLAGS="$RPM_OPT_FLAGS -fpie"
export FFLAGS="$RPM_OPT_FLAGS -fpie"
cd ./lib/%{_source_dirname}
./autogen.sh
%{configure}
%{__make}
cd ../..
%install
cd ./lib/%{_source_dirname}
%{makeinstall}
cd ../..
# bug in samba - installs this file with a executable permission
%{__chmod} -x $RPM_BUILD_ROOT/%{_libdir}/*.a
# temporary fix for 11.1 and above
%{__rm} -f $RPM_BUILD_ROOT/%{_bindir}/tdb*
%post -n %{_libpkgname}
/sbin/ldconfig
%postun -n %{_libpkgname}
/sbin/ldconfig
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -n %{_libpkgname}
%defattr(-,root,root)
%{_libdir}/*.so.*
%if %{_has_binary}
# %{_bindir}/*
%endif
%files -n %{_pkgname}-devel
%defattr(-,root,root)
%{_includedir}/*.h
%{_libdir}/*.a
%{_libdir}/pkgconfig/*.pc
%if %{_has_manpage}
%{_mandir}/man?/*
%endif
%if %{_has_py_module}
%{_libdir}/python*/site-packages/*.so
%endif
%changelog
* Thu Jan 29 2009 msuman@suse.de
- Update to Samba 4 alpha6
* Tue Jan 5 2009 msuman@suse.de
- Tarball update to Samba GIT revision 3508a66.
* Tue Dec 2 2008 msuman@suse.de
- Tarball update to Samba GIT revision 58db2be.
* Thu Sep 25 2008 msuman@suse.de
- Spec file update to fix all build issues.
* Thu Sep 18 2008 msuman@suse.de
- Initial import of samba4-libs.