2008-01-24 13:21:25 +01:00
|
|
|
#
|
2012-04-11 16:01:03 +02:00
|
|
|
# spec file for package samba-doc
|
2008-01-24 13:21:25 +01:00
|
|
|
#
|
2012-04-11 16:01:03 +02:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-01-24 13:21:25 +01:00
|
|
|
#
|
2008-08-16 02:33:14 +02: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.
|
|
|
|
|
2008-01-24 13:21:25 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2012-04-11 16:01:03 +02:00
|
|
|
Name: samba-doc
|
2012-01-02 14:45:41 +01:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
|
|
|
|
BuildRequires: autoconf
|
|
|
|
%endif
|
2012-07-16 17:28:30 +02:00
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: patch
|
2011-09-09 15:14:31 +02:00
|
|
|
BuildRequires: cups-devel
|
|
|
|
BuildRequires: e2fsprogs-devel
|
|
|
|
BuildRequires: fam-devel
|
|
|
|
BuildRequires: libacl-devel
|
2012-02-28 00:22:41 +01:00
|
|
|
%if 0%{?centos_version} > 599 ||0%{?fedora_version} > 11 || 0%{?mandriva_version} > 2009 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1100
|
2012-02-27 19:58:29 +01:00
|
|
|
BuildRequires: libuuid-devel
|
|
|
|
%endif
|
2011-09-09 15:14:31 +02:00
|
|
|
BuildRequires: pam-devel
|
|
|
|
BuildRequires: popt-devel
|
|
|
|
BuildRequires: readline-devel
|
2009-06-20 06:10:37 +02:00
|
|
|
%if 0%{?suse_version}
|
2011-09-09 15:14:31 +02:00
|
|
|
BuildRequires: cracklib-devel
|
|
|
|
BuildRequires: openldap2-devel
|
2009-06-20 06:10:37 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 1030
|
2011-09-09 15:14:31 +02:00
|
|
|
BuildRequires: gdbm-devel
|
|
|
|
BuildRequires: pwdutils
|
2009-06-20 06:10:37 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 930
|
2011-09-09 15:14:31 +02:00
|
|
|
BuildRequires: krb5-devel
|
|
|
|
BuildRequires: libiniparser-devel
|
|
|
|
BuildRequires: libnscd-devel
|
|
|
|
BuildRequires: python-devel
|
2009-06-20 06:10:37 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 930 && 0%{?suse_version} < 1031
|
2011-09-09 15:14:31 +02:00
|
|
|
BuildRequires: dmapi-devel
|
2011-09-09 15:53:54 +02:00
|
|
|
BuildRequires: libxml2-devel
|
2011-09-09 15:14:31 +02:00
|
|
|
BuildRequires: mysql-devel
|
|
|
|
BuildRequires: postgresql-devel
|
|
|
|
BuildRequires: xfsprogs-devel
|
2009-06-20 06:10:37 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?fedora_version}
|
|
|
|
BuildRequires: cracklib-devel
|
|
|
|
%endif
|
|
|
|
%if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} || 0%{?mandriva_version}
|
2011-09-09 15:14:31 +02:00
|
|
|
BuildRequires: krb5-devel
|
|
|
|
BuildRequires: openldap-devel
|
|
|
|
BuildRequires: python-devel
|
2009-06-20 06:10:37 +02:00
|
|
|
%endif
|
2010-05-25 12:57:29 +02:00
|
|
|
%if 0%{?suse_version} > 1000
|
2009-06-20 06:10:37 +02:00
|
|
|
BuildRequires: keyutils-devel
|
|
|
|
%endif
|
2010-05-25 12:57:29 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} > 500
|
|
|
|
BuildRequires: keyutils-libs-devel
|
|
|
|
%endif
|
2009-06-20 06:10:37 +02:00
|
|
|
%if 0%{?suse_version} > 1000 || 0%{?fedora_version} || 0%{?rhel_version} || 0%{?mandriva_version}
|
2011-10-10 17:15:19 +02:00
|
|
|
BuildRequires: ctdb-devel > 1.0.105
|
2009-06-20 06:10:37 +02:00
|
|
|
%endif
|
2009-11-23 11:16:32 +01:00
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
2010-05-25 12:57:29 +02:00
|
|
|
%if 0%{?suse_version} > 1020
|
2012-12-02 23:09:01 +01:00
|
|
|
%define pkgconfig_req pkg-config
|
2010-02-18 16:51:01 +01:00
|
|
|
%else
|
2012-12-02 23:09:01 +01:00
|
|
|
%define pkgconfig_req pkgconfig
|
2010-02-18 16:51:01 +01:00
|
|
|
%endif
|
2012-12-02 23:09:01 +01:00
|
|
|
BuildRequires: %{pkgconfig_req}
|
2012-05-15 12:58:22 +02:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1210
|
2012-05-31 16:28:27 +02:00
|
|
|
BuildRequires: libldb-devel
|
2012-06-01 16:25:36 +02:00
|
|
|
#!BuildIgnore: libtalloc
|
2012-05-31 16:28:27 +02:00
|
|
|
BuildRequires: libtalloc-devel
|
2012-06-01 16:25:36 +02:00
|
|
|
#!BuildIgnore: libtdb
|
2012-05-31 16:28:27 +02:00
|
|
|
BuildRequires: libtdb-devel
|
|
|
|
BuildRequires: libtevent-devel
|
2012-05-15 12:58:22 +02:00
|
|
|
%endif
|
2012-12-10 12:40:59 +01:00
|
|
|
%define samba_ver 3.6.10
|
2011-08-09 14:45:29 +02:00
|
|
|
%define samba_ver_suffix %nil
|
2008-01-24 13:21:25 +01:00
|
|
|
%define samba_ver_full %{samba_ver}%{samba_ver_suffix}
|
2009-07-14 23:06:34 +02:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
|
|
|
%define guards_symbols pre_1111
|
|
|
|
%endif
|
2012-12-02 17:24:49 +01:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1031
|
|
|
|
%define libsmbclient_name libsmbclient
|
|
|
|
%define libsmbsharemodes_name libsmbsharemodes
|
|
|
|
%else
|
|
|
|
%define libsmbclient_name libsmbclient0
|
|
|
|
%define libsmbsharemodes_name libsmbsharemodes0
|
|
|
|
%endif
|
|
|
|
%define libldb_name libldb1
|
|
|
|
%define libnetapi_name libnetapi0
|
|
|
|
%define libwbclient_name libwbclient0
|
|
|
|
%define libtalloc_name libtalloc2
|
|
|
|
%define libtdb_name libtdb1
|
|
|
|
%define libtevent_name libtevent0
|
2012-05-15 12:58:22 +02:00
|
|
|
%if 0%{?suse_version} > 1130 && 0%{?suse_version} < 1211
|
2011-07-21 22:14:33 +02:00
|
|
|
%define libldb_ver 1.0.2
|
|
|
|
%define libtalloc_ver 2.0.5
|
|
|
|
%define libtdb_ver 1.2.9
|
|
|
|
%define libtevent_ver 0.9.11
|
2011-02-10 00:52:17 +01:00
|
|
|
%else
|
2012-05-15 12:58:22 +02:00
|
|
|
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1131
|
2011-02-10 00:52:17 +01:00
|
|
|
%define libldb_ver %{version}
|
2011-02-10 15:51:27 +01:00
|
|
|
%define libtalloc_ver %{version}
|
|
|
|
%define libtdb_ver %{version}
|
|
|
|
%define libtevent_ver %{version}
|
2011-02-10 00:52:17 +01:00
|
|
|
%endif
|
2012-05-15 12:58:22 +02:00
|
|
|
%endif
|
2011-03-18 17:25:03 +01:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
|
|
|
|
%define build_make_smp_mflags %{?_smp_mflags}
|
|
|
|
%else
|
|
|
|
%define build_make_smp_mflags %{?jobs:-j%jobs}
|
|
|
|
%endif
|
2012-12-23 00:40:34 +01:00
|
|
|
%define SOURCE_TIMESTAMP 2897
|
|
|
|
%define BRANCH 3.6.10
|
2012-12-10 12:40:59 +01:00
|
|
|
Version: 3.6.10
|
2012-11-30 21:34:48 +01:00
|
|
|
Release: 0
|
2012-03-14 18:52:00 +01:00
|
|
|
%define ldapsmb_ver 1.34b
|
2012-04-11 16:01:03 +02:00
|
|
|
Url: http://www.samba.org/
|
2012-01-26 15:22:21 +01:00
|
|
|
License: GPL-3.0+
|
2008-01-24 13:21:25 +01:00
|
|
|
Summary: Samba Documentation
|
|
|
|
Group: Documentation/Other
|
2011-09-09 15:14:31 +02:00
|
|
|
PreReq: coreutils
|
|
|
|
PreReq: findutils
|
2011-09-08 22:00:21 +02:00
|
|
|
Provides: samba-gplv3-doc = %{version}
|
2010-11-12 14:33:55 +01:00
|
|
|
Obsoletes: samba-gplv3-doc < %{version}
|
2011-09-08 22:00:21 +02:00
|
|
|
Provides: samba-doc-gplv2 = %{version}
|
2010-12-01 14:43:54 +01:00
|
|
|
Obsoletes: samba-doc-gplv2 < %{version}
|
2012-04-11 16:01:03 +02:00
|
|
|
BuildArch: noarch
|
2008-01-24 13:21:25 +01:00
|
|
|
Source: http://samba.org/samba/ftp/samba-%{version}%{samba_ver_suffix}.tar.bz2
|
|
|
|
Source1: vendor-files.tar.bz2
|
|
|
|
Source2: patches.tar.bz2
|
|
|
|
Source3: build-source-timestamp
|
2010-01-21 10:54:48 +01:00
|
|
|
Source4: baselibs.conf
|
2012-03-14 18:52:00 +01:00
|
|
|
Source11: http://www.samba.org/~gd/ldapsmb/ldapsmb-%{ldapsmb_ver}.tar.bz2
|
2008-01-24 13:21:25 +01:00
|
|
|
# Choose some features / extra packages here
|
|
|
|
############################################
|
|
|
|
%define make_devel 0
|
|
|
|
%define use_ccache 0
|
2009-02-08 03:31:22 +01:00
|
|
|
%if 0%{?use_ccache} > 0
|
|
|
|
BuildRequires: ccache
|
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
# requires: docbook-utils docbook-xsl-stylesheets docbook_4 freetype2 ghostscript-fonts-std ghostscript-library ghostscript-x11 libxslt sgml-skel te_etex te_latex te_pdf tetex xmlcharent
|
|
|
|
%define make_doc 0
|
|
|
|
%define make_utils 0
|
|
|
|
%define make_ldapsmb 1
|
2010-03-19 08:25:40 +01:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1120
|
2010-01-08 17:32:57 +01:00
|
|
|
%define cifs_init_script cifs
|
2010-03-19 08:25:40 +01:00
|
|
|
%else
|
|
|
|
%define cifs_init_script smbfs
|
2010-01-08 17:32:57 +01:00
|
|
|
%endif
|
2009-08-01 11:43:53 +02:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
|
|
|
%define link_static_libs 1
|
2012-02-27 19:58:29 +01:00
|
|
|
%else
|
|
|
|
%define link_static_libs 0
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
2011-07-21 22:14:33 +02:00
|
|
|
# pre-11.2 doesn't know the python_* macros
|
|
|
|
%define python_sitelib %py_sitedir
|
|
|
|
%define python_sitearch %py_sitedir
|
2012-02-27 19:58:29 +01:00
|
|
|
%else (%if 0%{?centos_version} && 0%{?centos_version} < 600) || (0%{rhel_version} && 0%{rhel_version} < 600)
|
|
|
|
# CentOS and RHEL pre-6 don't know them either
|
|
|
|
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())")
|
|
|
|
%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")
|
2009-08-01 11:43:53 +02:00
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
# Define some global directories
|
|
|
|
################################
|
|
|
|
%define DOCDIR %{_defaultdocdir}/samba
|
|
|
|
%define DOCBOOKDIR %{_defaultdocdir}/%{name}/docbook
|
|
|
|
%define SWATDIR %{_datadir}/samba/swat
|
|
|
|
%define LOGDIR %{_localstatedir}/log/samba
|
|
|
|
%define LOCKDIR %{_localstatedir}/lib/samba
|
|
|
|
%define CONFIGDIR %{_sysconfdir}/samba
|
|
|
|
%define INITDIR %{_sysconfdir}/init.d
|
|
|
|
%define PIDDIR %{_localstatedir}/run/samba
|
2008-10-06 16:19:18 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
%define NET_CFGDIR network
|
|
|
|
%else
|
|
|
|
%define NET_CFGDIR network-scripts
|
|
|
|
%endif
|
2010-05-25 12:57:29 +02:00
|
|
|
%define idmap_modules idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_rid,idmap_tdb2
|
2008-04-24 09:21:53 +02:00
|
|
|
%define vfs_modules vfs_cacheprime,vfs_readahead
|
2008-05-17 02:11:23 +02:00
|
|
|
%if 0%{?ul_version} >= 1
|
2008-01-24 13:21:25 +01:00
|
|
|
%define VENDOR UL
|
|
|
|
%else
|
2008-05-17 02:11:23 +02:00
|
|
|
%if "%{_vendor}" == "suse" || "%{_vendor}" == "redhat"
|
2008-01-24 13:21:25 +01:00
|
|
|
%define VENDOR SUSE
|
|
|
|
%else
|
|
|
|
%define VENDOR %_vendor
|
|
|
|
%endif
|
|
|
|
%endif
|
2010-04-24 17:27:08 +02:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1120
|
|
|
|
%define cups_lib_dir %{_prefix}/lib/cups
|
|
|
|
%else
|
|
|
|
%define cups_lib_dir %{_libdir}/cups
|
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%prep
|
2011-02-28 18:20:27 +01:00
|
|
|
# samba-doc nowadays is part the main samba spec file
|
2011-02-28 17:29:13 +01:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
2008-01-24 13:21:25 +01:00
|
|
|
%setup -n samba-%{samba_ver_full} -q
|
2012-03-14 18:52:00 +01:00
|
|
|
# ldapsmb
|
|
|
|
%if %{make_ldapsmb}
|
|
|
|
%setup -T -D -a 11 -n samba-%{samba_ver_full} -q
|
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
# patches
|
|
|
|
%setup -T -D -a 2 -n samba-%{samba_ver_full} -q
|
2009-07-14 23:06:34 +02:00
|
|
|
for patch in $( patches/tools/guards %{guards_symbols} <patches/series); do
|
2008-01-24 13:21:25 +01:00
|
|
|
if ! patch -s -E -p0 --no-backup-if-mismatch -i patches/$patch; then
|
|
|
|
echo "*** Patch $patch failed ***"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
# vendor-files (config, scripts, tools)
|
|
|
|
%setup -T -D -a 1 -n samba-%{samba_ver_full} -q
|
|
|
|
for file in docs/htmldocs/index.html vendor-files/docu/README.vendor; do
|
|
|
|
sed -e "s/VENDOR/%{VENDOR}/g" "${file}" >"${file}.new" && \
|
|
|
|
mv "${file}.new" "${file}"
|
|
|
|
done
|
2011-09-09 15:14:31 +02:00
|
|
|
install -m 0644 vendor-files/tools/get_printing_ticket.c source3/client/get_printing_ticket.c
|
|
|
|
install -m 0644 -p vendor-files/docu/rfc3454.txt source4/heimdal/lib/wind/
|
2008-01-24 13:21:25 +01:00
|
|
|
# Create and add vendor suffix
|
|
|
|
test -f vendor-files/tools/package-data && \
|
|
|
|
. vendor-files/tools/package-data
|
2009-07-14 23:06:34 +02:00
|
|
|
pushd source3
|
2010-05-25 12:57:29 +02:00
|
|
|
if test "%{_project}" != "openSUSE:Factory"; then
|
|
|
|
vendor_tag_release=$( grep -m 1 ^Release: ${RPM_SOURCE_DIR}/samba.spec | \
|
|
|
|
while read tag release; do \
|
|
|
|
echo -n "${release:+${release}-}"; \
|
|
|
|
done)
|
|
|
|
else
|
|
|
|
vendor_tag_release=""
|
|
|
|
fi
|
|
|
|
vendor_tag=$( echo -n "${vendor_tag_release}"; \
|
2008-01-24 13:21:25 +01:00
|
|
|
echo -n "${SAMBA_PACKAGE_SVN_VERSION:+${SAMBA_PACKAGE_SVN_VERSION}-}"; \
|
|
|
|
test %{make_devel} -eq 1 && echo -n "devel-" || :)
|
|
|
|
# Create product suffix
|
2008-05-17 02:11:23 +02:00
|
|
|
test 0%{?centos_version} -gt 0 && product_version=%{?centos_version}
|
|
|
|
test 0%{?fedora_version} -gt 0 && product_version=%{?fedora_version}
|
|
|
|
test 0%{?mandriva_version} -gt 0 && product_version=%{?mandriva_version}
|
|
|
|
test 0%{?rhel_version} -gt 0 && product_version=%{?rhel_version}
|
|
|
|
test 0%{?suse_version} -gt 0 && product_version=%{?suse_version}
|
|
|
|
major_version=$((${product_version}/100))
|
|
|
|
minor_version=$((${product_version}/10))
|
2008-01-24 13:21:25 +01:00
|
|
|
minor_version="${minor_version#$major_version}"
|
|
|
|
product_version="${major_version}.${minor_version}"
|
|
|
|
product_suffix=""
|
|
|
|
if test "%{VENDOR}" != "UL"; then
|
2008-05-17 02:11:23 +02:00
|
|
|
if test 0%{?sles_version} -gt 0; then
|
2008-01-24 13:21:25 +01:00
|
|
|
product_suffix="-SLES%{sles_version}"
|
2008-05-17 02:11:23 +02:00
|
|
|
elif test 0%{?suse_version} -gt 0; then
|
2008-01-24 13:21:25 +01:00
|
|
|
product_suffix="-SL${product_version}"
|
2008-05-17 02:11:23 +02:00
|
|
|
else
|
|
|
|
product_suffix="-OBS"
|
2008-01-24 13:21:25 +01:00
|
|
|
fi
|
2008-10-27 17:14:41 +01:00
|
|
|
case "%{?suse_version}" in
|
|
|
|
1010|1110) product_suffix="-CODE${major_version}" ;;
|
2008-01-24 13:21:25 +01:00
|
|
|
esac
|
|
|
|
fi
|
2010-11-12 14:33:55 +01:00
|
|
|
# Add the build architecture
|
|
|
|
test "%{_build_arch}" != "" && \
|
|
|
|
product_suffix="${product_suffix}-%{_build_arch}"
|
2008-01-24 13:21:25 +01:00
|
|
|
# Set SAMBA_VERSION_VENDOR_SUFFIX in the VERSION file
|
|
|
|
mv VERSION VERSION.orig
|
2012-10-29 14:38:14 +01:00
|
|
|
sed -e "s/^SAMBA_VERSION_VENDOR_SUFFIX=$/SAMBA_VERSION_VENDOR_SUFFIX=\"${vendor_tag}%{VENDOR}${product_suffix}\"/" VERSION.orig >VERSION
|
2011-02-28 17:29:13 +01:00
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
|
|
|
|
%build samba-%{samba_ver_full}
|
2011-02-28 17:29:13 +01:00
|
|
|
# samba-doc nowadays is part the main samba spec file
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
2008-05-17 02:11:23 +02:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 911
|
2008-01-24 13:21:25 +01:00
|
|
|
OPTIMIZATION="-O"
|
|
|
|
%else
|
|
|
|
# use the default optimization
|
|
|
|
unset OPTIMIZATION
|
|
|
|
%endif
|
2009-08-22 03:36:34 +02:00
|
|
|
%if 0%{?suse_version} > 1110
|
2009-08-01 11:43:53 +02:00
|
|
|
export SUSE_ASNEEDED=0
|
|
|
|
%endif
|
2011-09-09 15:14:31 +02:00
|
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE ${OPTIMIZATION} -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
|
2008-01-24 13:21:25 +01:00
|
|
|
%if %{use_ccache}
|
|
|
|
export CC="ccache gcc"
|
|
|
|
%endif
|
2009-07-14 23:06:34 +02:00
|
|
|
pushd source3
|
2012-01-02 14:45:41 +01:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1141
|
2008-01-24 13:21:25 +01:00
|
|
|
%{?suse_update_config:%{suse_update_config -f}}
|
2012-01-02 14:45:41 +01:00
|
|
|
%endif
|
2012-04-22 01:32:25 +02:00
|
|
|
# Ensure all idl is recompiled, in case we are carrying pidl changes locally.
|
|
|
|
rm -f librpc/gen_ndr/*.[cho] ../librpc/gen_ndr/*.[cho]
|
2012-06-25 20:20:43 +02:00
|
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 11 && 0%{?fedora_version} < 15 || 0%{?mandriva_version} > 2009 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 0
|
2009-07-14 23:06:34 +02:00
|
|
|
./autogen.sh
|
2012-02-27 19:58:29 +01:00
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
CONFIGURE_OPTIONS="\
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--localstatedir=%{LOCKDIR} \
|
|
|
|
--sysconfdir=%{CONFIGDIR} \
|
|
|
|
--with-configdir=%{CONFIGDIR} \
|
2009-05-06 18:53:12 +02:00
|
|
|
--libdir=%{_libdir} \
|
2008-01-24 13:21:25 +01:00
|
|
|
--with-lockdir=%{LOCKDIR} \
|
|
|
|
--with-logfilebase=%{LOGDIR} \
|
|
|
|
--with-mandir=%{_mandir} \
|
2009-05-06 18:53:12 +02:00
|
|
|
--with-modulesdir=%{_libdir}/samba \
|
2008-01-24 13:21:25 +01:00
|
|
|
--with-rootsbindir=/sbin \
|
2011-07-21 22:14:33 +02:00
|
|
|
--with-nmbdsocketdir=%{LOCKDIR} \
|
2008-01-24 13:21:25 +01:00
|
|
|
--enable-cups \
|
2008-08-02 05:35:22 +02:00
|
|
|
--enable-debug \
|
2009-08-01 11:43:53 +02:00
|
|
|
%if %{link_static_libs}
|
2008-09-05 20:40:17 +02:00
|
|
|
--enable-static \
|
2009-08-01 11:43:53 +02:00
|
|
|
%else
|
|
|
|
--disable-static \
|
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
--with-acl-support \
|
|
|
|
--with-automount \
|
|
|
|
--with-dnsupdate \
|
|
|
|
--with-pam \
|
|
|
|
--with-pammodulesdir=%{_lib}/security \
|
|
|
|
--with-pam_smbpass \
|
|
|
|
--with-piddir=%{PIDDIR} \
|
|
|
|
--with-privatedir=%{CONFIGDIR} \
|
|
|
|
%if %{make_devel}
|
|
|
|
--with-profiling-data \
|
|
|
|
%endif
|
|
|
|
--with-quotas \
|
|
|
|
--with-swatdir=%{SWATDIR} \
|
|
|
|
--with-syslog \
|
|
|
|
--with-utmp \
|
|
|
|
--with-winbind \
|
2008-04-24 09:21:53 +02:00
|
|
|
--with-shared-modules=%{vfs_modules},%{idmap_modules} \
|
2008-01-24 13:21:25 +01:00
|
|
|
%if %{make_devel}
|
|
|
|
--enable-developer \
|
|
|
|
--enable-krb5developer \
|
|
|
|
%endif
|
|
|
|
"
|
|
|
|
# make sure we have a chance to find krb5-config
|
|
|
|
for dir in /usr/lib/mit/bin /usr/lib/heimdal; do
|
|
|
|
test -d "${dir}" && export PATH="${PATH}:${dir}"
|
|
|
|
done
|
|
|
|
unset CONFIGURE_OPTIONS_DEVEL
|
|
|
|
%if %{make_devel}
|
|
|
|
CONFIGURE_OPTIONS_DEVEL="--enable-debug --enable-developer"
|
|
|
|
%endif
|
|
|
|
./configure ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEVEL}
|
|
|
|
./script/mkversion.sh
|
2011-02-28 17:29:13 +01:00
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
|
|
|
|
%install
|
2011-02-23 17:10:21 +01:00
|
|
|
# samba-doc nowadays is part the main samba spec file
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
2008-01-24 13:21:25 +01:00
|
|
|
mkdir -p \
|
2011-09-09 15:14:31 +02:00
|
|
|
%{buildroot}/%{DOCDIR} \
|
|
|
|
%{buildroot}/%{DOCBOOKDIR} \
|
|
|
|
%{buildroot}/%{SWATDIR}/help \
|
|
|
|
%{buildroot}/%{_datadir}/susehelp/meta/Administration/System
|
2008-01-24 13:21:25 +01:00
|
|
|
# utility scripts
|
|
|
|
scripts="creategroup mksmbpasswd.sh"
|
2011-09-09 15:14:31 +02:00
|
|
|
install -d -m 0755 examples/scripts
|
2008-01-24 13:21:25 +01:00
|
|
|
for i in $scripts; do
|
2011-09-09 15:14:31 +02:00
|
|
|
install -m 0755 "source3/script/${i}" examples/scripts/${i}
|
2008-01-24 13:21:25 +01:00
|
|
|
done
|
|
|
|
# configuration files
|
|
|
|
pushd vendor-files
|
|
|
|
echo "# smb.conf is the main Samba configuration file. You find a full commented" >config/smb.conf
|
|
|
|
echo "# version at %{DOCDIR}/examples/smb.conf.%{VENDOR} if the" >>config/smb.conf
|
|
|
|
echo "# samba-doc package is installed." >>config/smb.conf
|
|
|
|
grep -v "\(^#\|^;\|^$\)" config/smb.conf.vendor >>config/smb.conf
|
2011-09-09 15:14:31 +02:00
|
|
|
install -p -m 0644 config/smb.conf.vendor ../examples/smb.conf.%{VENDOR}
|
2008-01-24 13:21:25 +01:00
|
|
|
# SuSEhelp files
|
2011-09-09 15:14:31 +02:00
|
|
|
install -m 0644 docu/Samba.desktop %{buildroot}/%{_datadir}/susehelp/meta/Administration/System/Samba.desktop
|
|
|
|
install -m 0644 docu/manpages.html ../docs/htmldocs/manpages.html
|
2008-01-24 13:21:25 +01:00
|
|
|
popd
|
2008-04-26 11:40:18 +02:00
|
|
|
for file in Samba3-ByExample Samba3-Developers-Guide Samba3-HOWTO; do
|
2008-01-24 13:21:25 +01:00
|
|
|
touch "${RPM_BUILD_ROOT}/%{SWATDIR}/help/${file}"
|
|
|
|
done
|
|
|
|
cp -a swat/help/welcome.html "${RPM_BUILD_ROOT}/%{SWATDIR}/help"
|
|
|
|
# pam_smbpass is missing
|
2009-07-14 23:06:34 +02:00
|
|
|
cp -a source3/pam_smbpass/samples examples/pam_smbpass
|
2011-09-09 15:14:31 +02:00
|
|
|
install -m 0644 source3/pam_smbpass/CHANGELOG examples/pam_smbpass/CHANGELOG
|
|
|
|
install -m 0644 source3/pam_smbpass/INSTALL examples/pam_smbpass/INSTALL
|
|
|
|
install -m 0644 source3/pam_smbpass/README examples/pam_smbpass/README
|
|
|
|
install -m 0644 source3/pam_smbpass/TODO examples/pam_smbpass/TODO
|
|
|
|
mv COPYING Manifest README Roadmap WHATSNEW.txt %{buildroot}/%{DOCDIR}/
|
2008-01-24 13:21:25 +01:00
|
|
|
# this is empty
|
|
|
|
rm -rf docs/yodldocs
|
|
|
|
rm -rf docs/manpages
|
2011-09-09 15:14:31 +02:00
|
|
|
cp -a docs/* %{buildroot}/%{DOCDIR}
|
|
|
|
rm -rf "%{buildroot}/%{DOCBOOKDIR}"
|
2012-08-16 17:02:49 +02:00
|
|
|
rm -f examples/VFS/*~
|
2011-09-09 15:14:31 +02:00
|
|
|
cp -a examples/ %{buildroot}/%{DOCDIR}
|
|
|
|
test -e "%{buildroot}/%{SWATDIR}/help/manpages" || \
|
|
|
|
ln -s "%{DOCDIR}/htmldocs/manpages" "%{buildroot}/%{SWATDIR}/help"
|
2008-01-24 13:21:25 +01:00
|
|
|
# Install HTML pages only in the samba-doc package
|
2011-09-09 15:14:31 +02:00
|
|
|
pushd %{buildroot}/%{SWATDIR}/help
|
2008-01-24 13:21:25 +01:00
|
|
|
for file in $( find -mindepth 1 -maxdepth 1); do
|
|
|
|
file="${file#./}"
|
|
|
|
case "${file}" in
|
|
|
|
welcome-no-samba-doc.html)
|
|
|
|
case "%{name}" in
|
|
|
|
samba*-doc) rm "${file}" ;;
|
|
|
|
esac
|
|
|
|
continue
|
|
|
|
;;
|
|
|
|
welcome.html) ;;
|
|
|
|
*)
|
|
|
|
rm -r "${file}"
|
|
|
|
ln -s "%{DOCDIR}/htmldocs/${file}" .
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
echo "%doc %{SWATDIR}/help/${file}" >>${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-samba-doc
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
# finally build filelist-samba-doc
|
2011-09-09 15:14:31 +02:00
|
|
|
for file in $( find %{buildroot}%{DOCDIR} -maxdepth 1); do
|
2008-09-05 20:40:17 +02:00
|
|
|
# exclude %{DOCDIR}, README, and docbook
|
2011-09-09 15:14:31 +02:00
|
|
|
case "${file#%{buildroot}}" in
|
2008-09-05 20:40:17 +02:00
|
|
|
%{DOCDIR}|%{DOCDIR}/README.%{VENDOR}|%{DOCDIR}/docbook) continue ;;
|
|
|
|
esac
|
2011-09-09 15:14:31 +02:00
|
|
|
echo "%doc ${file#%{buildroot}}" >>"${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-samba-doc"
|
2008-01-24 13:21:25 +01:00
|
|
|
done
|
|
|
|
%if ! %{make_utils}
|
|
|
|
# delete manpages if not packaged in utils-package
|
|
|
|
rm -f \
|
2011-09-09 15:14:31 +02:00
|
|
|
%{buildroot}/%{_mandir}/man1/log2pcap.1* \
|
|
|
|
%{buildroot}/%{_mandir}/man1/vfstest.1*
|
2008-01-24 13:21:25 +01:00
|
|
|
%endif
|
2011-02-23 17:10:21 +01:00
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
|
|
|
|
%pre
|
|
|
|
# Remove all directories and files from usr/share/samba/swat/help expect welcome-*.html
|
|
|
|
if [ -d usr/share/samba/swat/help ]; then
|
|
|
|
find usr/share/samba/swat/help -mindepth 1 -maxdepth 1 -type d -print0 | \
|
|
|
|
xargs -0 rm -rf
|
|
|
|
for file in $( find usr/share/samba/swat/help -maxdepth 1 -type f); do
|
|
|
|
case "${file}" in
|
|
|
|
usr/share/samba/swat/help/welcome*.html) continue ;;
|
|
|
|
*) rm -f "${file}" ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
%clean
|
|
|
|
[ x"${RPM_BUILD_ROOT}" = x"/" ] && ( echo "your buildroot is /" && exit 0) || rm -rf "${RPM_BUILD_ROOT}"
|
|
|
|
|
2011-02-23 17:10:21 +01:00
|
|
|
# samba-doc nowadays is part the main samba spec file
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1111
|
2008-01-24 13:21:25 +01:00
|
|
|
%files -f filelist-samba-doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{DOCDIR}
|
|
|
|
%dir %{_datadir}/samba
|
|
|
|
%dir %{SWATDIR}
|
|
|
|
%dir %{SWATDIR}/help
|
|
|
|
%doc %{_datadir}/susehelp
|
2011-02-23 17:10:21 +01:00
|
|
|
%endif
|
2008-01-24 13:21:25 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains all the Samba documentation as it is not part of
|
|
|
|
the man pages.
|
|
|
|
|
2012-12-01 21:05:19 +01:00
|
|
|
Source timestamp: %{SOURCE_TIMESTAMP}
|
|
|
|
Branch: %{BRANCH}
|
|
|
|
|
2008-01-24 13:21:25 +01:00
|
|
|
|
2012-04-11 16:01:03 +02:00
|
|
|
|
|
|
|
%changelog
|