/[packages]/cauldron/samba/current/SPECS/samba.spec
ViewVC logotype

Diff of /cauldron/samba/current/SPECS/samba.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 852307 by remmy, Tue Jul 7 11:00:21 2015 UTC revision 854335 by neoclust, Wed Jul 15 14:16:29 2015 UTC
# Line 1  Line 1 
1  %define pkg_name        samba  # rpmbuild --rebuild --with testsuite --without clustering samba.src.rpm
2  %define version         3.6.25  #
3  %define rel             2  # The testsuite is disabled by default. Set --with testsuite or %bcond_without
4  #define subrel          1  # to run the Samba torture testsuite.
5  %define vscanver        0.1.3  %bcond_with testsuite
6  %define libsmbmajor     0  # ctdb is enabled by default, you can disable it with: --without clusterin
7  %define netapimajor     0  %bcond_without clustering
 %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 \  
   
   
 # Samba has started using -Wl,z,nodefs upstream, without libtool (after patch  
 # submission to them, handled in samba bug 6792. To allow  
 # plugins to link now, we have to avoid any such flags by default  
 #define _disable_ld_no_undefined 1  
 # or, instead, filter them out of the right line in the Makefile, like before  
 # see LDSHFLAGS_MODULES below  
   
 %{!?lib: %global lib lib}  
 %{!?mklibname: %global mklibname(ds) %lib%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}}  
   
 %{?!mga_ver:%global mga_ver(r:) %{-r:%(perl -e '$_="%{1}";m/(((\\d\\.?)+)(\\w\*))(.\*)/;$pre=$4;print "0.$pre." if $pre =~ /\\w\{2,\}/;print "%{-r*}"')}%{!-r:%(perl -e '$_="%{1}";m/(((\\d\\.?)+)(\\w\*))(.\*)/;$pre=$4;print "$2";print $pre if $pre !~ /\\w{2,}/')}}  
   
 %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  
   
 # Version and release replaced by samba-team at release from samba cvs  
 %define pversion PVERSION  
 %define prelease PRELEASE  
   
 #Check to see if p(version|release) has been replaced (1 if replaced)  
 %define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)  
   
 %if %have_pversion  
 %define source_ver      %{pversion}  
 %define rel %mkrel 1.%{prelease}  
 # Don't abort for stupid reasons on builds from tarballs:  
 %global _unpackaged_files_terminate_build       0  
 %global _missing_doc_files_terminate_build      0  
 %else  
 %define source_ver      %{version}  
 %endif  
8    
 %define prerel %mga_ver -r %rel %source_ver  
 %define real_version %mga_ver %source_ver  
 %define release %mkrel %prerel  
 %define have_pre %([ "%version" == "%source_ver" ]; echo $?)  
   
 # Check to see if we are running a build from a tarball release from samba.org  
 # (%have_pversion) If so, disable vscan, unless explicitly requested  
 # (--with vscan).  
 %define build_vscan     1  
 %if %have_pversion  
 %define build_vscan     0  
 %{?_with_vscan: %define build_vscan 1}  
 %endif  
   
 # Default options  
 %define build_talloc 0  
 %define build_tdb 0  
 %define build_ldb 0  
 %define build_ctdb 1  
 %define build_alternatives      1  
 %define build_system    1  
 %define build_acl       1  
 %define build_winbind   1  
 %define build_wins      1  
 %define build_ldap      0  
 %define build_ads       1  
 %define build_scanners  0  
 %define build_test      0  
 # CUPS supports functionality for 'printcap name = cups' (9.0 and later):  
 %define build_cupspc    1  
 # %_{pre,postun}_service are provided by rpm-helper in 9.0 and later  
 %define have_rpmhelper  1  
 %define build_mysql     0  
 %define build_pgsql     0  
   
 # Allow commandline option overrides (borrowed from Vince's qmail srpm):  
 # To use it, do rpm [-ba|--rebuild] --with 'xxx'  
 # Check if the rpm was built with the defaults, otherwise we inform the user  
 %define build_non_default 0  
 %{?_with_system: %global build_system 1}  
 %{?_without_system: %global build_system 0}  
 %{?_with_acl: %global build_acl 1}  
 %{?_with_acl: %global build_non_default 1}  
 %{?_without_acl: %global build_acl 0}  
 %{?_without_acl: %global build_non_default 1}  
 %{?_with_winbind: %global build_winbind 1}  
 %{?_with_winbind: %global build_non_default 1}  
 %{?_without_winbind: %global build_winbind 0}  
 %{?_without_winbind: %global build_non_default 1}  
 %{?_with_wins: %global build_wins 1}  
 %{?_with_wins: %global build_non_default 1}  
 %{?_without_wins: %global build_wins 0}  
 %{?_without_wins: %global build_non_default 1}  
 %{?_with_ldap: %global build_ldap 1}  
 %{?_with_ldap: %global build_non_default 1}  
 %{?_without_ldap: %global build_ldap 0}  
 %{?_without_ldap: %global build_non_default 1}  
 %{?_with_ads: %global build_ads 1}  
 %{?_with_ads: %global build_non_default 1}  
 %{?_without_ads: %global build_ads 0}  
 %{?_without_ads: %global build_non_default 1}  
 %{?_with_scanners: %global build_scanners 1}  
 %{?_with_scanners: %global build_non_default 1}  
 %{?_without_scanners: %global build_scanners 0}  
 %{?_without_scanners: %global build_non_default 1}  
 %{?_with_vscan: %global build_vscan 1}  
 %{?_with_vscan: %global build_non_default 1}  
 %{?_without_vscan: %global build_vscan 0}  
 %{?_without_vscan: %global build_non_default 1}  
 %{?_with_test: %global build_test 1}  
 %{?_with_test: %global build_non_default 1}  
 %{?_without_test: %global build_test 0}  
 %{?_without_test: %global build_non_default 1}  
 %{?_with_mysql: %global build_mysql 1}  
 %{?_with_pgsql: %global build_pgsql 1}  
 # As if that weren't enough, we're going to try building with antivirus  
 # support as an option also  
 %global build_antivir   0  
 %global build_clamav    0  
 %global build_fprot     0  
 %global build_fsav      0  
 %global build_icap      0  
 %global build_kaspersky 0  
 %global build_mks       0  
 %global build_nai       0  
 %global build_openav    0  
 %global build_sophos    0  
 %global build_symantec  0  
 %global build_trend     0  
 %if %build_vscan  
 # These we build by default  
 %global build_clamav    1  
 %global build_icap      0  
 %global build_fsav      1  
 %global build_sophos    1  
 %endif  
 %if %build_vscan && %build_scanners  
 # These scanners are built if scanners are selected  
 # symantec requires their library present and must be selected  
 # individually  
 %global build_fprot     1  
 %global build_kaspersky 1  
 %global build_mks       1  
 %global build_nai       1  
 %global build_openav    1  
 %global build_trend     1  
 %endif  
 %if %build_vscan  
 %{?_with_fprot: %{expand: %%global build_fprot 1}}  
 %{?_with_kaspersky: %{expand: %%global build_kaspersky 1}}  
 %{?_with_mks: %{expand: %%global build_mks 1}}  
 %{?_with_openav: %{expand: %%global build_openav 1}}  
 %{?_with_sophos: %{expand: %%global build_sophos 1}}  
 #%{?_with_symantec: %{expand: %%global build_symantec 1}}  
 %{?_with_trend: %{expand: %%global build_trend 1}}  
 %global vscandir samba-virusfilter-%{vscanver}  
 %endif  
 %global vfsdir examples.bin/VFS  
   
 #Standard texts for descriptions:  
 %define message_bugzilla() %(echo -e -n "Please file bug reports for this package at Mageia bugzilla \\n(http://bugs.mageia.org) under the product name %{1}")  
 %define message_system %(echo -e -n "NOTE: These packages of samba-%{version}, are provided, parallel installable\\nwith samba-2.2.x, to allow easy migration from samba-2.2.x to samba-%{version},\\nbut are not officially supported")  
   
 #check gcc version to disable some optimisations on gcc-3.3.1  
 # gcc is not mandatory to do rpm queries on a .src.rpm, which is what the buildsystem  
 # ends up doing, so we need to guard against that  
 %define gcc331 %((gcc -dumpversion 2>/dev/null || echo 4.1.2) |awk '{if ($1>3.3) print 1; else print 0}')  
   
 #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 %build_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  
9    
 %global testbin         debug2html,smbtorture,msgtest,masktest,locktest,locktest2,nsstest,vfstest  
10    
11  %ifarch alpha  %define major 1
12  %define build_expsam xml  %define wbclientmajor   0
13  %else  %define smbclientmajor  0
14  %define build_expsam xml%{?_with_pgsql:,pgsql}%{?_with_mysql:,mysql}  %define testmajor       0
15  %endif  %define dcmajor 0
16    
 # Determine whether this is the system samba or not.  
 %if %build_system  
 %define samba_major     %{nil}  
 %else  
 %define samba_major     3  
 %endif  
 # alternatives_major is %{nil} if we aren't system and not using alternatives  
 %if !%build_system || %build_alternatives  
 %define alternative_major 3  
 %else  
 %define alternative_major %{nil}  
 %endif  
17    
18  Summary: Samba SMB server  %define libname %mklibname %{name} %{major}
19  Name: %{pkg_name}%{samba_major}  %define develname %mklibname %{name} -d
20    %define libwbclient %mklibname wbclient %{wbclientmajor}
21    %define wbclientdevel %mklibname wbclient -d
22    
23  Version: %{source_ver}  %define libsmbclient %mklibname smbclient %{smbclientmajor}
24  Release: %mkrel %rel  %define smbclientdevel %mklibname smbclient -d
25    
26  License: GPLv3  %define libtest %mklibname %{name}-test %{testmajor}
27  Group: System/Servers  %define testdevel %mklibname %{name}-test -d
 Source: http://ftp.samba.org/pub/samba/stable/samba-%{source_ver}.tar.gz  
 Source99: http://ftp.samba.org/pub/samba/stable/samba-%{source_ver}.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}-mageia-rpm  
 Source8: https://github.com/downloads/fumiyas/samba-virusfilter/samba-virusfilter-%{vscanver}.tar.bz2  
 %if %build_vscan  
 %endif  
 %if %build_vscan  
 BuildRequires: file-devel  
 %endif  
 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  
 Source31:       %{name}-tmpfiles.conf  
   
   
 %if !%have_pversion  
 # Version specific patches: current version  
 Patch11: samba-3.0-mageia-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  
 Patch34: samba-3.6.23-readline.patch  
 %else  
 # Version specific patches: upcoming version  
 %endif  
 # Limbo patches (applied to prereleases, but not preleases, ie destined for  
 # samba CVS)  
 %if %have_pversion && %have_pre  
 %endif  
 Requires: pam >= 0.64, samba-common = %{version}  
 BuildRequires: pam-devel  
 BuildRequires: readline-devel  
 BuildRequires: libncurses-devel  
 BuildRequires: popt-devel  
 BuildRequires: libxml2-devel  
 # 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: avahi-client-devel  
 BuildRequires: libaio-devel  
 BuildRequires: libuuid-devel  
 %if %build_ctdb  
 BuildRequires: ctdb-devel >= 1.0.114.4  
 %endif  
 %if %build_pgsql  
 BuildRequires: postgresql-devel  
 %endif  
 %ifnarch alpha  
 %if %build_mysql  
 BuildRequires: mysql-devel  
 %endif  
 %endif  
 %if %build_acl  
 BuildRequires: libacl-devel  
 %endif  
 BuildRequires: libcups-devel  
 BuildRequires: cups-common  
 BuildRequires: libldap-devel  
 %if %build_ads  
 BuildRequires: libldap-devel  
 BuildRequires: krb5-devel  
 %endif  
 BuildRequires: keyutils-devel  
 %if !%build_tdb  
 BuildRequires: tdb-devel  
 %endif  
 %if !%build_ldb  
 #BuildRequires: ldb-devel  
 %endif  
 %if !%build_talloc  
 BuildRequires: talloc-devel  
 %endif  
 BuildRequires: tevent-devel  
 # for domain-join gui  
 BuildRequires: gtk2-devel  
 Requires(pre): chkconfig mktemp psmisc  
 Requires(pre): coreutils sed grep  
28    
29  %description  %define libsdc %mklibname %{name}-dc %{dcmajor}
30  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.  
 %if %have_pversion  
 %message_bugzilla samba3  
 %endif  
 %if !%build_system  
 %message_system  
 %endif  
 %if %build_non_default  
 WARNING: This RPM was built with command-line options. Please  
 see README.%{name}-mageia-rpm in the documentation for  
 more information.  
 %endif  
   
 %package server  
 URL:    http://www.samba.org  
 Summary: Samba (SMB) server programs  
 Requires: %{name}-common = %{version}  
 Requires: %libwbclient >= %{version}  
 %if %have_rpmhelper  
 Requires(pre):          rpm-helper  
 %endif  
 Group: Networking/Other  
 %if %build_system  
 Provides: samba  
 Obsoletes: samba  
 Provides:  samba-server-ldap  
 Obsoletes: samba-server-ldap  
 Provides:  samba3-server  
 Obsoletes: samba3-server  
 %else  
 #Provides: samba-server  
 %endif  
31    
32  %description server  %define samba_version 4.1.17
33  Samba-server provides a SMB server which can be used to provide  %define talloc_version 2.1.1
34  network services to SMB (sometimes called "Lan Manager")  %define ntdb_version 0.9
35  clients. Samba uses NetBIOS over TCP/IP (NetBT) protocols  %define tdb_version 1.2.12
36  and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)  %define tevent_version 0.9.21
37  protocol.  %define ldb_version 1.1.16
   
 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.  
 %if %have_pversion  
 %message_bugzilla samba3-server  
 %endif  
 %if !%build_system  
 %message_system  
 %endif  
   
 %package client  
 URL:    http://www.samba.org  
 Summary: Samba (SMB) client programs  
 Group: Networking/Other  
 Requires: %{name}-common = %{version}  
 Requires: cifs-utils >= 4.4  
 Requires(post): update-alternatives  
 # virtual provides for drakxtools-backend  
 Provides: smb-client = %{version}  
 %if %build_alternatives  
 #Conflicts:     samba-client < 2.2.8a-9mdk  
 %endif  
 %if %build_system  
 Provides:  samba3-client  
 Obsoletes: samba3-client  
 Obsoletes: smbfs  
 %else  
 #Provides: samba-client  
 %endif  
 %if !%build_system && %build_alternatives  
 Provides: samba-client  
 %endif  
38    
 %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.  
 %if %have_pversion  
 %message_bugzilla samba3-client  
 %endif  
 %if !%build_system  
 %message_system  
 %endif  
39    
40  %package common  %global with_libsmbclient 1
41  URL:    http://www.samba.org  %global with_libwbclient 1
 Summary: Files used by both Samba servers and clients  
 Group: System/Servers  
 Conflicts: %{name}-server < 3.6.6-2  
 Requires(post): systemd >= %{systemd_required_version}  
 %if %build_system  
 Provides:  samba-common-ldap  
 Obsoletes: samba-common-ldap  
 Provides:  samba3-common  
 Obsoletes: samba3-common  
 %else  
 #Provides: samba-common  
 %endif  
42    
43  %description common  %global with_pam_smbpass 0
44  Samba-common provides files necessary for both the server and client  %global with_internal_talloc 0
45  packages of Samba.  %global with_internal_tevent 0
46  %if %have_pversion  %global with_internal_tdb 0
47  %message_bugzilla samba3-common  %global with_internal_ntdb 1
48  %endif  %global with_internal_ldb 0
 %if !%build_system  
 %message_system  
 %endif  
49    
50  %package doc  %global with_profiling 1
51  URL:    http://www.samba.org  %global with_vfs_glusterfs 1
 Summary: Documentation for Samba servers and clients  
 Group: System/Servers  
 Requires: %{name}-common = %{version}  
 BuildArch: noarch  
 %if %build_system  
 Obsoletes: samba3-doc  
 Provides:  samba3-doc  
 %else  
 #Provides: samba-doc  
 %endif  
52    
 %description doc  
 Samba-doc provides documentation files for both the server and client  
 packages of Samba.  
 %if %have_pversion  
 %message_bugzilla samba3-doc  
 %endif  
 %if !%build_system  
 %message_system  
 %endif  
53    
54  %package swat  %global with_mitkrb5 0
55  URL:    http://www.samba.org  %global with_dc 1
 Summary: The Samba Web Administration Tool  
 Requires: %{name}-server = %{version}  
 Requires: xinetd  
 Group: System/Servers  
 %if %build_system  
 Provides:  samba-swat-ldap  
 Obsoletes: samba-swat-ldap  
 Provides:  samba3-swat  
 Obsoletes: samba3-swat  
 %else  
 #Provides: samba-swat  
 %endif  
 Conflicts: %{name}-server < 3.4.0  
 Recommends: %{name}-doc  
56    
57  %description swat  %if %{with testsuite}
58  SWAT (the Samba Web Administration Tool) allows samba's smb.conf file  # The testsuite only works with a full build right now.
59  to be remotely managed using your favourite web browser. For the time  %global with_mitkrb5 0
60  being this is being enabled on TCP port 901 via xinetd. Note that  %global with_dc 1
 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 %have_pversion  
 %message_bugzilla samba3-swat  
 %endif  
 %if !%build_system  
 %message_system  
61  %endif  %endif
62    
63  %if %build_winbind  %global with_clustering_support 0
 %package winbind  
 URL:    http://www.samba.org  
 Summary: Samba-winbind daemon, utilities and documentation  
 Group: System/Servers  
 Requires: %{name}-common = %{version}  
 %endif  
 %if %build_winbind && !%build_system  
 Conflicts: samba-winbind  
 %endif  
 %if %build_winbind  
 %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 %have_pversion  
 %message_bugzilla samba3-winbind  
 %endif  
 %if !%build_system  
 %message_system  
 %endif  
64    
65  %if %build_wins  %if %{with clustering}
66  %package -n nss_wins%{samba_major}  %global with_clustering_support 1
 URL:    http://www.samba.org  
 Summary: Name Service Switch service for WINS  
 Group: System/Servers  
 Requires: %{name}-common = %{version}  
 Requires(pre): glibc  
 %endif  
 %if %build_wins && !%build_system  
 Conflicts: nss_wins  
 %endif  
 %if %build_wins  
 %description -n nss_wins%{samba_major}  
 Provides the libnss_wins shared library which resolves NetBIOS names to  
 IP addresses.  
 %endif  
 %if %have_pversion  
 %message_bugzilla nss_wins3  
 %endif  
 %if !%build_system  
 %message_system  
67  %endif  %endif
68    
69  %if %build_test  Name:           samba4
70  %package test  Version:        %{samba_version}
71  URL:    http://www.samba.org  Release:        %mkrel 5
 Summary: Debugging and benchmarking tools for samba  
 Group: System/Servers  
 Requires: %{name}-common = %{version}  
 %endif  
 %if %build_system && %build_test  
 Provides:  samba3-test samba3-debug  
 Obsoletes: samba3-test samba3-debug  
 %endif  
 %if !%build_system && %{build_test}  
 Provides: samba-test samba3-debug  
 Obsoletes: samba3-debug  
 %endif  
 %if %{build_test}  
72    
73  %description test  %define samba_depver %{version}-%{release}
 This package provides tools for benchmarking samba, and debugging  
 the correct operation of tools against smb servers.  
 %endif  
74    
75  %if %build_system  Summary:        Server and Client software to interoperate with Windows machines
76  %package -n %{libname}  License:        GPLv3+ and LGPLv3+
77  URL:            http://www.samba.org  Group:          System/Servers
78  Summary:        SMB Client Library  URL:            http://www.samba.org/
79  Group:          System/Libraries  Source0:        samba-%{version}.tar.gz
 Provides:       libsmbclient  
80    
81  %description -n %{libname}  # Red Hat specific replacement-files
82  This package contains the SMB client library, part of the samba  Source1:        samba.log
83  suite of networking software, allowing other software to access  Source2:        samba.xinetd
84  SMB shares.  #There is now in samba4 a provision script that has to be used
85  %endif  #Source4:               smb.conf.default
86  %if %have_pversion && %build_system  Source5:        pam_winbind.conf
87  %message_bugzilla %{libname}  Source6:        samba.pamd
88  %endif  Source7:        samba4-tempfiles.conf
89    
90  %if %build_system  Source200:      README.dc
91  %package -n %{libname}-devel  Source201:      README.downgrade
92  URL:            http://www.samba.org  Patch0:         systemd.patch
93  Summary:        SMB Client Library Development files  Patch1:         samba-4.1.14-fix-start-order.patch
94  Group:          Development/C  Patch2:         samba-4.1.17-rodc-fix-p4226.patch
 Provides:       libsmbclient-devel = %{version}-%{release}  
 Requires:       %{libname} = %{version}-%{release}  
95    
96  %description -n %{libname}-devel  Requires(pre):    rpm-helper >= %{rpmhelper_required_version}
97  This package contains the development files for the SMB client  Requires(post):   rpm-helper >= %{rpmhelper_required_version}
98  library, part of the samba suite of networking software, allowing  Requires(preun):  rpm-helper >= %{rpmhelper_required_version}
99  the development of other software to access SMB shares.  Requires(postun): rpm-helper >= %{rpmhelper_required_version}
 %endif  
 %if %have_pversion && %build_system  
 %message_bugzilla %{libname}-devel  
 %endif  
100    
 %if %build_system  
 %package -n %{libname}-static-devel  
 URL:            http://www.samba.org  
 Summary:        SMB Client Static Library Development files  
 Group:          Development/C  
 Provides:       libsmbclient-static-devel = %{version}-%{release}  
 Requires:       %{libname}-devel = %{version}-%{release}  
101    
102  %description -n %{libname}-static-devel  Requires(pre):  %{name}-common = %{samba_depver}
103  This package contains the static development files for the SMB  Requires:       %{libname} = %{samba_depver}
104  client library, part of the samba suite of networking software,  %if %with_libwbclient
105  allowing the development of other software to access SMB shares.  Requires:       %{libwbclient} = %{samba_depver}
106  %endif  %endif
 %if %have_pversion && %build_system  
 %message_bugzilla %{libname}-devel  
 %endif  
   
 %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  
107    
108  %package -n %netapidevel  Provides:       %{name} = %{samba_depver}
 Group: Development/C  
 Summary: Samba library for accessing functions in 'net' binary  
 Provides: netapi-devel = %{version}-%{release}  
109    
110  %description -n %netapidevel  # We don't build it outdated docs anymore
111  Samba library for accessing functions in 'net' binary  Obsoletes:      samba4-doc
112    # Is not supported yet
113    Obsoletes:      %{name}-domainjoin-gui
114    # SWAT been deprecated and removed from samba
115    Obsoletes:      samba4-swat
116    
117  %package -n %libsmbsharemodes  %if %with_clustering_support
118  Group: System/Libraries  BuildRequires:  ctdb-devel
119  Summary: Samba Library for accessing smb share modes (locks etc.)  %endif
120    BuildRequires:  cups-devel
121  %description -n %libsmbsharemodes  BuildRequires:  docbook-style-xsl
122  Samba Library for accessing smb share modes (locks etc.)  BuildRequires:  e2fsprogs-devel
123    BuildRequires:  gawk
124  %package -n %smbsharemodesdevel  BuildRequires:  git
125  Group: Development/C  BuildRequires:  iniparser-devel
126  Summary: Samba Library for accessing smb share modes (locks etc.)  BuildRequires:  krb5-devel >= 1.10
127  Provides: smbsharemodes-devel = %{version}-%{release}  BuildRequires:  libacl-devel
128    BuildRequires:  libaio-devel
129    BuildRequires:  libattr-devel
130    BuildRequires:  libcap-devel
131    BuildRequires:  libuuid-devel
132    BuildRequires:  pkgconfig(libxslt)
133    BuildRequires:  ncurses-devel
134    BuildRequires:  openldap-devel
135    BuildRequires:  pam-devel
136    BuildRequires:  perl(ExtUtils::MakeMaker)
137    BuildRequires:  perl(Parse::Yapp)
138    BuildRequires:  popt-devel
139    BuildRequires:  python-devel
140    BuildRequires:  python-tevent
141    BuildRequires:  quota-devel
142    BuildRequires:  readline-devel
143    BuildRequires:  systemd-devel
144    BuildRequires:  sed
145    BuildRequires:  zlib-devel >= 1.2.3
146    BuildRequires:  xsltproc
147    %if %{with_vfs_glusterfs}
148    BuildRequires:  pkgconfig(glusterfs-api)
149    %endif
150    
151  %description -n %smbsharemodesdevel  # pidl requirements
152  Samba Library for accessing smb share modes (locks etc.)  BuildRequires:  perl(Parse::Yapp)
153    
154  %if %build_talloc  %if ! %with_internal_talloc
155  %package -n %libtalloc  %global libtalloc_version 2.1.1
 Group: System/Libraries  
 Summary: Library implementing Samba's memory allocator  
156    
157  %description -n %libtalloc  BuildRequires:  talloc-devel >= %{libtalloc_version}
158  Library implementing Samba's memory allocator  BuildRequires:  pytalloc-util-devel >= %{libtalloc_version}
159    %endif
160    
161  %package -n %tallocdevel  %if ! %with_internal_tevent
162  Group: Development/C  %global libtevent_version 0.9.17
 Summary: Library implementing Samba's memory allocator  
 Provides: talloc-devel = %{version}-%{release}  
163    
164  %description -n %tallocdevel  BuildRequires:  tevent-devel >= %{libtevent_version}
165  Library implementing Samba's memory allocator  BuildRequires:  python-tevent >= %{libtevent_version}
166  %endif  %endif
167    
168  %if %build_tdb  %if ! %with_internal_ldb
169  %package -n %libtdb  %global libldb_version 1.1.11
 Group: System/Libraries  
 Summary: Library implementing Samba's embedded database  
170    
171  %description -n %libtdb  BuildRequires:  ldb-devel >= %{libldb_version}
172  Library implementing Samba's embedded database  BuildRequires:  pyldb-util-devel >= %{libldb_version}
173    %endif
174    
175  %package -n %tdbdevel  %if ! %with_internal_tdb
176  Group: Development/C  %global libtdb_version 1.2.10
 Summary: Library implementing Samba's embedded database  
 Provides: tdb-devel = %{version}-%{release}  
 Requires: %libtdb  
 # because /usr/include/tdb.h was moved from libsmbclient0-devel to libtdb-devel  
 Conflicts: %{mklibname smbclient 0 -d} < 3.2.6-3  
177    
178  %description -n %tdbdevel  BuildRequires:  tdb-devel >= %{libtdb_version}
179  Library implementing Samba's embedded database  BuildRequires:  python-tdb >= %{libtdb_version}
180  %endif  %endif
181    
182  %package -n %libwbclient  %if %{with testsuite}
183  Group: System/Libraries  BuildRequires:  ldb-tools
184  Summary: Library providing access to winbindd  %endif
   
 %description -n %libwbclient  
 Library providing access to winbindd  
185    
186  %package -n %wbclientdevel  # filter out perl requirements pulled in from examples in the docdir.
187  Group: Development/C  %{?filter_setup:
188  Summary: Library providing access to winbindd  %filter_provides_in %{_docdir}
189  Provides: wbclient-devel = %{version}-%{release}  %filter_requires_in %{_docdir}
190  Requires: %libwbclient >= %{version}  %filter_setup
191    }
192    #global __requires_exclude %{?__requires_exclude:%__requires_exclude|}devel\\(lib(ads|asn1util|auth|authkrb5|ccan|cliauth|cli_cldap|cli-ldap|cli-ldap-common|cli_smb_common|CHARSET3|dbwrap|dcerpc-samba|errors|flag_mapping|gse|gssapi-samba4|interfaces|krb5samba|krb5-samba4|ldbsamba|libcli_lsa3|libcli_netlogon3|libsmb|msrpc3|ndr-samba|replace|libreplace|samba3-util|samba-modules|samba-net|samba-security|samba-sockets|samdb-common|secrets3|server-role|smbd_shim|smbregistry|smb_transport|subunit|tdb-wrap|util_cmdline|util_reg|util_setid|util_tdb|winbind-client|winbind-client)\\)
193    %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}devel\\(.*\)\\)
194    
195  %description -n %wbclientdevel  %rename         samba
 Library providing access to winbindd  
196    
197  #%package passdb-ldap  ### SAMBA
198  #URL:           http://www.samba.org  %description
199  #Summary:       Samba password database plugin for LDAP  Samba is the standard Windows interoperability suite of programs
200  #Group:         System/Libraries  for Linux and Unix.
 #  
 #%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 %have_pversion  
 #_message_bugzilla samba3-passdb-ldap  
 #_endif  
 #_if !%build_system  
 #_message_system  
 #_endif  
   
 %ifnarch alpha  
 %if %{build_mysql}  
 %package passdb-mysql  
 URL:            http://www.samba.org  
 Summary:        Samba password database plugin for MySQL  
 Group:          System/Libraries  
 Requires:       %{name}-server = %{version}-%{release}  
 %endif  
 %endif  
 %ifnarch alpha  
 %if %build_system && %{build_mysql}  
 Obsoletes:      samba3-passdb-mysql  
 Provides:       samba3-passdb-mysql  
 %endif  
 %endif  
 %ifnarch alpha  
 %if %{build_mysql}  
   
 %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  
 %endif  
   
 #does postgresql build on alpha?  
 #ifnarch alpha  
 %if %{build_pgsql}  
 %package passdb-pgsql  
 URL:            http://www.samba.org  
 Summary:        Samba password database plugin for PostgreSQL  
 Group:          System/Libraries  
 Requires:       %{name}-server = %{version}-%{release}  
 #endif  
 #ifnarch alpha && %build_system  
 %endif  
 %if %build_system && %{build_pgsql}  
 Obsoletes:      samba3-passdb-pgsql  
 Provides:       samba3-passdb-pgsql  
 %endif  
 %if %{build_pgsql}  
   
 %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 %build_antivir  
 %package vscan-antivir  
 Summary: On-access virus scanning for samba using Antivir  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 Provides: %{name}-vscan  
 %description vscan-antivir  
 A vfs-module for samba to implement on-access scanning using the  
 Antivir antivirus scanner daemon.  
 %endif  
   
   
 %if %build_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 = %{version}  
 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 %build_fprot  
 %package vscan-fprot  
 Summary: On-access virus scanning for samba using FPROT  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 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 %build_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 = %{version}  
 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 %build_icap  
 %package vscan-icap  
 Summary: On-access virus scanning for samba using ICAP  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 Provides: %{name}-icap  
 %description vscan-icap  
 A vfs-module for samba to implement on-access scanning using  
 ICAP-capable antivirus software.  
 %endif  
   
 %if %build_kaspersky  
 %package vscan-kaspersky  
 Summary: On-access virus scanning for samba using Kaspersky  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 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 %build_mks  
 %package vscan-mks  
 Summary: On-access virus scanning for samba using MKS  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 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 %build_nai  
 %package vscan-nai  
 Summary: On-access virus scanning for samba using NAI McAfee  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 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 %build_openav  
 %package vscan-openav  
 Summary: On-access virus scanning for samba using OpenAntivirus  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 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 %build_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 = %{version}  
 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 %build_symantec  
 %package vscan-symantec  
 Summary: On-access virus scanning for samba using Symantec  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 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 %build_trend  
 %package vscan-trend  
 Summary: On-access virus scanning for samba using Trend  
 Group: System/Servers  
 Requires: %{name}-server = %{version}  
 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 = %{version}  
 Group: System/Configuration  
