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