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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 852307 - (show annotations) (download)
Tue Jul 7 11:00:21 2015 UTC (4 years, 7 months ago) by remmy
File size: 66011 byte(s)
Provide missing .so files which resulted in dangling symlinks (mga#4336)
1 %define pkg_name samba
2 %define version 3.6.25
3 %define rel 2
4 #define subrel 1
5 %define vscanver 0.1.3
6 %define libsmbmajor 0
7 %define netapimajor 0
8 %define smbsharemodesmajor 0
9 %define tallocmajor 1
10 %define tdbmajor 1
11 %define wbclientmajor 0
12
13 %define check_sig() export GNUPGHOME=%{_tmppath}/rpm-gpghome \
14 if [ -d "$GNUPGHOME" ] \
15 then echo "Error, GNUPGHOME $GNUPGHOME exists, remove it and try again"; exit 1 \
16 fi \
17 install -d -m700 $GNUPGHOME \
18 gpg --import %{1} \
19 gpg --trust-model always --verify %{2} %{?3} \
20 rm -Rf $GNUPGHOME \
21
22
23 # Samba has started using -Wl,z,nodefs upstream, without libtool (after patch
24 # submission to them, handled in samba bug 6792. To allow
25 # plugins to link now, we have to avoid any such flags by default
26 #define _disable_ld_no_undefined 1
27 # or, instead, filter them out of the right line in the Makefile, like before
28 # see LDSHFLAGS_MODULES below
29
30 %{!?lib: %global lib lib}
31 %{!?mklibname: %global mklibname(ds) %lib%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}}
32
33 %{?!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,}/')}}
34
35 %define libname %mklibname smbclient %libsmbmajor
36 %define libnetapi %mklibname netapi %netapimajor
37 %define netapidevel %mklibname -d netapi
38 %define libsmbsharemodes %mklibname smbsharemodes %smbsharemodesmajor
39 %define smbsharemodesdevel %mklibname -d smbsharemodes
40 %define libtalloc %mklibname talloc %tallocmajor
41 %define tallocdevel %mklibname -d talloc
42 %define libtdb %mklibname tdb %tdbmajor
43 %define tdbdevel %mklibname -d tdb
44 %define libwbclient %mklibname wbclient %wbclientmajor
45 %define wbclientdevel %mklibname -d wbclient
46
47 # Version and release replaced by samba-team at release from samba cvs
48 %define pversion PVERSION
49 %define prelease PRELEASE
50
51 #Check to see if p(version|release) has been replaced (1 if replaced)
52 %define have_pversion %(if [ "%pversion" = `echo "pversion" |tr '[:lower:]' '[:upper:]'` ];then echo 0; else echo 1; fi)
53
54 %if %have_pversion
55 %define source_ver %{pversion}
56 %define rel %mkrel 1.%{prelease}
57 # Don't abort for stupid reasons on builds from tarballs:
58 %global _unpackaged_files_terminate_build 0
59 %global _missing_doc_files_terminate_build 0
60 %else
61 %define source_ver %{version}
62 %endif
63
64 %define prerel %mga_ver -r %rel %source_ver
65 %define real_version %mga_ver %source_ver
66 %define release %mkrel %prerel
67 %define have_pre %([ "%version" == "%source_ver" ]; echo $?)
68
69 # Check to see if we are running a build from a tarball release from samba.org
70 # (%have_pversion) If so, disable vscan, unless explicitly requested
71 # (--with vscan).
72 %define build_vscan 1
73 %if %have_pversion
74 %define build_vscan 0
75 %{?_with_vscan: %define build_vscan 1}
76 %endif
77
78 # Default options
79 %define build_talloc 0
80 %define build_tdb 0
81 %define build_ldb 0
82 %define build_ctdb 1
83 %define build_alternatives 1
84 %define build_system 1
85 %define build_acl 1
86 %define build_winbind 1
87 %define build_wins 1
88 %define build_ldap 0
89 %define build_ads 1
90 %define build_scanners 0
91 %define build_test 0
92 # CUPS supports functionality for 'printcap name = cups' (9.0 and later):
93 %define build_cupspc 1
94 # %_{pre,postun}_service are provided by rpm-helper in 9.0 and later
95 %define have_rpmhelper 1
96 %define build_mysql 0
97 %define build_pgsql 0
98
99 # Allow commandline option overrides (borrowed from Vince's qmail srpm):
100 # To use it, do rpm [-ba|--rebuild] --with 'xxx'
101 # Check if the rpm was built with the defaults, otherwise we inform the user
102 %define build_non_default 0
103 %{?_with_system: %global build_system 1}
104 %{?_without_system: %global build_system 0}
105 %{?_with_acl: %global build_acl 1}
106 %{?_with_acl: %global build_non_default 1}
107 %{?_without_acl: %global build_acl 0}
108 %{?_without_acl: %global build_non_default 1}
109 %{?_with_winbind: %global build_winbind 1}
110 %{?_with_winbind: %global build_non_default 1}
111 %{?_without_winbind: %global build_winbind 0}
112 %{?_without_winbind: %global build_non_default 1}
113 %{?_with_wins: %global build_wins 1}
114 %{?_with_wins: %global build_non_default 1}
115 %{?_without_wins: %global build_wins 0}
116 %{?_without_wins: %global build_non_default 1}
117 %{?_with_ldap: %global build_ldap 1}
118 %{?_with_ldap: %global build_non_default 1}
119 %{?_without_ldap: %global build_ldap 0}
120 %{?_without_ldap: %global build_non_default 1}
121 %{?_with_ads: %global build_ads 1}
122 %{?_with_ads: %global build_non_default 1}
123 %{?_without_ads: %global build_ads 0}
124 %{?_without_ads: %global build_non_default 1}
125 %{?_with_scanners: %global build_scanners 1}
126 %{?_with_scanners: %global build_non_default 1}
127 %{?_without_scanners: %global build_scanners 0}
128 %{?_without_scanners: %global build_non_default 1}
129 %{?_with_vscan: %global build_vscan 1}
130 %{?_with_vscan: %global build_non_default 1}
131 %{?_without_vscan: %global build_vscan 0}
132 %{?_without_vscan: %global build_non_default 1}
133 %{?_with_test: %global build_test 1}
134 %{?_with_test: %global build_non_default 1}
135 %{?_without_test: %global build_test 0}
136 %{?_without_test: %global build_non_default 1}
137 %{?_with_mysql: %global build_mysql 1}
138 %{?_with_pgsql: %global build_pgsql 1}
139 # As if that weren't enough, we're going to try building with antivirus
140 # support as an option also
141 %global build_antivir 0
142 %global build_clamav 0
143 %global build_fprot 0
144 %global build_fsav 0
145 %global build_icap 0
146 %global build_kaspersky 0
147 %global build_mks 0
148 %global build_nai 0
149 %global build_openav 0
150 %global build_sophos 0
151 %global build_symantec 0
152 %global build_trend 0
153 %if %build_vscan
154 # These we build by default
155 %global build_clamav 1
156 %global build_icap 0
157 %global build_fsav 1
158 %global build_sophos 1
159 %endif
160 %if %build_vscan && %build_scanners
161 # These scanners are built if scanners are selected
162 # symantec requires their library present and must be selected
163 # individually
164 %global build_fprot 1
165 %global build_kaspersky 1
166 %global build_mks 1
167 %global build_nai 1
168 %global build_openav 1
169 %global build_trend 1
170 %endif
171 %if %build_vscan
172 %{?_with_fprot: %{expand: %%global build_fprot 1}}
173 %{?_with_kaspersky: %{expand: %%global build_kaspersky 1}}
174 %{?_with_mks: %{expand: %%global build_mks 1}}
175 %{?_with_openav: %{expand: %%global build_openav 1}}
176 %{?_with_sophos: %{expand: %%global build_sophos 1}}
177 #%{?_with_symantec: %{expand: %%global build_symantec 1}}
178 %{?_with_trend: %{expand: %%global build_trend 1}}
179 %global vscandir samba-virusfilter-%{vscanver}
180 %endif
181 %global vfsdir examples.bin/VFS
182
183 #Standard texts for descriptions:
184 %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}")
185 %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")
186
187 #check gcc version to disable some optimisations on gcc-3.3.1
188 # gcc is not mandatory to do rpm queries on a .src.rpm, which is what the buildsystem
189 # ends up doing, so we need to guard against that
190 %define gcc331 %((gcc -dumpversion 2>/dev/null || echo 4.1.2) |awk '{if ($1>3.3) print 1; else print 0}')
191
192 #Define sets of binaries that we can use in globs and loops:
193 %global commonbin net,ntlm_auth,rpcclient,smbcacls,smbcquotas,smbpasswd,smbtree,testparm
194
195 %global serverbin pdbedit,profiles,smbcontrol,smbstatus,sharesec,smbta-util
196 %if %build_ldb
197 %global serverldbbin ldbadd,ldbdel,ldbedit,ldbmodify,ldbsearch,ldbrename
198 %endif
199 %global serversbin nmbd,samba,smbd
200
201 %global clientbin findsmb,nmblookup,smbclient,smbprint,smbspool,smbtar,smbget
202 %global client_sbin mount.smb,mount.smbfs
203 %global client_man man1/findsmb.1,man1/nmblookup.1,man1/smbclient.1,man1/smbget.1,man1/smbtar.1,man5/smbgetrc.5,man8/smbspool.8
204
205 %global testbin debug2html,smbtorture,msgtest,masktest,locktest,locktest2,nsstest,vfstest
206
207 %ifarch alpha
208 %define build_expsam xml
209 %else
210 %define build_expsam xml%{?_with_pgsql:,pgsql}%{?_with_mysql:,mysql}
211 %endif
212
213 # Determine whether this is the system samba or not.
214 %if %build_system
215 %define samba_major %{nil}
216 %else
217 %define samba_major 3
218 %endif
219 # alternatives_major is %{nil} if we aren't system and not using alternatives
220 %if !%build_system || %build_alternatives
221 %define alternative_major 3
222 %else
223 %define alternative_major %{nil}
224 %endif
225
226 Summary: Samba SMB server
227 Name: %{pkg_name}%{samba_major}
228
229 Version: %{source_ver}
230 Release: %mkrel %rel
231
232 License: GPLv3
233 Group: System/Servers
234 Source: http://ftp.samba.org/pub/samba/stable/samba-%{source_ver}.tar.gz
235 Source99: http://ftp.samba.org/pub/samba/stable/samba-%{source_ver}.tar.asc
236 Source98: http://ftp.samba.org/pub/samba/samba-pubkey.asc
237 URL: http://www.samba.org
238 Source1: samba.log
239 Source3: samba.xinetd
240 Source4: swat_48.png
241 Source5: swat_32.png
242 Source6: swat_16.png
243 Source7: README.%{name}-mageia-rpm
244 Source8: https://github.com/downloads/fumiyas/samba-virusfilter/samba-virusfilter-%{vscanver}.tar.bz2
245 %if %build_vscan
246 %endif
247 %if %build_vscan
248 BuildRequires: file-devel
249 %endif
250 Source10: samba-print-pdf.sh
251 Source11: smb-migrate
252
253 #Sources that used to be in packaging patch:
254 Source20: smbusers
255 Source21: smbprint
256 #Source22: smbadduser
257 Source23: findsmb
258 Source24: smb.init
259 Source25: winbind.init
260 Source26: wrepld.init
261 Source27: samba.pamd
262 Source28: samba.pamd0_9
263 Source29: system-auth-winbind.pamd
264 Source30: smb.conf
265 Source31: %{name}-tmpfiles.conf
266
267
268 %if !%have_pversion
269 # Version specific patches: current version
270 Patch11: samba-3.0-mageia-packaging.patch
271 # https://bugzilla.samba.org/show_bug.cgi?id=3571, bug 21387
272 Patch19: samba-3.0.21c-swat-fr-translaction.patch
273 Patch30: samba-3.5-check-undefined-before-zdefs.patch
274 Patch31: samba-3.5.3-fix-nss-wins-syslog.patch
275 Patch33: samba-3.5.8-fix-netapi-examples-linking.patch
276 Patch34: samba-3.6.23-readline.patch
277 %else
278 # Version specific patches: upcoming version
279 %endif
280 # Limbo patches (applied to prereleases, but not preleases, ie destined for
281 # samba CVS)
282 %if %have_pversion && %have_pre
283 %endif
284 Requires: pam >= 0.64, samba-common = %{version}
285 BuildRequires: pam-devel
286 BuildRequires: readline-devel
287 BuildRequires: libncurses-devel
288 BuildRequires: popt-devel
289 BuildRequires: libxml2-devel
290 # Samba 3.2 and later should be built with capabilities support:
291 # http://lists.samba.org/archive/samba/2009-March/146821.html
292 BuildRequires: libcap-devel
293 BuildRequires: gnupg
294 BuildRequires: avahi-client-devel
295 BuildRequires: libaio-devel
296 BuildRequires: libuuid-devel
297 %if %build_ctdb
298 BuildRequires: ctdb-devel >= 1.0.114.4
299 %endif
300 %if %build_pgsql
301 BuildRequires: postgresql-devel
302 %endif
303 %ifnarch alpha
304 %if %build_mysql
305 BuildRequires: mysql-devel
306 %endif
307 %endif
308 %if %build_acl
309 BuildRequires: libacl-devel
310 %endif
311 BuildRequires: libcups-devel
312 BuildRequires: cups-common
313 BuildRequires: libldap-devel
314 %if %build_ads
315 BuildRequires: libldap-devel
316 BuildRequires: krb5-devel
317 %endif
318 BuildRequires: keyutils-devel
319 %if !%build_tdb
320 BuildRequires: tdb-devel
321 %endif
322 %if !%build_ldb
323 #BuildRequires: ldb-devel
324 %endif
325 %if !%build_talloc
326 BuildRequires: talloc-devel
327 %endif
328 BuildRequires: tevent-devel
329 # for domain-join gui
330 BuildRequires: gtk2-devel
331 Requires(pre): chkconfig mktemp psmisc
332 Requires(pre): coreutils sed grep
333
334 %description
335 Samba provides an SMB server which can be used to provide
336 network services to SMB (sometimes called "Lan Manager")
337 clients, including various versions of MS Windows, OS/2,
338 and other Linux machines. Samba also provides some SMB
339 clients, which complement the built-in SMB filesystem
340 in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
341 and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
342 protocol.
343
344 Samba-3.0 features working NT Domain Control capability and
345 includes the SWAT (Samba Web Administration Tool) that
346 allows samba's smb.conf file to be remotely managed using your
347 favourite web browser. For the time being this is being
348 enabled on TCP port 901 via xinetd. SWAT is now included in
349 it's own subpackage, samba-swat.
350
351 Please refer to the WHATSNEW.txt document for fixup information.
352 This binary release includes encrypted password support.
353
354 Please read the smb.conf file and ENCRYPTION.txt in the
355 docs directory for implementation details.
356 %if %have_pversion
357 %message_bugzilla samba3
358 %endif
359 %if !%build_system
360 %message_system
361 %endif
362 %if %build_non_default
363 WARNING: This RPM was built with command-line options. Please
364 see README.%{name}-mageia-rpm in the documentation for
365 more information.
366 %endif
367
368 %package server
369 URL: http://www.samba.org
370 Summary: Samba (SMB) server programs
371 Requires: %{name}-common = %{version}
372 Requires: %libwbclient >= %{version}
373 %if %have_rpmhelper
374 Requires(pre): rpm-helper
375 %endif
376 Group: Networking/Other
377 %if %build_system
378 Provides: samba
379 Obsoletes: samba
380 Provides: samba-server-ldap
381 Obsoletes: samba-server-ldap
382 Provides: samba3-server
383 Obsoletes: samba3-server
384 %else
385 #Provides: samba-server
386 %endif
387
388 %description server
389 Samba-server provides a SMB server which can be used to provide
390 network services to SMB (sometimes called "Lan Manager")
391 clients. Samba uses NetBIOS over TCP/IP (NetBT) protocols
392 and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
393 protocol.
394
395 Samba-3.0 features working NT Domain Control capability and
396 includes the SWAT (Samba Web Administration Tool) that
397 allows samba's smb.conf file to be remotely managed using your
398 favourite web browser. For the time being this is being
399 enabled on TCP port 901 via xinetd. SWAT is now included in
400 it's own subpackage, samba-swat.
401
402 Please refer to the WHATSNEW.txt document for fixup information.
403 This binary release includes encrypted password support.
404
405 Please read the smb.conf file and ENCRYPTION.txt in the
406 docs directory for implementation details.
407 %if %have_pversion
408 %message_bugzilla samba3-server
409 %endif
410 %if !%build_system
411 %message_system
412 %endif
413
414 %package client
415 URL: http://www.samba.org
416 Summary: Samba (SMB) client programs
417 Group: Networking/Other
418 Requires: %{name}-common = %{version}
419 Requires: cifs-utils >= 4.4
420 Requires(post): update-alternatives
421 # virtual provides for drakxtools-backend
422 Provides: smb-client = %{version}
423 %if %build_alternatives
424 #Conflicts: samba-client < 2.2.8a-9mdk
425 %endif
426 %if %build_system
427 Provides: samba3-client
428 Obsoletes: samba3-client
429 Obsoletes: smbfs
430 %else
431 #Provides: samba-client
432 %endif
433 %if !%build_system && %build_alternatives
434 Provides: samba-client
435 %endif
436
437 %description client
438 Samba-client provides some SMB clients, which complement the built-in
439 SMB filesystem in Linux. These allow the accessing of SMB shares, and
440 printing to SMB printers.
441 %if %have_pversion
442 %message_bugzilla samba3-client
443 %endif
444 %if !%build_system
445 %message_system
446 %endif
447
448 %package common
449 URL: http://www.samba.org
450 Summary: Files used by both Samba servers and clients
451 Group: System/Servers
452 Conflicts: %{name}-server < 3.6.6-2
453 Requires(post): systemd >= %{systemd_required_version}
454 %if %build_system
455 Provides: samba-common-ldap
456 Obsoletes: samba-common-ldap
457 Provides: samba3-common
458 Obsoletes: samba3-common
459 %else
460 #Provides: samba-common
461 %endif
462
463 %description common
464 Samba-common provides files necessary for both the server and client
465 packages of Samba.
466 %if %have_pversion
467 %message_bugzilla samba3-common
468 %endif
469 %if !%build_system
470 %message_system
471 %endif
472
473 %package doc
474 URL: http://www.samba.org
475 Summary: Documentation for Samba servers and clients
476 Group: System/Servers
477 Requires: %{name}-common = %{version}
478 BuildArch: noarch
479 %if %build_system
480 Obsoletes: samba3-doc
481 Provides: samba3-doc
482 %else
483 #Provides: samba-doc
484 %endif
485
486 %description doc
487 Samba-doc provides documentation files for both the server and client
488 packages of Samba.
489 %if %have_pversion
490 %message_bugzilla samba3-doc
491 %endif
492 %if !%build_system
493 %message_system
494 %endif
495
496 %package swat
497 URL: http://www.samba.org
498 Summary: The Samba Web Administration Tool
499 Requires: %{name}-server = %{version}
500 Requires: xinetd
501 Group: System/Servers
502 %if %build_system
503 Provides: samba-swat-ldap
504 Obsoletes: samba-swat-ldap
505 Provides: samba3-swat
506 Obsoletes: samba3-swat
507 %else
508 #Provides: samba-swat
509 %endif
510 Conflicts: %{name}-server < 3.4.0
511 Recommends: %{name}-doc
512
513 %description swat
514 SWAT (the Samba Web Administration Tool) allows samba's smb.conf file
515 to be remotely managed using your favourite web browser. For the time
516 being this is being enabled on TCP port 901 via xinetd. Note that
517 SWAT does not use SSL encryption, nor does it preserve comments in
518 your smb.conf file. Webmin uses SSL encryption by default, and
519 preserves comments in configuration files, even if it does not display
520 them, and is therefore the preferred method for remotely managing
521 Samba.
522 %if %have_pversion
523 %message_bugzilla samba3-swat
524 %endif
525 %if !%build_system
526 %message_system
527 %endif
528
529 %if %build_winbind
530 %package winbind
531 URL: http://www.samba.org
532 Summary: Samba-winbind daemon, utilities and documentation
533 Group: System/Servers
534 Requires: %{name}-common = %{version}
535 %endif
536 %if %build_winbind && !%build_system
537 Conflicts: samba-winbind
538 %endif
539 %if %build_winbind
540 %description winbind
541 Provides the winbind daemon and testing tools to allow authentication
542 and group/user enumeration from a Windows or Samba domain controller.
543 %endif
544 %if %have_pversion
545 %message_bugzilla samba3-winbind
546 %endif
547 %if !%build_system
548 %message_system
549 %endif
550
551 %if %build_wins
552 %package -n nss_wins%{samba_major}
553 URL: http://www.samba.org
554 Summary: Name Service Switch service for WINS
555 Group: System/Servers
556 Requires: %{name}-common = %{version}
557 Requires(pre): glibc
558 %endif
559 %if %build_wins && !%build_system
560 Conflicts: nss_wins
561 %endif
562 %if %build_wins
563 %description -n nss_wins%{samba_major}
564 Provides the libnss_wins shared library which resolves NetBIOS names to
565 IP addresses.
566 %endif
567 %if %have_pversion
568 %message_bugzilla nss_wins3
569 %endif
570 %if !%build_system
571 %message_system
572 %endif
573
574 %if %build_test
575 %package test
576 URL: http://www.samba.org
577 Summary: Debugging and benchmarking tools for samba
578 Group: System/Servers
579 Requires: %{name}-common = %{version}
580 %endif
581 %if %build_system && %build_test
582 Provides: samba3-test samba3-debug
583 Obsoletes: samba3-test samba3-debug
584 %endif
585 %if !%build_system && %{build_test}
586 Provides: samba-test samba3-debug
587 Obsoletes: samba3-debug
588 %endif
589 %if %{build_test}
590
591 %description test
592 This package provides tools for benchmarking samba, and debugging
593 the correct operation of tools against smb servers.
594 %endif
595
596 %if %build_system
597 %package -n %{libname}
598 URL: http://www.samba.org
599 Summary: SMB Client Library
600 Group: System/Libraries
601 Provides: libsmbclient
602
603 %description -n %{libname}
604 This package contains the SMB client library, part of the samba
605 suite of networking software, allowing other software to access
606 SMB shares.
607 %endif
608 %if %have_pversion && %build_system
609 %message_bugzilla %{libname}
610 %endif
611
612 %if %build_system
613 %package -n %{libname}-devel
614 URL: http://www.samba.org
615 Summary: SMB Client Library Development files
616 Group: Development/C
617 Provides: libsmbclient-devel = %{version}-%{release}
618 Requires: %{libname} = %{version}-%{release}
619
620 %description -n %{libname}-devel
621 This package contains the development files for the SMB client
622 library, part of the samba suite of networking software, allowing
623 the development of other software to access SMB shares.
624 %endif
625 %if %have_pversion && %build_system
626 %message_bugzilla %{libname}-devel
627 %endif
628
629 %if %build_system
630 %package -n %{libname}-static-devel
631 URL: http://www.samba.org
632 Summary: SMB Client Static Library Development files
633 Group: Development/C
634 Provides: libsmbclient-static-devel = %{version}-%{release}
635 Requires: %{libname}-devel = %{version}-%{release}
636
637 %description -n %{libname}-static-devel
638 This package contains the static development files for the SMB
639 client library, part of the samba suite of networking software,
640 allowing the development of other software to access SMB shares.
641 %endif
642 %if %have_pversion && %build_system
643 %message_bugzilla %{libname}-devel
644 %endif
645
646 %package -n %libnetapi
647 Summary: Samba library for accessing functions in 'net' binary
648 Group: System/Libraries
649
650 %description -n %libnetapi
651 Samba library for accessing functions in 'net' binary
652
653 %package -n %netapidevel
654 Group: Development/C
655 Summary: Samba library for accessing functions in 'net' binary
656 Provides: netapi-devel = %{version}-%{release}
657
658 %description -n %netapidevel
659 Samba library for accessing functions in 'net' binary
660
661 %package -n %libsmbsharemodes
662 Group: System/Libraries
663 Summary: Samba Library for accessing smb share modes (locks etc.)
664
665 %description -n %libsmbsharemodes
666 Samba Library for accessing smb share modes (locks etc.)
667
668 %package -n %smbsharemodesdevel
669 Group: Development/C
670 Summary: Samba Library for accessing smb share modes (locks etc.)
671 Provides: smbsharemodes-devel = %{version}-%{release}
672
673 %description -n %smbsharemodesdevel
674 Samba Library for accessing smb share modes (locks etc.)
675
676 %if %build_talloc
677 %package -n %libtalloc
678 Group: System/Libraries
679 Summary: Library implementing Samba's memory allocator
680
681 %description -n %libtalloc
682 Library implementing Samba's memory allocator
683
684 %package -n %tallocdevel
685 Group: Development/C
686 Summary: Library implementing Samba's memory allocator
687 Provides: talloc-devel = %{version}-%{release}
688
689 %description -n %tallocdevel
690 Library implementing Samba's memory allocator
691 %endif
692
693 %if %build_tdb
694 %package -n %libtdb
695 Group: System/Libraries
696 Summary: Library implementing Samba's embedded database
697
698 %description -n %libtdb
699 Library implementing Samba's embedded database
700
701 %package -n %tdbdevel
702 Group: Development/C
703 Summary: Library implementing Samba's embedded database
704 Provides: tdb-devel = %{version}-%{release}
705 Requires: %libtdb
706 # because /usr/include/tdb.h was moved from libsmbclient0-devel to libtdb-devel
707 Conflicts: %{mklibname smbclient 0 -d} < 3.2.6-3
708
709 %description -n %tdbdevel
710 Library implementing Samba's embedded database
711 %endif
712
713 %package -n %libwbclient
714 Group: System/Libraries
715 Summary: Library providing access to winbindd
716
717 %description -n %libwbclient
718 Library providing access to winbindd
719
720 %package -n %wbclientdevel
721 Group: Development/C
722 Summary: Library providing access to winbindd
723 Provides: wbclient-devel = %{version}-%{release}
724 Requires: %libwbclient >= %{version}
725
726 %description -n %wbclientdevel
727 Library providing access to winbindd
728
729 #%package passdb-ldap
730 #URL: http://www.samba.org
731 #Summary: Samba password database plugin for LDAP
732 #Group: System/Libraries
733 #
734 #%description passdb-ldap
735 #The passdb-ldap package for samba provides a password database
736 #backend allowing samba to store account details in an LDAP
737 #database
738 #_if %have_pversion
739 #_message_bugzilla samba3-passdb-ldap
740 #_endif
741 #_if !%build_system
742 #_message_system
743 #_endif
744
745 %ifnarch alpha
746 %if %{build_mysql}
747 %package passdb-mysql
748 URL: http://www.samba.org
749 Summary: Samba password database plugin for MySQL
750 Group: System/Libraries
751 Requires: %{name}-server = %{version}-%{release}
752 %endif
753 %endif
754 %ifnarch alpha
755 %if %build_system && %{build_mysql}
756 Obsoletes: samba3-passdb-mysql
757 Provides: samba3-passdb-mysql
758 %endif
759 %endif
760 %ifnarch alpha
761 %if %{build_mysql}
762
763 %description passdb-mysql
764 The passdb-mysql package for samba provides a password database
765 backend allowing samba to store account details in a MySQL
766 database
767 %endif
768 %endif
769
770 #does postgresql build on alpha?
771 #ifnarch alpha
772 %if %{build_pgsql}
773 %package passdb-pgsql
774 URL: http://www.samba.org
775 Summary: Samba password database plugin for PostgreSQL
776 Group: System/Libraries
777 Requires: %{name}-server = %{version}-%{release}
778 #endif
779 #ifnarch alpha && %build_system
780 %endif
781 %if %build_system && %{build_pgsql}
782 Obsoletes: samba3-passdb-pgsql
783 Provides: samba3-passdb-pgsql
784 %endif
785 %if %{build_pgsql}
786
787 %description passdb-pgsql
788 The passdb-pgsql package for samba provides a password database
789 backend allowing samba to store account details in a PostgreSQL
790 database
791 %endif
792
793 #Antivirus packages:
794 %if %build_antivir
795 %package vscan-antivir
796 Summary: On-access virus scanning for samba using Antivir
797 Group: System/Servers
798 Requires: %{name}-server = %{version}
799 Provides: %{name}-vscan
800 %description vscan-antivir
801 A vfs-module for samba to implement on-access scanning using the
802 Antivir antivirus scanner daemon.
803 %endif
804
805
806 %if %build_clamav
807 %package virusfilter-clamav
808 Summary: On-access virus scanning for samba using Clam Antivirus
809 Group: System/Servers
810 URL: https://github.com/fumiyas/samba-virusfilter
811 Requires: %{name}-server = %{version}
812 Provides: %{name}-vscan
813 Provides: %{name}-virusfilter
814 Requires: clamd
815 %description virusfilter-clamav
816 This is a Samba VFS module to scan and filter virus files on Samba file
817 services with an anti-virus scanner.
818
819 This package includes the VFS module supporting:
820 * ClamAV (clamd daemon) http://www.clamav.net
821
822 %endif
823
824 %if %build_fprot
825 %package vscan-fprot
826 Summary: On-access virus scanning for samba using FPROT
827 Group: System/Servers
828 Requires: %{name}-server = %{version}
829 Provides: %{name}-vscan
830 %description vscan-fprot
831 A vfs-module for samba to implement on-access scanning using the
832 FPROT antivirus software (which must be installed to use this).
833 %endif
834
835 %if %build_fsav
836 %package virusfilter-fsecure
837 Summary: On-access virus scanning for samba using F-Secure
838 Group: System/Servers
839 URL: https://github.com/fumiyas/samba-virusfilter
840 Requires: %{name}-server = %{version}
841 Provides: %{name}-vscan
842 Provides: %{name}-virusfilter
843 %description virusfilter-fsecure
844 This is a Samba VFS module to scan and filter virus files on Samba file
845 services with an anti-virus scanner.
846
847 This package provides the VFS module supporting:
848 * F-Secure Anti-Virus (fsavd daemon) http://www.f-secure.com
849
850 %endif
851
852 %if %build_icap
853 %package vscan-icap
854 Summary: On-access virus scanning for samba using ICAP
855 Group: System/Servers
856 Requires: %{name}-server = %{version}
857 Provides: %{name}-icap
858 %description vscan-icap
859 A vfs-module for samba to implement on-access scanning using
860 ICAP-capable antivirus software.
861 %endif
862
863 %if %build_kaspersky
864 %package vscan-kaspersky
865 Summary: On-access virus scanning for samba using Kaspersky
866 Group: System/Servers
867 Requires: %{name}-server = %{version}
868 Provides: %{name}-vscan
869 %description vscan-kaspersky
870 A vfs-module for samba to implement on-access scanning using the
871 Kaspersky antivirus software (which must be installed to use this).
872 %endif
873
874 %if %build_mks
875 %package vscan-mks
876 Summary: On-access virus scanning for samba using MKS
877 Group: System/Servers
878 Requires: %{name}-server = %{version}
879 Provides: %{name}-vscan
880 %description vscan-mks
881 A vfs-module for samba to implement on-access scanning using the
882 MKS antivirus software (which must be installed to use this).
883 %endif
884
885 %if %build_nai
886 %package vscan-nai
887 Summary: On-access virus scanning for samba using NAI McAfee
888 Group: System/Servers
889 Requires: %{name}-server = %{version}
890 Provides: %{name}-vscan
891 %description vscan-nai
892 A vfs-module for samba to implement on-access scanning using the
893 NAI McAfee antivirus software (which must be installed to use this).
894 %endif
895
896 %if %build_openav
897 %package vscan-openav
898 Summary: On-access virus scanning for samba using OpenAntivirus
899 Group: System/Servers
900 Requires: %{name}-server = %{version}
901 Provides: %{name}-vscan
902 %description vscan-openav
903 A vfs-module for samba to implement on-access scanning using the
904 OpenAntivirus antivirus software (which must be installed to use this).
905 %endif
906
907 %if %build_sophos
908 %package virusfilter-sophos
909 Summary: On-access virus scanning for samba using Sophos
910 Group: System/Servers
911 URL: https://github.com/fumiyas/samba-virusfilter
912 Requires: %{name}-server = %{version}
913 Provides: %{name}-vscan
914 %description virusfilter-sophos
915 This is a Samba VFS module to scan and filter virus files on Samba file
916 services with an anti-virus scanner.
917
918 This package includes the VFS module supporting:
919 * Sophos Anti-Virus (savdid daemon) http://www.sophos.com
920 %endif
921
922 %if %build_symantec
923 %package vscan-symantec
924 Summary: On-access virus scanning for samba using Symantec
925 Group: System/Servers
926 Requires: %{name}-server = %{version}
927 Provides: %{name}-vscan
928 Autoreq: 0
929 %description vscan-symantec
930 A vfs-module for samba to implement on-access scanning using the
931 Symantec antivirus software (which must be installed to use this).
932 %endif
933
934
935 %if %build_trend
936 %package vscan-trend
937 Summary: On-access virus scanning for samba using Trend
938 Group: System/Servers
939 Requires: %{name}-server = %{version}
940 Provides: %{name}-vscan
941 %description vscan-trend
942 A vfs-module for samba to implement on-access scanning using the
943 Trend antivirus software (which must be installed to use this).
944 %endif
945
946 %package domainjoin-gui
947 Summary: Domainjoin GUI
948 Requires: samba-common = %{version}
949 Group: System/Configuration
950
951 %description domainjoin-gui
952 The samba-domainjoin-gui package includes a domainjoin gtk application.
953
954 %prep
955
956 # Allow users to query build options with --with options:
957 #%%define opt_status(%1) %(echo %{1})
958 %if %{?_with_options:1}%{!?_with_options:0}
959 %define opt_status(%{1}) %(if [ %{1} -eq 1 ];then echo enabled;else echo disabled;fi)
960 #exit 1
961 %{error: }
962 %{error:Build options available are:}
963 %{error:--with[out] system Build as the system samba package [or as samba3]}
964 %{error:--with[out] acl Build with support for file ACLs - %opt_status %build_acl}
965 %{error:--with[out] winbind Build with Winbind support - %opt_status %build_winbind}
966 %{error:--with[out] wins Build with WINS name resolution support - %opt_status %build_wins}
967 %{error:--with[out] ldap Build with legacy (samba2) LDAP support - %opt_status %build_ldap}
968 %{error:--with[out] ads Build with Active Directory support - %opt_status %build_ads}
969 %{error:--with[out] mysql Build MySQL passdb backend - %opt_status %build_mysql}
970 %{error:--with[out] pgsql Build PostgreSQL passdb backend - %opt_status %build_pgsql}
971 %{error:--with[out] scanners Enable on-access virus scanners - %opt_status %build_scanners}
972 %{error:--with[out] test Enable testing and benchmarking tools - %opt_status %build_test}
973 %{error: }
974 %else
975 #{error: }
976 #{error: This rpm has build options available, use --with options to see them}
977 #{error: }
978 echo -e "\n This rpm has build options available, use --with options to see them\n" >&2
979 sleep 1
980 %endif
981
982 %if %{?_with_options:1}%{!?_with_options:0} && %build_scanners
983 #{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}}
984 %{error:--with scanners enables the following: antivir,clamav,icap,fprot,fsav,mks,nai,openav,sophos,trend}
985 %{error: }
986 %{error:To enable others (requires development libraries for the scanner):}
987 %{error:--with symantec Enable on-access scanning with Symantec - %opt_status %build_symantec}
988 %{error: }
989 %endif
990
991 %if %{?_with_options:1}%{!?_with_options:0}
992 clear
993 exit 1
994 %endif
995
996
997 %if %build_non_default
998 RPM_EXTRA_OPTIONS="\
999 %{?_with_system: --with system}\
1000 %{?_without_system: --without system}\
1001 %{?_with_acl: --with acl}\
1002 %{?_without_acl: --without acl}\
1003 %{?_with_winbind: --with winbind}\
1004 %{?_without_winbind: --without winbind}\
1005 %{?_with_wins: --with wins}\
1006 %{?_without_wins: --without wins}\
1007 %{?_with_ldap: --with ldap}\
1008 %{?_without_ldap: --without ldap}\
1009 %{?_with_ads: --with ads}\
1010 %{?_without_ads: --without ads}\
1011 %{?_with_scanners: --with scanners}\
1012 %{?_without_scanners: --without scanners}\
1013 "
1014 echo "Building a non-default rpm with the following command-line arguments:"
1015 echo "$RPM_EXTRA_OPTIONS"
1016 echo "This rpm was built with non-default options, thus, to build ">%{SOURCE7}
1017 echo "an identical rpm, you need to supply the following options">>%{SOURCE7}
1018 echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7}
1019 echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}
1020 %else
1021 echo "This rpm was built with default options">%{SOURCE7}
1022 echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}
1023 %endif
1024
1025
1026 #Try and validate signatures on source:
1027 VERIFYSOURCE=%{SOURCE0}
1028 VERIFYSOURCE=${VERIFYSOURCE%%.gz}
1029 gzip -dc %{SOURCE0} > $VERIFYSOURCE
1030 %check_sig %{SOURCE98} %{SOURCE99} $VERIFYSOURCE
1031
1032 %if %build_vscan
1033 %setup -q -a 8 -n %{pkg_name}-%{source_ver}
1034 %else
1035 %setup -q -n %{pkg_name}-%{source_ver}
1036 %endif
1037 # Version specific patches: current version
1038 %if !%have_pversion
1039 echo "Applying patches for current version: %{ver}"
1040 %patch11 -p1 -b .mga
1041 pushd source3
1042 popd
1043 %patch30 -p1 -b .checkflags
1044 #patch31 -p1 -b .nss_wins_log
1045 %patch33 -p1 -b .netapi_link
1046 %patch34 -p1 -b .readline
1047
1048 # patches from cvs/samba team
1049 pushd source3
1050 popd
1051 %else
1052 # Version specific patches: upcoming version
1053 echo "Applying patches for new versions: %{pversion}"
1054 %endif
1055
1056 # Limbo patches
1057 %if %have_pversion && %have_pre
1058 echo "Appling patches which should only be applied to prereleases"
1059 %endif
1060
1061 cp %{SOURCE7} .
1062
1063 # Make a copy of examples so that we have a clean one for doc:
1064 cp -a examples examples.bin
1065
1066 %if %build_vscan
1067 pushd samba-virusfilter-%{vscanver}
1068 perl -pi -e 's,/var/run/clamav/clamd.ctl,/var/lib/clamav/clamd.socket,g' clamav/svf-clamav.c
1069 popd
1070 %endif
1071
1072 # Edit some files when not building system samba:
1073 %if !%build_system
1074 perl -pi -e 's/%{pkg_name}/%{name}/g' source3/auth/pampass.c
1075 %endif
1076
1077 #remove cvs internal files from docs:
1078 find docs examples -name '.cvsignore' -exec rm -f {} \;
1079
1080 #make better doc trees:
1081 chmod -R a+rX examples docs *Manifest* README Roadmap COPYING
1082 mkdir -p clean-docs/samba-doc
1083 cp -a examples docs clean-docs/samba-doc
1084 mv -f clean-docs/samba-doc/examples/libsmbclient clean-docs/
1085 rm -Rf clean-docs/samba-doc/docs/{docbook,manpages,htmldocs,using_samba}
1086 #ln -s %{_datadir}/swat%{samba_major}/using_samba clean-docs/samba-doc/docs/using_samba
1087 mkdir clean-docs/samba-doc/docs/htmldocs
1088 cp docs/htmldocs/*.{html,css} clean-docs/samba-doc/docs/htmldocs
1089 ln -sf %{_datadir}/swat%{samba_major}/help/{Samba3-ByExample,Samba3-HOWTO,Samba3-Developers-Guide,using_samba,manpages} clean-docs/samba-doc/docs/htmldocs/
1090
1091 %build
1092 %serverbuild
1093 (cd source3
1094 CFLAGS="`echo "$RPM_OPT_FLAGS"|sed -e 's/ -g / /g'` -DLDAP_DEPRECATED"
1095 %if %gcc331
1096 CFLAGS=`echo "$CFLAGS"|sed -e 's/-O2/-O/g'`
1097 %endif
1098 ./autogen.sh
1099 # Don't use --with-fhs now, since it overrides libdir, it sets configdir,
1100 # lockdir,piddir logfilebase,privatedir and swatdir
1101 %configure2_5x --prefix=%{_prefix} \
1102 --sysconfdir=%{_sysconfdir}/%{name} \
1103 --localstatedir=/var \
1104 --with-modulesdir=%{_libdir}/%{name} \
1105 --with-privatedir=%{_sysconfdir}/%{name} \
1106 --with-lockdir=/var/cache/%{name} \
1107 --with-piddir=/var/run \
1108 --with-swatdir=%{_datadir}/swat%{samba_major} \
1109 --with-configdir=%{_sysconfdir}/%{name} \
1110 --with-logfilebase=/var/log/%{name} \
1111 --with-pammodulesdir=%{_lib}/security/ \
1112 --with-rootsbindir=/bin \
1113 %if %build_talloc
1114 --with-libtalloc=yes \
1115 %else
1116 --enable-external-libtalloc=yes \
1117 %endif
1118 %if %build_tdb
1119 --with-libtdb = yes \
1120 %else
1121 --enable-external-libtdb=yes \
1122 %endif
1123 %if %build_ctdb
1124 --with-cluster-support \
1125 %endif
1126 %if !%build_ads
1127 --with-ads=no \
1128 %endif
1129 --with-automount \
1130 --with-pam \
1131 --with-pam_smbpass \
1132 --with-aio-support \
1133 %if %build_ldap
1134 --with-ldapsam \
1135 %endif
1136 --with-syslog \
1137 --with-quotas \
1138 --with-utmp \
1139 %if %build_acl
1140 --with-acl-support \
1141 %endif
1142 --with-shared-modules=idmap_rid,idmap_ad \
1143 --enable-avahi \
1144 --with-dnsupdate \
1145 --program-suffix=%{samba_major}
1146 # --with-expsam=%build_expsam \
1147 # --with-shared-modules=pdb_ldap,idmap_ldap \
1148 # --with-manpages-langs=en,ja,pl \
1149 #_if !%build_system
1150 # --with-smbwrapper \
1151 #_endif
1152 # --with-nisplussam \
1153 # --with-fhs \
1154
1155 # Remove -Wl,--no-undefined for plugins:
1156 grep ^LDSHFLAGS_MODULES Makefile
1157 perl -pi -e 'if ( m/^LDSHFLAGS_MODULES/ ) { $_ =~ s/-Wl,--no-undefined//g;};' Makefile
1158 grep ^LDSHFLAGS_MODULES Makefile
1159
1160 #Should be a patch instead?
1161 %if !%build_talloc
1162 perl -pi -e 's,-I./lib/talloc,,g;s,bin/libtalloc.so,,g;s,^(installlibs:: )installlibtalloc,$1,g' Makefile
1163 %endif
1164 %if !%build_tdb
1165 perl -pi -e 's,-I./lib/tdb/include,,g;s,bin/libtdb.so,,g;s,^(installlibs:: )installlibtdb,$1,g' Makefile
1166 %endif
1167 %if !%build_ldb
1168 perl -pi -e 's,\$\(BIN_PROGS4\),,g' Makefile
1169 %endif
1170
1171 perl -pi -e 's|-Wl,-rpath,%{_libdir}||g;s|-Wl,-rpath -Wl,%{_libdir}||g' Makefile
1172
1173 make proto_exists || :
1174 %make all libsmbclient smbfilter wins %{?_with_test: torture debug2html bin/log2pcap} bin/smbget
1175 make -C lib/netapi/examples
1176 )
1177
1178 %if %build_vscan
1179 echo -e "\n\nBuild antivirus VFS modules\n\n"
1180 pushd %{vscandir}
1181 %configure --with-samba-source=../
1182 make
1183 popd
1184 %endif
1185
1186 # Build antivirus vfs objects
1187 %if %build_symantec
1188 echo "Building Symantec"
1189 make -C %{vfsdir}/%{vscandir} symantec
1190 %endif
1191
1192 %install
1193 mkdir -p %{buildroot}
1194
1195 #Ensure all docs are readable
1196 chmod a+r docs -R
1197
1198 # Any entries here mean samba makefile is *really* broken:
1199 mkdir -p %{buildroot}%{_sysconfdir}/%{name}
1200 mkdir -p %{buildroot}/%{_datadir}
1201 mkdir -p %{buildroot}%{_libdir}/%{name}/vfs
1202
1203 (cd source3
1204 make DESTDIR=%{buildroot} install installclientlib installmodules)
1205
1206 # we ship docs in the docs supackage, and lik it into swat, delete the extra copy:
1207 rm -Rf %{buildroot}/%{_datadir}/swat/using_samba
1208
1209 #install -m755 source/bin/smbget %{buildroot}/%{_bindir}
1210
1211
1212 #need to stay
1213 mkdir -p %{buildroot}/{sbin,bin}
1214 mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,pam.d,xinetd.d}
1215 mkdir -p %{buildroot}/%{_initrddir}
1216 mkdir -p %{buildroot}/var/cache/%{name}
1217 mkdir -p %{buildroot}/var/log/%{name}
1218 mkdir -p %{buildroot}/var/spool/%{name}
1219 mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}/{netlogon,profiles,printers}
1220 mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
1221 mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}/codepages/src
1222 mkdir -p %{buildroot}/%{_lib}/security
1223 mkdir -p %{buildroot}%{_libdir}/pkgconfig
1224 mkdir -p %{buildroot}%{_sbindir}
1225 mkdir -p %{buildroot}%{_bindir}
1226 mkdir -p %{buildroot}%{_libdir}/%{name}/vfs
1227 mkdir -p %{buildroot}%{_datadir}/%{name}/scripts
1228
1229 install -m755 source3/bin/lib*.a %{buildroot}%{_libdir}/
1230
1231 # tmpfiles for runtime dir creation
1232 install -D -p -m 0644 %{SOURCE31} %{buildroot}%{_tmpfilesdir}/%{name}.conf
1233
1234 # smbsh forgotten
1235 #install -m 755 source/bin/smbsh %{buildroot}%{_bindir}/
1236
1237 %if %build_vscan
1238 %makeinstall_std -C %{vscandir}
1239 install -m 644 %{vscandir}/etc/*.conf.example %{buildroot}/%{_sysconfdir}/%{name}
1240 for i in %{buildroot}/%{_sysconfdir}/%{name}/*.example
1241 do mv $i ${i%%.example}
1242 done
1243 #mv %{buildroot}/%{_datadir}/%{name}/bin/svf-notify %{buildroot}/%{_datadir}/%{name}/scripts
1244 # script uses ksh, which we don't have
1245 rm %{buildroot}/%{_datadir}/%{name}/bin/svf-notify
1246 perl -pi -e 's,%{_datadir}/%{name}/bin,%{_datadir}/%{name}/scripts,g' %{buildroot}/%{_sysconfdir}/%{name}/smb.svf-*.conf
1247 %endif
1248
1249 #libnss_* still not handled by make:
1250 # Install the nsswitch library extension file
1251 for i in wins winbind; do
1252 install -m755 nsswitch/libnss_${i}.so %{buildroot}/%{_lib}/libnss_${i}.so
1253 done
1254 # Make link for wins and winbind resolvers
1255 ( cd %{buildroot}/%{_lib}; ln -s libnss_wins.so libnss_wins.so.2; ln -s libnss_winbind.so libnss_winbind.so.2)
1256 install -d %{buildroot}/%{_libdir}/krb5/plugins
1257 install -m755 source3/bin/winbind_krb5_locator.so %{buildroot}/%{_libdir}/krb5/plugins
1258
1259 install -m 755 source3/lib/netapi/examples/bin/netdomjoin-gui %{buildroot}/%{_sbindir}/netdomjoin-gui
1260 mkdir -p %{buildroot}%{_datadir}/pixmaps/%{name}
1261 install -m 644 source3/lib/netapi/examples/netdomjoin-gui/samba.ico %{buildroot}/%{_datadir}/pixmaps/%{name}/samba.ico
1262 install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo.png %{buildroot}/%{_datadir}/pixmaps/%{name}/logo.png
1263 install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo-small.png %{buildroot}/%{_datadir}/pixmaps/%{name}/logo-small.png
1264
1265 %if %{build_test}
1266 for i in {%{testbin}};do
1267 #install -m755 source/bin/${i} %{buildroot}/%{_bindir}/${i}%{samba_major}
1268 done
1269 %endif
1270
1271 # Install other stuff
1272
1273 # install -m644 examples/VFS/recycle/recycle.conf %{buildroot}%{_sysconfdir}/samba/
1274 install -m644 %{SOURCE20} %{buildroot}%{_sysconfdir}/%{name}/smbusers
1275 install -m755 %{SOURCE21} %{buildroot}/%{_bindir}
1276 #install -m755 %{SOURCE22} %{buildroot}/usr/bin
1277 install -m755 %{SOURCE23} %{buildroot}/%{_bindir}
1278 install -m755 %{SOURCE24} %{buildroot}/%{_initrddir}/smb%{samba_major}
1279 install -m755 %{SOURCE24} %{buildroot}/%{_sbindir}/%{name}
1280 install -m755 %{SOURCE25} %{buildroot}/%{_initrddir}/winbind
1281 install -m755 %{SOURCE25} %{buildroot}/%{_sbindir}/winbind
1282 # install -m755 %{SOURCE26} %{buildroot}/%{_initrddir}/wrepld%{samba_major}
1283 install -m644 %{SOURCE28} %{buildroot}/%{_sysconfdir}/pam.d/%{name}
1284 install -m644 %{SOURCE29} %{buildroot}/%{_sysconfdir}/pam.d/system-auth-winbind
1285 #
1286 install -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
1287
1288 # install pam_winbind.conf sample file
1289 mkdir -p %{buildroot}%{_sysconfdir}/security
1290 install -m 0644 examples/pam_winbind/pam_winbind.conf %{buildroot}%{_sysconfdir}/security/pam_winbind.conf
1291
1292 install -m755 examples/LDAP/convertSambaAccount %{buildroot}/%{_datadir}/%{name}/scripts/
1293
1294 # make a conf file for winbind from the default one:
1295 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
1296 install -m644 packaging/Mageia/smb-winbind.conf %{buildroot}/%{_sysconfdir}/%{name}/smb-winbind.conf
1297
1298 # Some inline fixes for smb.conf for non-winbind use
1299 install -m644 %{SOURCE30} %{buildroot}/%{_sysconfdir}/%{name}/smb.conf
1300 cat %{SOURCE30} | \
1301 sed -e 's/^; printer admin = @adm/ printer admin = @adm/g' >%{buildroot}/%{_sysconfdir}/%{name}/smb.conf
1302 %if %build_cupspc
1303 perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' %{buildroot}/%{_sysconfdir}/%{name}/smb.conf
1304 perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' %{buildroot}/%{_sysconfdir}/%{name}/smb-winbind.conf
1305 %endif
1306
1307 #%if !%build_system
1308 # Fix script paths in smb.conf
1309 #perl -pi -e 's,%{_datadir}/samba,%{_datadir}/%{name},g' %{buildroot}/%{_sysconfdir}/%{name}/smb*.conf
1310 #%endif
1311
1312
1313 echo 127.0.0.1 localhost > %{buildroot}/%{_sysconfdir}/%{name}/lmhosts
1314
1315 # Link smbspool to CUPS (does not require installed CUPS)
1316
1317 mkdir -p %{buildroot}/%{_prefix}/lib/cups/backend
1318 ln -s %{_bindir}/smbspool%{alternative_major} %{buildroot}/%{_prefix}/lib/cups/backend/smb%{alternative_major}
1319
1320 # xinetd support
1321
1322 mkdir -p %{buildroot}/%{_sysconfdir}/xinetd.d
1323 install -m644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/xinetd.d/swat%{samba_major}
1324
1325 # menu support
1326
1327 mkdir -p %{buildroot}/%{_datadir}/applications
1328 cat > %{buildroot}/%{_datadir}/applications/mageia-%{name}-swat.desktop << EOF
1329 [Desktop Entry]
1330 Name=Samba Configuration (SWAT)
1331 Comment=The Swat Samba Administration Tool
1332 Exec=www-browser http://localhost:901/
1333 Icon=swat%{samba_major}
1334 Terminal=false
1335 Type=Application
1336 StartupNotify=true
1337 Categories=Settings;
1338 EOF
1339
1340 mkdir -p %{buildroot}%{_liconsdir} %{buildroot}%{_iconsdir} %{buildroot}%{_miconsdir}
1341
1342 # install html man pages for swat
1343 install -d %{buildroot}/%{_datadir}/swat%{samba_major}/help/manpages
1344 #install -m644 docs/htmldocs/manpages-3/* %{buildroot}/%{_datadir}/swat%{samba_major}/help/manpages
1345
1346 install %{SOURCE4} %{buildroot}%{_liconsdir}/swat%{samba_major}.png
1347 install %{SOURCE5} %{buildroot}%{_iconsdir}/swat%{samba_major}.png
1348 install %{SOURCE6} %{buildroot}%{_miconsdir}/swat%{samba_major}.png
1349
1350 install %{SOURCE10} %{buildroot}%{_datadir}/%{name}/scripts/print-pdf
1351 install %{SOURCE11} %{buildroot}%{_datadir}/%{name}/scripts/smb-migrate
1352
1353 # Fix configs when not building system samba:
1354
1355 #Client binaries will have suffixes while we use alternatives, even
1356 # if we are system samba
1357 %if !%build_system || %build_alternatives
1358 for OLD in %{buildroot}/%{_bindir}/{%{clientbin},eventlogadm} %{buildroot}/%{_prefix}/lib/cups/backend/smb
1359 do
1360 NEW=`echo ${OLD}%{alternative_major}`
1361 [ -e $OLD ] && mv -f $OLD $NEW
1362 done
1363 for OLD in %{buildroot}/%{_mandir}/man?/{%{clientbin},eventlogadm}*
1364 do
1365 if [ -e $OLD ]
1366 then
1367 BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'`
1368 EXT=`echo $OLD|sed -e 's,'${BASE}',,g'`
1369 NEW=`echo ${BASE}%{alternative_major}${EXT}`
1370 mv $OLD $NEW
1371 fi
1372 done
1373 %endif
1374 # Server/common binaries are versioned only if not system samba:
1375 %if !%build_system
1376 for OLD in %{buildroot}/%{_bindir}/{%{commonbin}} %{buildroot}/%{_bindir}/{%{serverbin}%{?serverldbbin:,%serverldbbin}} %{buildroot}/%{_sbindir}/{%{serversbin},swat}
1377 do
1378 NEW=`echo ${OLD}%{alternative_major}`
1379 mv $OLD $NEW -f ||:
1380 done
1381 # And the man pages too:
1382 for OLD in %{buildroot}/%{_mandir}/man?/{%{commonbin},%{serverbin}%{?serverldbbin:,%serverldbbin},%{serversbin},swat,{%testbin},smb.conf,lmhosts}*
1383 do
1384 if [ -e $OLD ]
1385 then
1386 BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'`
1387 # BASE=`perl -e '$name="'${OLD}'"; print "",($name =~ /(.*?)\.[0-9]/), "\n";'`
1388 EXT=`echo $OLD|sed -e 's,'${BASE}',,g'`
1389 NEW=`echo ${BASE}%{samba_major}${EXT}`
1390 mv $OLD $NEW
1391 fi
1392 done
1393 # Replace paths in config files and init scripts:
1394 for i in smb ;do
1395 perl -pi -e 's,/subsys/'$i',/subsys/'$i'%{samba_major},g' %{buildroot}/%{_initrddir}/${i}%{samba_major}
1396 done
1397 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
1398 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;
1399 done
1400 # Fix xinetd file for swat:
1401 perl -pi -e 's,/usr/sbin,%{_sbindir},g' %{buildroot}/%{_sysconfdir}/xinetd.d/swat%{samba_major}
1402 %endif
1403
1404 #Clean up unpackaged files:
1405 #for i in %{_bindir}/pam_smbpass.so %{_bindir}/smbwrapper.so;do
1406 #rm -f %{buildroot}/$i
1407 #done
1408 # the binary gets removed ... but not the man page ...
1409 rm -f %{buildroot}/%{_mandir}/man1/testprns*
1410 rm -f %{buildroot}/%{_mandir}/man1/dbwrap_tool*
1411
1412 # (sb) make a smb.conf.clean we can use for the merge, since an existing
1413 # smb.conf won't get overwritten
1414 cp %{buildroot}/%{_sysconfdir}/%{name}/smb.conf %{buildroot}/%{_datadir}/%{name}/smb.conf.clean
1415
1416 # (sb) leave a README.mga.conf to explain what has been done
1417 cat << EOF > %{buildroot}/%{_datadir}/%{name}/README.mga.conf
1418 In order to facilitate upgrading an existing samba install, and merging
1419 previous configuration data with any new syntax used by samba3, a merge
1420 script has attempted to combine your local configuration data with the
1421 new conf file format. The merged data is in smb.conf, with comments like
1422
1423 # *** merged from original smb.conf: ***
1424
1425 near the additional entries. Any local shares should have been appended to
1426 smb.conf. A log of what took place should be in:
1427
1428 /var/log/samba/smb-migrate.log
1429
1430 A clean samba3 smb.conf is in /usr/share/samba, named smb.conf.clean.
1431 Your original conf should be /etc/samba/smb.conf.tomerge.
1432
1433 The actual merge script is /usr/share/samba/scripts/smb-migrate.
1434
1435 EOF
1436
1437 # Development pkgconfig files
1438
1439 # 1. Generate the .pc files that are not done automatically
1440 # (NB: This does not work when done at the same time as configure above)
1441 for i in \
1442 %if %build_talloc
1443 talloc \
1444 %endif
1445 %if %build_tdb
1446 tdb \
1447 %endif
1448 ; do
1449 pushd lib/$i
1450 ./configure --prefix=%{_prefix} --libdir=%{_libdir}
1451 make
1452 WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$PATH waf install --destdir=%{buildroot} --targets=`basename bin/PKGCONFIG_$i.pc`
1453 popd
1454 done
1455
1456 # 2. Install them
1457 for i in smbclient smbsharemodes netapi wbclient; do
1458 install -m 644 source3/pkgconfig/$i.pc %{buildroot}%{_libdir}/pkgconfig/
1459 done
1460
1461 %if !%build_ldb
1462 rm -f %{buildroot}/%{_bindir}/ldb*
1463 rm -fr %{buildroot}%{_mandir}/man1/ldbadd.1
1464 rm -fr %{buildroot}%{_mandir}/man1/ldbdel.1
1465 rm -fr %{buildroot}%{_mandir}/man1/ldbedit.1
1466 rm -fr %{buildroot}%{_mandir}/man1/ldbmodify.1
1467 rm -fr %{buildroot}%{_mandir}/man1/ldbrename.1
1468 rm -fr %{buildroot}%{_mandir}/man1/ldbsearch.1
1469 %endif
1470
1471 %if %{build_test}
1472 rm -fr %{buildroot}%{_mandir}/man1/log2pcap*.1*
1473 %else
1474 rm -fr %{buildroot}%{_mandir}/man1/vfstest%{samba_major}*.1*
1475 rm -fr %{buildroot}%{_mandir}/man1/log2pcap*.1*
1476 %endif
1477
1478 rm -fr %{buildroot}%{_mandir}/man8/tdb*.8*
1479
1480 %if %build_winbind
1481 %find_lang pam_winbind
1482 %endif
1483 %find_lang net
1484
1485 %ifarch alpha
1486 rm -f %{buildroot}%{_bindir}/smb*m*nt%{samba_major}
1487 rm -f %{buildroot}%{_mandir}/man8/smb*m*nt*.8*
1488 %endif
1489
1490 %if !%build_system
1491 rm -f %{buildroot}%{_libdir}/libsmbclient.so.*
1492 rm -f %{buildroot}%{_includedir}/*
1493 rm -f %{buildroot}%{_libdir}/libsmbclient.so
1494 rm -f %{buildroot}%{_libdir}/lib*.a
1495 rm -f %{buildroot}%{_mandir}/man8/libsmbclient.8*
1496 rm -f %{buildroot}%{_libdir}/pkgconfig/smbclient.pc
1497 %endif
1498
1499 %if %build_vscan
1500 #rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan*.so
1501
1502 %if !%build_antivir
1503 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-antivir.so
1504 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-antivir.conf
1505 %endif
1506
1507 %if !%build_clamav
1508 rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-clamav.so
1509 rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-clamav.conf
1510 %endif
1511
1512 %if !%build_fprot
1513 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-fprotd.so
1514 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-fprotd.conf
1515 %endif
1516
1517 %if !%build_fsav
1518 rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-fsav.so
1519 rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-fsav.conf
1520 %endif
1521
1522 %if !%build_icap
1523 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-icap.so
1524 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-icap.conf
1525 %endif
1526
1527 %if !%build_kaspersky
1528 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-kavp.so
1529 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-kavp.conf
1530 %endif
1531
1532 %if !%build_mks
1533 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-mksd.so
1534 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-mks*.conf
1535 %endif
1536
1537 %if !%build_nai
1538 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-mcdaemon.so
1539 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-mcdaemon.conf
1540 %endif
1541
1542 %if !%build_openav
1543 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-oav.so
1544 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-oav.conf
1545 %endif
1546
1547 %if !%build_sophos
1548 rm -f %{buildroot}%{_libdir}/%{name}/vfs/svf-sophos.so
1549 rm -f %{buildroot}%{_sysconfdir}/%{name}/smb.svf-sophos.conf
1550 %endif
1551
1552 %if !%build_symantec
1553 rm -rf %{buildroot}%{_sysconfdir}/%{name}/vscan-symantec.conf
1554 %endif
1555
1556 %if !%build_trend
1557 rm -f %{buildroot}%{_libdir}/%{name}/vfs/vscan-trend.so
1558 rm -f %{buildroot}%{_sysconfdir}/%{name}/vscan-trend.conf
1559 %endif
1560 %endif
1561
1562 # these are provided by ldb-utils
1563 rm -f %{buildroot}%{_mandir}/man1/ldbadd.1*
1564 rm -f %{buildroot}%{_mandir}/man1/ldbdel.1*
1565 rm -f %{buildroot}%{_mandir}/man1/ldbedit.1*
1566 rm -f %{buildroot}%{_mandir}/man1/ldbmodify.1*
1567 rm -f %{buildroot}%{_mandir}/man1/ldbrename.1*
1568 rm -f %{buildroot}%{_mandir}/man1/ldbsearch.1*
1569
1570 # these are provided by tdb-utils
1571 rm -f %{buildroot}%{_mandir}/man8/tdbbackup.8*
1572 rm -f %{buildroot}%{_mandir}/man8/tdbdump.8*
1573 rm -f %{buildroot}%{_mandir}/man8/tdbtool.8*
1574
1575 # these are not built
1576 rm -f %{buildroot}%{_mandir}/man1/log2pcap.1*
1577 rm -f %{buildroot}%{_mandir}/man1/vfstest.1*
1578
1579 %post server
1580
1581 %_post_service smb%{samba_major}
1582 #%_post_service wrepld%{samba_major}
1583
1584 # Add a unix group for samba machine accounts
1585 groupadd -frg 421 machines
1586
1587 # Migrate tdb's from /var/lock/samba (taken from official samba spec file):
1588 for i in /var/lock/samba/*.tdb
1589 do
1590 if [ -f $i ]; then
1591 newname=`echo $i | sed -e's|var\/lock\/samba|var\/cache\/samba|'`
1592 echo "Moving $i to $newname"
1593 mv $i $newname
1594 fi
1595 done
1596
1597 %post common
1598 %_tmpfilescreate %{name}
1599
1600 # Basic migration script for pre-2.2.1 users,
1601 # since smb config moved from /etc to %{_sysconfdir}/samba
1602
1603 # Let's create a proper %{_sysconfdir}/samba/smbpasswd file
1604 [ -f %{_sysconfdir}/%{name}/smbpasswd ] || {
1605 echo "Creating password file for samba..."
1606 touch %{_sysconfdir}/%{name}/smbpasswd
1607 }
1608
1609 # And this too, in case we don't have smbd to create it for us
1610 [ -f /var/cache/%{name}/unexpected.tdb ] || {
1611 touch /var/cache/%{name}/unexpected.tdb
1612 }
1613
1614 # Let's define the proper paths for config files
1615 perl -pi -e 's/(\/etc\/)(smb)/\1%{name}\/\2/' %{_sysconfdir}/%{name}/smb.conf
1616
1617 # Fix the logrotate.d file from smb and nmb to smbd and nmbd
1618 if [ -f %{_sysconfdir}/logrotate.d/samba ]; then
1619 perl -pi -e 's/smb /smbd /' %{_sysconfdir}/logrotate.d/samba
1620 perl -pi -e 's/nmb /nmbd /' %{_sysconfdir}/logrotate.d/samba
1621 fi
1622
1623 # And not loose our machine account SID
1624 [ -f %{_sysconfdir}/MACHINE.SID ] && mv -f %{_sysconfdir}/MACHINE.SID %{_sysconfdir}/%{name}/ ||:
1625
1626 # FIXME: Can be removed in mageia ?
1627 %triggerpostun common -- samba-common < 3.0.1-3mdk
1628 # (sb) merge any existing smb.conf with new syntax file
1629 if [ $1 = 2 ]; then
1630 # (sb) save existing smb.conf for merge
1631 echo "Upgrade: copy smb.conf to smb.conf.tomerge for merging..."
1632 cp -f %{_sysconfdir}/%{name}/smb.conf %{_sysconfdir}/%{name}/smb.conf.tomerge
1633 echo "Upgrade: merging previous smb.conf..."
1634 if [ -f %{_datadir}/%{name}/smb.conf.clean ]; then
1635 cp %{_datadir}/%{name}/smb.conf.clean %{_sysconfdir}/%{name}/smb.conf
1636 cp %{_datadir}/%{name}/README.mga.conf %{_sysconfdir}/%{name}/
1637 %{_datadir}/%{name}/scripts/smb-migrate commit
1638 fi
1639 fi
1640
1641 %postun common
1642 if [ -f %{_sysconfdir}/%{name}/README.mga.conf ];then rm -f %{_sysconfdir}/%{name}/README.mga.conf;fi
1643
1644 %if %build_winbind
1645 %post winbind
1646 if [ $1 = 1 ]; then
1647 /sbin/chkconfig winbind on
1648 cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave
1649 cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp
1650 for i in passwd group;do
1651 grep ^$i %{_sysconfdir}/nsswitch.conf |grep -v 'winbind' >/dev/null
1652 if [ $? = 0 ];then
1653 echo "Adding a winbind entry to the $i section of %{_sysconfdir}/nsswitch.conf"
1654 awk '/^'$i'/ {print $0 " winbind"};!/^'$i'/ {print}' %{_sysconfdir}/nsswitch.conf.rpmtemp >%{_sysconfdir}/nsswitch.conf;
1655 cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp
1656 else
1657 echo "$i entry found in %{_sysconfdir}/nsswitch.conf"
1658 fi
1659 done
1660 if [ -f %{_sysconfdir}/nsswitch.conf.rpmtemp ];then rm -f %{_sysconfdir}/nsswitch.conf.rpmtemp;fi
1661 fi
1662
1663 %preun winbind
1664 if [ $1 = 0 ]; then
1665 echo "Removing winbind entries from %{_sysconfdir}/nsswitch.conf"
1666 perl -pi -e 's/ winbind//' %{_sysconfdir}/nsswitch.conf
1667
1668 /sbin/chkconfig winbind reset
1669 fi
1670 %endif %build_winbind
1671
1672 %if %build_wins
1673 %post -n nss_wins%{samba_major}
1674 if [ $1 = 1 ]; then
1675 cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave
1676 grep '^hosts' %{_sysconfdir}/nsswitch.conf |grep -v 'wins' >/dev/null
1677 if [ $? = 0 ];then
1678 echo "Adding a wins entry to the hosts section of %{_sysconfdir}/nsswitch.conf"
1679 awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' %{_sysconfdir}/nsswitch.conf.rpmsave >%{_sysconfdir}/nsswitch.conf;
1680 else
1681 echo "wins entry found in %{_sysconfdir}/nsswitch.conf"
1682 fi
1683 # else
1684 # echo "Upgrade, leaving nsswitch.conf intact"
1685 fi
1686
1687 %preun -n nss_wins%{samba_major}
1688 if [ $1 = 0 ]; then
1689 echo "Removing wins entry from %{_sysconfdir}/nsswitch.conf"
1690 perl -pi -e 's/ wins//' %{_sysconfdir}/nsswitch.conf
1691 #else
1692 # echo "Leaving %{_sysconfdir}/nsswitch.conf intact"
1693 fi
1694 %endif %build_wins
1695
1696 %preun server
1697
1698 %_preun_service smb%{samba_major}
1699 #%_preun_service wrepld%{samba_major}
1700
1701 #if [ $1 = 0 ] ; then
1702 # /sbin/chkconfig --level 35 smb reset
1703 # Let's not loose /var/cache/samba
1704 #
1705 # if [ -d /var/cache/%{name} ]; then
1706 # mv -f /var/cache/%{name} /var/cache/%{name}.BAK
1707 # fi
1708 #fi
1709
1710 %post swat
1711 if [ -f /var/lock/subsys/xinetd ]; then
1712 service xinetd reload >/dev/null 2>&1 || :
1713 fi
1714
1715 %postun swat
1716
1717 # Remove swat entry from xinetd
1718 if [ $1 = 0 -a -f %{_sysconfdir}/xinetd.conf ] ; then
1719 rm -f %{_sysconfdir}/xinetd.d/swat%{samba_major}
1720 service xinetd reload &>/dev/null || :
1721 fi
1722
1723 if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi
1724
1725 %if %build_alternatives
1726 %post client
1727
1728 update-alternatives --install %{_bindir}/smbclient smbclient \
1729 %{_bindir}/smbclient%{alternative_major} 10 \
1730 $(for i in %{_bindir}/{%{clientbin},eventlogadm};do
1731 j=`basename $i`
1732 [ "$j" = "smbclient" ] || \
1733 echo -n " --slave ${i} ${j} ${i}%{alternative_major}";done) \
1734 $(for i in %{_mandir}/{%{client_man}};do
1735 echo -n " --slave ${i}%{_extension} `basename $i` ${i%%.?}%{alternative_major}.${i##*.}%{_extension}";done) \
1736 --slave %{_prefix}/lib/cups/backend/smb cups_smb %{_prefix}/lib/cups/backend/smb%{alternative_major} || \
1737 update-alternatives --auto smbclient
1738
1739 %preun client
1740 [ $1 = 0 ] && update-alternatives --remove smbclient %{_bindir}/smbclient%{alternative_major} ||:
1741 %endif
1742
1743 %if %build_alternatives
1744 %triggerpostun client -- samba-client, samba2-client
1745 [ ! -e %{_bindir}/smbclient ] && update-alternatives --auto smbclient || :
1746 %endif
1747
1748 %files server
1749 %(for i in %{_sbindir}/{%{serversbin}}%{samba_major};do echo $i;done)
1750 %(for i in %{_bindir}/{%{serverbin}%{?serverldbbin:,%serverldbbin}}%{samba_major};do echo $i;done)
1751 %attr(755,root,root) /%{_lib}/security/pam_smbpass*
1752 %dir %{_libdir}/%{name}/vfs
1753 %{_libdir}/%{name}/vfs/*.so
1754 %dir %{_libdir}/%{name}/pdb
1755 %{_libdir}/%{name}/auth
1756
1757 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smbusers
1758 %attr(-,root,root) %config(noreplace) %{_initrddir}/smb%{samba_major}
1759 #%attr(-,root,root) %config(noreplace) %{_initrddir}/wrepld%{samba_major}
1760 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
1761 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/%{name}
1762 #%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/samba-slapd.include
1763 %(for i in %{_mandir}/man?/{%{serverbin}%{?serverldbbin:,%serverldbbin},%{serversbin}}%{samba_major}\.[0-9]\\*;do echo $i|grep -v mkntpwd;done)
1764 %attr(775,root,adm) %dir %{_localstatedir}/lib/%{name}/netlogon
1765 %attr(755,root,root) %dir %{_localstatedir}/lib/%{name}/profiles
1766 %attr(755,root,root) %dir %{_localstatedir}/lib/%{name}/printers
1767 %attr(2775,root,adm) %dir %{_localstatedir}/lib/%{name}/printers/*
1768 %attr(1777,root,root) %dir /var/spool/%{name}
1769 %dir %{_datadir}/%{name}
1770 %dir %{_datadir}/%{name}/scripts
1771 %attr(0755,root,root) %{_datadir}/%{name}/scripts/*
1772 %exclude %{_datadir}/%{name}/scripts/smb-migrate
1773 %{_mandir}/man8/idmap_*.8*
1774 %{_mandir}/man8/vfs_*.8*
1775
1776 %files doc
1777 %doc README COPYING Manifest Read-Manifest-Now
1778 %doc WHATSNEW.txt Roadmap
1779 %doc README.%{name}-mageia-rpm
1780 %doc clean-docs/samba-doc/docs/*
1781 %doc clean-docs/samba-doc/examples
1782 #%attr(-,root,root) %{_datadir}/swat%{samba_major}/using_samba/
1783 %attr(-,root,root) %{_datadir}/swat%{samba_major}/help/
1784
1785 %files swat
1786 %config(noreplace) %{_sysconfdir}/xinetd.d/swat%{samba_major}
1787 #%attr(-,root,root) /sbin/*
1788 %{_sbindir}/swat%{samba_major}
1789 %{_datadir}/applications/mageia-%{name}-swat.desktop
1790 %{_miconsdir}/*.png
1791 %{_liconsdir}/*.png
1792 %{_iconsdir}/*.png
1793 #%attr(-,root,root) %{_datadir}/swat%{samba_major}/help/
1794 %attr(-,root,root) %{_datadir}/swat%{samba_major}/images/
1795 %attr(-,root,root) %{_datadir}/swat%{samba_major}/include/
1796 %lang(ja) %{_datadir}/swat%{samba_major}/lang/ja
1797 %lang(tr) %{_datadir}/swat%{samba_major}/lang/tr
1798 %{_mandir}/man8/swat*.8*
1799 %lang(de) %{_libdir}/%{name}/de.msg
1800 %lang(en) %{_libdir}/%{name}/en.msg
1801 %lang(fr) %{_libdir}/%{name}/fr.msg
1802 %lang(it) %{_libdir}/%{name}/it.msg
1803 %lang(ja) %{_libdir}/%{name}/ja.msg
1804 %lang(nl) %{_libdir}/%{name}/nl.msg
1805 %lang(pl) %{_libdir}/%{name}/pl.msg
1806 %lang(tr) %{_libdir}/%{name}/tr.msg
1807 %lang(fi) %{_libdir}/%{name}/fi.msg
1808 %lang(ru) %{_libdir}/%{name}/ru.msg
1809 #%doc swat/README
1810
1811 %files client
1812 %(for i in %{_bindir}/{%{clientbin},eventlogadm}%{alternative_major};do echo $i;done)
1813 %(for i in %{_mandir}/man?/{%{clientbin}}%{alternative_major}.\\?.\\*;do echo $i|grep -v smbprint;done)
1814 #xclude %{_mandir}/man?/smbget*
1815 %{_mandir}/man5/smbgetrc%{alternative_major}.5*
1816 %ifnarch alpha
1817 #(for i in /sbin/{%{client_sbin}}%{alternative_major};do echo $i|grep -v "smb.*m.*nt";done)
1818 %endif
1819 %{_mandir}/man8/eventlogadm3.8*
1820 # Link of smbspool to CUPS
1821 %{_prefix}/lib*/cups/backend/smb%{alternative_major}
1822
1823 %files common -f net.lang
1824 %dir /var/cache/%{name}
1825 %dir /var/log/%{name}
1826 %{_tmpfilesdir}/%{name}.conf
1827 %(for i in %{_bindir}/{%{commonbin}}%{samba_major};do echo $i;done)
1828 %(for i in %{_mandir}/man?/{%{commonbin}}%{samba_major}\.[0-9]\\*;do echo $i;done)
1829 #%{_libdir}/smbwrapper%{samba_major}.so
1830 %dir %{_libdir}/%{name}
1831 %{_libdir}/%{name}/*.dat
1832 %{_libdir}/%{name}/charset
1833 #%{_libdir}/%{name}/lowcase.dat
1834 #%{_libdir}/%{name}/valid.dat
1835 %dir %{_sysconfdir}/%{name}
1836 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb.conf
1837 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb-winbind.conf
1838 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/lmhosts
1839 %dir %{_localstatedir}/lib/%{name}
1840 %attr(-,root,root) %{_localstatedir}/lib/%{name}/codepages
1841 %{_mandir}/man5/smb.conf*.5*
1842 %{_mandir}/man5/lmhosts*.5*
1843 #%{_mandir}/man7/Samba*.7*
1844 %dir %{_datadir}/swat%{samba_major}
1845 %attr(0750,root,adm) %{_datadir}/%{name}/scripts/smb-migrate
1846 %attr(-,root,root) %{_datadir}/%{name}/smb.conf.clean
1847 %attr(-,root,root) %{_datadir}/%{name}/README.mga.conf
1848
1849 %if %build_winbind
1850 %files winbind -f pam_winbind.lang
1851 %config(noreplace) %{_sysconfdir}/security/pam_winbind.conf
1852 %{_sbindir}/winbindd
1853 %{_sbindir}/winbind
1854 %{_bindir}/wbinfo
1855 %attr(755,root,root) /%{_lib}/security/pam_winbind*
1856 %attr(755,root,root) /%{_lib}/libnss_winbind*
1857 %{_libdir}/%{name}/idmap
1858 %{_libdir}/krb5/plugins/winbind_krb5_locator.so
1859 %attr(-,root,root) %config(noreplace) %{_initrddir}/winbind
1860 %attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind*
1861 %{_mandir}/man8/winbindd*.8*
1862 %{_mandir}/man8/pam_winbind.8*
1863 %{_mandir}/man5/pam_winbind.conf.5.*
1864 %{_mandir}/man7/winbind_krb5_locator.7.*
1865 %{_mandir}/man1/wbinfo*.1*
1866 %dir %{_libdir}/%{name}/nss_info
1867 %{_libdir}/%{name}/nss_info/rfc2307.so
1868 %{_libdir}/%{name}/nss_info/sfu*.so
1869 %dir %{_libdir}/%{name}/idmap
1870 %{_libdir}/%{name}/idmap/*.so
1871 %endif
1872
1873 %if %build_wins
1874 %files -n nss_wins%{samba_major}
1875 %attr(755,root,root) /%{_lib}/libnss_wins.so*
1876 %endif
1877
1878 %if %{build_test}
1879 %files test
1880 %(for i in %{_bindir}/{%{testbin}}%{samba_major};do echo $i;done)
1881 %{_mandir}/man1/vfstest%{samba_major}*.1*
1882 %endif
1883
1884 %if %build_system
1885 %files -n %{libname}
1886 %{_libdir}/libsmbclient.so.%{libsmbmajor}
1887 %endif
1888
1889 %if %build_system
1890 %files -n %{libname}-devel
1891 %{_includedir}/libsmbclient.h
1892 %{_libdir}/libsmbclient.so
1893 %doc clean-docs/libsmbclient/*
1894 %{_mandir}/man7/libsmbclient.7*
1895 %{_libdir}/pkgconfig/smbclient.pc
1896 %endif
1897
1898 %if %build_system
1899 %files -n %{libname}-static-devel
1900 %{_libdir}/lib*.a
1901 %endif
1902
1903 %files -n %libnetapi
1904 %{_libdir}/libnetapi.so.%{netapimajor}*
1905
1906 %files -n %netapidevel
1907 %{_libdir}/libnetapi*.so
1908 %{_includedir}/netapi.h
1909 %{_libdir}/pkgconfig/netapi.pc
1910
1911 %files -n %libsmbsharemodes
1912 %{_libdir}/libsmbsharemodes.so.%{smbsharemodesmajor}*
1913
1914 %files -n %smbsharemodesdevel
1915 %{_libdir}/libsmbsharemodes.so
1916 %{_includedir}/smb_share_modes.h
1917 %{_libdir}/pkgconfig/smbsharemodes.pc
1918
1919 %if %build_talloc
1920 %files -n %libtalloc
1921 %{_libdir}/libtalloc.so.%{tallocmajor}*
1922
1923 %files -n %tallocdevel
1924 %{_libdir}/libtalloc.so
1925 %{_includedir}/talloc.h
1926 %{_libdir}/pkgconfig/talloc.pc
1927 %endif
1928
1929 %if %build_tdb
1930 %files -n %libtdb
1931 %{_libdir}/libtdb.so.%{tdbmajor}*
1932
1933 %files -n %tdbdevel
1934 %{_libdir}/libtdb.so
1935 %{_includedir}/tdb.h
1936 %{_libdir}/pkgconfig/tdb.pc
1937 %endif
1938
1939 %files -n %libwbclient
1940 %{_libdir}/libwbclient.so.%{wbclientmajor}
1941
1942 %files -n %wbclientdevel
1943 %{_libdir}/libwbclient.so
1944 %{_includedir}/wbclient.h
1945 %{_libdir}/pkgconfig/wbclient.pc
1946
1947 #%files passdb-ldap
1948 #%defattr(-,root,root)
1949 #%{_libdir}/%{name}/*/*ldap.so
1950
1951 %ifnarch alpha
1952 %if %{build_mysql}
1953 %files passdb-mysql
1954 %{_libdir}/%{name}/pdb/*mysql.so
1955 %endif
1956 %endif
1957
1958 %if %{build_pgsql}
1959 %files passdb-pgsql
1960 %{_libdir}/%{name}/pdb/*pgsql.so
1961 %endif
1962
1963 #Files for antivirus support:
1964 %if %build_antivir
1965 %files vscan-antivir
1966 %{_libdir}/%{name}/vfs/vscan-antivir.so
1967 %config(noreplace) %{_sysconfdir}/%{name}/vscan-antivir.conf
1968 %endif
1969
1970 %if %build_clamav
1971 %files virusfilter-clamav
1972 %{_libdir}/%{name}/vfs/svf-clamav.so
1973 %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-clamav.conf
1974 %endif
1975
1976 %if %build_fprot
1977 %files vscan-fprot
1978 %{_libdir}/%{name}/vfs/vscan-fprotd.so
1979 %config(noreplace) %{_sysconfdir}/%{name}/vscan-fprotd.conf
1980 %doc %{vfsdir}/%{vscandir}/INSTALL
1981 %endif
1982
1983 %if %build_fsav
1984 %files virusfilter-fsecure
1985 %{_libdir}/%{name}/vfs/svf-fsav.so
1986 %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-fsav.conf
1987 %endif
1988
1989 %if %build_icap
1990 %files vscan-icap
1991 %{_libdir}/%{name}/vfs/vscan-icap.so
1992 %config(noreplace) %{_sysconfdir}/%{name}/vscan-icap.conf
1993 %doc %{vfsdir}/%{vscandir}/INSTALL
1994 %endif
1995
1996 %if %build_kaspersky
1997 %files vscan-kaspersky
1998 %{_libdir}/%{name}/vfs/vscan-kavp.so
1999 %config(noreplace) %{_sysconfdir}/%{name}/vscan-kavp.conf
2000 %doc %{vfsdir}/%{vscandir}/INSTALL
2001 %endif
2002
2003 %if %build_mks
2004 %files vscan-mks
2005 %{_libdir}/%{name}/vfs/vscan-mksd.so
2006 %config(noreplace) %{_sysconfdir}/%{name}/vscan-mks*.conf
2007 %doc %{vfsdir}/%{vscandir}/INSTALL
2008 %endif
2009
2010 %if %build_nai
2011 %files vscan-nai
2012 %{_libdir}/%{name}/vfs/vscan-mcdaemon.so
2013 %config(noreplace) %{_sysconfdir}/%{name}/vscan-mcdaemon.conf
2014 %doc %{vfsdir}/%{vscandir}/INSTALL
2015 %endif
2016
2017 %if %build_openav
2018 %files vscan-openav
2019 %{_libdir}/%{name}/vfs/vscan-oav.so
2020 %config(noreplace) %{_sysconfdir}/%{name}/vscan-oav.conf
2021 %doc %{vfsdir}/%{vscandir}/INSTALL
2022 %endif
2023
2024 %if %build_sophos
2025 %files virusfilter-sophos
2026 %{_libdir}/%{name}/vfs/svf-sophos.so
2027 %config(noreplace) %{_sysconfdir}/%{name}/smb.svf-sophos.conf
2028 %endif
2029
2030 %if %build_symantec
2031 %files vscan-symantec
2032 %{_libdir}/%{name}/vfs/vscan-symantec.so
2033 %config(noreplace) %{_sysconfdir}/%{name}/vscan-symantec.conf
2034 %doc %{vfsdir}/%{vscandir}/INSTALL
2035 %endif
2036
2037 %if %build_trend
2038 %files vscan-trend
2039 %{_libdir}/%{name}/vfs/vscan-trend.so
2040 %config(noreplace) %{_sysconfdir}/%{name}/vscan-trend.conf
2041 %doc %{vfsdir}/%{vscandir}/INSTALL
2042 %endif
2043
2044 %files domainjoin-gui
2045 %{_sbindir}/netdomjoin-gui
2046 %dir %{_datadir}/pixmaps/samba
2047 %{_datadir}/pixmaps/samba/samba.ico
2048 %{_datadir}/pixmaps/samba/logo.png
2049 %{_datadir}/pixmaps/samba/logo-small.png
2050

  ViewVC Help
Powered by ViewVC 1.1.26