%define vscanver 0.1.4 %define libsmbmajor 0 %define netapimajor 0 %define smbsharemodesmajor 0 %define tallocmajor 1 %define tdbmajor 1 %define wbclientmajor 0 %define check_sig() export GNUPGHOME=%{_tmppath}/rpm-gpghome \ if [ -d "$GNUPGHOME" ] \ then echo "Error, GNUPGHOME $GNUPGHOME exists, remove it and try again"; exit 1 \ fi \ install -d -m700 $GNUPGHOME \ gpg --import %{1} \ gpg --trust-model always --verify %{2} %{?3} \ rm -Rf $GNUPGHOME %define libname %mklibname smbclient %{libsmbmajor} %define libnetapi %mklibname netapi %{netapimajor} %define netapidevel %mklibname -d netapi %define libsmbsharemodes %mklibname smbsharemodes %{smbsharemodesmajor} %define smbsharemodesdevel %mklibname -d smbsharemodes %define libtalloc %mklibname talloc %{tallocmajor} %define tallocdevel %mklibname -d talloc %define libtdb %mklibname tdb %{tdbmajor} %define tdbdevel %mklibname -d tdb %define libwbclient %mklibname wbclient %{wbclientmajor} %define wbclientdevel %mklibname -d wbclient %bcond_without vscan %bcond_with talloc %bcond_with tdb %bcond_with ldb %bcond_with ctdb %bcond_without alternatives %bcond_without acl %bcond_without winbind %bcond_without wins %bcond_with ldap %bcond_without ads %bcond_with scanners %bcond_with test %bcond_without cupspc %bcond_without rpmhelper %bcond_with mysql %bcond_with pgsql %bcond_with antivir %bcond_with clamav %bcond_with fprot %bcond_with fsav %bcond_with icap %bcond_with kaspersky %bcond_with mks %bcond_with nai %bcond_with openav %bcond_with sophos %bcond_with symantec %bcond_with trend %if %{with vscan} # These we build by default %bcond_without clamav %bcond_with icap %bcond_without fsav %bcond_without sophos %endif %if %{with vscan} && %{with scanners} # These scanners are built if scanners are selected # symantec requires their library present and must be selected individually %bcond_without fprot %bcond_without kaspersky %bcond_without mks %bcond_without nai %bcond_without openav %bcond_without trend %endif %if %{with vscan} %global vscandir samba-virusfilter-%{vscanver} %endif %global vfsdir examples.bin/VFS #Define sets of binaries that we can use in globs and loops: %global commonbin net,ntlm_auth,rpcclient,smbcacls,smbcquotas,smbpasswd,smbtree,testparm %global serverbin pdbedit,profiles,smbcontrol,smbstatus,sharesec,smbta-util %if %{with ldb} %global serverldbbin ldbadd,ldbdel,ldbedit,ldbmodify,ldbsearch,ldbrename %endif %global serversbin nmbd,samba,smbd %global clientbin findsmb,nmblookup,smbclient,smbprint,smbspool,smbtar,smbget %global client_sbin mount.smb,mount.smbfs %global client_man man1/findsmb.1,man1/nmblookup.1,man1/smbclient.1,man1/smbget.1,man1/smbtar.1,man5/smbgetrc.5,man8/smbspool.8 %global testbin debug2html,smbtorture,msgtest,masktest,locktest,locktest2,nsstest,vfstest %if %{with alternatives} %define alternative_major 3 %else %define alternative_major %{nil} %endif Summary: Samba SMB server Name: samba Version: 3.6.19 Release: 1 License: GPLv3 Group: System/Servers Source: http://ftp.samba.org/pub/samba/stable/%{name}-%{version}.tar.gz Source99: http://ftp.samba.org/pub/samba/stable/%{name}-%{version}.tar.asc Source98: http://ftp.samba.org/pub/samba/samba-pubkey.asc URL: http://www.samba.org Source1: samba.log Source3: samba.xinetd Source4: swat_48.png Source5: swat_32.png Source6: swat_16.png Source7: README.%{name}-rosa-rpm Source8: samba-virusfilter-%{vscanver}.tar.gz Source10: samba-print-pdf.sh Source11: smb-migrate #Sources that used to be in packaging patch: Source20: smbusers Source21: smbprint #Source22: smbadduser Source23: findsmb Source24: smb.init Source25: winbind.init Source26: wrepld.init Source27: samba.pamd Source28: samba.pamd0_9 Source29: system-auth-winbind.pamd Source30: smb.conf # Version specific patches: current version Patch11: samba-3.0-mandriva-packaging.patch # https://bugzilla.samba.org/show_bug.cgi?id=3571, bug 21387 Patch19: samba-3.0.21c-swat-fr-translaction.patch Patch30: samba-3.5-check-undefined-before-zdefs.patch Patch31: samba-3.5.3-fix-nss-wins-syslog.patch Patch33: samba-3.5.8-fix-netapi-examples-linking.patch Requires: pam >= 0.64, samba-common = %{EVRD} BuildRequires: pam-devel BuildRequires: readline-devel BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(popt) BuildRequires: pkgconfig(libxml-2.0) # Samba 3.2 and later should be built with capabilities support: # http://lists.samba.org/archive/samba/2009-March/146821.html BuildRequires: libcap-devel BuildRequires: gnupg BuildRequires: pkgconfig(avahi-client) BuildRequires: libaio-devel BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(gamin) %if %{with ctdb} BuildRequires: pkgconfig(ctdb) %endif %if %{with pgsql} BuildRequires: postgresql-devel %endif %if %{with mysql} BuildRequires: mysql-devel %endif %if %{with acl} BuildRequires: acl-devel %endif BuildRequires: cups-devel BuildRequires: cups-common BuildRequires: libldap-devel %if %{with ads} BuildRequires: libldap-devel BuildRequires: krb5-devel %endif BuildRequires: keyutils-devel %if !%{with tdb} BuildRequires: pkgconfig(tdb) %endif %if !%{with ldb} #BuildRequires: pkgconfig(ldb) %endif %if !%{with talloc} BuildRequires: pkgconfig(talloc) %endif # for domain-join gui BuildRequires: pkgconfig(gtk+-2.0) Requires(pre): chkconfig Requires(pre): mktemp Requires(pre): psmisc Requires(pre): coreutils Requires(pre): sed Requires(pre): grep %if %{with vscan} BuildRequires: magic-devel %endif BuildRequires: pkgconfig(tevent) %description Samba provides an SMB server which can be used to provide network services to SMB (sometimes called "Lan Manager") clients, including various versions of MS Windows, OS/2, and other Linux machines. Samba also provides some SMB clients, which complement the built-in SMB filesystem in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) protocol. Samba-3.0 features working NT Domain Control capability and includes the SWAT (Samba Web Administration Tool) that allows samba's smb.conf file to be remotely managed using your favourite web browser. For the time being this is being enabled on TCP port 901 via xinetd. SWAT is now included in it's own subpackage, samba-swat. Please refer to the WHATSNEW.txt document for fixup information. This binary release includes encrypted password support. Please read the smb.conf file and ENCRYPTION.txt in the docs directory for implementation details. %package server Summary: Samba (SMB) server programs Requires: %{name}-common = %{EVRD} Requires: %{libwbclient} >= %{EVRD} %if %{with rpmhelper} Requires(pre): rpm-helper %endif Group: Networking/Other Provides: samba = %{EVRD} Provides: samba-server-ldap = %{EVRD} Provides: samba3-server= %{EVRD} %description server Samba-server provides a SMB server which can be used to provide network services to SMB (sometimes called "Lan Manager") clients. Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) protocol. Samba-3.0 features working NT Domain Control capability and includes the SWAT (Samba Web Administration Tool) that allows samba's smb.conf file to be remotely managed using your favourite web browser. For the time being this is being enabled on TCP port 901 via xinetd. SWAT is now included in it's own subpackage, samba-swat. Please refer to the WHATSNEW.txt document for fixup information. This binary release includes encrypted password support. Please read the smb.conf file and ENCRYPTION.txt in the docs directory for implementation details. %package client Summary: Samba (SMB) client programs Group: Networking/Other Requires: %{name}-common = %{EVRD} Requires: cifs-utils >= 4.4 Provides: samba3-client = %{EVRD} %description client Samba-client provides some SMB clients, which complement the built-in SMB filesystem in Linux. These allow the accessing of SMB shares, and printing to SMB printers. %package common Summary: Files used by both Samba servers and clients Group: System/Servers Conflicts: %{name}-server < 3.6.6-2 Provides: samba-common-ldap = %{EVRD} Provides: samba3-common = %{EVRD} %description common Samba-common provides files necessary for both the server and client packages of Samba. %package doc Summary: Documentation for Samba servers and clients Group: System/Servers Requires: %{name}-common = %{EVRD} BuildArch: noarch Provides: samba3-doc = %{EVRD} %description doc Samba-doc provides documentation files for both the server and client packages of Samba. %package swat Summary: The Samba Web Administration Tool Requires: %{name}-server = %{EVRD} Requires: xinetd Group: System/Servers Provides: samba-swat-ldap = %{EVRD} Provides: samba3-swat = %{EVRD} Conflicts: %{name}-server < 3.4.0 Suggests: %{name}-doc %description swat SWAT (the Samba Web Administration Tool) allows samba's smb.conf file to be remotely managed using your favourite web browser. For the time being this is being enabled on TCP port 901 via xinetd. Note that SWAT does not use SSL encryption, nor does it preserve comments in your smb.conf file. Webmin uses SSL encryption by default, and preserves comments in configuration files, even if it does not display them, and is therefore the preferred method for remotely managing Samba. %if %{with winbind} %package winbind Summary: Samba-winbind daemon, utilities and documentation Group: System/Servers Requires: %{name}-common = %{EVRD} %description winbind Provides the winbind daemon and testing tools to allow authentication and group/user enumeration from a Windows or Samba domain controller. %endif %if %{with wins} %package -n nss_wins Summary: Name Service Switch service for WINS Group: System/Servers Requires: %{name}-common = %{EVRD} Requires(pre): glibc %description -n nss_wins Provides the libnss_wins shared library which resolves NetBIOS names to IP addresses. %endif %if %{with test} %package test Summary: Debugging and benchmarking tools for samba Group: System/Servers Requires: %{name}-common = %{EVRD} Provides: samba3-test = %{EVRD} Provides: samba3-debug = %{EVRD} %description test This package provides tools for benchmarking samba, and debugging the correct operation of tools against smb servers. %endif %package -n %{libname} Summary: SMB Client Library Group: System/Libraries Provides: libsmbclient = %{EVRD} %description -n %{libname} This package contains the SMB client library, part of the samba suite of networking software, allowing other software to access SMB shares. %package -n %{libname}-devel Summary: SMB Client Library Development files Group: Development/C Provides: libsmbclient-devel = %{EVRD} Requires: %{libname} = %{EVRD} %description -n %{libname}-devel This package contains the development files for the SMB client library, part of the samba suite of networking software, allowing the development of other software to access SMB shares. %package -n %{libname}-static-devel Summary: SMB Client Static Library Development files Group: Development/C Provides: libsmbclient-static-devel = %{EVRD} Requires: %{libname}-devel = %{EVRD} %description -n %{libname}-static-devel This package contains the static development files for the SMB client library, part of the samba suite of networking software, allowing the development of other software to access SMB shares. %package -n %{libnetapi} Summary: Samba library for accessing functions in 'net' binary Group: System/Libraries %description -n %{libnetapi} Samba library for accessing functions in 'net' binary %package -n %{netapidevel} Group: Development/C Summary: Samba library for accessing functions in 'net' binary Provides: netapi-devel = %{EVRD} %description -n %{netapidevel} Samba library for accessing functions in 'net' binary %package -n %{libsmbsharemodes} Group: System/Libraries Summary: Samba Library for accessing smb share modes (locks etc.) %description -n %{libsmbsharemodes} Samba Library for accessing smb share modes (locks etc.) %package -n %{smbsharemodesdevel} Group: Development/C Summary: Samba Library for accessing smb share modes (locks etc.) Provides: smbsharemodes-devel = %{EVRD} %description -n %{smbsharemodesdevel} Samba Library for accessing smb share modes (locks etc.) %if %{with talloc} %package -n %{libtalloc} Group: System/Libraries Summary: Library implementing Samba's memory allocator %description -n %{libtalloc} Library implementing Samba's memory allocator %package -n %{tallocdevel} Group: Development/C Summary: Library implementing Samba's memory allocator Provides: talloc-devel = %{EVRD} %description -n %{tallocdevel} Library implementing Samba's memory allocator %endif %if %{with tdb} %package -n %{libtdb} Group: System/Libraries Summary: Library implementing Samba's embedded database %description -n %{libtdb} Library implementing Samba's embedded database %package -n %{tdbdevel} Group: Development/C Summary: Library implementing Samba's embedded database Provides: tdb-devel = %{EVRD} Requires: %{libtdb} # because /usr/include/tdb.h was moved from libsmbclient0-devel to libtdb-devel Conflicts: %{mklibname smbclient 0 -d} < 3.2.6-3 %description -n %{tdbdevel} Library implementing Samba's embedded database %endif %package -n %{libwbclient} Group: System/Libraries Summary: Library providing access to winbindd %description -n %{libwbclient} Library providing access to winbindd %package -n %{wbclientdevel} Group: Development/C Summary: Library providing access to winbindd Provides: wbclient-devel = %{EVRD} Requires: %{libwbclient} >= %{EVRD} %description -n %{wbclientdevel} Library providing access to winbindd #%package passdb-ldap #Summary: Samba password database plugin for LDAP #Group: System/Libraries # #%description passdb-ldap #The passdb-ldap package for samba provides a password database #backend allowing samba to store account details in an LDAP #database %if %{with mysql} %package passdb-mysql Summary: Samba password database plugin for MySQL Group: System/Libraries Requires: %{name}-server = %{EVRD} Provides: samba3-passdb-mysql = %{EVRD} %description passdb-mysql The passdb-mysql package for samba provides a password database backend allowing samba to store account details in a MySQL database %endif %if %{with pgsql} %package passdb-pgsql Summary: Samba password database plugin for PostgreSQL Group: System/Libraries Requires: %{name}-server = %{EVRD} Provides: samba3-passdb-pgsql = %{EVRD} %description passdb-pgsql The passdb-pgsql package for samba provides a password database backend allowing samba to store account details in a PostgreSQL database %endif #Antivirus packages: %if %{with antivir} %package vscan-antivir Summary: On-access virus scanning for samba using Antivir Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan %description vscan-antivir A vfs-module for samba to implement on-access scanning using the Antivir antivirus scanner daemon. %endif %if %{with clamav} %package virusfilter-clamav Summary: On-access virus scanning for samba using Clam Antivirus Group: System/Servers URL: https://github.com/fumiyas/samba-virusfilter Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan Provides: %{name}-virusfilter Requires: clamd %description virusfilter-clamav This is a Samba VFS module to scan and filter virus files on Samba file services with an anti-virus scanner. This package includes the VFS module supporting: * ClamAV (clamd daemon) http://www.clamav.net %endif %if %{with fprot} %package vscan-fprot Summary: On-access virus scanning for samba using FPROT Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan %description vscan-fprot A vfs-module for samba to implement on-access scanning using the FPROT antivirus software (which must be installed to use this). %endif %if %{with fsav} %package virusfilter-fsecure Summary: On-access virus scanning for samba using F-Secure Group: System/Servers URL: https://github.com/fumiyas/samba-virusfilter Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan Provides: %{name}-virusfilter %description virusfilter-fsecure This is a Samba VFS module to scan and filter virus files on Samba file services with an anti-virus scanner. This package provides the VFS module supporting: * F-Secure Anti-Virus (fsavd daemon) http://www.f-secure.com %endif %if %{with icap} %package vscan-icap Summary: On-access virus scanning for samba using ICAP Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-icap %description vscan-icap A vfs-module for samba to implement on-access scanning using ICAP-capable antivirus software. %endif %if %{with kaspersky} %package vscan-kaspersky Summary: On-access virus scanning for samba using Kaspersky Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan %description vscan-kaspersky A vfs-module for samba to implement on-access scanning using the Kaspersky antivirus software (which must be installed to use this). %endif %if %{with mks} %package vscan-mks Summary: On-access virus scanning for samba using MKS Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan %description vscan-mks A vfs-module for samba to implement on-access scanning using the MKS antivirus software (which must be installed to use this). %endif %if %{with nai} %package vscan-nai Summary: On-access virus scanning for samba using NAI McAfee Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan %description vscan-nai A vfs-module for samba to implement on-access scanning using the NAI McAfee antivirus software (which must be installed to use this). %endif %if %{with openav} %package vscan-openav Summary: On-access virus scanning for samba using OpenAntivirus Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan %description vscan-openav A vfs-module for samba to implement on-access scanning using the OpenAntivirus antivirus software (which must be installed to use this). %endif %if %{with sophos} %package virusfilter-sophos Summary: On-access virus scanning for samba using Sophos Group: System/Servers URL: https://github.com/fumiyas/samba-virusfilter Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan %description virusfilter-sophos This is a Samba VFS module to scan and filter virus files on Samba file services with an anti-virus scanner. This package includes the VFS module supporting: * Sophos Anti-Virus (savdid daemon) http://www.sophos.com %endif %if %{with symantec} %package vscan-symantec Summary: On-access virus scanning for samba using Symantec Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan Autoreq: 0 %description vscan-symantec A vfs-module for samba to implement on-access scanning using the Symantec antivirus software (which must be installed to use this). %endif %if %{with trend} %package vscan-trend Summary: On-access virus scanning for samba using Trend Group: System/Servers Requires: %{name}-server = %{EVRD} Provides: %{name}-vscan %description vscan-trend A vfs-module for samba to implement on-access scanning using the Trend antivirus software (which must be installed to use this). %endif %package domainjoin-gui Summary: Domainjoin GUI Requires: samba-common = %{EVRD} Group: System/Configuration/Other %description domainjoin-gui The samba-domainjoin-gui package includes a domainjoin gtk application. %prep #Try and validate signatures on source: VERIFYSOURCE=%{SOURCE0} VERIFYSOURCE=${VERIFYSOURCE%%.gz} gzip -dc %{SOURCE0} > $VERIFYSOURCE %check_sig %{SOURCE98} %{SOURCE99} $VERIFYSOURCE %if %{with vscan} %setup -q -a 8 -n %{name}-%{version} %else %setup -q -n %{name}-%{version} %endif # Version specific patches: current version %patch11 -p1 -b .mandriva pushd source3 popd %patch30 -p1 -b .checkflags #patch31 -p1 -b .nss_wins_log %patch33 -p1 -b .netapi_link #patch34 -p1 -b .recursive cp %{SOURCE7} . # Make a copy of examples so that we have a clean one for doc: cp -a examples examples.bin %if %{with vscan} pushd samba-virusfilter-%{vscanver} perl -pi -e 's,/var/run/clamav/clamd.ctl,/var/lib/clamav/clamd.socket,g' clamav/svf-clamav.c popd %endif #remove cvs internal files from docs: find docs examples -name '.cvsignore' -exec rm -f {} \; #make better doc trees: chmod -R a+rX examples docs *Manifest* README Roadmap COPYING mkdir -p clean-docs/samba-doc cp -a examples docs clean-docs/samba-doc mv -f clean-docs/samba-doc/examples/libsmbclient clean-docs/ rm -Rf clean-docs/samba-doc/docs/{docbook,manpages,htmldocs,using_samba} #ln -s %{_datadir}/swat/using_samba clean-docs/samba-doc/docs/using_samba mkdir clean-docs/samba-doc/docs/htmldocs cp docs/htmldocs/*.{html,css} clean-docs/samba-doc/docs/htmldocs ln -sf %{_datadir}/swat/help/{Samba3-ByExample,Samba3-HOWTO,Samba3-Developers-Guide,using_samba,manpages} clean-docs/samba-doc/docs/htmldocs/ %build %serverbuild (cd source3 CFLAGS="`echo "$RPM_OPT_FLAGS"|sed -e 's/ -g / /g'` -DLDAP_DEPRECATED" ./autogen.sh # Don't use --with-fhs now, since it overrides libdir, it sets configdir, # lockdir,piddir logfilebase,privatedir and swatdir %configure2_5x --prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir}/%{name} \ --localstatedir=/var \ --with-modulesdir=%{_libdir}/%{name} \ --with-privatedir=%{_sysconfdir}/%{name} \ --with-lockdir=/var/cache/%{name} \ --with-piddir=/var/run \ --with-swatdir=%{_datadir}/swat \ --with-configdir=%{_sysconfdir}/%{name} \ --with-logfilebase=/var/log/%{name} \ --with-pammodulesdir=/%{_lib}/security/ \ --with-rootsbindir=/bin \ %if %{with talloc} --with-libtalloc=yes \ %else --enable-external-libtalloc=yes \ %endif %if %{with tdb} --with-libtdb = yes \ %else --enable-external-libtdb=yes \ %endif %if %{with ctdb} --with-cluster-support \ %endif %if !%{with ads} --with-ads=no \ %endif --with-automount \ --with-pam \ --with-pam_smbpass \ --with-aio-support \ %if %{with ldap} --with-ldapsam \ %endif --with-syslog \ --with-quotas \ --with-utmp \ %if %{with acl} --with-acl-support \ %endif --with-shared-modules=idmap_rid,idmap_ad \ --enable-avahi \ --with-dnsupdate \ # --with-shared-modules=pdb_ldap,idmap_ldap \ # --with-manpages-langs=en,ja,pl \ # --with-nisplussam \ # --with-fhs \ # Remove -Wl,--no-undefined for plugins: grep ^LDSHFLAGS_MODULES Makefile perl -pi -e 'if ( m/^LDSHFLAGS_MODULES/ ) { $_ =~ s/-Wl,--no-undefined//g;};' Makefile grep ^LDSHFLAGS_MODULES Makefile #Should be a patch instead? %if !%{with talloc} perl -pi -e 's,-I./lib/talloc,,g;s,bin/libtalloc.so,,g;s,^(installlibs:: )installlibtalloc,$1,g' Makefile %endif %if !%{with tdb} perl -pi -e 's,-I./lib/tdb/include,,g;s,bin/libtdb.so,,g;s,^(installlibs:: )installlibtdb,$1,g' Makefile %endif %if !%{with ldb} perl -pi -e 's,\$\(BIN_PROGS4\),,g' Makefile %endif perl -pi -e 's|-Wl,-rpath,%{_libdir}||g;s|-Wl,-rpath -Wl,%{_libdir}||g' Makefile make proto_exists || : %make all libsmbclient smbfilter wins %{?_with_test: torture debug2html bin/log2pcap} bin/smbget make -C lib/netapi/examples ) %if %{with vscan} echo -e "\n\nBuild antivirus VFS modules\n\n" pushd %{vscandir} ./build/autogen.sh %configure2_5x --with-samba-source=../ make popd %endif # Build antivirus vfs objects %if %{with symantec} echo "Building Symantec" make -C %{vfsdir}/%{vscandir} symantec %endif %install #Ensure all docs are readable chmod a+r docs -R # Any entries here mean samba makefile is *really* broken: mkdir -p %{buildroot}%{_sysconfdir}/%{name} mkdir -p %{buildroot}%{_datadir} mkdir -p %{buildroot}%{_libdir}/%{name}/vfs (cd source3 make DESTDIR=%{buildroot} install installclientlib installmodules) # we ship docs in the docs supackage, and lik it into swat, delete the extra copy: rm -Rf %{buildroot}%{_datadir}/swat/using_samba #install -m755 source/bin/smbget %{buildroot}%{_bindir} #need to stay mkdir -p %{buildroot}/{sbin,bin} mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,pam.d,xinetd.d} mkdir -p %{buildroot}%{_initrddir} mkdir -p %{buildroot}/var/cache/%{name} mkdir -p %{buildroot}/var/log/%{name} mkdir -p %{buildroot}/var/run/%{name} mkdir -p %{buildroot}/var/spool/%{name} mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/{netlogon,profiles,printers} mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC} mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/codepages/src mkdir -p %{buildroot}/%{_lib}/security mkdir -p %{buildroot}%{_libdir}/pkgconfig mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_libdir}/%{name}/vfs mkdir -p %{buildroot}%{_datadir}/%{name}/scripts install -m755 source3/bin/lib*.a %{buildroot}%{_libdir}/ # smbsh forgotten #install -m 755 source/bin/smbsh %{buildroot}%{_bindir}/ %if %{with vscan} %makeinstall_std -C %{vscandir} install -m 644 %{vscandir}/etc/*.conf.example %{buildroot}%{_sysconfdir}/%{name} for i in %{buildroot}%{_sysconfdir}/%{name}/*.example do mv $i ${i%%.example} done #mv %{buildroot}%{_datadir}/%{name}/bin/svf-notify %{buildroot}%{_datadir}/%{name}/scripts # script uses ksh, which we don't have rm %{buildroot}%{_datadir}/%{name}/bin/svf-notify perl -pi -e 's,%{_datadir}/%{name}/bin,%{_datadir}/%{name}/scripts,g' %{buildroot}%{_sysconfdir}/%{name}/smb.svf-*.conf %endif #libnss_* still not handled by make: # Install the nsswitch library extension file for i in wins winbind; do install -m755 nsswitch/libnss_${i}.so %{buildroot}/%{_lib}/libnss_${i}.so done # Make link for wins and winbind resolvers ( cd %{buildroot}/%{_lib}; ln -s libnss_wins.so libnss_wins.so.2; ln -s libnss_winbind.so libnss_winbind.so.2) install -d %{buildroot}%{_libdir}/krb5/plugins install -m755 source3/bin/winbind_krb5_locator.so %{buildroot}%{_libdir}/krb5/plugins install -m 755 source3/lib/netapi/examples/bin/netdomjoin-gui %{buildroot}%{_sbindir}/netdomjoin-gui mkdir -p %{buildroot}%{_datadir}/pixmaps/%{name} install -m 644 source3/lib/netapi/examples/netdomjoin-gui/samba.ico %{buildroot}%{_datadir}/pixmaps/%{name}/samba.ico install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo.png %{buildroot}%{_datadir}/pixmaps/%{name}/logo.png install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo-small.png %{buildroot}%{_datadir}/pixmaps/%{name}/logo-small.png %if %{with test} for i in {%{testbin}};do #install -m755 source/bin/${i} %{buildroot}%{_bindir}/${i} done %endif # Install other stuff #install -m644 examples/VFS/recycle/recycle.conf %{buildroot}%{_sysconfdir}/samba/ install -m644 %{SOURCE20} %{buildroot}%{_sysconfdir}/%{name}/smbusers install -m755 %{SOURCE21} %{buildroot}%{_bindir} #install -m755 %{SOURCE22} %{buildroot}/usr/bin install -m755 %{SOURCE23} %{buildroot}%{_bindir} install -m755 %{SOURCE24} %{buildroot}%{_initrddir}/smb install -m755 %{SOURCE24} %{buildroot}%{_sbindir}/%{name} install -m755 %{SOURCE25} %{buildroot}%{_initrddir}/winbind install -m755 %{SOURCE25} %{buildroot}%{_sbindir}/winbind #install -m755 %{SOURCE26} %{buildroot}%{_initrddir}/wrepld install -m644 %{SOURCE28} %{buildroot}%{_sysconfdir}/pam.d/%{name} install -m644 %{SOURCE29} %{buildroot}%{_sysconfdir}/pam.d/system-auth-winbind install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # install pam_winbind.conf sample file mkdir -p %{buildroot}%{_sysconfdir}/security install -m 0644 examples/pam_winbind/pam_winbind.conf %{buildroot}%{_sysconfdir}/security/pam_winbind.conf install -m755 examples/LDAP/convertSambaAccount %{buildroot}%{_datadir}/%{name}/scripts/ # make a conf file for winbind from the default one: cat %{SOURCE30}|sed -e 's/^; winbind/ winbind/g;s/^; obey pam/ obey pam/g;s/ printer admin = @adm/# printer admin = @adm/g; s/^# printer admin = @"D/ printer admin = @"D/g;s/^; password server = \*/ password server = \*/g;s/^; template/ template/g; s/^ security = user/ security = domain/g' > packaging/Mandrake/smb-winbind.conf install -m644 packaging/Mandrake/smb-winbind.conf %{buildroot}%{_sysconfdir}/%{name}/smb-winbind.conf # Some inline fixes for smb.conf for non-winbind use install -m644 %{SOURCE30} %{buildroot}%{_sysconfdir}/%{name}/smb.conf cat %{SOURCE30} | \ sed -e 's/^; printer admin = @adm/ printer admin = @adm/g' >%{buildroot}%{_sysconfdir}/%{name}/smb.conf %if %{with cupspc} perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' %{buildroot}%{_sysconfdir}/%{name}/smb.conf perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' %{buildroot}%{_sysconfdir}/%{name}/smb-winbind.conf %endif echo 127.0.0.1 localhost > %{buildroot}%{_sysconfdir}/%{name}/lmhosts # Link smbspool to CUPS (does not require installed CUPS) mkdir -p %{buildroot}%{_libdir}/cups/backend ln -s %{_bindir}/smbspool%{alternative_major} %{buildroot}%{_libdir}/cups/backend/smb%{alternative_major} # xinetd support mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d install -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xinetd.d/swat # menu support mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/rosa-%{name}-swat.desktop << EOF [Desktop Entry] Name=Samba Configuration (SWAT) Comment=The Swat Samba Administration Tool Exec=www-browser http://localhost:901/ Icon=swat Terminal=false Type=Application StartupNotify=true Categories=X-MandrivaLinux-System-Configuration-Networking; EOF mkdir -p %{buildroot}%{_liconsdir} %{buildroot}%{_iconsdir} %{buildroot}%{_miconsdir} # install html man pages for swat install -d %{buildroot}%{_datadir}/swat/help/manpages #install -m644 docs/htmldocs/manpages-3/* %{buildroot}%{_datadir}/swat/help/manpages install %{SOURCE4} %{buildroot}%{_liconsdir}/swat.png install %{SOURCE5} %{buildroot}%{_iconsdir}/swat.png install %{SOURCE6} %{buildroot}%{_miconsdir}/swat.png install %{SOURCE10} %{buildroot}%{_datadir}/%{name}/scripts/print-pdf install %{SOURCE11} %{buildroot}%{_datadir}/%{name}/scripts/smb-migrate # Client binaries will have suffixes while we use alternatives, even if we are system samba %if %{with alternatives} for OLD in %{buildroot}%{_bindir}/{%{clientbin},eventlogadm} %{buildroot}%{_libdir}/cups/backend/smb do NEW=`echo ${OLD}%{alternative_major}` [ -e $OLD ] && mv -f $OLD $NEW done for OLD in %{buildroot}%{_mandir}/man?/{%{clientbin},eventlogadm}* do if [ -e $OLD ] then BASE=`perl -e '$_="'${OLD}'"; m,(%{buildroot})(.*?)(\.[0-9]),;print "$1$2\n";'` EXT=`echo $OLD|sed -e 's,'${BASE}',,g'` NEW=`echo ${BASE}%{alternative_major}${EXT}` mv $OLD $NEW fi done %endif #Clean up unpackaged files: #for i in %{_bindir}/pam_smbpass.so %{_bindir}/smbwrapper.so;do #rm -f %{buildroot}/$i #done # the binary gets removed ... but not the man page ... rm -f %{buildroot}%{_mandir}/man1/testprns* # (sb) make a smb.conf.clean we can use for the merge, since an existing # smb.conf won't get overwritten cp %{buildroot}%{_sysconfdir}/%{name}/smb.conf %{buildroot}%{_datadir}/%{name}/smb.conf.clean # (sb) leave a README.rosa.conf to explain what has been done cat << EOF > %{buildroot}%{_datadir}/%{name}/README.rosa.conf In order to facilitate upgrading an existing samba install, and merging previous configuration data with any new syntax used by samba3, a merge script has attempted to combine your local configuration data with the new conf file format. The merged data is in smb.conf, with comments like # *** merged from original smb.conf: *** near the additional entries. Any local shares should have been appended to smb.conf. A log of what took place should be in: /var/log/samba/smb-migrate.log A clean samba3 smb.conf is in /usr/share/samba, named smb.conf.clean. Your original conf should be /etc/samba/smb.conf.tomerge. The actual merge script is /usr/share/samba/scripts/smb-migrate. EOF # Development pkgconfig files # 1. Generate the .pc files that are not done automatically # (NB: This does not work when done at the same time as configure above) for i in \ %if %{with talloc} talloc \ %endif %if %{with tdb} tdb \ %endif ; do pushd lib/$i ./autogen.sh -V && %configure2_5x --prefix=%{_prefix} --libdir=%{_libdir} popd install -m 644 lib/$i/$i.pc %{buildroot}%{_libdir}/pkgconfig/ done # 2. Install them for i in smbclient smbsharemodes netapi wbclient; do install -m 644 source3/pkgconfig/$i.pc %{buildroot}%{_libdir}/pkgconfig/ done %if !%{with ldb} rm -f %{buildroot}%{_bindir}/ldb* rm -fr %{buildroot}%{_mandir}/man1/ldbadd.1 rm -fr %{buildroot}%{_mandir}/man1/ldbdel.1 rm -fr %{buildroot}%{_mandir}/man1/ldbedit.1 rm -fr %{buildroot}%{_mandir}/man1/ldbmodify.1 rm -fr %{buildroot}%{_mandir}/man1/ldbrename.1 rm -fr %{buildroot}%{_mandir}/man1/ldbsearch.1 %endif %if %{with test} rm -fr %{buildroot}%{_mandir}/man1/log2pcap*.1* %else rm -fr %{buildroot}%{_mandir}/man1/vfstest*.1* rm -fr %{buildroot}%{_mandir}/man1/log2pcap*.1* %endif rm -fr %{buildroot}%{_mandir}/man8/tdb*.8* %if %{with winbind} %find_lang pam_winbind %endif %find_lang net %if %{with vscan} #rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan*.so %if !%{with antivir} rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-antivir.so rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-antivir.conf %endif %if !%{with clamav} rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-clamav.so rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-clamav.conf %endif %if !%{with fprot} rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-fprotd.so rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-fprotd.conf %endif %if !%{with fsav} rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-fsav.so rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-fsav.conf %endif %if !%{with icap} rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-icap.so rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-icap.conf %endif %if !%{with kaspersky} rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-kavp.so rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-kavp.conf %endif %if !%{with mks} rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-mksd.so rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-mks*.conf %endif %if !%{with nai} rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-mcdaemon.so rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-mcdaemon.conf %endif %if !%{with openav} rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-oav.so rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-oav.conf %endif %if !%{with sophos} rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-sophos.so rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-sophos.conf %endif %if !%{with symantec} rm -rf %{buildroot}%{_sysconfdir}/%{name}/vscan-symantec.conf %endif %if !%{with trend} rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-trend.so rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-trend.conf %endif %endif # these are provided by ldb-utils rm -f %{buildroot}%{_mandir}/man1/ldbadd.1* rm -f %{buildroot}%{_mandir}/man1/ldbdel.1* rm -f %{buildroot}%{_mandir}/man1/ldbedit.1* rm -f %{buildroot}%{_mandir}/man1/ldbmodify.1* rm -f %{buildroot}%{_mandir}/man1/ldbrename.1* rm -f %{buildroot}%{_mandir}/man1/ldbsearch.1* # these are provided by tdb-utils rm -f %{buildroot}%{_mandir}/man8/tdbbackup.8* rm -f %{buildroot}%{_mandir}/man8/tdbdump.8* rm -f %{buildroot}%{_mandir}/man8/tdbtool.8* # these are not built rm -f %{buildroot}%{_mandir}/man1/log2pcap.1* rm -f %{buildroot}%{_mandir}/man1/vfstest.1* %post server #add additional directory for support filesharing through 'net' command mkdir /var/cache/samba/usershares chmod 1770 /var/cache/samba/usershares chown root:users /var/cache/samba/usershares %_post_service smb #%_post_service wrepld # Add a unix group for samba machine accounts groupadd -frg 421 machines # Migrate tdb's from /var/lock/samba (taken from official samba spec file): for i in /var/lock/samba/*.tdb do if [ -f $i ]; then newname=`echo $i | sed -e's|var\/lock\/samba|var\/cache\/samba|'` echo "Moving $i to $newname" mv $i $newname fi done %post common # Basic migration script for pre-2.2.1 users, # since smb config moved from /etc to %{_sysconfdir}/samba # Let's create a proper %{_sysconfdir}/samba/smbpasswd file [ -f %{_sysconfdir}/%{name}/smbpasswd ] || { echo "Creating password file for samba..." touch %{_sysconfdir}/%{name}/smbpasswd } # And this too, in case we don't have smbd to create it for us [ -f /var/cache/%{name}/unexpected.tdb ] || { touch /var/cache/%{name}/unexpected.tdb } # Let's define the proper paths for config files perl -pi -e 's/(\/etc\/)(smb)/\1%{name}\/\2/' %{_sysconfdir}/%{name}/smb.conf # Fix the logrotate.d file from smb and nmb to smbd and nmbd if [ -f %{_sysconfdir}/logrotate.d/samba ]; then perl -pi -e 's/smb /smbd /' %{_sysconfdir}/logrotate.d/samba perl -pi -e 's/nmb /nmbd /' %{_sysconfdir}/logrotate.d/samba fi # And not loose our machine account SID [ -f %{_sysconfdir}/MACHINE.SID ] && mv -f %{_sysconfdir}/MACHINE.SID %{_sysconfdir}/%{name}/ ||: %postun common if [ -f %{_sysconfdir}/%{name}/README.rosa.conf ];then rm -f %{_sysconfdir}/%{name}/README.rosa.conf;fi %if %{with winbind} %post winbind if [ $1 = 1 ]; then /sbin/chkconfig winbind on cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp for i in passwd group;do grep ^$i %{_sysconfdir}/nsswitch.conf |grep -v 'winbind' >/dev/null if [ $? = 0 ];then echo "Adding a winbind entry to the $i section of %{_sysconfdir}/nsswitch.conf" awk '/^'$i'/ {print $0 " winbind"};!/^'$i'/ {print}' %{_sysconfdir}/nsswitch.conf.rpmtemp >%{_sysconfdir}/nsswitch.conf; cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp else echo "$i entry found in %{_sysconfdir}/nsswitch.conf" fi done if [ -f %{_sysconfdir}/nsswitch.conf.rpmtemp ];then rm -f %{_sysconfdir}/nsswitch.conf.rpmtemp;fi fi %preun winbind if [ $1 = 0 ]; then echo "Removing winbind entries from %{_sysconfdir}/nsswitch.conf" perl -pi -e 's/ winbind//' %{_sysconfdir}/nsswitch.conf /sbin/chkconfig winbind reset fi %endif %{with winbind} %if %{with wins} %post -n nss_wins if [ $1 = 1 ]; then cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave grep '^hosts' %{_sysconfdir}/nsswitch.conf |grep -v 'wins' >/dev/null if [ $? = 0 ];then echo "Adding a wins entry to the hosts section of %{_sysconfdir}/nsswitch.conf" awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' %{_sysconfdir}/nsswitch.conf.rpmsave >%{_sysconfdir}/nsswitch.conf; else echo "wins entry found in %{_sysconfdir}/nsswitch.conf" fi # else # echo "Upgrade, leaving nsswitch.conf intact" fi %preun -n nss_wins if [ $1 = 0 ]; then echo "Removing wins entry from %{_sysconfdir}/nsswitch.conf" perl -pi -e 's/ wins//' %{_sysconfdir}/nsswitch.conf #else # echo "Leaving %{_sysconfdir}/nsswitch.conf intact" fi %endif %{with wins} %preun server %_preun_service smb #%_preun_service wrepld #if [ $1 = 0 ] ; then # /sbin/chkconfig --level 35 smb reset # Let's not loose /var/cache/samba # # if [ -d /var/cache/%{name} ]; then # mv -f /var/cache/%{name} /var/cache/%{name}.BAK # fi #fi %post swat if [ -f /var/lock/subsys/xinetd ]; then service xinetd reload >/dev/null 2>&1 || : fi %postun swat # Remove swat entry from xinetd if [ $1 = 0 -a -f %{_sysconfdir}/xinetd.conf ] ; then rm -f %{_sysconfdir}/xinetd.d/swat service xinetd reload &>/dev/null || : fi if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi %if %{with alternatives} %post client update-alternatives --install %{_bindir}/smbclient smbclient \ %{_bindir}/smbclient%{alternative_major} 10 \ $(for i in %{_bindir}/{%{clientbin},eventlogadm};do j=`basename $i` [ "$j" = "smbclient" ] || \ echo -n " --slave ${i} ${j} ${i}%{alternative_major}";done) \ $(for i in %{_mandir}/{%{client_man}};do echo -n " --slave ${i}%{_extension} `basename $i` ${i%%.?}%{alternative_major}.${i##*.}%{_extension}";done) \ --slave %{_libdir}/cups/backend/smb cups_smb %{_libdir}/cups/backend/smb%{alternative_major} || \ update-alternatives --auto smbclient %preun client [ $1 = 0 ] && update-alternatives --remove smbclient %{_bindir}/smbclient%{alternative_major} ||: %endif %if %{with alternatives} %triggerpostun client -- samba-client, samba2-client [ ! -e %{_bindir}/smbclient ] && update-alternatives --auto smbclient || : %endif %files server %(for i in %{_sbindir}/{%{serversbin}};do echo $i;done) %(for i in %{_bindir}/{%{serverbin}%{?serverldbbin:,%serverldbbin}};do echo $i;done) %attr(755,root,root) /%{_lib}/security/pam_smbpass* %dir %{_libdir}/%{name}/vfs %{_libdir}/%{name}/vfs/acl*.so %{_libdir}/%{name}/vfs/aio_fork.so %{_libdir}/%{name}/vfs/fileid.so %{_libdir}/%{name}/vfs/fake_perms.so %{_libdir}/%{name}/vfs/extd_audit.so %{_libdir}/%{name}/vfs/expand_msdfs.so %{_libdir}/%{name}/vfs/dirsort.so %{_libdir}/%{name}/vfs/default_quota.so %{_libdir}/%{name}/vfs/crossrename.so %{_libdir}/%{name}/vfs/catia.so %{_libdir}/%{name}/vfs/cap.so %{_libdir}/%{name}/vfs/audit.so %{_libdir}/%{name}/vfs/shadow*.so %{_libdir}/%{name}/vfs/scannedonly.so %{_libdir}/%{name}/vfs/recycle.so %{_libdir}/%{name}/vfs/read*.so %{_libdir}/%{name}/vfs/preopen.so %{_libdir}/%{name}/vfs/notify_fam.so %{_libdir}/%{name}/vfs/netatalk.so %{_libdir}/%{name}/vfs/linux_xfs_sgid.so %{_libdir}/%{name}/vfs/full_audit.so %{_libdir}/%{name}/vfs/smb_traffic_analyzer.so %{_libdir}/%{name}/vfs/time_audit.so %{_libdir}/%{name}/vfs/syncops.so %{_libdir}/%{name}/vfs/stream*.so %{_libdir}/%{name}/vfs/xattr_tdb.so %dir %{_libdir}/%{name}/pdb %{_libdir}/%{name}/auth %dir %{_libdir}/%{name}/nss_info %{_libdir}/%{name}/nss_info/rfc2307.so %{_libdir}/%{name}/nss_info/sfu*.so %config(noreplace) %{_sysconfdir}/%{name}/smbusers %config(noreplace) %{_initrddir}/smb %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %(for i in %{_mandir}/man?/{%{serverbin}%{?serverldbbin:,%serverldbbin},%{serversbin}}\.[0-9]\\*;do echo $i|grep -v mkntpwd;done) %attr(775,root,adm) %dir %{_localstatedir}/lib/%{name}/netlogon %attr(755,root,root) %dir %{_localstatedir}/lib/%{name}/profiles %attr(755,root,root) %dir %{_localstatedir}/lib/%{name}/printers %attr(2775,root,adm) %dir %{_localstatedir}/lib/%{name}/printers/* %attr(1777,root,root) %dir /var/spool/%{name} %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/scripts %attr(0755,root,root) %{_datadir}/%{name}/scripts/* %exclude %{_datadir}/%{name}/scripts/smb-migrate %{_mandir}/man8/idmap_*.8* %{_mandir}/man8/vfs_*.8* %files doc %doc README COPYING Manifest Read-Manifest-Now %doc WHATSNEW.txt Roadmap %doc README.%{name}-rosa-rpm %doc clean-docs/samba-doc/docs/* %doc clean-docs/samba-doc/examples %{_datadir}/swat/help/ %files swat %config(noreplace) %{_sysconfdir}/xinetd.d/swat %{_sbindir}/swat %{_datadir}/applications/rosa-%{name}-swat.desktop %{_miconsdir}/*.png %{_liconsdir}/*.png %{_iconsdir}/*.png %{_datadir}/swat/images/ %{_datadir}/swat/include/ %lang(ja) %{_datadir}/swat/lang/ja %lang(tr) %{_datadir}/swat/lang/tr %{_mandir}/man8/swat*.8* %lang(de) %{_libdir}/%{name}/de.msg %lang(en) %{_libdir}/%{name}/en.msg %lang(fr) %{_libdir}/%{name}/fr.msg %lang(it) %{_libdir}/%{name}/it.msg %lang(ja) %{_libdir}/%{name}/ja.msg %lang(nl) %{_libdir}/%{name}/nl.msg %lang(pl) %{_libdir}/%{name}/pl.msg %lang(tr) %{_libdir}/%{name}/tr.msg %lang(fi) %{_libdir}/%{name}/fi.msg %lang(ru) %{_libdir}/%{name}/ru.msg %files client %(for i in %{_bindir}/{%{clientbin},eventlogadm}%{alternative_major};do echo $i;done) %(for i in %{_mandir}/man?/{%{clientbin}}%{alternative_major}.\\?.\\*;do echo $i|grep -v smbprint;done) %{_mandir}/man5/smbgetrc%{alternative_major}.5* %{_mandir}/man8/eventlogadm3.8* # Link of smbspool to CUPS %{_libdir}*/cups/backend/smb%{alternative_major} %files common -f net.lang %dir /var/cache/%{name} %dir /var/log/%{name} %dir /var/run/%{name} %(for i in %{_bindir}/{%{commonbin}};do echo $i;done) %(for i in %{_mandir}/man?/{%{commonbin}}\.[0-9]\\*;do echo $i;done) %dir %{_libdir}/%{name} %{_libdir}/%{name}/*.dat %{_libdir}/%{name}/charset %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/smb.conf %config(noreplace) %{_sysconfdir}/%{name}/smb-winbind.conf %config(noreplace) %{_sysconfdir}/%{name}/lmhosts %dir %{_localstatedir}/lib/%{name} %{_localstatedir}/lib/%{name}/codepages %{_mandir}/man5/smb.conf*.5* %{_mandir}/man5/lmhosts*.5* %dir %{_datadir}/swat %attr(0750,root,adm) %{_datadir}/%{name}/scripts/smb-migrate %{_datadir}/%{name}/smb.conf.clean %{_datadir}/%{name}/README.rosa.conf %if %{with winbind} %files winbind -f pam_winbind.lang %config(noreplace) %{_sysconfdir}/security/pam_winbind.conf %{_sbindir}/winbindd %{_sbindir}/winbind %{_bindir}/wbinfo %attr(755,root,root) /%{_lib}/security/pam_winbind* %attr(755,root,root) /%{_lib}/libnss_winbind* %{_libdir}/%{name}/idmap %{_libdir}/krb5/plugins/winbind_krb5_locator.so %config(noreplace) %{_initrddir}/winbind %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind* %{_mandir}/man8/winbindd*.8* %{_mandir}/man8/pam_winbind.8* %{_mandir}/man5/pam_winbind.conf.5.* %{_mandir}/man7/winbind_krb5_locator.7.* %{_mandir}/man1/wbinfo*.1* %{_mandir}/man1/dbwrap*.1* %endif %if %{with wins} %files -n nss_wins %attr(755,root,root) /%{_lib}/libnss_wins.so* %endif %if %{with test} %files test %(for i in %{_bindir}/{%{testbin}};do echo $i;done) %{_mandir}/man1/vfstest*.1* %endif %files -n %{libname} %{_libdir}/libsmbclient.so.%{libsmbmajor} %files -n %{libname}-devel %{_includedir}/libsmbclient.h %{_libdir}/libsmbclient.so %doc clean-docs/libsmbclient/* %{_mandir}/man7/libsmbclient.7* %{_libdir}/pkgconfig/smbclient.pc %files -n %{libname}-static-devel %{_libdir}/lib*.a %files -n %{libnetapi} %{_libdir}/libnetapi.so.%{netapimajor}* %files -n %{netapidevel} %{_libdir}/libnetapi*.so %{_includedir}/netapi.h %{_libdir}/pkgconfig/netapi.pc %files -n %{libsmbsharemodes} %{_libdir}/libsmbsharemodes.so.%{smbsharemodesmajor}* %files -n %{smbsharemodesdevel} %{_libdir}/libsmbsharemodes.so %{_includedir}/smb_share_modes.h %{_libdir}/pkgconfig/smbsharemodes.pc %if %{with talloc} %files -n %{libtalloc} %{_libdir}/libtalloc.so.%{tallocmajor}* %files -n %{tallocdevel} %{_libdir}/libtalloc.so %{_includedir}/talloc.h %{_libdir}/pkgconfig/talloc.pc %endif %if %{with tdb} %files -n %{libtdb} %{_libdir}/libtdb.so.%{tdbmajor}* %files -n %{tdbdevel} %{_libdir}/libtdb.so %{_includedir}/tdb.h %{_libdir}/pkgconfig/tdb.pc %endif %files -n %{libwbclient} %{_libdir}/libwbclient.so.%{wbclientmajor} %files -n %{wbclientdevel} %{_libdir}/libwbclient.so %{_includedir}/wbclient.h %{_libdir}/pkgconfig/wbclient.pc #%files passdb-ldap #%{_libdir}/%{name}/*/*ldap.so %if %{with mysql} %files passdb-mysql %{_libdir}/%{name}/pdb/*mysql.so %endif %if %{with pgsql} %files passdb-pgsql %{_libdir}/%{name}/pdb/*pgsql.so %endif #Files for antivirus support: %if %{with antivir} %files vscan-antivir %{_libdir}/%{name}/vfs/vscan-antivir.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-antivir.conf %endif %if %{with clamav} %files virusfilter-clamav %{_libdir}/%{name}/vfs/svf-clamav.so %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-clamav.conf %endif %if %{with fprot} %files vscan-fprot %{_libdir}/%{name}/vfs/vscan-fprotd.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-fprotd.conf %doc %{vfsdir}/%{vscandir}/INSTALL %endif %if %{with fsav} %files virusfilter-fsecure %{_libdir}/%{name}/vfs/svf-fsav.so %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-fsav.conf %endif %if %{with icap} %files vscan-icap %{_libdir}/%{name}/vfs/vscan-icap.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-icap.conf %doc %{vfsdir}/%{vscandir}/INSTALL %endif %if %{with kaspersky} %files vscan-kaspersky %{_libdir}/%{name}/vfs/vscan-kavp.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-kavp.conf %doc %{vfsdir}/%{vscandir}/INSTALL %endif %if %{with mks} %files vscan-mks %{_libdir}/%{name}/vfs/vscan-mksd.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-mks*.conf %doc %{vfsdir}/%{vscandir}/INSTALL %endif %if %{with nai} %files vscan-nai %{_libdir}/%{name}/vfs/vscan-mcdaemon.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-mcdaemon.conf %doc %{vfsdir}/%{vscandir}/INSTALL %endif %if %{with openav} %files vscan-openav %{_libdir}/%{name}/vfs/vscan-oav.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-oav.conf %doc %{vfsdir}/%{vscandir}/INSTALL %endif %if %{with sophos} %files virusfilter-sophos %{_libdir}/%{name}/vfs/svf-sophos.so %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-sophos.conf %endif %if %{with symantec} %files vscan-symantec %{_libdir}/%{name}/vfs/vscan-symantec.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-symantec.conf %doc %{vfsdir}/%{vscandir}/INSTALL %endif %if %{with trend} %files vscan-trend %{_libdir}/%{name}/vfs/vscan-trend.so %config(noreplace) %{_sysconfdir}/%{name}/vscan-trend.conf %doc %{vfsdir}/%{vscandir}/INSTALL %endif %files domainjoin-gui %{_sbindir}/netdomjoin-gui %dir %{_datadir}/pixmaps/samba %{_datadir}/pixmaps/samba/samba.ico %{_datadir}/pixmaps/samba/logo.png %{_datadir}/pixmaps/samba/logo-small.png