2015-11-08 14:43:19 +01:00
|
|
|
#
|
|
|
|
# spec file for package talloc-man
|
|
|
|
#
|
2024-05-20 11:09:03 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2015-11-08 14:43:19 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-04-22 19:10:48 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-11-08 14:43:19 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{!?py3_soflags: %global py3_soflags cpython-%{python3_version_nodots}m}
|
2018-04-03 12:25:43 +02:00
|
|
|
%{!?py3_soflags_dash: %global py3_soflags_dash %(echo %{py3_soflags} | sed "s/_/-/g")}
|
|
|
|
%{!?py3_incdir: %global py3_incdir %(%{__python3} -c "import sysconfig as s; print(s.get_path('include'))")}
|
2015-11-08 14:43:19 +01:00
|
|
|
%define build_man 1
|
|
|
|
|
|
|
|
%if %{build_man}
|
|
|
|
Name: talloc-man
|
|
|
|
BuildRequires: doxygen
|
|
|
|
%else
|
|
|
|
Name: talloc
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: pkg-config
|
2018-04-03 12:25:43 +02:00
|
|
|
BuildRequires: python3-base
|
2015-11-08 14:43:19 +01:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
#!BuildIgnore: python
|
2015-11-08 15:08:31 +01:00
|
|
|
%endif # build_man
|
2020-01-03 15:02:03 +01:00
|
|
|
URL: http://talloc.samba.org/
|
2024-05-20 11:09:03 +02:00
|
|
|
Version: 2.4.2
|
2015-11-08 14:43:19 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Samba talloc Library
|
2019-04-22 19:10:48 +02:00
|
|
|
License: LGPL-3.0-or-later
|
2017-10-06 10:26:58 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-04-10 17:52:19 +02:00
|
|
|
Source: https://download.samba.org/pub/talloc/talloc-%{version}.tar.gz
|
|
|
|
Source1: https://download.samba.org/pub/talloc/talloc-%{version}.tar.asc
|
2015-11-08 14:43:19 +01:00
|
|
|
Source4: baselibs.conf
|
2016-03-08 18:45:53 +01:00
|
|
|
Patch0: talloc-python3.5-fix-soabi_name.patch
|
2019-10-23 20:20:20 +02:00
|
|
|
# Originally from https://git.samba.org/samba.git/?p=samba.git;a=patch;h=aabdcc91513e242c4f191e1bbbb70c890416d213
|
2015-11-08 14:43:19 +01:00
|
|
|
Source50: talloc.keyring
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
Talloc is a hierarchical, reference counted memory pool system with
|
|
|
|
destructors.
|
|
|
|
|
|
|
|
It is the core memory allocator used in Samba.
|
|
|
|
|
|
|
|
%if ! %{build_man}
|
|
|
|
|
2018-04-03 12:25:43 +02:00
|
|
|
%package -n libtalloc2
|
2017-10-06 10:26:58 +02:00
|
|
|
Summary: Samba talloc library
|
2015-11-08 14:43:19 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
Provides: bundled(libreplace)
|
|
|
|
|
2018-04-03 12:25:43 +02:00
|
|
|
%description -n libtalloc2
|
2015-11-08 14:43:19 +01:00
|
|
|
Talloc is a hierarchical, reference counted memory pool system with
|
|
|
|
destructors.
|
|
|
|
|
|
|
|
It is the core memory allocator used in Samba.
|
|
|
|
|
|
|
|
This package includes the talloc2 library.
|
|
|
|
|
|
|
|
%package -n libtalloc-devel
|
|
|
|
Summary: Libraries and Header Files to Develop Programs with talloc2 Support
|
2017-04-10 16:35:01 +02:00
|
|
|
# Man pages are built in a 2nd spec file in order to break a build cycle with doxygen->cmake->krb5->libtalloc
|
2017-10-01 13:50:22 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-11-08 14:43:19 +01:00
|
|
|
%if 0%{?suse_version} > 1030
|
|
|
|
Recommends: %{name}-man
|
|
|
|
%endif
|
2018-04-03 12:25:43 +02:00
|
|
|
Requires: libtalloc2 = %{version}
|
2015-11-08 14:43:19 +01:00
|
|
|
Requires: pkg-config
|
|
|
|
|
|
|
|
%description -n libtalloc-devel
|
|
|
|
Talloc is a hierarchical, reference counted memory pool system with
|
|
|
|
destructors.
|
|
|
|
|
|
|
|
It is the core memory allocator used in Samba.
|
|
|
|
|
2017-10-06 10:26:58 +02:00
|
|
|
Libraries and Header Files to Develop Programs with talloc2 Support.
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%package -n python3-talloc
|
|
|
|
Summary: Python3 bindings for the Talloc library
|
|
|
|
Group: Development/Libraries/Python
|
2018-04-03 12:25:43 +02:00
|
|
|
Requires: libtalloc2 = %{version}
|
2019-04-22 19:10:48 +02:00
|
|
|
Obsoletes: python-talloc
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%description -n python3-talloc
|
2017-10-06 10:26:58 +02:00
|
|
|
This package contains the Python3 bindings for the Talloc library.
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%package -n python3-talloc-devel
|
|
|
|
Summary: Developer tools for the Talloc library
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: pkg-config
|
2017-10-06 10:26:58 +02:00
|
|
|
Requires: python3-talloc = %{version}
|
2019-04-22 19:10:48 +02:00
|
|
|
Obsoletes: python-talloc-devel
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%description -n python3-talloc-devel
|
|
|
|
Libraries and Header Files to Develop Programs with python3-talloc Support
|
|
|
|
|
2015-11-08 15:08:31 +01:00
|
|
|
%endif # ! build_man
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -n talloc-%{version} -q
|
2019-10-23 20:20:20 +02:00
|
|
|
%autopatch -p1
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%if ! %{build_man}
|
2017-10-06 10:26:58 +02:00
|
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
|
2015-11-08 14:43:19 +01:00
|
|
|
CONFIGURE_OPTIONS="\
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--disable-rpath \
|
|
|
|
--disable-rpath-install \
|
|
|
|
--disable-silent-rules \
|
|
|
|
--bundled-libraries=NONE \
|
|
|
|
--builtin-libraries=replace \
|
|
|
|
"
|
|
|
|
./configure ${CONFIGURE_OPTIONS}
|
2017-10-06 10:26:58 +02:00
|
|
|
make %{?_smp_mflags} \
|
2015-11-08 14:43:19 +01:00
|
|
|
all
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
doxygen doxy.config
|
|
|
|
|
2015-11-08 15:08:31 +01:00
|
|
|
%endif # ! build_man
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%if ! %{build_man}
|
|
|
|
%check
|
2021-04-07 12:02:58 +02:00
|
|
|
%if 0%{?suse_version} != 1110 || "%{_build_arch}" == "x86_64"
|
2017-10-06 10:26:58 +02:00
|
|
|
%if "%{qemu_user_space_build}" == "1"
|
|
|
|
echo "skipping test on qemu userspace build due to AT_RANDOM not changing"
|
|
|
|
%else # qemu_user_space_build == 1
|
2015-11-08 15:32:19 +01:00
|
|
|
mkdir lib/talloc
|
|
|
|
ln test_magic_differs* lib/talloc/
|
2017-10-06 10:26:58 +02:00
|
|
|
LD_LIBRARY_PATH=bin/shared make test
|
|
|
|
%endif # qemu_user_space_build == 1
|
2016-03-15 18:57:01 +01:00
|
|
|
%endif # suse_version != 1110; fails for i586 and ppc64
|
2015-11-08 15:08:31 +01:00
|
|
|
%endif # ! build_man
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%if ! %{build_man}
|
2017-10-06 10:26:58 +02:00
|
|
|
%make_install
|
|
|
|
rm -r "%{buildroot}/%{_mandir}"
|
2018-04-03 12:25:43 +02:00
|
|
|
mkdir -p %{buildroot}/%{py3_incdir}
|
2019-04-22 19:10:48 +02:00
|
|
|
mv %{buildroot}/%{_includedir}/pytalloc.h %{buildroot}/%{py3_incdir}/pytalloc.h
|
2018-04-03 12:25:43 +02:00
|
|
|
sed -i 's;${prefix}/include;%{py3_incdir};g' %{buildroot}/%{_libdir}/pkgconfig/pytalloc-util.%{py3_soflags}.pc
|
|
|
|
sed -i 's;-lpytalloc-util.%{py3_soflags_dash};-lpytalloc-util.%{py3_soflags};g' %{buildroot}/%{_libdir}/pkgconfig/pytalloc-util.%{py3_soflags}.pc
|
2015-11-08 14:43:19 +01:00
|
|
|
%else
|
|
|
|
|
|
|
|
# Install API documentation
|
2017-10-06 10:26:58 +02:00
|
|
|
mkdir -p "%{buildroot}/%{_mandir}"
|
|
|
|
cp -a doc/man/* "%{buildroot}/%{_mandir}/"
|
2015-11-08 14:43:19 +01:00
|
|
|
|
2015-11-08 15:08:31 +01:00
|
|
|
%endif # ! build_man
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%if ! %{build_man}
|
2018-04-03 12:25:43 +02:00
|
|
|
%post -n libtalloc2 -p /sbin/ldconfig
|
2015-11-08 14:43:19 +01:00
|
|
|
|
2018-04-03 12:25:43 +02:00
|
|
|
%postun -n libtalloc2 -p /sbin/ldconfig
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%post -n python3-talloc -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n python3-talloc -p /sbin/ldconfig
|
|
|
|
|
2018-04-03 12:25:43 +02:00
|
|
|
%files -n libtalloc2
|
2015-11-08 14:43:19 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libtalloc.so.*
|
|
|
|
|
|
|
|
%files -n libtalloc-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/talloc.h
|
|
|
|
%{_libdir}/libtalloc.so
|
|
|
|
%{_libdir}/pkgconfig/talloc.pc
|
|
|
|
|
|
|
|
%files -n python3-talloc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libpytalloc-util.%{py3_soflags}.so.*
|
|
|
|
%{python3_sitearch}/talloc.%{py3_soflags}.so
|
|
|
|
|
|
|
|
%files -n python3-talloc-devel
|
|
|
|
%defattr(-,root,root)
|
2018-04-03 12:25:43 +02:00
|
|
|
%{py3_incdir}/pytalloc.h
|
2017-10-06 10:26:58 +02:00
|
|
|
%{_libdir}/pkgconfig/pytalloc-util.%{py3_soflags}.pc
|
2015-11-08 14:43:19 +01:00
|
|
|
%{_libdir}/libpytalloc-util.%{py3_soflags}.so
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_mandir}/man3/libtalloc*.3.*
|
|
|
|
%{_mandir}/man3/talloc*.3.*
|
|
|
|
|
2015-11-08 15:08:31 +01:00
|
|
|
%endif # ! build_man
|
2015-11-08 14:43:19 +01:00
|
|
|
|
|
|
|
%changelog
|