LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cifs-utils.spec of Package cifs-utils (Project network:samba:STABLE)

# spec file for package cifs-utils
# Copyright (c) 2012 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/

Name:           cifs-utils
Version:        5.8
Release:        0
Summary:        Utilities for doing and managing mounts of the Linux CIFS filesyste
License:        GPL-3.0+
Group:          System/Filesystems
Url:            http://www.samba.org/linux-cifs/cifs-utils/
Source:         %{name}-%{version}.tar.bz2
Source1:        cifs.init
Source2:        mkinitrd_scripts_boot-cifs.sh
Source3:        mkinitrd_scripts_setup-cifs.sh
%if 0%{?suse_version}
PreReq:         insserv %{?fillup_prereq} mkinitrd
PreReq:         /sbin/chkconfig
%define         initdir %{_sysconfdir}/init.d
Provides:       cifs-mount = %{version}
Obsoletes:      cifs-mount < %{version}
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
BuildRequires:  autoconf
BuildRequires:  automake
%if 0%{?suse_version} > 1020
BuildRequires:  keyutils-devel
BuildRequires:  krb5-devel
%if 0%{?suse_version} > 1120
BuildRequires:  libcap-ng-devel
BuildRequires:  libcap-devel
#!BuildIgnore:  libtalloc
BuildRequires:  libtalloc-devel
%if 0%{?suse_version} > 1110
BuildRequires:  fdupes
%if 0%{?mandriva_version}
BuildRequires:  libkeyutils-devel
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
BuildRequires:  libwbclient-devel
%if 0%{?suse_version} > 1020
BuildRequires:  pkg-config
BuildRequires:  pkgconfig
Requires:       keyutils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The cifs-utils package consist of utilities for doing and managing mounts of
the Linux CIFS filesystem.

%setup -q

export LDFLAGS="-pie"
%{__make} %{?_smp_mflags}

mkdir -p \
%{__make} install \
%if 0%{?suse_version}
	mkdir -p ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
	%{__install} -m 0755 ${RPM_SOURCE_DIR}/mkinitrd_scripts_boot-cifs.sh ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/boot-cifs.sh
	%{__install} -m 0755 ${RPM_SOURCE_DIR}/mkinitrd_scripts_setup-cifs.sh ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/setup-cifs.sh
# Hardlink duplicate files
%if 0%{?suse_version} > 1110
%fdupes ${RPM_BUILD_ROOT}

%if 0%{?suse_version}
%{stop_on_removal cifs}
if [ $1 = 0 ] ; then
	test -x /sbin/chkconfig && /sbin/chkconfig --del cifs

exit 0

[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
exit 0

%if 0%{?suse_version}
%{restart_on_update cifs}
if [ "$1" -ge "1" ]; then
	%{initdir}/cifs restart >/dev/null
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
exit 0

%if 0%{?mandriva_version} > 201100 || 0%{?mandriva_version} == 0
%doc %{_mandir}/man1/cifscreds.1.*
%if 0%{?mandriva_version} > 201100 || 0%{?mandriva_version} == 0
%doc %{_mandir}/man1/getcifsacl.1.*
%doc %{_mandir}/man1/setcifsacl.1.*
%doc %{_mandir}/man8/cifs.idmap.8.*
%doc %{_mandir}/man8/cifs.upcall.8.*
%doc %{_mandir}/man8/mount.cifs.8.*
%if 0%{?suse_version} > 1100
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts