Merge from 3.0:
[gd/samba/.git] / packaging / SuSE / samba3.spec
1 #
2 # spec file for package samba3 (Version 3.0.0rc1cvs)
3 #
4 # Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany.
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
7 #
8 # Please submit bugfixes or comments via http://www.suse.de/feedback/
9 #
10 # Note: The Samba3 tarball should be called: samba3-3.0.0.tar.bz2
11 #
12
13 # neededforbuild  XFree86-libs autoconf automake cups-devel cups-libs dialog docbook-utils docbook-xsl-stylesheets docbook_4 ed freetype2 ghostscript-fonts-std ghostscript-library ghostscript-x11 glib heimdal heimdal-devel heimdal-lib iso_ent libacl libacl-devel libattr libattr-devel libgimpprint libpng libtiff libxml2 libxml2-devel libxslt mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel popt popt-devel python python-devel readline readline-devel te_etex te_latex te_pdf tetex xmlcharent
14 # usedforbuild    aaa_base acl attr bash bind9-utils bison coreutils cpio cpp cvs cyrus-sasl2 db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv kbd less libacl libattr libgcc libstdc++ libxcrypt m4 make man mktemp modutils ncurses ncurses-devel net-tools netcfg pam pam-devel pam-modules patch permissions ps rcs readline sed sendmail shadow strace syslogd sysvinit tar texinfo timezone unzip util-linux vim zlib zlib-devel XFree86-libs autoconf automake binutils bzip2 cracklib cups-devel cups-libs dialog docbook-utils docbook-xsl-stylesheets docbook_4 ed freetype2 gcc gdbm gettext ghostscript-fonts-std ghostscript-library ghostscript-x11 glib heimdal heimdal-devel heimdal-lib iso_ent libacl-devel libattr-devel libgimpprint libpng libtiff libtool libxml2 libxml2-devel libxslt mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel perl popt popt-devel python python-devel readline-devel rpm te_ams te_etex te_latex te_pdf tetex xmlcharent
15
16 Name:         samba3
17 License:      GPL
18 Group:        Productivity/Networking/Samba
19 Url:          http://www.samba.org
20 Provides:     samba smbfs samba3
21 Requires:     samba3-client 
22 Obsoletes:    samba-classic samba-ldap
23 Autoreqprov:  on
24 %define         krb_heimdal_05  0
25 %define         new_heimdal     /opt/heimdal
26 %define         new_sasl        /opt/sasl
27 %define         new_openldap    /opt/openldap
28 %define         new_glibc       0
29 Version:      3.0.0
30 Release:      %(date +%%j)
31 %define         head            0
32 %define         samba_ver 3.0.0
33 %define         samba_release   0
34 %define         ul_version      0
35 %define         suse_ver 820
36 %define         python_ver      python2.2
37 %if %{suse_ver} > 810
38 %define         new_glibc       1
39 %endif
40 %if %{suse_ver} > 821
41 %define         python_ver      python2.3
42 %endif
43 %define         make_cifsvfs    1
44 %define         make_devel      0
45 %define         make_doc        0
46 %define         make_python     1
47 %define         make_shared_mod 0
48 %define         make_smbwrap    1
49 # vscan has not yet updated to the new vfs-api
50 %define         make_vscan      0
51 %define         make_wrepld     1
52 %define         use_keytab      0
53 Summary:      samba3
54 Source:       %{name}-%{version}.tar.bz2
55 Source10:     %{name}-%{version}.files.tar.bz2
56 Source50:     samba-vscan-%{vscan_ver}.tar.bz2
57 Patch1:       %{name}-%{version}-Makefiles-heimdal.diff
58 Patch2:       samba-mutual-auth.diff
59 Patch29:      %{name}-com_err.diff
60 Patch30:      %{name}-%{version}-heimdal-06.diff
61 Patch31:      %{name}-%{version}-pdb.diff
62 Patch32:      %{name}-net_ads_password.diff
63 Patch33:      %{name}-Makefile.diff
64 Patch34:      %{name}-smbwrapper.diff
65 Patch51:      %{name}-vscan.diff
66 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
67 %define         DOCDIR          %{_defaultdocdir}/%{name}
68 %define         DOCBOOKDIR      %{_defaultdocdir}/%{name}/docbook
69 %define         SWATDIR         %{_datadir}/samba/swat
70 %define         vscan_ver       0.3.2b
71 %define         vscan_modules   fprot icap mks openantivirus sophos trend
72 #not pdb_nisplussam
73 %define         pdb_modules     pdb_xml,pdb_mysql,pdb_ldap,pdb_smbpasswd,pdb_tdbsam,pdb_unix,pdb_guest,pdb_nisplussam
74 %define         rpc_modules     rpc_lsa,rpc_samr,rpc_reg,rpc_wks,rpc_net,rpc_dfs,rpc_srv,rpc_spoolss
75 %define         auth_modules    auth_rhosts,auth_sam,auth_unix,auth_winbind,auth_server,auth_domain,auth_builtin
76 %define         vfs_modules     vfs_recycle,vfs_audit,vfs_extd_audit,vfs_netatalk,vfs_fake_perms
77 %define         idmap_modules   idmap_winbind,idmap_ldap,idmap_tdb
78 %define         charset_modules charset_weird
79 %package client
80 Summary:      samba3-client
81 Autoreqprov:  on
82 Requires:     cups-libs
83 Obsoletes:    smbclnt samba-classic-client samba-ldap-client
84 Provides:     samba-client samba3-client
85 Group:        Productivity/Networking/Samba
86 %package winbind
87 Requires:     samba-client samba
88 Summary:      samba3-winbind
89 Autoreqprov:  on
90 Group:        Productivity/Networking/Samba
91 %package utils
92 Summary:      samba3-utils
93 Autoreqprov:  on
94 Group:        Productivity/Networking/Samba
95 %package doc
96 Summary:      samba3-doc
97 Autoreqprov:  on
98 Group:        Productivity/Networking/Samba
99 %package docbook
100 Summary:      samba3-docbook
101 Autoreqprov:  on
102 Group:        Productivity/Networking/Samba
103 %package pdb
104 Summary:      samba3-pdb
105 Autoreqprov:  on
106 Group:        Productivity/Networking/Samba
107 %if %{make_cifsvfs}
108 %package cifsmount
109 Summary:      samba3-cifsmount
110 Autoreqprov:  on
111 Group:        Productivity/Networking/Samba
112 Url:          http://us1.samba.org/samba/Linux_CIFS_client.html
113 %endif
114 %if %{make_vscan}
115 %package vscan
116 Summary:      samba3-vscan
117 Autoreqprov:  on
118 Group:        Productivity/Networking/Samba
119 Version:      0.3.2a
120 Release:      0
121 Url:          http://www.openantivirus.org/
122 %endif
123 %if %{make_wrepld}
124 %package wrepld
125 Summary:      samba3-wrepld
126 Autoreqprov:  on
127 Group:        Productivity/Networking/Samba
128 %endif
129 %if %{make_python}
130 %package python
131 Summary:      samba3-python
132 Autoreqprov:  on
133 Group:        Productivity/Networking/Samba
134 %endif
135 %package -n libsmbclient
136 Summary:      Samba client library
137 Autoreqprov:  on
138 Group:        System/Libraries
139 %package -n libsmbclient-devel
140 Summary:      Libraries and header files to develop programs with smbclient support
141 Autoreqprov:  on
142 Group:        Development/Libraries/C and C++
143 %prep
144 [ $RPM_BUILD_ROOT = "/" ] && (echo "your buildroot is /" && exit 0) || rm -rf $RPM_BUILD_ROOT
145 mkdir $RPM_BUILD_ROOT
146 %setup -n %{name}-%{samba_ver}
147 %setup -T -D -a 50
148 cp -ar samba-vscan-%{vscan_ver} examples/VFS/
149 # untar my configs
150 %setup -T -D -a 10
151 ###########
152 ### PATCHES
153 ###########
154 # Makefiles-heimdal.diff
155 %patch1
156 %if %{use_keytab}
157 # luke howards keytab-patch
158 %patch2
159 %endif
160 # some com_err fixes
161 %patch29
162 %if %{suse_ver} > 821
163 %patch30
164 %endif
165 # vscan patch
166 %patch51
167 # net ads password
168 %patch32
169 # temp Makefile (show more libs)
170 %patch33
171 # temp pdb-test.c
172 %patch31
173 # smbwrapper should use LIBDIR not BINDIR
174 %patch34
175 #find . -name CVS -print | xargs rm -rf
176 #find . -name ".cvsignore" -print | xargs rm -rf
177 find . -name "*.gd" -print | xargs rm -rvf
178 find . -name "*.orig" -print | xargs rm -rvf
179 %if %{ul_version} >= 1
180         echo '#define VERSION "%samba_ver-UL"' > source/include/version.h
181 %else
182         echo '#define VERSION "%samba_ver-SuSE"' > source/include/version.h
183 %endif
184
185 %build %{name}-%{samba_ver}
186 %{?suse_update_config:%{suse_update_config -f}}
187 cd source
188 ./autogen.sh
189 export CFLAGS="$RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
190 # debugging symbols
191 %if %{make_devel}
192 export CFLAGS="$RPM_OPT_FLAGS -g -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
193 %endif
194 %if %{krb_heimdal_05} 
195 export CFLAGS="$CFLAGS -I./include -I%{new_heimdal}/include "
196 export CFLAGS="$CFLAGS -I%{new_openldap}/include "
197 export CFLAGS="$CFLAGS -I%{new_sasl}/include "
198 export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_heimdal}/lib" 
199 export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_openldap}/lib"
200 export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_sasl}/lib" 
201 %endif
202 %ifarch ppc64
203 export CFLAGS="$CFLAGS -mminimal-toc"
204 %endif
205 CONF_OPTS="\
206         --enable-cups \
207         --libdir=/usr/lib/samba \
208         --localstatedir=/var/lib/samba \
209         --mandir=%{_mandir} \
210         --prefix=/usr \
211         --sbindir=/usr/sbin \
212         --sysconfdir=/etc/samba \
213         --with-acl-support \
214         --with-automount \
215         --with-configdir=/etc/samba \
216         --with-lockdir=/var/lib/samba \
217         --with-logfilebase=/var/log/samba \
218         --with-msdfs \
219         --with-pam \
220         --with-pam_smbpass \
221         --with-piddir=/var/run/samba \
222         --with-privatedir=/etc/samba \
223         --with-quotas \
224         --with-smbmount \
225         --with-swatdir=/usr/share/samba/swat \
226         --with-syslog \
227         --with-utmp \
228         --with-vfs \
229         --with-winbind \
230         --with-tdbsam \
231         --with-expsam=xml,mysql \
232         --with-profiling-data \
233 %if %{use_keytab}
234         --enable-keytab \
235 %endif
236 %if %{make_smbwrap}
237         --with-smbwrapper \
238 %endif
239 %if %{make_python}
240         --with-python=%{python_ver} \
241 %endif
242 %if %{make_shared_mod} 
243         --with-shared-modules=%{pdb_modules},%{rpc_modules} \
244 %endif
245 %if %{make_devel} 
246         --enable-developer \
247         --enable-krb5developer \
248 %endif
249 "
250 #       --with-nisplus-home \
251 # make sure we have a chance to find the krb5-config-tool
252 export PATH="$PATH:/usr/lib/heimdal/bin"
253 ./configure $CONF_OPTS
254 make \
255         all \
256         torture \
257         nsswitch/libnss_wins.so \
258         debug2html \
259         libsmbclient \
260         everything \
261         bin/editreg
262 # everything = nsswitch smbwrapper smbtorture debug2html smbfilter nsswitch/libnss_wins.so
263 make modules 
264 make -C tdb tdbdump tdbtest tdbtool tdbtorture 
265 make talloctort 
266 %if %{make_wrepld}
267 make bin/wrepld
268 %endif
269 %if %{make_doc}
270 pushd `pwd`
271 cd ../docs/docbook
272 autoconf -f
273 ./configure
274 # gracefully ignore errors...
275 make -i manpages html html-single pdf htmlfaq htmlman
276 # ps is not necessary, txt neither
277 # everything = manpages ps pdf html-single html htmlman txt htmlfaq 
278 popd
279 %endif
280 # make examples in VFS,PDB 
281 pushd `pwd`
282 cd ../examples/VFS/
283 sh -x autogen.sh
284 ./configure
285 popd
286 EXAMPLEDIRS="pdb VFS"
287 for i in $EXAMPLEDIRS; do make -C ../examples/$i; done
288 %if %{make_vscan}
289 export USE_KAVPSHAREDLIB=0
290 export USE_INCLMKSDLIB=1
291 for module in %{vscan_modules}; do 
292         make -C ../examples/VFS/samba-vscan-%{vscan_ver}/${module}; 
293 done
294 %endif
295 %if %{make_python}
296 make python_ext
297 %endif
298 %if %{make_cifsvfs}
299 cd client
300 export CFLAGS="$RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
301 gcc mount.cifs.c -o mount.cifs
302 cd ..
303 %endif
304
305 %install
306 mkdir -p \
307         $RPM_BUILD_ROOT/%{DOCDIR} \
308         $RPM_BUILD_ROOT/%{DOCDIR}-vscan \
309         $RPM_BUILD_ROOT/%{DOCDIR}/docbook \
310         $RPM_BUILD_ROOT/etc/{pam.d,init.d,samba} \
311         $RPM_BUILD_ROOT/lib/security \
312         $RPM_BUILD_ROOT/sbin \
313         $RPM_BUILD_ROOT/usr/include \
314         $RPM_BUILD_ROOT/usr/lib/%{python_ver}/lib-dynload \
315         $RPM_BUILD_ROOT/usr/lib/samba/{vfs,pdb,vscan,rpc,auth,charset,idmap} \
316         $RPM_BUILD_ROOT/usr/share/{man,samba/swat} \
317         $RPM_BUILD_ROOT/usr/{bin,sbin} \
318         $RPM_BUILD_ROOT/var/adm \
319         $RPM_BUILD_ROOT/var/lib/samba/{netlogon,drivers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC},profiles} \
320         $RPM_BUILD_ROOT/var/log/samba \
321         $RPM_BUILD_ROOT/var/run/samba \
322         $RPM_BUILD_ROOT/var/spool/samba 
323 cd source/
324 make install \
325         LIBDIR=$RPM_BUILD_ROOT/usr/lib/samba \
326         LOGFILEBASE=$RPM_BUILD_ROOT/var/log/samba \
327         CONFIGFILE=$RPM_BUILD_ROOT/etc/samba/smb.conf \
328         LMHOSTSFILE=$RPM_BUILD_ROOT/etc/samba/lmhosts \
329         SWATDIR=$RPM_BUILD_ROOT/usr/share/samba/swat \
330         SBINDIR=$RPM_BUILD_ROOT/usr/sbin \
331         LOCKDIR=$RPM_BUILD_ROOT/var/lib/samba \
332         DRIVERFILE=$RPM_BUILD_ROOT/etc/samba/printers.def \
333         BINDIR=$RPM_BUILD_ROOT/usr/bin \
334         SMB_PASSWD_FILE=$RPM_BUILD_ROOT/etc/samba/smbpasswd \
335         MANDIR=$RPM_BUILD_ROOT/usr/share/man
336 make installmodules \
337         LIBDIR=$RPM_BUILD_ROOT/usr/lib/samba 
338 cd ..
339 # utility scripts
340 %if %{head}
341 scripts="creategroup cvslog.pl scancvslog.pl"
342 %else
343 scripts="scancvslog.pl"
344 %endif
345 mkdir -p examples/scripts
346 for i in $scripts; do
347         cp -a source/script/$i          examples/scripts/
348 done
349 # configuration files
350 %if %{ul_version} >= 1
351         SUFFIX="UnitedLinux"
352 %else
353         SUFFIX="SuSE"
354 %endif
355 cat smb.conf.vendor | egrep -v '(^$$|^#)' > smb.conf
356 mv smb.conf.vendor examples/smb.conf.${SUFFIX}
357 install -m 644 smb.conf*        $RPM_BUILD_ROOT/etc/samba/
358 install -m 644 lmhosts          $RPM_BUILD_ROOT/etc/samba/
359 install -m 644 smbusers         $RPM_BUILD_ROOT/etc/samba/
360 install -m 600 smbpasswd -o root -g root  $RPM_BUILD_ROOT/etc/samba/
361 install -m 600 smbfstab -o root -g root  $RPM_BUILD_ROOT/etc/samba/
362 # pam
363 install -m 644 samba.pamd       $RPM_BUILD_ROOT/etc/pam.d/samba
364 # sambamount
365 ln -sf /usr/bin/smbmount        $RPM_BUILD_ROOT/sbin/mount.smbfs
366 #cifsmount
367 %if %{make_cifsvfs}
368 install -m755 source/client/mount.cifs  $RPM_BUILD_ROOT/sbin
369 %endif
370 # start scripts
371 install rc.smb                  $RPM_BUILD_ROOT/etc/init.d/smb
372 ln -sf ../../etc/init.d/smb     $RPM_BUILD_ROOT/usr/sbin/rcsmb
373 install rc.nmb                  $RPM_BUILD_ROOT/etc/init.d/nmb
374 ln -sf ../../etc/init.d/nmb     $RPM_BUILD_ROOT/usr/sbin/rcnmb
375 install rc.smbfs                $RPM_BUILD_ROOT/etc/init.d/smbfs
376 ln -sf ../../etc/init.d/smbfs   $RPM_BUILD_ROOT/usr/sbin/rcsmbfs
377 install rc.winbind              $RPM_BUILD_ROOT/etc/init.d/winbind
378 ln -sf ../../etc/init.d/winbind $RPM_BUILD_ROOT/usr/sbin/rcwinbind
379 %if %{make_wrepld}
380 install rc.wrepl                $RPM_BUILD_ROOT/etc/init.d/wrepl
381 ln -sf ../../etc/init.d/wrepl   $RPM_BUILD_ROOT/usr/sbin/rcwrepl
382 cp -a source/bin/wrepld         $RPM_BUILD_ROOT/usr/sbin/
383 %endif
384 # libnss_wins.so
385 cp source/nsswitch/libnss_wins.so               $RPM_BUILD_ROOT/lib/libnss_wins.so.2
386 ln -sf /lib/libnss_wins.so.2                    $RPM_BUILD_ROOT/lib/libnss_wins.so
387 # winbind stuff
388 cp -a source/nsswitch/pam_winbind.so            $RPM_BUILD_ROOT/lib/security/
389 cp -a source/nsswitch/libnss_winbind.so         $RPM_BUILD_ROOT/lib/libnss_winbind.so.2
390 cp -a source/bin/winbindd                       $RPM_BUILD_ROOT/usr/sbin/
391 ln -s /lib/libnss_winbind.so.2                  $RPM_BUILD_ROOT/lib/libnss_winbind.so
392 # pam_smbpass
393 cp -a source/bin/pam_smbpass.so                 $RPM_BUILD_ROOT/lib/security/
394 # smbfilter
395 cp -a source/bin/smbfilter                      $RPM_BUILD_ROOT/usr/bin/
396 # editreg
397 cp -a source/bin/editreg                        $RPM_BUILD_ROOT/usr/bin/
398 # install libsmbclient
399 install -m0755 source/bin/libsmbclient.a        $RPM_BUILD_ROOT/%{_libdir}
400 install -m0755 source/bin/libsmbclient.so       $RPM_BUILD_ROOT/%{_libdir}/libsmbclient.so.0
401 ln -s /usr/lib/libsmbclient.so.0                $RPM_BUILD_ROOT/%{_libdir}/libsmbclient.so
402 install -m0644 source/include/libsmbclient.h    $RPM_BUILD_ROOT/%{_includedir}
403 # install nsswitch-headers (for squid, etc.)
404 mkdir -p $RPM_BUILD_ROOT/%{_includedir}/samba/nsswitch
405 cp source/nsswitch/*.h                          $RPM_BUILD_ROOT/%{_includedir}/samba/nsswitch/
406 # install smbtorture and other test-programs
407 install -m0755 source/bin/smbtorture            $RPM_BUILD_ROOT/usr/bin/
408 install -m0755 source/bin/talloctort            $RPM_BUILD_ROOT/usr/bin/
409 install -m0755 source/bin/{msgtest,masktest,locktest*}  $RPM_BUILD_ROOT/usr/bin/
410 install -m0755 source/bin/{vfstest,nsstest}     $RPM_BUILD_ROOT/usr/bin/
411 # install tdb tools
412 install -m0755 source/tdb/{tdbdump,tdbtest,tdbtool,tdbtorture}  $RPM_BUILD_ROOT/usr/bin/
413 # install VFS-modules
414 install -m0755 examples/VFS/*.so                $RPM_BUILD_ROOT/%{_libdir}/samba/vfs/
415 # install PDB-modules
416 install -m0755 examples/pdb/pdb_test.so         $RPM_BUILD_ROOT/%{_libdir}/samba/pdb/
417 %if %{make_vscan}
418 # install VSCAN-vfs-modules
419 install -m0755 examples/VFS/samba-vscan-%{vscan_ver}/*/*.so     $RPM_BUILD_ROOT/%{_libdir}/samba/vscan/
420 %endif
421 # make examples clean
422 VFS="$RPM_BUILD_DIR/%{name}-%{samba_ver}/examples/VFS"
423 VSCAN="$VFS/samba-vscan-%{vscan_ver}"
424 PDB="$RPM_BUILD_DIR/%{name}-%{samba_ver}/examples/pdb"
425 dirs="$PDB $SAM $VFS"
426 (for i in $dirs; do make -C $i clean; done)
427 %if %{make_vscan}
428 (for i in %{vscan_modules}; do make -C $VSCAN/$i clean; done)
429 %endif
430 # install python
431 %if %{make_python}
432 cp -a source/build/lib.*/samba                  $RPM_BUILD_ROOT/usr/lib/%{python_ver}/lib-dynload/
433 find source/python -name CVS -print | xargs rm -rf
434 find source/python -name ".cvsignore" -print | xargs rm -rf
435 %endif
436 # whats this ?
437 install -m0755 source/bin/debug2html            $RPM_BUILD_ROOT/usr/bin/
438 # install smbwrapper
439 %if %{make_smbwrap}
440 install -m0755 source/bin/smbwrapper.so         $RPM_BUILD_ROOT/%{_libdir}/samba/
441 install -m0755 source/bin/smbsh                 $RPM_BUILD_ROOT/usr/bin/
442 %endif
443 ##############
444 # cleanup docs
445 ##############
446 #chmod 644 `find docs examples -type f`
447 #chmod 755 `find docs examples -type d`
448 #find . -name CVS -print | xargs rm -rf
449 #find . -name ".cvsignore" -print | xargs rm -rf
450 mv COPYING Manifest README Read-Manifest-Now Roadmap WHATSNEW.txt $RPM_BUILD_ROOT/%{DOCDIR}/
451 cp source/msdfs/README          $RPM_BUILD_ROOT/%{DOCDIR}/README.msdfs
452 cp source/smbwrapper/README     $RPM_BUILD_ROOT/%{DOCDIR}/README.smbwrapper
453 %if %{ul_version} >= 1
454         SUFFIX="UnitedLinux"
455 %else
456         SUFFIX="SuSE"
457 %endif
458 cp README.vendor                ${RPM_BUILD_ROOT}/%{DOCDIR}/README.${SUFFIX}
459 # pam_smbpass is missing
460 cp -a source/pam_smbpass/samples        examples/pam_smbpass/
461 cp -a source/pam_smbpass/{CHANGELOG,INSTALL,README,TODO} examples/pam_smbpass/
462 # prepare docbook package
463 cp -a docs/docbook/*            $RPM_BUILD_ROOT/%{DOCBOOKDIR}
464 #make -C $RPM_BUILD_ROOT/%{DOCBOOKDIR} clean
465 rm -rf $RPM_BUILD_ROOT/%{DOCBOOKDIR}/autom4te.cache 
466 rm -rf $RPM_BUILD_ROOT/%{DOCBOOKDIR}/config.*
467 # this is empty
468 rm -rf docs/yodldocs
469 rm -rf examples/VFS/samba-vscan-%{vscan_ver}
470 # zip manpages at least
471 gzip -f docs/manpages/*.[1-9]
472 cp -a docs/*                    $RPM_BUILD_ROOT/%{DOCDIR}
473 cp -a examples/                 $RPM_BUILD_ROOT/%{DOCDIR}
474 # save space...
475 rm -r $RPM_BUILD_ROOT/%{SWATDIR}/using_samba 
476 ln -s %{DOCDIR}/htmldocs/using_samba $RPM_BUILD_ROOT/%{SWATDIR}
477 # hm...
478 cp $RPM_BUILD_ROOT/%{SWATDIR}/help/welcome.html $RPM_BUILD_ROOT/%{DOCDIR}/htmldocs/
479 rm -r $RPM_BUILD_ROOT/%{SWATDIR}/help
480 ln -s %{DOCDIR}/htmldocs $RPM_BUILD_ROOT/%{SWATDIR}/help
481 # remove cvs
482 find $RPM_BUILD_ROOT/%{DOCDIR} -name CVS -print | xargs rm -rf
483 find $RPM_BUILD_ROOT/%{DOCDIR} -name ".cvsignore" -print | xargs rm -rf
484 # finally build a file-list
485 for file in $( find ${RPM_BUILD_ROOT}%{DOCDIR} -maxdepth 1); do
486         # exclude %{DOCDIR} and docbook
487         case "${file#${RPM_BUILD_ROOT}}" in
488                 %{DOCDIR}|%{DOCDIR}/docbook) continue ;;
489         esac
490         echo "%doc ${file#${RPM_BUILD_ROOT}}" >> ${RPM_BUILD_DIR}/%{name}-%{samba_ver}/filelist-doc
491 done
492
493 %post
494 %{fillup_and_insserv smb}
495 mkdir -p $RPM_BUILD_ROOT/var/adm/notify/messages
496 cat << EOF > var/adm/notify/messages/samba-notify
497 Achtung!
498 This is %{name}-%{samba_ver}. Please do not run on production systems.
499 You have been warned.
500 EOF
501
502 %post client
503 %{fillup_and_insserv -fpy smbfs}
504 %{fillup_only -ans samba client}
505
506 %post winbind
507 %{fillup_and_insserv winbind}
508
509 %postun
510 %{insserv_cleanup}
511
512 %postun client
513 %{insserv_cleanup}
514
515 %postun winbind
516 %{insserv_cleanup}
517
518 %clean
519 #make -C source realclean
520
521 %files
522 #/usr/bin/addtosmbpass
523 #/usr/bin/convert_smbpasswd
524 %dir /etc/samba
525 %dir /usr/lib/samba
526 %config /etc/init.d/nmb
527 %config /etc/init.d/smb
528 %config /etc/pam.d/samba
529 %config(noreplace) /etc/samba/smbpasswd
530 %config(noreplace) /etc/samba/smbusers
531 %doc %{_mandir}/man1/smbcontrol.1.gz
532 %doc %{_mandir}/man1/smbstatus.1.gz
533 %doc %{_mandir}/man1/testparm.1.gz
534 %doc %{_mandir}/man1/testprns.1.gz
535 %doc %{_mandir}/man5/smbpasswd.5.gz
536 %doc %{_mandir}/man7/samba.7.gz
537 %doc %{_mandir}/man8/nmbd.8.gz
538 %doc %{_mandir}/man8/pdbedit.8.gz
539 %doc %{_mandir}/man8/smbd.8.gz
540 %doc %{_mandir}/man8/smbpasswd.8.gz
541 %doc %{_mandir}/man8/swat.8.gz
542 %doc %{_mandir}/man8/tdbbackup.8.gz
543 %{_includedir}/samba
544 /lib/security/pam_smbpass.so
545 /usr/bin/pdbedit
546 /usr/bin/smbcontrol
547 /usr/bin/smbpasswd
548 /usr/bin/smbstatus
549 /usr/bin/tdbbackup
550 /usr/bin/tdbdump  
551 /usr/bin/tdbtest  
552 /usr/bin/tdbtool  
553 /usr/bin/testparm
554 /usr/bin/testprns
555 /usr/lib/samba/rpc
556 /usr/lib/samba/vfs
557 /usr/sbin/nmbd
558 /usr/sbin/rcnmb
559 /usr/sbin/rcsmb
560 /usr/sbin/smbd
561 /usr/sbin/swat
562 /usr/share/samba
563 /var/lib/samba
564 /var/log/samba
565 /var/run/samba
566 /var/spool/samba
567
568 %files client
569 %config /etc/init.d/smbfs
570 %config(noreplace) /etc/samba/lmhosts
571 %config(noreplace) /etc/samba/smb.conf
572 %config(noreplace) /etc/samba/smbfstab
573 %dir /etc/samba
574 %dir /usr/lib/samba
575 %doc %{_mandir}/man1/editreg.1.gz
576 %doc %{_mandir}/man1/findsmb.1.gz
577 %doc %{_mandir}/man1/nmblookup.1.gz
578 %doc %{_mandir}/man1/profiles.1.gz
579 %doc %{_mandir}/man1/rpcclient.1.gz
580 %doc %{_mandir}/man1/smbcacls.1.gz
581 %doc %{_mandir}/man1/smbclient.1.gz
582 %doc %{_mandir}/man1/smbcquotas.1.gz
583 %doc %{_mandir}/man1/smbtar.1.gz
584 %doc %{_mandir}/man1/smbtree.1.gz
585 %doc %{_mandir}/man5/lmhosts.5.gz
586 %doc %{_mandir}/man5/smb.conf.5.gz
587 %doc %{_mandir}/man7/Samba.7.gz
588 %doc %{_mandir}/man8/net.8.gz
589 %doc %{_mandir}/man8/smbmnt.8.gz
590 %doc %{_mandir}/man8/smbmount.8.gz
591 %doc %{_mandir}/man8/smbspool.8.gz
592 %doc %{_mandir}/man8/smbumount.8.gz
593 /sbin/mount.smbfs
594 /usr/bin/editreg
595 /usr/bin/findsmb
596 /usr/bin/net
597 /usr/bin/nmblookup
598 /usr/bin/profiles
599 /usr/bin/rpcclient
600 /usr/bin/smbcacls
601 /usr/bin/smbclient
602 /usr/bin/smbcquotas
603 /usr/bin/smbfilter
604 /usr/bin/smbmnt
605 /usr/bin/smbmount
606 /usr/bin/smbspool
607 /usr/bin/smbtar
608 /usr/bin/smbtree
609 /usr/bin/smbumount
610 /usr/lib/samba/lowcase.dat
611 /usr/lib/samba/upcase.dat
612 /usr/lib/samba/valid.dat
613 /usr/sbin/rcsmbfs
614 %if %{make_smbwrap}
615 /usr/bin/smbsh
616 %doc %{_mandir}/man1/smbsh.1.gz
617 /usr/lib/samba/smbwrapper.so
618 %endif
619
620 %files winbind
621 %config /etc/init.d/winbind
622 %config(noreplace) /etc/samba/smb.conf
623 %dir /etc/samba
624 %doc %{_mandir}/man1/wbinfo.1.gz
625 %doc %{_mandir}/man8/winbindd.8.gz
626 %doc %{_mandir}/man1/ntlm_auth.1.gz
627 /lib/libnss_winbind.so*
628 /lib/libnss_wins.so*
629 /lib/security/pam_winbind.so
630 /usr/bin/ntlm_auth
631 /usr/bin/wbinfo
632 /usr/sbin/rcwinbind
633 /usr/sbin/winbindd
634
635 %files utils
636 %doc %{_mandir}/man1/vfstest.1.gz
637 /usr/bin/debug2html
638 /usr/bin/locktest
639 /usr/bin/locktest2
640 /usr/bin/masktest
641 /usr/bin/msgtest
642 /usr/bin/nsstest
643 /usr/bin/smbtorture
644 /usr/bin/talloctort
645 /usr/bin/tdbtorture
646 /usr/bin/vfstest
647
648 %files doc -f filelist-doc
649 %dir /usr/share/doc/packages/samba3
650
651 %files docbook
652 %docdir %{DOCBOOKDIR}
653 %{DOCBOOKDIR}
654 %dir /usr/share/doc/packages/samba3
655
656 %files pdb
657 /usr/lib/samba/pdb
658 %doc examples/pdb/{Makefile,README,pdb_test.c}
659 %doc examples/pdb/{mysql/mysql.dump,mysql/smb.conf}
660 %if %{make_cifsvfs}
661
662 %files cifsmount
663 /sbin/mount.cifs
664 %endif
665 %if %{make_wrepld}
666
667 %files wrepld
668 %config /etc/init.d/wrepl
669 /usr/sbin/rcwrepl
670 /usr/sbin/wrepld
671 %endif
672 %if %{make_vscan}
673
674 %files vscan
675 /usr/lib/samba/vscan
676 %doc samba-vscan-%{vscan_ver}/{AUTHORS,COPYING,ChangeLog,FAQ,NEWS,README,TODO}
677 %endif
678 %if %{make_python}
679
680 %files python
681 %doc source/python/README 
682 %doc source/python/examples 
683 %doc source/python/gprinterdata
684 %doc source/python/gtdbtool
685 %doc source/python/gtkdictbrowser.py
686 /usr/lib/%{python_ver}/lib-dynload/samba
687 %endif
688
689 %files -n libsmbclient
690 %{_libdir}/libsmbclient.so.*
691
692 %files -n libsmbclient-devel
693 %{_includedir}/libsmbclient.h
694 %{_libdir}/libsmbclient.a
695 %{_libdir}/libsmbclient.so
696
697 %description
698 samba3
699
700
701 %description client
702 samba3-client
703
704
705 %description winbind
706 samba3-winbind
707
708
709 %description utils
710 samba3-utils
711
712
713 %description doc
714 samba3-doc
715
716
717 %description docbook
718 samba3-docbook
719
720
721 %description pdb
722 samba3-pdb
723
724 %if %{make_cifsvfs}
725
726 %description cifsmount
727 samba3-cifsmount
728
729 %endif
730 %if %{make_vscan}
731
732 %description vscan
733 samba3-vscan
734
735 %endif
736 %if %{make_python}
737
738 %description python
739 samba3-python
740
741 %endif
742 %if %{make_wrepld}
743
744 %description wrepld
745 samba3-wrepld
746
747 %endif
748
749 %description -n libsmbclient
750 This package includes the libsmbclient library.
751
752 Authors:
753 --------
754     The Samba Team <samba@samba.org>
755
756
757 %description -n libsmbclient-devel
758 This package contains static libraries and header files needed to develop
759 programs which make use of the smbclient programming interface.
760
761 Authors:
762 --------
763     The Samba Team <samba@samba.org>
764
765