201    
202  %description domainjoin-gui  ### CLIENT
203  The samba-domainjoin-gui package includes a domainjoin gtk application.  %package        client
204    Summary:        Samba client programs
205    Group:          Networking/Other
206    Requires:       %{name}-common = %{samba_depver}
207    Requires:       %{libname} = %{samba_depver}
208    %if %with_libsmbclient
209    Requires:       libsmbclient = %{samba_depver}
210    %endif
211    Provides:       %{name}-client = %{samba_depver}
212    # virtual provides for drakxtools-backend
213    Provides:       smb-client = %{samba_depver}
214    
215  %prep  %rename         samba-client
216    
 # Allow users to query build options with --with options:  
 #%%define opt_status(%1)        %(echo %{1})  
 %if %{?_with_options:1}%{!?_with_options:0}  
 %define opt_status(%{1})        %(if [ %{1} -eq 1 ];then echo enabled;else echo disabled;fi)  
 #exit 1  
 %{error: }  
 %{error:Build options available are:}  
 %{error:--with[out] system   Build as the system samba package [or as samba3]}  
 %{error:--with[out] acl      Build with support for file ACLs          - %opt_status %build_acl}  
 %{error:--with[out] winbind  Build with Winbind support                - %opt_status %build_winbind}  
 %{error:--with[out] wins     Build with WINS name resolution support   - %opt_status %build_wins}  
 %{error:--with[out] ldap     Build with legacy (samba2) LDAP support   - %opt_status %build_ldap}  
 %{error:--with[out] ads      Build with Active Directory support       - %opt_status %build_ads}  
 %{error:--with[out] mysql    Build MySQL passdb backend                - %opt_status %build_mysql}  
 %{error:--with[out] pgsql    Build PostgreSQL passdb backend           - %opt_status %build_pgsql}  
 %{error:--with[out] scanners Enable on-access virus scanners           - %opt_status %build_scanners}  
 %{error:--with[out] test     Enable testing and benchmarking tools     - %opt_status %build_test}  
 %{error: }  
 %else  
 #{error: }  
 #{error: This rpm has build options available, use --with options to see them}  
 #{error: }  
 echo -e "\n This rpm has build options available, use --with options to see them\n" >&2  
 sleep 1  
 %endif  
   
 %if %{?_with_options:1}%{!?_with_options:0} && %build_scanners  
 #{error:--with scanners enables the following:%{?build_clamav:clamav,}%{?build_icap:icap,}%{?build_fprot:fprot,}%{?build_mks:mks,}%{?build_openav:openav,}%{?build_sophos:sophos,}%{?build_symantec:symantec,}%{?build_trend:trend}}  
 %{error:--with scanners enables the following: antivir,clamav,icap,fprot,fsav,mks,nai,openav,sophos,trend}  
 %{error: }  
 %{error:To enable others (requires development libraries for the scanner):}  
 %{error:--with symantec           Enable on-access scanning with Symantec        - %opt_status %build_symantec}  
 %{error: }  
 %endif  
   
 %if %{?_with_options:1}%{!?_with_options:0}  
 clear  
 exit 1  
 %endif  
217    
218    %description client
219    The samba4-client package provides some SMB/CIFS clients to complement
220    the built-in SMB/CIFS filesystem in Linux. These clients allow access
221    of SMB/CIFS shares and printing to SMB/CIFS printers.
222    
223  %if %build_non_default  ### COMMON
224  RPM_EXTRA_OPTIONS="\  %package        common
225  %{?_with_system: --with system}\  Summary: Files used by both Samba servers and clients
226  %{?_without_system: --without system}\  Group:          System/Servers
227  %{?_with_acl: --with acl}\  Requires:       %{libname} = %{samba_depver}
228  %{?_without_acl: --without acl}\  %if %with_libwbclient
229  %{?_with_winbind: --with winbind}\  Requires:       %{libwbclient} = %{samba_depver}
 %{?_without_winbind: --without winbind}\  
 %{?_with_wins: --with wins}\  
 %{?_without_wins: --without wins}\  
 %{?_with_ldap: --with ldap}\  
 %{?_without_ldap: --without ldap}\  
 %{?_with_ads: --with ads}\  
 %{?_without_ads: --without ads}\  
 %{?_with_scanners: --with scanners}\  
 %{?_without_scanners: --without scanners}\  
 "  
 echo "Building a non-default rpm with the following command-line arguments:"  
 echo "$RPM_EXTRA_OPTIONS"  
 echo "This rpm was built with non-default options, thus, to build ">%{SOURCE7}  
 echo "an identical rpm, you need to supply the following options">>%{SOURCE7}  
 echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7}  
 echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}  
 %else  
 echo "This rpm was built with default options">%{SOURCE7}  
 echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}  
230  %endif  %endif
231    Provides:       %{name}-common = %{samba_depver}
232    
233    %rename         samba-common
234    
235  #Try and validate signatures on source:  %description common
236  VERIFYSOURCE=%{SOURCE0}  samba4-common provides files necessary for both the server and client
237  VERIFYSOURCE=${VERIFYSOURCE%%.gz}  packages of Samba.
 gzip -dc %{SOURCE0} > $VERIFYSOURCE  
 %check_sig %{SOURCE98} %{SOURCE99} $VERIFYSOURCE  
238    
239  %if %build_vscan  ### DC
240  %setup -q -a 8 -n %{pkg_name}-%{source_ver}  %package        dc
241  %else  Summary:        Samba AD Domain Controller
242  %setup -q -n %{pkg_name}-%{source_ver}  Group:          System/Servers
243    Requires:       %{libname} = %{samba_depver}
244    Requires:       %{libsdc} = %{samba_depver}
245    Requires:       %{name}-python = %{samba_depver}
246    Provides:       %{name}-dc = %{samba_depver}
247    
248    
249    %description dc
250    The samba-dc package provides AD Domain Controller functionality
251    
252    ### DC-LIBS
253    %package        -n %{libsdc}
254    Summary:        Samba AD Domain Controller Libraries
255    Group:          System/Servers
256    Requires:       %{name}-common = %{samba_depver}
257    Requires:       %{libname} = %{samba_depver}
258    Provides:       %{libsdc} = %{samba_depver}
259    
260    
261    %description    -n %{libsdc}
262    The samba4-dc-libs package contains the libraries needed by the DC to
263    link against the SMB, RPC and other protocols.
264    
265    ### DEVEL
266    %package        -n %{develname}
267    Summary:        Developer tools for Samba libraries
268    Group:          Development/C
269    Requires:       %{libname} = %{samba_depver}
270    Provides:       %{develname} = %{samba_depver}
271    
272    
273    %description    -n     %{develname}
274    The samba4-devel package contains the header files for the libraries
275    needed to develop programs that link against the SMB, RPC and other
276    libraries in the Samba suite.
277    
278    ### GLUSTER
279    %if %{with_vfs_glusterfs}
280    %package vfs-glusterfs
281    Summary:        Samba VFS module for GlusterFS
282    Group:          System/Libraries
283    Requires:       glusterfs-api >= 3.4.0.16
284    Requires:       glusterfs >= 3.4.0.16
285    Requires:       %{name} = %{samba_version}-%{release}
286    Requires:       %{libname} = %{samba_version}-%{release}
287    
288    
289    %description vfs-glusterfs
290    Samba VFS module for GlusterFS integration.
291    %endif
292    
293    ### LIBS
294    %package        -n  %{libname}
295    Summary:        Samba libraries
296    Group:          System/Libraries
297    Requires:       krb5-libs >= 1.10
298    %if %with_libwbclient
299    Requires:       %{libwbclient} = %{samba_depver}
300    %endif
301    Provides:       %{libname} = %{version}-%{release}
302    
303    %description    -n  %{libname}
304    The samba4-libs package contains the libraries needed by programs that
305    link against the SMB, RPC and other protocols provided by the Samba suite.
306    
307    ### LIBSMBCLIENT
308    %if %with_libsmbclient
309    %package        -n %{libsmbclient}
310    Summary:        The SMB client library
311    Group:          System/Libraries
312    Requires:       %{name}-common = %{samba_depver}
313    Requires:       %{libname} = %{samba_depver}
314    Provides:       %{libsmbclient} = %{version}-%{release}
315    
316    %description -n %{libsmbclient}
317    The libsmbclient contains the SMB client library from the Samba suite.
318    
319    %package        -n %{smbclientdevel}
320    Summary:        Developer tools for the SMB client library
321    Group:          Development/C
322    Requires:       %{libsmbclient} = %{samba_depver}
323    Provides:       %{smbclientdevel} = %{version}-%{release}
324    
325    %description -n  %{smbclientdevel}
326    The libsmbclient-devel package contains the header files and libraries needed to
327    develop programs that link against the SMB client library in the Samba suite.
328    %endif # with_libsmbclient
329    
330    ### LIBWBCLIENT
331    %if %with_libwbclient
332    %package        -n %{libwbclient}
333    Summary:        The winbind client library
334    Group:          System/Libraries
335    Requires:       %{libname} = %{samba_depver}
336    
337    %description    -n %{libwbclient}
338    The libwbclient package contains the winbind client library
339    from the Samba suite.
340    
341    %package        -n %{wbclientdevel}
342    Summary:        Developer tools for the winbind library
343    Group:          Development/C
344    Requires:       %{libwbclient} = %{samba_depver}
345    Provides:       %{wbclientdevel} = %{version}-%{release}
346    
347    %description -n %{wbclientdevel}
348    The libwbclient-devel package provides developer tools for
349    the wbclient library.
350    %endif # with_libwbclient
351    
352    ### PYTHON
353    %package -n python-samba4
354    Summary:        Samba Python libraries
355    Group:          System/Libraries
356    Requires:       %{name} = %{samba_depver}
357    Requires:       %{libname} = %{samba_depver}
358    Requires:       python-tevent
359    Requires:       python-tdb
360    Requires:       python-ldb
361    Requires:       python-talloc
362    Provides:       %{name}-python = %{samba_depver}
363    
364    # temp cauldron fix:
365    %rename samba4-python
366    
367    
368    %description -n python-samba4
369    The samba4-python package contains the Python libraries needed by programs
370    that use SMB, RPC and other Samba provided protocols in Python programs.
371    
372    ### PIDL
373    %package        pidl
374    Summary:        Perl IDL compiler
375    Group:          Development/Tools
376    Requires:       perl(Parse::Yapp)
377    BuildArch:      noarch
378    Provides:       %{name}-pidl = %{samba_depver}
379    
380    
381    %description    pidl
382    The %{name}-pidl package contains the Perl IDL compiler used by Samba
383    and Wireshark to parse IDL and similar protocols
384    
385    ### TEST
386    %package        test
387    Summary:        Testing tools for Samba servers and clients
388    Group:          Networking/Other
389    Requires:       %{name} = %{samba_depver}
390    Requires:       %{name}-common = %{samba_depver}
391    Requires:       %{name}-winbind = %{samba_depver}
392    
393    Requires:       %{libname} = %{samba_depver}
394    #Requires:      %{name}-test-libs = %{samba_depver}
395    %if %with_dc
396    Requires:       %{name}-dc-libs = %{samba_depver}
397    %endif
398    Requires:       %{libname} = %{samba_depver}
399    %if %with_libsmbclient
400    Requires:       %{libsmbclient} = %{samba_depver}
401  %endif  %endif
402  # Version specific patches: current version  %if %with_libwbclient
403  %if !%have_pversion  Requires:       %{libwbclient} = %{samba_depver}
 echo "Applying patches for current version: %{ver}"  
 %patch11 -p1 -b .mga  
 pushd source3  
 popd  
 %patch30 -p1 -b .checkflags  
 #patch31 -p1 -b .nss_wins_log  
 %patch33 -p1 -b .netapi_link  
 %patch34 -p1 -b .readline  
   
 # patches from cvs/samba team  
 pushd source3  
 popd  
 %else  
 # Version specific patches: upcoming version  
 echo "Applying patches for new versions: %{pversion}"  
404  %endif  %endif
405    Provides:       %{name}-test = %{samba_depver}
406    
 # Limbo patches  
 %if %have_pversion && %have_pre  
 echo "Appling patches which should only be applied to prereleases"  
 %endif  
407    
408  cp %{SOURCE7} .  %description    test
409    %{name}-test provides testing tools for both the server and client
410    packages of Samba.
411    
412  # Make a copy of examples so that we have a clean one for doc:  ### TEST-LIBS
413  cp -a examples examples.bin  %package        -n %{libtest}
414    Summary:        Libraries need by teh testing tools for Samba servers and clients
415    Group:          Networking/Remote access
416    Requires:       %{libname} = %{samba_depver}
417    
418    %description    -n %{libtest}
419    %{name}-test-libs provides libraries required by the testing tools.
420    
421    ### TEST-DEVEL
422    %package        -n %{testdevel}
423    Summary:        Testing devel files for Samba servers and clients
424    Group:          Development/C
425    Requires:       %{libtest} = %{samba_depver}
426    
427  %if %build_vscan  %description    -n %{testdevel}
428  pushd samba-virusfilter-%{vscanver}  samba-test-devel provides testing devel files for both the server and client
429  perl -pi -e 's,/var/run/clamav/clamd.ctl,/var/lib/clamav/clamd.socket,g' clamav/svf-clamav.c  packages of Samba.
 popd  
 %endif  
430    
431  # Edit some files when not building system samba:  ### WINBIND
432  %if !%build_system  %package        winbind
433  perl -pi -e 's/%{pkg_name}/%{name}/g' source3/auth/pampass.c  Summary:        Samba winbind
434    Group:          System/Libraries
435    Requires:       %{name}-common = %{samba_depver}
436    Requires:       %{libname} = %{samba_depver}
437    Requires:       %{name}-winbind-modules = %{samba_depver}
438    
439    Provides: samba4-winbind = %{samba_depver}
440    %rename         nss_wins
441    
442    %description    winbind
443    The samba-winbind package provides the winbind NSS library, and some
444    client tools.  Winbind enables Linux to be a full member in Windows
445    domains and to use Windows user and group accounts on Linux.
446    
447    ### WINBIND-CLIENTS
448    %package        winbind-clients
449    Summary:        Samba winbind clients
450    Group:          System/Libraries
451    Requires:       %{name}-common = %{samba_depver}
452    Requires:       %{libname} = %{samba_depver}
453    Requires:       %{name}-winbind = %{samba_depver}
454    %if %with_libwbclient
455    Requires:       %{libwbclient} = %{samba_depver}
456    %endif
457    
458    Provides: samba4-winbind-clients = %{samba_depver}
459    Obsoletes: samba4-winbind-clients < %{samba_depver}
460    
461    %description    winbind-clients
462    The samba-winbind-clients package provides the wbinfo and ntlm_auth
463    tool.
464    
465    ### WINBIND-KRB5-LOCATOR
466    %package        winbind-krb5-locator
467    Summary:        Samba winbind krb5 locator
468    Group:          Networking/Remote access
469    %if %with_libwbclient
470    Requires:       %{libwbclient} = %{samba_depver}
471    Requires:       %{name}-winbind = %{samba_depver}
472    %else
473    Requires:       %{libname} = %{samba_depver}
474  %endif  %endif
475    Provides:       samba4-winbind-krb5-locator = %{samba_depver}
476    
477  #remove cvs internal files from docs:  # Handle winbind_krb5_locator.so as alternatives to allow
478  find docs examples -name '.cvsignore' -exec rm -f {} \;  # IPA AD trusts case where it should not be used by libkrb5
479    # The plugin will be diverted to /dev/null by the FreeIPA
480    # freeipa-server-trust-ad subpackage due to higher priority
481    # and restored to the proper one on uninstall
482    Requires(post): %{_sbindir}/update-alternatives
483    Requires(postun): %{_sbindir}/update-alternatives
484    Requires(preun): %{_sbindir}/update-alternatives
485    
486    %description    winbind-krb5-locator
487    The winbind krb5 locator is a plugin for the system kerberos library to allow
488    the local kerberos library to use the same KDC as samba and winbind use
489    
490    ### WINBIND-MODULES
491    %package        winbind-modules
492    Summary:        Samba winbind modules
493    Group:          System/Libraries
494    Requires:       %{libname} = %{samba_depver}
495    %if %with_libwbclient
496    Requires:       %{libwbclient} = %{samba_depver}
497    %endif
498    Requires:       pam
499    
500    %description winbind-modules
501    The samba-winbind-modules package provides the NSS library and a PAM
502    module necessary to communicate to the Winbind Daemon
503    
504  #make better doc trees:  %prep
505  chmod -R a+rX examples docs *Manifest* README  Roadmap COPYING  %setup -q -n samba-%{version}
506  mkdir -p clean-docs/samba-doc  %patch0 -p1 -b .systemd
507  cp -a examples docs clean-docs/samba-doc  %patch1 -p1
508  mv -f clean-docs/samba-doc/examples/libsmbclient clean-docs/  %patch2 -p1
 rm -Rf clean-docs/samba-doc/docs/{docbook,manpages,htmldocs,using_samba}  
 #ln -s %{_datadir}/swat%{samba_major}/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%{samba_major}/help/{Samba3-ByExample,Samba3-HOWTO,Samba3-Developers-Guide,using_samba,manpages} clean-docs/samba-doc/docs/htmldocs/  
509    
510  %build  %build
511  %serverbuild  %serverbuild
512  (cd source3  %global _talloc_lib ,talloc,pytalloc,pytalloc-util
513  CFLAGS="`echo "$RPM_OPT_FLAGS"|sed -e 's/ -g / /g'` -DLDAP_DEPRECATED"  %global _tevent_lib ,tevent,pytevent
514  %if %gcc331  %global _tdb_lib ,tdb,pytdb
515  CFLAGS=`echo "$CFLAGS"|sed -e 's/-O2/-O/g'`  %global _ldb_lib ,ldb,pyldb
 %endif  
 ./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%{samba_major} \  
                 --with-configdir=%{_sysconfdir}/%{name} \  
                 --with-logfilebase=/var/log/%{name} \  
                 --with-pammodulesdir=%{_lib}/security/ \  
                 --with-rootsbindir=/bin \  
 %if %build_talloc  
                 --with-libtalloc=yes \  
 %else  
                 --enable-external-libtalloc=yes \  
 %endif  
 %if %build_tdb  
                 --with-libtdb = yes \  
 %else  
                 --enable-external-libtdb=yes \  
 %endif            
 %if %build_ctdb  
                 --with-cluster-support \  
 %endif  
 %if !%build_ads  
                 --with-ads=no   \  
 %endif  
                 --with-automount \  
                 --with-pam \  
                 --with-pam_smbpass \  
                 --with-aio-support \  
 %if %build_ldap  
                 --with-ldapsam \  
 %endif  
                 --with-syslog \  
                 --with-quotas \  
                 --with-utmp \  
 %if %build_acl  
                 --with-acl-support      \  
 %endif  
                 --with-shared-modules=idmap_rid,idmap_ad \  
                 --enable-avahi \  
                 --with-dnsupdate \  
                 --program-suffix=%{samba_major}  
 #               --with-expsam=%build_expsam \  
 #               --with-shared-modules=pdb_ldap,idmap_ldap \  
 #               --with-manpages-langs=en,ja,pl  \  
 #_if !%build_system  
 #                --with-smbwrapper \  
 #_endif          
 #               --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 !%build_talloc  
 perl -pi -e 's,-I./lib/talloc,,g;s,bin/libtalloc.so,,g;s,^(installlibs:: )installlibtalloc,$1,g' Makefile  
 %endif  
 %if !%build_tdb  
 perl -pi -e 's,-I./lib/tdb/include,,g;s,bin/libtdb.so,,g;s,^(installlibs:: )installlibtdb,$1,g' Makefile  
 %endif  
 %if !%build_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 %build_vscan  
 echo -e "\n\nBuild antivirus VFS modules\n\n"  
 pushd %{vscandir}  
 %configure --with-samba-source=../  
 make  
 popd  
 %endif  
   
 # Build antivirus vfs objects  
 %if %build_symantec  
 echo "Building Symantec"  
 make -C %{vfsdir}/%{vscandir} symantec  
 %endif  
   
 %install  
 mkdir -p %{buildroot}  
   
 #Ensure all docs are readable  
 chmod a+r docs -R  
516    
517  # Any entries here mean samba makefile is *really* broken:  %if ! %{with_internal_talloc}
518  mkdir -p %{buildroot}%{_sysconfdir}/%{name}  %global _talloc_lib ,!talloc,!pytalloc,!pytalloc-util
 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/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}/  
   
 # tmpfiles for runtime dir creation  
 install -D -p -m 0644 %{SOURCE31} %{buildroot}%{_tmpfilesdir}/%{name}.conf  
   
 # smbsh forgotten  
 #install -m 755 source/bin/smbsh %{buildroot}%{_bindir}/  
   
 %if %build_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  
519  %endif  %endif
520    
521  #libnss_* still not handled by make:  %if ! %{with_internal_tevent}
522  # Install the nsswitch library extension file  %global _tevent_lib ,!tevent,!pytevent
 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 %{build_test}  
 for i in {%{testbin}};do  
   #install -m755 source/bin/${i} %{buildroot}/%{_bindir}/${i}%{samba_major}  
 done  
523  %endif  %endif
524    
525  # Install other stuff  %if ! %{with_internal_tdb}
526    %global _tdb_lib ,!tdb,!pytdb
 #        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%{samba_major}  
         install -m755 %{SOURCE24} %{buildroot}/%{_sbindir}/%{name}  
         install -m755 %{SOURCE25} %{buildroot}/%{_initrddir}/winbind  
         install -m755 %{SOURCE25} %{buildroot}/%{_sbindir}/winbind  
 #       install -m755 %{SOURCE26} %{buildroot}/%{_initrddir}/wrepld%{samba_major}  
         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/Mageia/smb-winbind.conf  
         install -m644 packaging/Mageia/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 %build_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  
527  %endif  %endif
528    
529  #%if !%build_system  %if ! %{with_internal_ldb}
530  # Fix script paths in smb.conf  %global _ldb_lib ,!ldb,!pyldb
 #perl -pi -e 's,%{_datadir}/samba,%{_datadir}/%{name},g' %{buildroot}/%{_sysconfdir}/%{name}/smb*.conf  
 #%endif  
   
   
         echo 127.0.0.1 localhost > %{buildroot}/%{_sysconfdir}/%{name}/lmhosts  
   
 # Link smbspool to CUPS (does not require installed CUPS)  
   
         mkdir -p %{buildroot}/%{_prefix}/lib/cups/backend  
         ln -s %{_bindir}/smbspool%{alternative_major} %{buildroot}/%{_prefix}/lib/cups/backend/smb%{alternative_major}  
   
 # xinetd support  
   
         mkdir -p %{buildroot}/%{_sysconfdir}/xinetd.d  
         install -m644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/xinetd.d/swat%{samba_major}  
   
 # menu support  
   
 mkdir -p %{buildroot}/%{_datadir}/applications  
 cat > %{buildroot}/%{_datadir}/applications/mageia-%{name}-swat.desktop << EOF  
 [Desktop Entry]  
 Name=Samba Configuration (SWAT)  
 Comment=The Swat Samba Administration Tool  
 Exec=www-browser http://localhost:901/  
 Icon=swat%{samba_major}  
 Terminal=false  
 Type=Application  
 StartupNotify=true  
 Categories=Settings;  
 EOF  
   
 mkdir -p %{buildroot}%{_liconsdir} %{buildroot}%{_iconsdir} %{buildroot}%{_miconsdir}  
   
 # install html man pages for swat  
 install -d %{buildroot}/%{_datadir}/swat%{samba_major}/help/manpages  
 #install -m644 docs/htmldocs/manpages-3/* %{buildroot}/%{_datadir}/swat%{samba_major}/help/manpages  
   
 install %{SOURCE4} %{buildroot}%{_liconsdir}/swat%{samba_major}.png  
 install %{SOURCE5} %{buildroot}%{_iconsdir}/swat%{samba_major}.png  
 install %{SOURCE6} %{buildroot}%{_miconsdir}/swat%{samba_major}.png  
   
 install %{SOURCE10} %{buildroot}%{_datadir}/%{name}/scripts/print-pdf  
 install %{SOURCE11} %{buildroot}%{_datadir}/%{name}/scripts/smb-migrate  
   
 # Fix configs when not building system samba:  
   
 #Client binaries will have suffixes while we use alternatives, even  
 # if we are system samba  
 %if !%build_system || %build_alternatives  
 for OLD in %{buildroot}/%{_bindir}/{%{clientbin},eventlogadm} %{buildroot}/%{_prefix}/lib/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  
 # Server/common binaries are versioned only if not system samba:  
 %if !%build_system  
 for OLD in %{buildroot}/%{_bindir}/{%{commonbin}} %{buildroot}/%{_bindir}/{%{serverbin}%{?serverldbbin:,%serverldbbin}} %{buildroot}/%{_sbindir}/{%{serversbin},swat}  
 do  
     NEW=`echo ${OLD}%{alternative_major}`  
     mv $OLD $NEW -f ||:  
 done  
 # And the man pages too:  
 for OLD in %{buildroot}/%{_mandir}/man?/{%{commonbin},%{serverbin}%{?serverldbbin:,%serverldbbin},%{serversbin},swat,{%testbin},smb.conf,lmhosts}*  
 do  
     if [ -e $OLD ]  
     then  
         BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'`  
 #        BASE=`perl -e '$name="'${OLD}'"; print "",($name =~ /(.*?)\.[0-9]/), "\n";'`  
         EXT=`echo $OLD|sed -e 's,'${BASE}',,g'`  
         NEW=`echo ${BASE}%{samba_major}${EXT}`  
         mv $OLD $NEW  
     fi  
 done              
 # Replace paths in config files and init scripts:  
 for i in smb ;do  
         perl -pi -e 's,/subsys/'$i',/subsys/'$i'%{samba_major},g' %{buildroot}/%{_initrddir}/${i}%{samba_major}  
 done  
 for i in %{_sysconfdir}/%{name}/smb.conf %{_initrddir}/smb%{samba_major} %{_sbindir}/%{name} %{_initrddir}/winbind /%{_sysconfdir}/logrotate.d/%{name} /%{_sysconfdir}/xinetd.d/swat%{samba_major} %{_initrddir}/wrepld%{samba_major}; do  
         perl -pi -e 's,/%{pkg_name},/%{name},g; s,smbd,%{_sbindir}/smbd%{samba_major},g; s,nmbd,%{_sbindir}/nmbd%{samba_major},g; s,/usr/sbin/swat,%{_sbindir}/swat%{samba_major},g;s,wrepld,%{_sbindir}/wrepld%{samba_major},g' %{buildroot}/$i;  
 done  
 # Fix xinetd file for swat:  
 perl -pi -e 's,/usr/sbin,%{_sbindir},g' %{buildroot}/%{_sysconfdir}/xinetd.d/swat%{samba_major}  
531  %endif  %endif
532    
533  #Clean up unpackaged files:  %global _samba4_libraries heimdal,!zlib,!popt%{_talloc_lib}%{_tevent_lib}%{_tdb_lib}%{_ldb_lib}
 #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*  
 rm -f %{buildroot}/%{_mandir}/man1/dbwrap_tool*  
   
 # (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.mga.conf to explain what has been done  
 cat << EOF > %{buildroot}/%{_datadir}/%{name}/README.mga.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:  
534    
535          /var/log/samba/smb-migrate.log  %global _samba4_idmap_modules idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2
536    %global _samba4_pdb_modules pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4
537    %global _samba4_auth_modules auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4
538    
539  A clean samba3 smb.conf is in /usr/share/samba, named smb.conf.clean.  %global _samba4_modules %{_samba4_idmap_modules},%{_samba4_pdb_modules},%{_samba4_auth_modules}
 Your original conf should be /etc/samba/smb.conf.tomerge.  
540    
541  The actual merge script is /usr/share/samba/scripts/smb-migrate.  %global _libsmbclient %nil
542    %global _libwbclient %nil
543    
544  EOF  %if ! %with_libsmbclient
545    %global _libsmbclient smbclient,smbsharemodes,
 # 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 %build_talloc  
 talloc \  
546  %endif  %endif
 %if %build_tdb  
 tdb \  
 %endif  
 ; do  
         pushd lib/$i  
         ./configure --prefix=%{_prefix} --libdir=%{_libdir}  
         make  
         WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$PATH waf install --destdir=%{buildroot} --targets=`basename bin/PKGCONFIG_$i.pc`  
         popd  
 done  
547    
548  # 2. Install them  %if ! %with_libwbclient
549  for i in smbclient smbsharemodes netapi wbclient; do  %global _libwbclient wbclient,
         install -m 644 source3/pkgconfig/$i.pc %{buildroot}%{_libdir}/pkgconfig/  
 done  
   
 %if !%build_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  
550  %endif  %endif
551    
552  %if %{build_test}  %global _samba4_private_libraries %{_libsmbclient}%{_libwbclient}
 rm -fr %{buildroot}%{_mandir}/man1/log2pcap*.1*  
 %else  
 rm -fr %{buildroot}%{_mandir}/man1/vfstest%{samba_major}*.1*  
 rm -fr %{buildroot}%{_mandir}/man1/log2pcap*.1*  
 %endif  
553    
 rm -fr %{buildroot}%{_mandir}/man8/tdb*.8*  
554    
555  %if %build_winbind  ./configure \
556  %find_lang pam_winbind          --prefix=/usr \
557            --exec-prefix=/usr \
558            --bindir=%{_bindir} \
559            --sbindir=%{_sbindir} \
560            --sysconfdir=%{_sysconfdir} \
561            --datadir=%{_datadir} \
562            --includedir=%{_includedir} \
563            --libdir=%{_libdir} \
564            --libexecdir=%{_libexecdir} \
565            --localstatedir=%{_localstatedir} \
566            --sharedstatedir=/usr/com \
567            --mandir=%{_mandir} \
568            --infodir=%{_infodir} \
569            --enable-fhs \
570            --with-piddir=/run \
571            --with-sockets-dir=/run/samba \
572            --with-modulesdir=%{_libdir}/samba \
573            --with-pammodulesdir=%{_libdir}/security \
574            --with-lockdir=%{_localstatedir}/lib/samba \
575            --with-cachedir=%{_localstatedir}/lib/samba \
576            --disable-gnutls \
577            --disable-rpath-install \
578            --with-shared-modules=%{_samba4_modules} \
579            --bundled-libraries=%{_samba4_libraries} \
580            --with-pam \
581            --without-fam \
582    %if (! %with_libsmbclient) || (! %with_libwbclient)
583            --private-libraries=%{_samba4_private_libraries} \
584  %endif  %endif
585  %find_lang net  %if %with_mitkrb5
586            --with-system-mitkrb5 \
 %ifarch alpha  
 rm -f %{buildroot}%{_bindir}/smb*m*nt%{samba_major}  
 rm -f %{buildroot}%{_mandir}/man8/smb*m*nt*.8*  
587  %endif  %endif
588    %if ! %with_dc
589  %if !%build_system          --without-ad-dc \
 rm -f %{buildroot}%{_libdir}/libsmbclient.so.*  
 rm -f %{buildroot}%{_includedir}/*  
 rm -f %{buildroot}%{_libdir}/libsmbclient.so  
 rm -f %{buildroot}%{_libdir}/lib*.a  
 rm -f %{buildroot}%{_mandir}/man8/libsmbclient.8*  
 rm -f %{buildroot}%{_libdir}/pkgconfig/smbclient.pc  
590  %endif  %endif
591    %if ! %with_vfs_glusterfs
592  %if %build_vscan          --disable-glusterfs \
 #rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan*.so  
   
 %if !%build_antivir  
 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-antivir.so  
 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-antivir.conf  
593  %endif  %endif
594    %if %with_clustering_support
595  %if !%build_clamav          --with-cluster-support \
596  rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-clamav.so          --enable-old-ctdb \
 rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-clamav.conf  
597  %endif  %endif
598    %if %with_profiling
599  %if !%build_fprot          --with-profiling-data \
 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-fprotd.so  
 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-fprotd.conf  
600  %endif  %endif
601    %if %{with testsuite}
602  %if !%build_fsav          --enable-selftest \
 rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-fsav.so  
 rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-fsav.conf  
603  %endif  %endif
604    %if ! %with_pam_smbpass
605  %if !%build_icap          --without-pam_smbpass \
 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-icap.so  
 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-icap.conf  
606  %endif  %endif
607            --with-systemd
608    
609  %if !%build_kaspersky  make -j2
 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-kavp.so  
 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-kavp.conf  
 %endif  
610    
611  %if !%build_mks  %install
 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-mksd.so  
 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-mks*.conf  
 %endif  
612    
613  %if !%build_nai  %makeinstall_std
 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-mcdaemon.so  
 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-mcdaemon.conf  
 %endif  
614    
615  %if !%build_openav  %{__install} -d -m 0755 %{buildroot}%{_bindir}
616  rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-oav.so  %{__install} -d -m 0755 %{buildroot}%{_sbindir}
617  rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-oav.conf  %{__install} -d -m 0755 %{buildroot}%{_libdir}/security
618  %endif  %{__install} -d -m 0755 %{buildroot}/var/lib/samba
619    %{__install} -d -m 0755 %{buildroot}/var/lib/samba/private
620    %{__install} -d -m 0755 %{buildroot}/var/lib/samba/winbindd_privileged
621    %{__install} -d -m 0755 %{buildroot}/var/lib/samba/scripts
622    %{__install} -d -m 0755 %{buildroot}/var/lib/samba/sysvol
623    %{__install} -d -m 0755 %{buildroot}%{_logdir}/samba/old
624    %{__install} -d -m 0755 %{buildroot}/var/spool/samba
625    %{__install} -d -m 0755 %{buildroot}/var/run/samba
626    %{__install} -d -m 0755 %{buildroot}/var/run/winbindd
627    %{__install} -d -m 0755 %{buildroot}/%{_libdir}/samba
628    %{__install} -d -m 0755 %{buildroot}/%{_libdir}/pkgconfig
629    
630  %if !%build_sophos  # Install other stuff
631  rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-sophos.so  %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
632  rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-sophos.conf  %{__install} -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/samba
 %endif  
633    
634  %if !%build_symantec  #%{__install} -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/samba/smb.conf
 rm -rf %{buildroot}%{_sysconfdir}/%{name}/vscan-symantec.conf  
 %endif  
635    
636  %if !%build_trend  %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/security
637  rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-trend.so  %{__install} -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/security/pam_winbind.conf
 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-trend.conf  
 %endif  
 %endif  
638    
639  # these are provided by ldb-utils  echo 127.0.0.1 localhost > %{buildroot}%{_sysconfdir}/samba/lmhosts
 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*  
640    
641  # these are provided by tdb-utils  # openLDAP database schema
642  rm -f %{buildroot}%{_mandir}/man8/tdbbackup.8*  %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/openldap/schema
643  rm -f %{buildroot}%{_mandir}/man8/tdbdump.8*  %{__install} -m644 examples/LDAP/samba.schema %{buildroot}%{_sysconfdir}/openldap/schema/samba.schema
 rm -f %{buildroot}%{_mandir}/man8/tdbtool.8*  
644    
645  # these are not built  %{__install} -m 0744 packaging/printing/smbprint %{buildroot}%{_bindir}/smbprint
 rm -f %{buildroot}%{_mandir}/man1/log2pcap.1*  
 rm -f %{buildroot}%{_mandir}/man1/vfstest.1*  
646    
647  %post server  %{__install} -d -m 0755 %{buildroot}%{_prefix}/lib/tmpfiles.d/
648    %{__install} -m644 packaging/systemd/samba.conf.tmp %{buildroot}%{_prefix}/lib/tmpfiles.d/samba.conf
649    # create /run/samba too.
650    
651  %_post_service smb%{samba_major}  %{__install} -D -p -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf
 #%_post_service wrepld%{samba_major}  
652    
653  # Add a unix group for samba machine accounts  %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
654  groupadd -frg 421 machines  %{__install} -m 0644 packaging/systemd/samba.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/samba
655    
656  # Migrate tdb's from /var/lock/samba (taken from official samba spec file):  %{__install} -m 0644 %{SOURCE201} packaging/README.downgrade
 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  
657    
658  %post common  %if ! %with_dc
659  %_tmpfilescreate %{name}  %{__install} -m 0644 %{SOURCE200} packaging/README.dc
660    %{__install} -m 0644 %{SOURCE200} packaging/README.dc-libs
661    %endif
662    
663  # Basic migration script for pre-2.2.1 users,  %{__install} -d -m 0755 %{buildroot}%{_unitdir}
664  # since smb config moved from /etc to %{_sysconfdir}/samba  #for i in nmb smb winbind ; do
665    for i in samba ; do
666        cat packaging/systemd/$i.service | sed -e 's@\[Service\]@[Service]\nEnvironment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba@g' >tmp$i.service
667        %{__install} -m 0644 tmp$i.service %{buildroot}%{_unitdir}/$i.service
668        sed -i "s:systemd-daemon:systemd:g" -i wscript lib/util/wscript_build
669    done
670    
671  # Let's create a proper %{_sysconfdir}/samba/smbpasswd file  # NetworkManager online/offline script
672  [ -f %{_sysconfdir}/%{name}/smbpasswd ] || {  #%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/
673          echo "Creating password file for samba..."  #%{__install} -m 0755 packaging/NetworkManager/30-winbind-systemd \
674          touch %{_sysconfdir}/%{name}/smbpasswd  #            %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/30-winbind
 }  
675    
676  # And this too, in case we don't have smbd to create it for us  # winbind krb5 locator
677  [ -f /var/cache/%{name}/unexpected.tdb ] || {  %{__install} -d -m 0755 %{buildroot}%{_libdir}/krb5/plugins/libkrb5
678          touch /var/cache/%{name}/unexpected.tdb  touch %{buildroot}%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so
 }  
679    
 # Let's define the proper paths for config files  
 perl -pi -e 's/(\/etc\/)(smb)/\1%{name}\/\2/' %{_sysconfdir}/%{name}/smb.conf  
680    
 # 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  
681    
682  # And not loose our machine account SID  %if %{with testsuite}
683  [ -f %{_sysconfdir}/MACHINE.SID ] && mv -f %{_sysconfdir}/MACHINE.SID %{_sysconfdir}/%{name}/ ||:  %check
684    TDB_NO_FSYNC=1 %make test
685    %endif
686    
687  # FIXME: Can be removed in mageia ?  %pre
688  %triggerpostun common -- samba-common < 3.0.1-3mdk  %_pre_useradd %{name} /dev/null /bin/false
 # (sb) merge any existing smb.conf with new syntax file  
 if [ $1 = 2 ]; then  
         # (sb) save existing smb.conf for merge  
         echo "Upgrade: copy smb.conf to smb.conf.tomerge for merging..."  
         cp -f %{_sysconfdir}/%{name}/smb.conf %{_sysconfdir}/%{name}/smb.conf.tomerge  
         echo "Upgrade: merging previous smb.conf..."  
         if [ -f %{_datadir}/%{name}/smb.conf.clean ]; then  
                 cp %{_datadir}/%{name}/smb.conf.clean %{_sysconfdir}/%{name}/smb.conf  
                 cp %{_datadir}/%{name}/README.mga.conf %{_sysconfdir}/%{name}/  
                 %{_datadir}/%{name}/scripts/smb-migrate commit  
         fi  
 fi  
689    
 %postun common  
 if [ -f %{_sysconfdir}/%{name}/README.mga.conf ];then rm -f %{_sysconfdir}/%{name}/README.mga.conf;fi  
690    
 %if %build_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  
691    
692  %preun winbind  %post
693  if [ $1 = 0 ]; then  #%_post_service smb
694          echo "Removing winbind entries from %{_sysconfdir}/nsswitch.conf"  #%_post_service nmb
695          perl -pi -e 's/ winbind//' %{_sysconfdir}/nsswitch.conf  %_post_service samba
696    
697          /sbin/chkconfig winbind reset  %preun
698  fi  #%_preun_service smb
699  %endif %build_winbind  #%_preun_service nmb
700    %_preun_service samba
701    
702  %if %build_wins  %postun
703  %post -n nss_wins%{samba_major}  %_postun_userdel %{name}
704  if [ $1 = 1 ]; then  #%_postun_service smb
705      cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave  #%_postun_service nmb
706      grep '^hosts' %{_sysconfdir}/nsswitch.conf |grep -v 'wins' >/dev/null  %_postun_service samba
     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  
707    
708  %preun -n nss_wins%{samba_major}  %post common
709  if [ $1 = 0 ]; then  %_tmpfilescreate %{name}
710          echo "Removing wins entry from %{_sysconfdir}/nsswitch.conf"  if [ -d /var/cache/samba ]; then
711          perl -pi -e 's/ wins//' %{_sysconfdir}/nsswitch.conf      mv /var/cache/samba/netsamlogon_cache.tdb /var/lib/samba/ 2>/dev/null
712  #else      mv /var/cache/samba/winbindd_cache.tdb /var/lib/samba/ 2>/dev/null
713  #       echo "Leaving %{_sysconfdir}/nsswitch.conf intact"      rm -rf /var/cache/samba/
714        ln -sf /var/cache/samba /var/lib/samba/
715  fi  fi
 %endif %build_wins  
716    
 %preun server  
717    
 %_preun_service smb%{samba_major}  
 #%_preun_service wrepld%{samba_major}  
718    
719  #if [ $1 = 0 ] ; then  #%pre winbind
720  #    /sbin/chkconfig --level 35 smb reset  #%_pre_useradd wbpriv /dev/null /bin/false
 # Let's not loose /var/cache/samba  
 #  
 #    if [ -d /var/cache/%{name} ]; then  
 #      mv -f /var/cache/%{name} /var/cache/%{name}.BAK  
 #    fi  
 #fi  
721    
722  %post swat  #%post winbind
723  if [ -f /var/lock/subsys/xinetd ]; then  #%_post_service winbind
         service xinetd reload >/dev/null 2>&1 || :  
 fi  
724    
725  %postun swat  #%preun winbind
726    #%_preun_service winbind
727    
728  # Remove swat entry from xinetd  #%postun winbind
729  if [ $1 = 0 -a -f %{_sysconfdir}/xinetd.conf ] ; then  #%_postun_userdel wbpriv
730  rm -f %{_sysconfdir}/xinetd.d/swat%{samba_major}  #%_postun_service smb
731          service xinetd reload &>/dev/null || :  #%_postun_service nmb
732  fi  
733    #%postun winbind-krb5-locator
734    #if [ "$1" -ge "1" ]; then
735    #        if [ "`readlink %{_sysconfdir}/alternatives/winbind_krb5_locator.so`" == "%{_libdir}/winbind_krb5_locator.so" ]; then
736    #                %{_sbindir}/update-alternatives --set winbind_krb5_locator.so %{_libdir}/winbind_krb5_locator.so
737    #        fi
738    #fi
739    
740  if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi  #%post winbind-krb5-locator
741    #%{_sbindir}/update-alternatives --install %{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so \
742    #                                winbind_krb5_locator.so %{_libdir}/winbind_krb5_locator.so 10
743    
744    #%preun winbind-krb5-locator
745    #if [ $1 -eq 0 ]; then
746    #        %{_sbindir}/update-alternatives --remove winbind_krb5_locator.so %{_libdir}/winbind_krb5_locator.so
747    #fi
748    
 %if %build_alternatives  
 %post client  
749    
 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 %{_prefix}/lib/cups/backend/smb cups_smb %{_prefix}/lib/cups/backend/smb%{alternative_major} || \  
 update-alternatives --auto smbclient  
   
 %preun client  
 [ $1 = 0 ] && update-alternatives --remove smbclient %{_bindir}/smbclient%{alternative_major} ||:  
 %endif  
   
 %if %build_alternatives  
 %triggerpostun client -- samba-client, samba2-client  
 [ ! -e %{_bindir}/smbclient ] && update-alternatives --auto smbclient || :  
 %endif  
   
 %files server  
 %(for i in %{_sbindir}/{%{serversbin}}%{samba_major};do echo $i;done)  
 %(for i in %{_bindir}/{%{serverbin}%{?serverldbbin:,%serverldbbin}}%{samba_major};do echo $i;done)  
 %attr(755,root,root) /%{_lib}/security/pam_smbpass*  
 %dir %{_libdir}/%{name}/vfs  
 %{_libdir}/%{name}/vfs/*.so  
 %dir %{_libdir}/%{name}/pdb  
 %{_libdir}/%{name}/auth  
   
 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smbusers  
 %attr(-,root,root) %config(noreplace) %{_initrddir}/smb%{samba_major}  
 #%attr(-,root,root) %config(noreplace) %{_initrddir}/wrepld%{samba_major}  
 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}  
 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/%{name}  
 #%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/samba-slapd.include  
 %(for i in %{_mandir}/man?/{%{serverbin}%{?serverldbbin:,%serverldbbin},%{serversbin}}%{samba_major}\.[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*  
750    
 %files doc  
 %doc README COPYING Manifest Read-Manifest-Now  
 %doc WHATSNEW.txt Roadmap  
 %doc README.%{name}-mageia-rpm  
 %doc clean-docs/samba-doc/docs/*  
 %doc clean-docs/samba-doc/examples  
 #%attr(-,root,root) %{_datadir}/swat%{samba_major}/using_samba/  
 %attr(-,root,root) %{_datadir}/swat%{samba_major}/help/  
   
 %files swat  
 %config(noreplace) %{_sysconfdir}/xinetd.d/swat%{samba_major}  
 #%attr(-,root,root) /sbin/*  
 %{_sbindir}/swat%{samba_major}  
 %{_datadir}/applications/mageia-%{name}-swat.desktop  
 %{_miconsdir}/*.png  
 %{_liconsdir}/*.png  
 %{_iconsdir}/*.png  
 #%attr(-,root,root) %{_datadir}/swat%{samba_major}/help/  
 %attr(-,root,root) %{_datadir}/swat%{samba_major}/images/  
 %attr(-,root,root) %{_datadir}/swat%{samba_major}/include/  
 %lang(ja) %{_datadir}/swat%{samba_major}/lang/ja  
 %lang(tr) %{_datadir}/swat%{samba_major}/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  
 #%doc swat/README  
751    
752  %files client  ### SAMBA
753  %(for i in %{_bindir}/{%{clientbin},eventlogadm}%{alternative_major};do echo $i;done)  %files
754  %(for i in %{_mandir}/man?/{%{clientbin}}%{alternative_major}.\\?.\\*;do echo $i|grep -v smbprint;done)  %doc COPYING README WHATSNEW.txt
755  #xclude %{_mandir}/man?/smbget*  %doc examples/autofs examples/LDAP examples/misc
756  %{_mandir}/man5/smbgetrc%{alternative_major}.5*  %doc examples/printer-accounting examples/printing
757  %ifnarch alpha  %doc packaging/README.downgrade
758  #(for i in /sbin/{%{client_sbin}}%{alternative_major};do echo $i|grep -v "smb.*m.*nt";done)  %{_bindir}/smbstatus
759  %endif  %{_bindir}/eventlogadm
760  %{_mandir}/man8/eventlogadm3.8*  %{_sbindir}/nmbd
761  # Link of smbspool to CUPS  %{_sbindir}/smbd
762  %{_prefix}/lib*/cups/backend/smb%{alternative_major}  %dir %{_libdir}/samba/auth
763    %{_libdir}/samba/auth/script.so
764  %files common -f net.lang  %{_libdir}/samba/auth/unix.so
765  %dir /var/cache/%{name}  %{_libdir}/samba/auth/wbc.so
766  %dir /var/log/%{name}  %dir %{_libdir}/samba/vfs
767    %{_libdir}/samba/vfs/acl_tdb.so
768    %{_libdir}/samba/vfs/acl_xattr.so
769    %{_libdir}/samba/vfs/aio_fork.so
770    %{_libdir}/samba/vfs/aio_linux.so
771    %{_libdir}/samba/vfs/aio_posix.so
772    %{_libdir}/samba/vfs/aio_pthread.so
773    %{_libdir}/samba/vfs/audit.so
774    %{_libdir}/samba/vfs/btrfs.so
775    %{_libdir}/samba/vfs/cap.so
776    %{_libdir}/samba/vfs/catia.so
777    %{_libdir}/samba/vfs/commit.so
778    %{_libdir}/samba/vfs/crossrename.so
779    %{_libdir}/samba/vfs/default_quota.so
780    %{_libdir}/samba/vfs/dirsort.so
781    %{_libdir}/samba/vfs/expand_msdfs.so
782    %{_libdir}/samba/vfs/extd_audit.so
783    %{_libdir}/samba/vfs/fake_perms.so
784    %{_libdir}/samba/vfs/fileid.so
785    %{_libdir}/samba/vfs/full_audit.so
786    %{_libdir}/samba/vfs/linux_xfs_sgid.so
787    %{_libdir}/samba/vfs/media_harmony.so
788    %{_libdir}/samba/vfs/netatalk.so
789    %{_libdir}/samba/vfs/preopen.so
790    %{_libdir}/samba/vfs/readahead.so
791    %{_libdir}/samba/vfs/readonly.so
792    %{_libdir}/samba/vfs/recycle.so
793    %{_libdir}/samba/vfs/scannedonly.so
794    %{_libdir}/samba/vfs/shadow_copy.so
795    %{_libdir}/samba/vfs/shadow_copy2.so
796    %{_libdir}/samba/vfs/smb_traffic_analyzer.so
797    %{_libdir}/samba/vfs/streams_depot.so
798    %{_libdir}/samba/vfs/streams_xattr.so
799    %{_libdir}/samba/vfs/syncops.so
800    %{_libdir}/samba/vfs/time_audit.so
801    %{_libdir}/samba/vfs/xattr_tdb.so
802    
803    #%{_unitdir}/nmb.service
804    #%{_unitdir}/smb.service
805    %{_unitdir}/samba.service
806    %attr(0755,root,root) %dir /var/spool/samba
807    %dir %{_sysconfdir}/openldap/schema
808    %{_sysconfdir}/openldap/schema/samba.schema
809    %{_mandir}/man1/smbstatus.1*
810    %{_mandir}/man8/eventlogadm.8*
811    %{_mandir}/man8/smbd.8*
812    %{_mandir}/man8/nmbd.8*
813    #%{_mandir}/man8/vfs_*.8*
814    %{_mandir}/man8/vfs_acl_tdb.8*
815    %{_mandir}/man8/vfs_acl_xattr.8*
816    %{_mandir}/man8/vfs_aio_fork.8*
817    %{_mandir}/man8/vfs_aio_linux.8*
818    %{_mandir}/man8/vfs_aio_pthread.8*
819    %{_mandir}/man8/vfs_audit.8*
820    %{_mandir}/man8/vfs_btrfs.8*
821    %{_mandir}/man8/vfs_cacheprime.8*
822    %{_mandir}/man8/vfs_cap.8*
823    %{_mandir}/man8/vfs_catia.8*
824    %{_mandir}/man8/vfs_commit.8*
825    %{_mandir}/man8/vfs_crossrename.8*
826    %{_mandir}/man8/vfs_default_quota.8*
827    %{_mandir}/man8/vfs_dirsort.8*
828    %{_mandir}/man8/vfs_extd_audit.8*
829    %{_mandir}/man8/vfs_fake_perms.8*
830    %{_mandir}/man8/vfs_fileid.8*
831    %{_mandir}/man8/vfs_full_audit.8*
832    %{_mandir}/man8/vfs_gpfs.8*
833    %{_mandir}/man8/vfs_linux_xfs_sgid.8*
834    %{_mandir}/man8/vfs_media_harmony.8*
835    %{_mandir}/man8/vfs_netatalk.8*
836    %{_mandir}/man8/vfs_notify_fam.8*
837    %{_mandir}/man8/vfs_prealloc.8*
838    %{_mandir}/man8/vfs_preopen.8*
839    %{_mandir}/man8/vfs_readahead.8*
840    %{_mandir}/man8/vfs_readonly.8*
841    %{_mandir}/man8/vfs_recycle.8*
842    %{_mandir}/man8/vfs_scannedonly.8*
843    %{_mandir}/man8/vfs_shadow_copy.8*
844    %{_mandir}/man8/vfs_shadow_copy2.8*
845    %{_mandir}/man8/vfs_smb_traffic_analyzer.8*
846    %{_mandir}/man8/vfs_streams_depot.8*
847    %{_mandir}/man8/vfs_streams_xattr.8*
848    %{_mandir}/man8/vfs_syncops.8*
849    %{_mandir}/man8/vfs_time_audit.8*
850    %{_mandir}/man8/vfs_tsmsm.8*
851    %{_mandir}/man8/vfs_xattr_tdb.8*
852  %{_tmpfilesdir}/%{name}.conf  %{_tmpfilesdir}/%{name}.conf
 %(for i in %{_bindir}/{%{commonbin}}%{samba_major};do echo $i;done)  
 %(for i in %{_mandir}/man?/{%{commonbin}}%{samba_major}\.[0-9]\\*;do echo $i;done)  
 #%{_libdir}/smbwrapper%{samba_major}.so  
 %dir %{_libdir}/%{name}  
 %{_libdir}/%{name}/*.dat  
 %{_libdir}/%{name}/charset  
 #%{_libdir}/%{name}/lowcase.dat  
 #%{_libdir}/%{name}/valid.dat  
 %dir %{_sysconfdir}/%{name}  
 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb.conf  
 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb-winbind.conf  
 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/lmhosts  
 %dir %{_localstatedir}/lib/%{name}  
 %attr(-,root,root) %{_localstatedir}/lib/%{name}/codepages  
 %{_mandir}/man5/smb.conf*.5*  
 %{_mandir}/man5/lmhosts*.5*  
 #%{_mandir}/man7/Samba*.7*  
 %dir %{_datadir}/swat%{samba_major}  
 %attr(0750,root,adm) %{_datadir}/%{name}/scripts/smb-migrate  
 %attr(-,root,root) %{_datadir}/%{name}/smb.conf.clean  
 %attr(-,root,root) %{_datadir}/%{name}/README.mga.conf  
853    
854  %if %build_winbind  ### CLIENT
855  %files winbind -f pam_winbind.lang  %files client
856  %config(noreplace) %{_sysconfdir}/security/pam_winbind.conf  %{_bindir}/cifsdd
857  %{_sbindir}/winbindd  %{_bindir}/dbwrap_tool
858  %{_sbindir}/winbind  %{_bindir}/nmblookup
859  %{_bindir}/wbinfo  %{_bindir}/nmblookup4
860  %attr(755,root,root) /%{_lib}/security/pam_winbind*  %{_bindir}/oLschema2ldif
861  %attr(755,root,root) /%{_lib}/libnss_winbind*  %{_bindir}/regdiff
862  %{_libdir}/%{name}/idmap  %{_bindir}/regpatch
863  %{_libdir}/krb5/plugins/winbind_krb5_locator.so  %{_bindir}/regshell
864  %attr(-,root,root) %config(noreplace) %{_initrddir}/winbind  %{_bindir}/regtree
865  %attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind*  %{_bindir}/rpcclient
866  %{_mandir}/man8/winbindd*.8*  %{_bindir}/samba-regedit
867  %{_mandir}/man8/pam_winbind.8*  %{_bindir}/sharesec
868  %{_mandir}/man5/pam_winbind.conf.5.*  %{_bindir}/smbcacls
869  %{_mandir}/man7/winbind_krb5_locator.7.*  %{_bindir}/smbclient
870  %{_mandir}/man1/wbinfo*.1*  %{_bindir}/smbclient4
871  %dir %{_libdir}/%{name}/nss_info  %{_bindir}/smbcquotas
872  %{_libdir}/%{name}/nss_info/rfc2307.so  %{_bindir}/smbget
873  %{_libdir}/%{name}/nss_info/sfu*.so  #%{_bindir}/smbiconv
874  %dir %{_libdir}/%{name}/idmap  %{_bindir}/smbpasswd
875  %{_libdir}/%{name}/idmap/*.so  %{_bindir}/smbprint
876  %endif  %{_bindir}/smbspool
877    %{_bindir}/smbta-util
878  %if %build_wins  %{_bindir}/smbtar
879  %files -n nss_wins%{samba_major}  %{_bindir}/smbtree
880  %attr(755,root,root) /%{_lib}/libnss_wins.so*  %{_mandir}/man1/dbwrap_tool.1*
881  %endif  %{_mandir}/man1/nmblookup.1*
882    %{_mandir}/man1/oLschema2ldif.1*
883  %if %{build_test}  %{_mandir}/man1/regdiff.1*
884  %files test  %{_mandir}/man1/regpatch.1*
885  %(for i in %{_bindir}/{%{testbin}}%{samba_major};do echo $i;done)  %{_mandir}/man1/regshell.1*
886  %{_mandir}/man1/vfstest%{samba_major}*.1*  %{_mandir}/man1/regtree.1*
887  %endif  %exclude %{_mandir}/man1/findsmb.1*
888    %{_mandir}/man1/log2pcap.1*
889  %if %build_system  %{_mandir}/man1/nmblookup4.1*
890  %files -n %{libname}  %{_mandir}/man1/rpcclient.1*
891  %{_libdir}/libsmbclient.so.%{libsmbmajor}  %{_mandir}/man1/sharesec.1*
892  %endif  %{_mandir}/man1/smbcacls.1*
893    %{_mandir}/man1/smbclient.1*
894  %if %build_system  %{_mandir}/man1/smbcquotas.1*
895  %files -n %{libname}-devel  %{_mandir}/man1/smbget.1*
896  %{_includedir}/libsmbclient.h  %{_mandir}/man3/ntdb.3*
897  %{_libdir}/libsmbclient.so  %{_mandir}/man5/smbgetrc.5*
898  %doc clean-docs/libsmbclient/*  %{_mandir}/man1/smbtar.1*
899    %{_mandir}/man1/smbtree.1*
900    %{_mandir}/man8/ntdbbackup.8*
901    %{_mandir}/man8/ntdbdump.8*
902    %{_mandir}/man8/ntdbrestore.8*
903    %{_mandir}/man8/ntdbtool.8*
904    %{_mandir}/man8/samba-regedit.8*
905    %{_mandir}/man8/smbpasswd.8*
906    %{_mandir}/man8/smbspool.8*
907    %{_mandir}/man8/smbta-util.8*
908    
909    ## we don't build it for now
910    %if %{with_internal_ntdb}
911    %{_bindir}/ntdbbackup
912    %{_bindir}/ntdbdump
913    %{_bindir}/ntdbrestore
914    %{_bindir}/ntdbtool
915    %endif
916    
917    %if %{with_internal_tdb}
918    %{_bindir}/tdbbackup
919    %{_bindir}/tdbdump
920    %{_bindir}/tdbrestore
921    %{_bindir}/tdbtool
922    %{_mandir}/man8/tdbbackup.8*
923    %{_mandir}/man8/tdbdump.8*
924    %{_mandir}/man8/tdbrestore.8*
925    %{_mandir}/man8/tdbtool.8*
926    %endif
927    
928    %if %with_internal_ldb
929    %{_bindir}/ldbadd
930    %{_bindir}/ldbdel
931    %{_bindir}/ldbedit
932    %{_bindir}/ldbmodify
933    %{_bindir}/ldbrename
934    %{_bindir}/ldbsearch
935    %{_libdir}/samba/ldb/
936    %{_mandir}/man1/ldbadd.1.gz
937    %{_mandir}/man1/ldbdel.1.gz
938    %{_mandir}/man1/ldbedit.1.gz
939    %{_mandir}/man1/ldbmodify.1.gz
940    %{_mandir}/man1/ldbrename.1.gz
941    %{_mandir}/man1/ldbsearch.1.gz
942    %endif
943    
944    ### COMMON
945    %files common
946    #%{_libdir}/samba/charset ???
947    %{_prefix}/lib/tmpfiles.d/samba.conf
948    %{_bindir}/net
949    %{_bindir}/pdbedit
950    %{_bindir}/profiles
951    %{_bindir}/smbcontrol
952    %{_bindir}/testparm
953    %{_datadir}/samba/codepages
954    %dir %{_sysconfdir}/logrotate.d/
955    %config(noreplace) %{_sysconfdir}/logrotate.d/samba
956    %attr(0700,root,root) %dir /var/log/samba
957    %attr(0700,root,root) %dir /var/log/samba/old
958    %ghost %dir /var/run/samba
959    %ghost %dir /var/run/winbindd
960    %attr(700,root,root) %dir /var/lib/samba/private
961    %attr(755,root,root) %dir %{_sysconfdir}/samba
962    #%config(noreplace) %{_sysconfdir}/samba/smb.conf
963    %config(noreplace) %{_sysconfdir}/samba/lmhosts
964    %config(noreplace) %{_sysconfdir}/sysconfig/samba
965    %{_mandir}/man1/profiles.1*
966    %{_mandir}/man1/smbcontrol.1*
967    %{_mandir}/man1/testparm.1*
968    %{_mandir}/man5/lmhosts.5*
969    %{_mandir}/man5/smb.conf.5*
970    %{_mandir}/man5/smbpasswd.5*
971    %{_mandir}/man7/samba.7*
972    %{_mandir}/man8/net.8*
973    %{_mandir}/man8/pdbedit.8*
974    
975    # common libraries
976    %{_libdir}/samba/libpopt_samba3.so
977    %dir %{_libdir}/samba/pdb
978    %{_libdir}/samba/pdb/ldapsam.so
979    %{_libdir}/samba/pdb/smbpasswd.so
980    %{_libdir}/samba/pdb/tdbsam.so
981    %{_libdir}/samba/pdb/wbc_sam.so
982    
983    %if %with_pam_smbpass
984    %{_libdir}/security/pam_smbpass.so
985    %endif
986    
987    ### DC
988    %files dc
989    
990    %if %with_dc
991    %{_bindir}/samba-tool
992    %{_sbindir}/samba
993    %{_sbindir}/samba_kcc
994    %{_sbindir}/samba_dnsupdate
995    %{_sbindir}/samba_spnupdate
996    %{_sbindir}/samba_upgradedns
997    %{_libdir}/mit_samba.so
998    %{_libdir}/samba/auth/samba4.so
999    %{_libdir}/samba/bind9/dlz_bind9.so
1000    %{_libdir}/samba/libheimntlm-samba4.so.1
1001    %{_libdir}/samba/libheimntlm-samba4.so.1.0.1
1002    %{_libdir}/samba/libkdc-samba4.so.2
1003    %{_libdir}/samba/libkdc-samba4.so.2.0.0
1004    %{_libdir}/samba/libpac.so
1005    %{_libdir}/samba/gensec
1006    %{_libdir}/samba/ldb/acl.so
1007    %{_libdir}/samba/ldb/aclread.so
1008    %{_libdir}/samba/ldb/anr.so
1009    %{_libdir}/samba/ldb/descriptor.so
1010    %{_libdir}/samba/ldb/dirsync.so
1011    %{_libdir}/samba/ldb/extended_dn_in.so
1012    %{_libdir}/samba/ldb/extended_dn_out.so
1013    %{_libdir}/samba/ldb/extended_dn_store.so
1014    %{_libdir}/samba/ldb/ildap.so
1015    %{_libdir}/samba/ldb/instancetype.so
1016    %{_libdir}/samba/ldb/lazy_commit.so
1017    %{_libdir}/samba/ldb/ldbsamba_extensions.so
1018    %{_libdir}/samba/ldb/linked_attributes.so
1019    %{_libdir}/samba/ldb/local_password.so
1020    %{_libdir}/samba/ldb/new_partition.so
1021    %{_libdir}/samba/ldb/objectclass.so
1022    %{_libdir}/samba/ldb/objectclass_attrs.so
1023    %{_libdir}/samba/ldb/objectguid.so
1024    %{_libdir}/samba/ldb/operational.so
1025    %{_libdir}/samba/ldb/partition.so
1026    %{_libdir}/samba/ldb/password_hash.so
1027    %{_libdir}/samba/ldb/ranged_results.so
1028    %{_libdir}/samba/ldb/repl_meta_data.so
1029    %{_libdir}/samba/ldb/resolve_oids.so
1030    %{_libdir}/samba/ldb/rootdse.so
1031    %{_libdir}/samba/ldb/samba3sam.so
1032    %{_libdir}/samba/ldb/samba3sid.so
1033    %{_libdir}/samba/ldb/samba_dsdb.so
1034    %{_libdir}/samba/ldb/samba_secrets.so
1035    %{_libdir}/samba/ldb/samldb.so
1036    %{_libdir}/samba/ldb/schema_data.so
1037    %{_libdir}/samba/ldb/schema_load.so
1038    %{_libdir}/samba/ldb/secrets_tdb_sync.so
1039    %{_libdir}/samba/ldb/show_deleted.so
1040    %{_libdir}/samba/ldb/simple_dn.so
1041    %{_libdir}/samba/ldb/simple_ldap_map.so
1042    %{_libdir}/samba/ldb/subtree_delete.so
1043    %{_libdir}/samba/ldb/subtree_rename.so
1044    %{_libdir}/samba/ldb/update_keytab.so
1045    %{_libdir}/samba/ldb/wins_ldb.so
1046    %{_libdir}/samba/vfs/posix_eadb.so
1047    %dir /var/lib/samba/sysvol
1048    %{_datadir}/samba/setup
1049    %{_mandir}/man8/samba.8*
1050    %{_mandir}/man8/samba-tool.8*
1051    %else # with_dc
1052    %doc packaging/README.dc
1053    %exclude %{_mandir}/man8/samba.8*
1054    %exclude %{_mandir}/man8/samba-tool.8*
1055    %exclude %{_libdir}/samba/ldb/ildap.so
1056    %exclude %{_libdir}/samba/ldb/ldbsamba_extensions.so
1057    
1058    %endif # with_dc
1059    
1060    ### DC-LIBS
1061    %files -n %{libsdc}
1062    
1063    %if %with_dc
1064    %{_libdir}/samba/libprocess_model.so
1065    %{_libdir}/samba/libservice.so
1066    %{_libdir}/samba/process_model
1067    %{_libdir}/samba/service
1068    %{_libdir}/libdcerpc-server.so.*
1069    %{_libdir}/samba/libdfs_server_ad.so
1070    %{_libdir}/samba/libdsdb-module.so
1071    %{_libdir}/samba/libntvfs.so
1072    %{_libdir}/samba/libposix_eadb.so
1073    %{_libdir}/samba/bind9/dlz_bind9_9.so
1074    %else
1075    %doc packaging/README.dc-libs
1076    %exclude %{_libdir}/samba/libdfs_server_ad.so
1077    %endif # with_dc
1078    
1079    ### DEVEL
1080    %files    -n %{develname}
1081    %{_includedir}/samba-4.0/charset.h
1082    %{_includedir}/samba-4.0/core/doserr.h
1083    %{_includedir}/samba-4.0/core/error.h
1084    %{_includedir}/samba-4.0/core/ntstatus.h
1085    %{_includedir}/samba-4.0/core/werror.h
1086    %{_includedir}/samba-4.0/credentials.h
1087    %{_includedir}/samba-4.0/dcerpc.h
1088    %{_includedir}/samba-4.0/dlinklist.h
1089    %{_includedir}/samba-4.0/domain_credentials.h
1090    %{_includedir}/samba-4.0/gen_ndr/atsvc.h
1091    %{_includedir}/samba-4.0/gen_ndr/auth.h
1092    %{_includedir}/samba-4.0/gen_ndr/dcerpc.h
1093    %{_includedir}/samba-4.0/gen_ndr/epmapper.h
1094    %{_includedir}/samba-4.0/gen_ndr/krb5pac.h
1095    %{_includedir}/samba-4.0/gen_ndr/lsa.h
1096    %{_includedir}/samba-4.0/gen_ndr/mgmt.h
1097    %{_includedir}/samba-4.0/gen_ndr/misc.h
1098    %{_includedir}/samba-4.0/gen_ndr/nbt.h
1099    %{_includedir}/samba-4.0/gen_ndr/drsblobs.h
1100    %{_includedir}/samba-4.0/gen_ndr/drsuapi.h
1101    %{_includedir}/samba-4.0/gen_ndr/ndr_drsblobs.h
1102    %{_includedir}/samba-4.0/gen_ndr/ndr_drsuapi.h
1103    %{_includedir}/samba-4.0/gen_ndr/ndr_atsvc.h
1104    %{_includedir}/samba-4.0/gen_ndr/ndr_atsvc_c.h
1105    %{_includedir}/samba-4.0/gen_ndr/ndr_dcerpc.h
1106    %{_includedir}/samba-4.0/gen_ndr/ndr_epmapper.h
1107    %{_includedir}/samba-4.0/gen_ndr/ndr_epmapper_c.h
1108    %{_includedir}/samba-4.0/gen_ndr/ndr_krb5pac.h
1109    %{_includedir}/samba-4.0/gen_ndr/ndr_mgmt.h
1110    %{_includedir}/samba-4.0/gen_ndr/ndr_mgmt_c.h
1111    %{_includedir}/samba-4.0/gen_ndr/ndr_misc.h
1112    %{_includedir}/samba-4.0/gen_ndr/ndr_nbt.h
1113    %{_includedir}/samba-4.0/gen_ndr/ndr_samr.h
1114    %{_includedir}/samba-4.0/gen_ndr/ndr_samr_c.h
1115    %{_includedir}/samba-4.0/gen_ndr/ndr_svcctl.h
1116    %{_includedir}/samba-4.0/gen_ndr/ndr_svcctl_c.h
1117    %{_includedir}/samba-4.0/gen_ndr/netlogon.h
1118    %{_includedir}/samba-4.0/gen_ndr/samr.h
1119    %{_includedir}/samba-4.0/gen_ndr/security.h
1120    %{_includedir}/samba-4.0/gen_ndr/server_id.h
1121    %{_includedir}/samba-4.0/gen_ndr/svcctl.h
1122    %{_includedir}/samba-4.0/gensec.h
1123    %{_includedir}/samba-4.0/ldap-util.h
1124    %{_includedir}/samba-4.0/ldap_errors.h
1125    %{_includedir}/samba-4.0/ldap_message.h
1126    %{_includedir}/samba-4.0/ldap_ndr.h
1127    %{_includedir}/samba-4.0/ldb_wrap.h
1128    %{_includedir}/samba-4.0/lookup_sid.h
1129    %{_includedir}/samba-4.0/machine_sid.h
1130    %{_includedir}/samba-4.0/ndr.h
1131    %{_includedir}/samba-4.0/ndr/ndr_drsblobs.h
1132    %{_includedir}/samba-4.0/ndr/ndr_drsuapi.h
1133    %{_includedir}/samba-4.0/ndr/ndr_svcctl.h
1134    %{_includedir}/samba-4.0/ndr/ndr_nbt.h
1135    %{_includedir}/samba-4.0/netapi.h
1136    %{_includedir}/samba-4.0/param.h
1137    %{_includedir}/samba-4.0/passdb.h
1138    %{_includedir}/samba-4.0/policy.h
1139    %{_includedir}/samba-4.0/read_smb.h
1140    %{_includedir}/samba-4.0/registry.h
1141    %{_includedir}/samba-4.0/roles.h
1142    %{_includedir}/samba-4.0/rpc_common.h
1143    %{_includedir}/samba-4.0/samba/session.h
1144    %{_includedir}/samba-4.0/samba/version.h
1145    %{_includedir}/samba-4.0/share.h
1146    %{_includedir}/samba-4.0/smb2.h
1147    %{_includedir}/samba-4.0/smb2_constants.h
1148    %{_includedir}/samba-4.0/smb2_create_blob.h
1149    %{_includedir}/samba-4.0/smb2_lease.h
1150    %{_includedir}/samba-4.0/smb2_signing.h
1151    %{_includedir}/samba-4.0/smb_cli.h
1152    %{_includedir}/samba-4.0/smb_cliraw.h
1153    %{_includedir}/samba-4.0/smb_common.h
1154    %{_includedir}/samba-4.0/smb_composite.h
1155    %{_includedir}/samba-4.0/smbconf.h
1156    %{_includedir}/samba-4.0/smb_constants.h
1157    %{_includedir}/samba-4.0/smb_ldap.h
1158    %{_includedir}/samba-4.0/smbldap.h
1159    %{_includedir}/samba-4.0/smb_raw.h
1160    %{_includedir}/samba-4.0/smb_raw_interfaces.h
1161    %{_includedir}/samba-4.0/smb_raw_signing.h
1162    %{_includedir}/samba-4.0/smb_raw_trans2.h
1163    %{_includedir}/samba-4.0/smb_request.h
1164    %{_includedir}/samba-4.0/smb_seal.h
1165    %{_includedir}/samba-4.0/smb_signing.h
1166    %{_includedir}/samba-4.0/smb_unix_ext.h
1167    %{_includedir}/samba-4.0/smb_util.h
1168    %{_includedir}/samba-4.0/tdr.h
1169    %{_includedir}/samba-4.0/tsocket.h
1170    %{_includedir}/samba-4.0/tsocket_internal.h
1171    %{_includedir}/samba-4.0/samba_util.h
1172    %{_includedir}/samba-4.0/util/attr.h
1173    %{_includedir}/samba-4.0/util/byteorder.h
1174    %{_includedir}/samba-4.0/util/data_blob.h
1175    %{_includedir}/samba-4.0/util/debug.h
1176    %{_includedir}/samba-4.0/util/memory.h
1177    %{_includedir}/samba-4.0/util/safe_string.h
1178    %{_includedir}/samba-4.0/util/string_wrappers.h
1179    %{_includedir}/samba-4.0/util/talloc_stack.h
1180    %{_includedir}/samba-4.0/util/tevent_ntstatus.h
1181    %{_includedir}/samba-4.0/util/tevent_unix.h
1182    %{_includedir}/samba-4.0/util/tevent_werror.h
1183    %{_includedir}/samba-4.0/util/time.h
1184    %{_includedir}/samba-4.0/util/xfile.h
1185    %{_includedir}/samba-4.0/util_ldb.h
1186    %{_libdir}/libdcerpc-atsvc.so
1187    %{_libdir}/libdcerpc-binding.so
1188    %{_libdir}/libdcerpc-samr.so
1189    %{_libdir}/libdcerpc.so
1190    %{_libdir}/libgensec.so
1191    %{_libdir}/libndr-krb5pac.so
1192    %{_libdir}/libndr-nbt.so
1193    %{_libdir}/libndr-standard.so
1194    %{_libdir}/libndr.so
1195    %{_libdir}/libnetapi.so
1196    %{_libdir}/libregistry.so
1197    %{_libdir}/libsamba-credentials.so
1198    %{_libdir}/libsamba-hostconfig.so
1199    %{_libdir}/libsamba-policy.so
1200    %{_libdir}/libsamba-util.so
1201    %{_libdir}/libsamdb.so
1202    %{_libdir}/libsmbclient-raw.so
1203    %{_libdir}/libsmbconf.so
1204    %{_libdir}/libtevent-util.so
1205    %{_libdir}/pkgconfig/dcerpc.pc
1206    %{_libdir}/pkgconfig/dcerpc_atsvc.pc
1207    %{_libdir}/pkgconfig/dcerpc_samr.pc
1208    %{_libdir}/pkgconfig/gensec.pc
1209    %{_libdir}/pkgconfig/ndr.pc
1210    %{_libdir}/pkgconfig/ndr_krb5pac.pc
1211    %{_libdir}/pkgconfig/ndr_nbt.pc
1212    %{_libdir}/pkgconfig/ndr_standard.pc
1213    %{_libdir}/pkgconfig/netapi.pc
1214    %{_libdir}/pkgconfig/registry.pc
1215    %{_libdir}/pkgconfig/samba-credentials.pc
1216    %{_libdir}/pkgconfig/samba-hostconfig.pc
1217    %{_libdir}/pkgconfig/samba-policy.pc
1218    %{_libdir}/pkgconfig/samba-util.pc
1219    %{_libdir}/pkgconfig/samdb.pc
1220    %{_libdir}/pkgconfig/smbclient-raw.pc
1221    %{_libdir}/libpdb.so
1222    %{_libdir}/libsmbldap.so
1223    
1224    %if %with_dc
1225    %{_includedir}/samba-4.0/dcerpc_server.h
1226    %{_libdir}/libdcerpc-server.so
1227    %{_libdir}/pkgconfig/dcerpc_server.pc
1228    %endif
1229    
1230    %if %with_internal_talloc
1231    %{_includedir}/samba-4.0/pytalloc.h
1232    %endif
1233    
1234    %if ! %with_libsmbclient
1235    %{_includedir}/samba-4.0/libsmbclient.h
1236    %{_includedir}/samba-4.0/smb_share_modes.h
1237    %endif # ! with_libsmbclient
1238    
1239    %if ! %with_libwbclient
1240    %{_includedir}/samba-4.0/wbclient.h
1241    %endif # ! with_libwbclient
1242    
1243    ### VFS-GLUSTERFS
1244    %if %{with_vfs_glusterfs}
1245    %files vfs-glusterfs
1246    %{_libdir}/samba/vfs/glusterfs.so
1247    %endif
1248    
1249    ### LIBS
1250    %files   -n %{libname}
1251    %{_libdir}/libdcerpc-atsvc.so.*
1252    %{_libdir}/libdcerpc-binding.so.*
1253    %{_libdir}/libdcerpc-samr.so.*
1254    %{_libdir}/libdcerpc.so.*
1255    %{_libdir}/libgensec.so.*
1256    %{_libdir}/libndr-krb5pac.so.*
1257    %{_libdir}/libndr-nbt.so.*
1258    %{_libdir}/libndr-standard.so.*
1259    %{_libdir}/libndr.so.*
1260    %{_libdir}/libnetapi.so.*
1261    %{_libdir}/libregistry.so.*
1262    %{_libdir}/libsamba-credentials.so.*
1263    %{_libdir}/libsamba-hostconfig.so.*
1264    %{_libdir}/libsamba-policy.so.*
1265    %{_libdir}/libsamba-util.so.*
1266    %{_libdir}/libsamdb.so.*
1267    %{_libdir}/libsmbclient-raw.so.*
1268    %{_libdir}/libsmbconf.so.*
1269    %{_libdir}/libtevent-util.so.*
1270    %{_libdir}/libpdb.so.*
1271    %{_libdir}/libsmbldap.so.*
1272    
1273    
1274    # libraries needed by the public libraries
1275    %dir %{_libdir}/samba
1276    %{_libdir}/samba/libCHARSET3.so
1277    %{_libdir}/samba/libMESSAGING.so
1278    %{_libdir}/samba/libLIBWBCLIENT_OLD.so
1279    %{_libdir}/samba/libaddns.so
1280    %{_libdir}/samba/libads.so
1281    %{_libdir}/samba/libasn1util.so
1282    %{_libdir}/samba/libauth.so
1283    %{_libdir}/samba/libauth4.so
1284    %{_libdir}/samba/libauth_sam_reply.so
1285    %{_libdir}/samba/libauth_unix_token.so
1286    %{_libdir}/samba/libauthkrb5.so
1287    %{_libdir}/samba/libccan.so
1288    %{_libdir}/samba/libcli-ldap-common.so
1289    %{_libdir}/samba/libcli-ldap.so
1290    %{_libdir}/samba/libcli-nbt.so
1291    %{_libdir}/samba/libcli_cldap.so
1292    %{_libdir}/samba/libcli_smb_common.so
1293    %{_libdir}/samba/libcli_spoolss.so
1294    %{_libdir}/samba/libcliauth.so
1295    #%{_libdir}/samba/libclidns.so
1296    %{_libdir}/samba/libcluster.so
1297    %{_libdir}/samba/libcmdline-credentials.so
1298    %{_libdir}/samba/libdbwrap.so
1299    %{_libdir}/samba/libdcerpc-samba.so
1300    %{_libdir}/samba/libdcerpc-samba4.so
1301    %{_libdir}/samba/liberrors.so
1302    %{_libdir}/samba/libevents.so
1303    %{_libdir}/samba/libflag_mapping.so
1304    %{_libdir}/samba/libgpo.so
1305    %{_libdir}/samba/libgse.so
1306    %{_libdir}/samba/libinterfaces.so
1307    %{_libdir}/samba/libkrb5samba.so
1308    %{_libdir}/samba/libldbsamba.so
1309    %{_libdir}/samba/liblibcli_lsa3.so
1310    %{_libdir}/samba/liblibcli_netlogon3.so
1311    %{_libdir}/samba/liblibsmb.so
1312    %{_libdir}/samba/libsmb_transport.so
1313    %{_libdir}/samba/libmsrpc3.so
1314    %{_libdir}/samba/libndr-samba.so
1315    %{_libdir}/samba/libndr-samba4.so
1316    %{_libdir}/samba/libnet_keytab.so
1317    %{_libdir}/samba/libnetif.so
1318    %{_libdir}/samba/libnon_posix_acls.so
1319    %{_libdir}/samba/libnpa_tstream.so
1320    %{_libdir}/samba/libprinting_migrate.so
1321    %{_libdir}/samba/libreplace.so
1322    %{_libdir}/samba/libsamba-modules.so
1323    %{_libdir}/samba/libsamba-net.so
1324    %{_libdir}/samba/libsamba-security.so
1325    %{_libdir}/samba/libsamba-sockets.so
1326    %{_libdir}/samba/libsamba_python.so
1327    %{_libdir}/samba/libsamdb-common.so
1328    %{_libdir}/samba/libsecrets3.so
1329    %{_libdir}/samba/libserver-role.so
1330    %{_libdir}/samba/libshares.so
1331    %{_libdir}/samba/libsamba3-util.so
1332    %{_libdir}/samba/libsmbd_base.so
1333    %{_libdir}/samba/libsmbd_conn.so
1334    %{_libdir}/samba/libsmbd_shim.so
1335    %{_libdir}/samba/libsmbldaphelper.so
1336    %{_libdir}/samba/libsmbpasswdparser.so
1337    %{_libdir}/samba/libsmbregistry.so
1338    %{_libdir}/samba/libtdb-wrap.so
1339    %{_libdir}/samba/libtdb_compat.so
1340    %{_libdir}/samba/libtrusts_util.so
1341    %{_libdir}/samba/libutil_cmdline.so
1342    %{_libdir}/samba/libutil_ntdb.so
1343    %{_libdir}/samba/libutil_reg.so
1344    %{_libdir}/samba/libutil_setid.so
1345    %{_libdir}/samba/libutil_tdb.so
1346    %{_libdir}/samba/libxattr_tdb.so
1347    %{_libdir}/samba/bind9/dlz_bind9_10.so
1348    
1349    %if %with_dc
1350    %{_libdir}/samba/libdb-glue.so
1351    %{_libdir}/samba/libHDB_SAMBA4.so
1352    %{_libdir}/samba/libasn1-samba4.so.8
1353    %{_libdir}/samba/libasn1-samba4.so.8.0.0
1354    %{_libdir}/samba/libgssapi-samba4.so.2
1355    %{_libdir}/samba/libgssapi-samba4.so.2.0.0
1356    %{_libdir}/samba/libhcrypto-samba4.so.5
1357    %{_libdir}/samba/libhcrypto-samba4.so.5.0.1
1358    %{_libdir}/samba/libhdb-samba4.so.11
1359    %{_libdir}/samba/libhdb-samba4.so.11.0.2
1360    %{_libdir}/samba/libheimbase-samba4.so.1
1361    %{_libdir}/samba/libheimbase-samba4.so.1.0.0
1362    %{_libdir}/samba/libhx509-samba4.so.5
1363    %{_libdir}/samba/libhx509-samba4.so.5.0.0
1364    %{_libdir}/samba/libkrb5-samba4.so.26
1365    %{_libdir}/samba/libkrb5-samba4.so.26.0.0
1366    %{_libdir}/samba/libroken-samba4.so.19
1367    %{_libdir}/samba/libroken-samba4.so.19.0.1
1368    %{_libdir}/samba/libwind-samba4.so.0
1369    %{_libdir}/samba/libwind-samba4.so.0.0.0
1370    %endif
1371    
1372    %if %{with_internal_ldb}
1373    %{_libdir}/samba/libldb.so.1
1374    %{_libdir}/samba/libldb.so.%{ldb_version}
1375    %{_libdir}/samba/libpyldb-util.so.1
1376    %{_libdir}/samba/libpyldb-util.so.%{ldb_version}
1377    %{_mandir}/man3/ldb.3.xz
1378    %endif
1379    %if %{with_internal_talloc}
1380    %{_libdir}/samba/libtalloc.so.2
1381    %{_libdir}/samba/libtalloc.so.%{talloc_version}
1382    %{_libdir}/samba/libpytalloc-util.so.2
1383    %{_libdir}/samba/libpytalloc-util.so.%{talloc_version}
1384    %{_mandir}/man3/talloc.3.xz
1385    %endif
1386    %if %{with_internal_tevent}
1387    %{_libdir}/samba/libtevent.so.0
1388    %{_libdir}/samba/libtevent.so.%{tevent_version}
1389    %endif
1390    %if %{with_internal_tdb}
1391    %{_libdir}/samba/libtdb.so.1
1392    %{_libdir}/samba/libtdb.so.%{tdb_version}
1393    %endif
1394    %if %{with_internal_ntdb}
1395    %{_libdir}/samba/libntdb.so.0
1396    %{_libdir}/samba/libntdb.so.%{ntdb_version}
1397    %endif
1398    
1399    %if ! %with_libsmbclient
1400    %{_libdir}/samba/libsmbclient.so.*
1401    %{_libdir}/samba/libsmbsharemodes.so.*
1402  %{_mandir}/man7/libsmbclient.7*  %{_mandir}/man7/libsmbclient.7*
1403  %{_libdir}/pkgconfig/smbclient.pc  %endif # ! with_libsmbclient
 %endif  
1404    
1405  %if %build_system  %if ! %with_libwbclient
1406  %files -n %{libname}-static-devel  %{_libdir}/samba/libwbclient.so.*
1407  %{_libdir}/lib*.a  %{_libdir}/samba/libwinbind-client.so
1408  %endif  %endif # ! with_libwbclient
   
 %files -n %libnetapi  
 %{_libdir}/libnetapi.so.%{netapimajor}*  
1409    
 %files -n %netapidevel  
 %{_libdir}/libnetapi*.so  
 %{_includedir}/netapi.h  
 %{_libdir}/pkgconfig/netapi.pc  
1410    
 %files -n %libsmbsharemodes  
 %{_libdir}/libsmbsharemodes.so.%{smbsharemodesmajor}*  
1411    
1412  %files -n %smbsharemodesdevel  ######          Let's temporarily add these file
1413    %{_libdir}/mit_samba.so
1414    %{_libdir}/samba/libHDB_SAMBA4.so
1415    %{_libdir}/samba/libasn1-samba4.so.8
1416    %{_libdir}/samba/libasn1-samba4.so.8.0.0
1417    %{_libdir}/samba/libdb-glue.so
1418    %{_libdir}/samba/libdnsserver_common.so
1419    %{_libdir}/samba/libgssapi-samba4.so.2
1420    %{_libdir}/samba/libgssapi-samba4.so.2.0.0
1421    %{_libdir}/samba/libhcrypto-samba4.so.5
1422    %{_libdir}/samba/libhcrypto-samba4.so.5.0.1
1423    %{_libdir}/samba/libhdb-samba4.so.11
1424    %{_libdir}/samba/libhdb-samba4.so.11.0.2
1425    %{_libdir}/samba/libheimbase-samba4.so.1
1426    %{_libdir}/samba/libheimbase-samba4.so.1.0.0
1427    %{_libdir}/samba/libheimntlm-samba4.so.1
1428    %{_libdir}/samba/libheimntlm-samba4.so.1.0.1
1429    %{_libdir}/samba/libhx509-samba4.so.5
1430    %{_libdir}/samba/libhx509-samba4.so.5.0.0
1431    %{_libdir}/samba/libkdc-samba4.so.2
1432    %{_libdir}/samba/libkdc-samba4.so.2.0.0
1433    %{_libdir}/samba/libkrb5-samba4.so.26
1434    %{_libdir}/samba/libkrb5-samba4.so.26.0.0
1435    %{_libdir}/samba/libpac.so
1436    %{_libdir}/samba/libroken-samba4.so.19
1437    %{_libdir}/samba/libroken-samba4.so.19.0.1
1438    %{_libdir}/samba/libwind-samba4.so.0
1439    %{_libdir}/samba/libwind-samba4.so.0.0.0
1440    
1441    
1442    ### LIBSMBCLIENT
1443    %if %with_libsmbclient
1444    %files -n %{libsmbclient}
1445    %{_libdir}/libsmbclient.so.*
1446    %{_libdir}/libsmbsharemodes.so.*
1447    
1448    
1449    ### LIBSMBCLIENT-DEVEL
1450    %files -n %{smbclientdevel}
1451    %{_includedir}/samba-4.0/libsmbclient.h
1452    %{_includedir}/samba-4.0/smb_share_modes.h
1453    %{_libdir}/libsmbclient.so
1454  %{_libdir}/libsmbsharemodes.so  %{_libdir}/libsmbsharemodes.so
1455  %{_includedir}/smb_share_modes.h  %{_libdir}/pkgconfig/smbclient.pc
1456  %{_libdir}/pkgconfig/smbsharemodes.pc  %{_libdir}/pkgconfig/smbsharemodes.pc
1457    %{_mandir}/man7/libsmbclient.7*
1458    %endif # with_libsmbclient
1459    
1460  %if %build_talloc  ### LIBWBCLIENT
1461  %files -n %libtalloc  %if %with_libwbclient
1462  %{_libdir}/libtalloc.so.%{tallocmajor}*  %files -n %{libwbclient}
1463    %{_libdir}/libwbclient.so.*
1464  %files -n %tallocdevel  %{_libdir}/samba/libwinbind-client.so
1465  %{_libdir}/libtalloc.so  
1466  %{_includedir}/talloc.h  ### LIBWBCLIENT-DEVEL
1467  %{_libdir}/pkgconfig/talloc.pc  %files -n %{wbclientdevel}
1468  %endif  %{_includedir}/samba-4.0/wbclient.h
   
 %if %build_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  
1469  %{_libdir}/libwbclient.so  %{_libdir}/libwbclient.so
 %{_includedir}/wbclient.h  
1470  %{_libdir}/pkgconfig/wbclient.pc  %{_libdir}/pkgconfig/wbclient.pc
1471    %endif # with_libwbclient
1472    
1473  #%files passdb-ldap  ### PIDL
1474  #%defattr(-,root,root)  %files pidl
1475  #%{_libdir}/%{name}/*/*ldap.so  %attr(755,root,root) %{_bindir}/pidl
1476    %dir %{perl_vendorlib}/Parse
1477    %{perl_vendorlib}/Parse/Pidl.pm
1478    %dir %{perl_vendorlib}/Parse/Pidl
1479    %{perl_vendorlib}/Parse/Pidl/CUtil.pm
1480    %{perl_vendorlib}/Parse/Pidl/Samba4.pm
1481    %{perl_vendorlib}/Parse/Pidl/Expr.pm
1482    %{perl_vendorlib}/Parse/Pidl/ODL.pm
1483    %{perl_vendorlib}/Parse/Pidl/Typelist.pm
1484    %{perl_vendorlib}/Parse/Pidl/IDL.pm
1485    %{perl_vendorlib}/Parse/Pidl/Compat.pm
1486    %dir %{perl_vendorlib}/Parse/Pidl/Wireshark
1487    %{perl_vendorlib}/Parse/Pidl/Wireshark/Conformance.pm
1488    %{perl_vendorlib}/Parse/Pidl/Wireshark/NDR.pm
1489    %{perl_vendorlib}/Parse/Pidl/Dump.pm
1490    %dir %{perl_vendorlib}/Parse/Pidl/Samba3
1491    %{perl_vendorlib}/Parse/Pidl/Samba3/ServerNDR.pm
1492    %{perl_vendorlib}/Parse/Pidl/Samba3/ClientNDR.pm
1493    %dir %{perl_vendorlib}/Parse/Pidl/Samba4
1494    %{perl_vendorlib}/Parse/Pidl/Samba4/Header.pm
1495    %dir %{perl_vendorlib}/Parse/Pidl/Samba4/COM
1496    %{perl_vendorlib}/Parse/Pidl/Samba4/COM/Header.pm
1497    %{perl_vendorlib}/Parse/Pidl/Samba4/COM/Proxy.pm
1498    %{perl_vendorlib}/Parse/Pidl/Samba4/COM/Stub.pm
1499    %{perl_vendorlib}/Parse/Pidl/Samba4/Python.pm
1500    %{perl_vendorlib}/Parse/Pidl/Samba4/Template.pm
1501    %dir %{perl_vendorlib}/Parse/Pidl/Samba4/NDR
1502    %{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Server.pm
1503    %{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Client.pm
1504    %{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Parser.pm
1505    %{perl_vendorlib}/Parse/Pidl/Samba4/TDR.pm
1506    %{perl_vendorlib}/Parse/Pidl/NDR.pm
1507    %{perl_vendorlib}/Parse/Pidl/Util.pm
1508    %{_mandir}/man1/pidl*
1509    %{_mandir}/man3/Parse::Pidl*
1510    
1511    ### PYTHON
1512    %files -n python-samba4
1513    %{python_sitearch}/*
1514    
1515  %ifnarch alpha  ### TEST
1516  %if %{build_mysql}  %files test
1517  %files passdb-mysql  %{_bindir}/gentest
1518  %{_libdir}/%{name}/pdb/*mysql.so  %{_bindir}/locktest
1519  %endif  %{_bindir}/masktest
1520  %endif  %{_bindir}/ndrdump
1521    %{_bindir}/smbtorture
1522  %if %{build_pgsql}  %{_mandir}/man1/gentest.1*
1523  %files passdb-pgsql  %{_mandir}/man1/locktest.1*
1524  %{_libdir}/%{name}/pdb/*pgsql.so  %{_mandir}/man1/masktest.1*
1525  %endif  %{_mandir}/man1/ndrdump.1*
1526    %{_mandir}/man1/smbtorture.1*
1527  #Files for antivirus support:  %{_mandir}/man1/vfstest.1*
1528  %if %build_antivir  
1529  %files vscan-antivir  %if %{with testsuite}
1530  %{_libdir}/%{name}/vfs/vscan-antivir.so  # files to ignore in testsuite mode
1531  %config(noreplace) %{_sysconfdir}/%{name}/vscan-antivir.conf  %{_libdir}/samba/libnss_wrapper.so
1532  %endif  %{_libdir}/samba/libsocket_wrapper.so
1533    %{_libdir}/samba/libuid_wrapper.so
1534  %if %build_clamav  %endif
1535  %files virusfilter-clamav  
1536  %{_libdir}/%{name}/vfs/svf-clamav.so  ### TEST-LIBS
1537  %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-clamav.conf  %files -n %{libtest}
1538  %endif  %{_libdir}/libtorture.so.*
1539    %{_libdir}/samba/libsubunit.so
1540  %if %build_fprot  %if %with_dc
1541  %files vscan-fprot  %{_libdir}/samba/libdlz_bind9_for_torture.so
1542  %{_libdir}/%{name}/vfs/vscan-fprotd.so  %else
1543  %config(noreplace) %{_sysconfdir}/%{name}/vscan-fprotd.conf  %{_libdir}/samba/libdsdb-module.so
 %doc %{vfsdir}/%{vscandir}/INSTALL  
 %endif  
   
 %if %build_fsav  
 %files virusfilter-fsecure  
 %{_libdir}/%{name}/vfs/svf-fsav.so  
 %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-fsav.conf  
 %endif  
   
 %if %build_icap  
 %files vscan-icap  
 %{_libdir}/%{name}/vfs/vscan-icap.so  
 %config(noreplace) %{_sysconfdir}/%{name}/vscan-icap.conf  
 %doc %{vfsdir}/%{vscandir}/INSTALL  
 %endif  
   
 %if %build_kaspersky  
 %files vscan-kaspersky  
 %{_libdir}/%{name}/vfs/vscan-kavp.so  
 %config(noreplace) %{_sysconfdir}/%{name}/vscan-kavp.conf  
 %doc %{vfsdir}/%{vscandir}/INSTALL  
 %endif  
   
 %if %build_mks  
 %files vscan-mks  
 %{_libdir}/%{name}/vfs/vscan-mksd.so  
 %config(noreplace) %{_sysconfdir}/%{name}/vscan-mks*.conf  
 %doc %{vfsdir}/%{vscandir}/INSTALL  
 %endif  
   
 %if %build_nai  
 %files vscan-nai  
 %{_libdir}/%{name}/vfs/vscan-mcdaemon.so  
 %config(noreplace) %{_sysconfdir}/%{name}/vscan-mcdaemon.conf  
 %doc %{vfsdir}/%{vscandir}/INSTALL  
 %endif  
   
 %if %build_openav  
 %files vscan-openav  
 %{_libdir}/%{name}/vfs/vscan-oav.so  
 %config(noreplace) %{_sysconfdir}/%{name}/vscan-oav.conf  
 %doc %{vfsdir}/%{vscandir}/INSTALL  
1544  %endif  %endif
1545    
1546  %if %build_sophos  ### TEST-DEVEL
1547  %files virusfilter-sophos  %files -n %{testdevel}
1548  %{_libdir}/%{name}/vfs/svf-sophos.so  %{_includedir}/samba-4.0/torture.h
1549  %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-sophos.conf  %{_libdir}/libtorture.so
1550  %endif  %{_libdir}/pkgconfig/torture.pc
1551    
1552    ### WINBIND
1553    %files winbind
1554    #%{_bindir}/wbinfo3
1555    %{_libdir}/samba/idmap
1556    %{_libdir}/samba/nss_info
1557    %{_libdir}/samba/libnss_info.so
1558    %{_libdir}/samba/libidmap.so
1559    %{_sbindir}/winbindd
1560    %attr(750,root,wbpriv) %dir /var/lib/samba/winbindd_privileged
1561    #%{_unitdir}/winbind.service
1562    #%{_sysconfdir}/NetworkManager/dispatcher.d/30-winbind
1563    %{_mandir}/man8/winbindd.8*
1564    %{_mandir}/man8/idmap_*.8*
1565    
1566  %if %build_symantec  ### WINBIND-CLIENTS
1567  %files vscan-symantec  %files winbind-clients
 %{_libdir}/%{name}/vfs/vscan-symantec.so  
 %config(noreplace) %{_sysconfdir}/%{name}/vscan-symantec.conf  
 %doc %{vfsdir}/%{vscandir}/INSTALL  
 %endif  
1568    
1569  %if %build_trend  %{_bindir}/ntlm_auth
1570  %files vscan-trend  %{_bindir}/wbinfo
1571  %{_libdir}/%{name}/vfs/vscan-trend.so  %{_mandir}/man1/ntlm_auth.1.*
1572  %config(noreplace) %{_sysconfdir}/%{name}/vscan-trend.conf  %{_mandir}/man1/wbinfo.1*
 %doc %{vfsdir}/%{vscandir}/INSTALL  
 %endif  
1573    
1574  %files domainjoin-gui  ### WINBIND-KRB5-LOCATOR
1575  %{_sbindir}/netdomjoin-gui  %files winbind-krb5-locator
1576  %dir %{_datadir}/pixmaps/samba  %ghost %{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so
1577  %{_datadir}/pixmaps/samba/samba.ico  %{_libdir}/winbind_krb5_locator.so
1578  %{_datadir}/pixmaps/samba/logo.png  %{_mandir}/man7/winbind_krb5_locator.7*
1579  %{_datadir}/pixmaps/samba/logo-small.png  
1580    ### WINBIND-MODULES
1581    %files winbind-modules
1582    %{_libdir}/libnss_winbind.so*
1583    %{_libdir}/libnss_wins.so*
1584    %{_libdir}/security/pam_winbind.so
1585    %config(noreplace) %{_sysconfdir}/security/pam_winbind.conf
1586    %{_mandir}/man5/pam_winbind.conf.5*
1587    %{_mandir}/man8/pam_winbind.8*
1588    

Legend:
Removed from v.852307  
changed lines
  Added in v.854335

  ViewVC Help
Powered by ViewVC 1.1.26