]> git.pld-linux.org Git - packages/samba.git/blob - samba.spec
- fix quota with 2.4.x
[packages/samba.git] / samba.spec
1 #
2 # Conditional build:
3 # _with_ldap    - with LDAP support
4 #
5 Summary:        SMB server
6 Summary(pl):    Serwer SMB
7 Summary(cs):    Server SMB
8 Summary(da):    SMB server
9 Summary(de):    SMB-Server
10 Summary(fi):    SMB-palvelin
11 Summary(fr):    Serveur SMB
12 Summary(it):    Server SMB
13 Summary(pl):    Serwer SMB
14 Summary(tr):    SMB sunucusu
15 Name:           samba
16 Version:        2.2.3a
17 Release:        0.1
18 License:        GPL
19 Group:          Networking/Daemons
20 URL:            http://www.samba.org/
21 Source0:        ftp://ftp.samba.org/pub/samba/%{name}-%{version}.tar.bz2
22 Source1:        smb.init
23 Source2:        %{name}.pamd
24 Source3:        swat.inetd
25 Source4:        %{name}.sysconfig
26 Source5:        %{name}.logrotate
27 Source6:        smb.conf
28 Patch1:         %{name}-config.patch
29 Patch2:         %{name}-DESTDIR.patch
30 Patch3:         %{name}-manpages_PLD_fixes.patch
31 Patch4:         %{name}-smbprint.patch
32 Patch5:         %{name}-autoconf.patch
33 Patch6:         %{name}-smbadduser.patch
34 Patch7:         %{name}-nmbd_socket.patch
35 Patch8:         %{name}-pam_smbpass.patch 
36 Patch9:         %{name}-srv_spoolss_nt.patch
37 # needed for external vfs modules to work.
38 Patch10:     %{name}-2.2.3-vfs.dif
39 Prereq:         /sbin/chkconfig
40 Requires:       pam >= 0.66
41 Requires:       logrotate
42 Requires:       samba-common = %{version}
43 BuildRequires:  autoconf
44 BuildRequires:  ncurses-devel >= 5.2
45 BuildRequires:  readline-devel >= 4.2
46 BuildRequires:  pam-devel > 0.66
47 %{?_with_ldap:BuildRequires:    openldap-devel}
48 BuildRequires:  openssl-devel >= 0.9.6a
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         _sysconfdir     /etc/samba
52 %define         _libdir         %{_sysconfdir}
53 %define         _localstatedir  %{_var}/log/samba
54
55 %description
56 Samba provides an SMB server which can be used to provide network
57 services to SMB (sometimes called "Lan Manager") clients, including
58 various versions of MS Windows, OS/2, and other Linux machines. Samba
59 also provides some SMB clients, which complement the built-in SMB
60 filesystem in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
61 and does NOT need NetBEUI (Microsoft Raw NetBIOS frame) protocol.
62
63 This release is known as the "Locking Update" and has full support for
64 Opportunistic File Locking. In addition this update includes native
65 support for Microsoft encrypted passwords, improved browse list and
66 WINS database management.
67
68 Please refer to the WHATSNEW.txt document for fixup information. This
69 binary release includes encrypted password support. Please read the
70 smb.conf file and ENCRYPTION.txt in the docs directory for
71 implementation details.
72
73 %description -l cs
74 Samba poskytuje server SMB, který lze pou¾ít pro poskytování sí»ových
75 slu¾eb klientùm SMB (nìkdy nazývaných klienti "LAN mana¾er") vèetnì
76 klientù rùzných verzí MS Windows, OS/2 a dal¹ích linuxových strojù.
77 Samba té¾ poskytuje nìkteré klienty SMB, kteøí komplementují vestavìný
78 souborový systém SMB v Linuxu. Samba pou¾ívá protokoly NetBIOS pøes
79 TCP/IP (NetBT) a NEpotøebuje protokol NetBEUI (neformátovaný rámec
80 NetBIOS od spoleènosti Microsoft.
81
82 %description -l da
83 Samba tilbyder en SMB server som kan bruges til at tilbyde netværk
84 services til SMB (også kaldet "Lan Manager") klienter, incl.
85 forskellige versioner af MS Windows, OS/2, og andre Linux maskiner.
86 Samba tilbyder også SMB klienter, som udbygger det indbyggede SMB
87 filsystem i Linux. Samba benytter NetBIOS over TCP/IP (NetBT)
88 protocolen og kræver ikke NetBEUI (Microsoft Raw NetBIOS frame)
89 protokollen.
90
91 %description -l de
92 Samba stellt einen SMB-Server zum Anbieten von Netzwerkdiensten für
93 SMB-Clients (auch "Lan Manager" genannt) zur Verfügung, darunter
94 verschiedenen Versionen von MS Windows-, OS/2- und anderen
95 Linux-Rechnern. Samba enthält außerdem einige SMB-Clients, die das in
96 Linux integrierte SMB-Dateisystem ergänzen. Samba benutzt
97 NetBIOS-über-TCP/IP (NetBT)-Protokolle und benötigt KEIN NetBEUI
98 (Microsoft Raw NetBIOS frame)-Protokoll.
99
100 %description -l fi
101 Samba on SMB-palvelin, jota voidaan käyttää SMB-asiakasohjelmien
102 verkkopalvelujen tarjoajana. SMB-protokollaa kutsutaan joskus "Lan
103 Manager" protokollaksi ja asiakasohjelmat toimivat dosissa,
104 Windowseissa, OS/2:ssa ja toisissa Linux-koneissa. Samban mukana on
105 myös joitakin SMB-asiakasohjelmia, jotka täydentävät Linuxin
106 kernelissä olevaa SMB-tiedostojärjestelmän tukea. Samba vaatii NetBIOS
107 over TCP/IP (NetBT) protokollaa eikä tarvitse tai pysty käyttämään
108 NetBEUI-protokollaa.
109
110 %description -l it
111 Samba fornisce un server SMB che puo` essere usato per fornire servizi
112 di rete ai client SMB, incluse le versioni MS Windows, OS/2 e per
113 altre macchine Linux. Samba fornisce anche i client SMB. Samba usa
114 NetBIOS sopra TCP/IP e non ha bisogno del protocollo NetBEUI.
115
116 %description -l pl
117 Samba udostêpnia serwer SMB, który mo¿e byæ u¿yty w celu dostarczenia
118 us³ug sieciowych (potocznie zwanych "Lan Manager"), dla klientów
119 takich jak MS Windows, OS/2 a tak¿e maszyn linuksowych. W pakiecie
120 znajduje siê równie¿ oprogramowanie klienckie. Samba u¿ywa protoko³u
121 NetBIOS po TCP/IP (NetBT) i nie wymaga protoko³u NetBEUI. Ta wersja ma
122 pe³ne wsparcie dla blokowania plików, a tak¿e wsparcie dla kodowania
123 hase³ w standardzie MS i zarzadzania baz± WINS.
124
125 %package -n swat
126 Summary:        Samba Web Administration Tool
127 Summary(pl):    Narzêdzie administracyjne serwisu Samba
128 Group:          Networking/Admin
129 Requires:       %{name}
130 Requires:       rc-inetd >= 0.8.2
131 Requires:       inetdaemon
132 Provides:       samba-swat
133 Obsoletes:      samba-swat
134
135 %description -n swat
136 swat allows a Samba administrator to configure the complex smb.conf
137 file via a Web browser. In addition, a swat configuration page has
138 help links to all the configurable options in the smb.conf file
139 allowing an administrator to easily look up the effects of any change.
140
141 swat is run from inet server.
142
143 %description -n swat -l pl
144 swat pozwala na kompleksow± konfiguracjê smb.conf przy pomocy
145 przegl±darki WWW.
146
147 %package client
148 Summary:        Samba client programs
149 Summary(pl):    Klienci serwera Samba
150 Group:          Applications/Networking
151 Requires:       samba-common = %{version}
152 Obsoletes:      smbfs
153
154 %description client
155 Samba-client provides some SMB clients, which complement the build-in
156 SMB filesystem in Linux. These allow accessing of SMB shares and
157 printing to SMB printers.
158
159 %description client -l pl
160 Samba-client dostarcza pewne programy które uzupe³niaj± system plików
161 SMB zawarty w j±drze. Pozwala na wspó³dzielenie i drukowanie w sieci
162 SMB.
163
164 %package common
165 Summary:        Files used by both Samba servers and clients
166 Summary(pl):    Pliki u¿ywane przez serwer i klientów Samba
167 Group:          Networking/Daemons
168
169 %description common
170 Samba-common provides files necessary for both the server and client
171 packages of Samba.
172
173 %description common -l pl
174 Samba-common dostarcza pliki niezbêdne zarówno dla serwera jak i
175 klientów Samba.
176
177 %package -n pam_smbpass
178 Summary:        PAM Samba Password Module
179 Summary(pl):    Modu³ PAM smbpass
180 Group:          Base
181
182 %description -n pam_smbpass
183 PAM module which can be used on conforming systems to
184 keep the smbpasswd (Samba password) database in sync with the unix
185 password file.
186
187 %description -n pam_smbpass -l pl
188 Modu³ PAMa, który mo¿e byæ u¿ywany do trzymania pliku smbpasswd
189 (has³a Samby) zsynchronizowanego z has³ami unixowymi.
190
191 %prep
192 %setup -q
193 %patch1 -p1
194 %patch2 -p1
195 %patch3 -p1
196 %patch4 -p1
197 %patch5 -p1
198 #%patch6 -p1
199 %patch7 -p1
200 %patch8 -p1
201 %patch9 -p1
202 %patch10 -p1
203
204 %build
205 cd source
206 autoconf
207 %configure \
208         --with-readline \
209         --with-privatedir=%{_libdir} \
210         --with-lockdir=%{_var}/lock/samba \
211         --with-swatdir=%{_datadir}/swat \
212         --with-smbmount \
213         --with-automount \
214         --without-smbwrapper \
215         --with-netatalk \
216         --with-msdfs \
217         --with-quotas \
218         --with-vfs \
219         --with-utmp \
220         --with-syslog \
221         --with-mmap \
222         --with-pam \
223         --with-ssl \
224         --with-sslinc=%{_prefix} \
225         %{?_with_ldap:--with-ldapsam}
226
227 mv Makefile Makefile.old
228 sed -e "s#-symbolic##g" Makefile.old > Makefile
229
230 %{__make} everything
231
232 %install
233 rm -rf $RPM_BUILD_ROOT
234 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,pam.d,security,sysconfig/rc-inetd} \
235         $RPM_BUILD_ROOT/{var/{lock,log,log/archiv,spool},home}/samba \
236         $RPM_BUILD_ROOT/{sbin,lib/security}
237
238 cd source
239 %{__make} install DESTDIR=$RPM_BUILD_ROOT
240 install script/mksmbpasswd.sh /$RPM_BUILD_ROOT%{_sbindir}
241 cd ..
242
243 ln -sf %{_bindir}/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
244
245 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
246 install %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/samba
247 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/swat
248 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/samba
249 install %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/samba
250 install %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/smb.conf
251
252 install nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib/libnss_wins.so.2
253 install nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security/
254 install bin/pam_smbpass.so      $RPM_BUILD_ROOT/lib/security/
255 install bin/wbinfo              $RPM_BUILD_ROOT%{_bindir}
256
257 touch $RPM_BUILD_ROOT/var/lock/samba/{STATUS..LCK,wins.dat,browse.dat}
258
259 echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_libdir}/lmhosts
260
261 > $RPM_BUILD_ROOT%{_libdir}/smbusers
262 > $RPM_BUILD_ROOT/etc/security/blacklist.samba
263
264 rm -f docs/faq/*.{sgml,txt}
265 rm -f docs/htmldocs/*.[0-9].html
266
267 gzip -9nfr Manifest README Roadmap WHATSNEW.txt docs/{announce,history,THANKS} docs/textdocs/*.txt
268 gzip -9nfr source/nsswitch/README source/pam_smbpass/{CHAN*,README,TODO}
269 gzip -9nfr packaging/Mandrake/system-auth-winbind.pamd
270
271 %clean
272 rm -rf $RPM_BUILD_ROOT
273
274 %post
275 /sbin/chkconfig --add smb
276 if [ -r /var/lock/subsys/smb ]; then
277         /etc/rc.d/init.d/smb restart >&2
278 else
279         echo "Run \"/etc/rc.d/init.d/smb start\" to start Samba daemons."
280 fi
281
282 %preun
283 if [ "$1" = "0" ]; then
284         if [ -r /var/lock/subsys/smb ]; then
285                 /etc/rc.d/init.d/smb stop >&2
286         fi
287         /sbin/chkconfig --del smb
288 fi
289
290 %post -n swat
291 if [ -f /var/lock/subsys/rc-inetd ]; then
292         /etc/rc.d/init.d/rc-inetd reload 1>&2
293 else
294         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
295 fi
296
297 %postun -n swat
298 if [ -f /var/lock/subsys/rc-inetd ]; then
299         /etc/rc.d/init.d/rc-inetd reload
300 fi
301
302 %triggerpostun -- samba < 1.9.18p7
303 if [ "$1" != "0" ]; then
304         /sbin/chkconfig --add smb
305 fi
306
307 %triggerpostun -- samba < 2.0.5a-3
308 if [ "$1" != "0" ]; then
309         [ ! -d /var/lock/samba ] && mkdir -m 0755 /var/lock/samba
310         [ ! -d /var/spool/samba ] && mkdir -m 1777 /var/spool/samba
311 fi
312
313 %files
314 %defattr(644,root,root,755)
315 %doc docs/nsswitch/README.gz packaging/Mandrake/*.gz
316 %attr(755,root,root) %{_sbindir}/nmbd
317 %attr(755,root,root) %{_sbindir}/smbd
318 %attr(755,root,root) %{_sbindir}/winbindd
319 %attr(755,root,root) %{_sbindir}/mksmbpasswd.sh
320 %attr(755,root,root) %{_bindir}/smbstatus
321 %attr(755,root,root) %{_bindir}/smbpasswd
322 %attr(755,root,root) %{_bindir}/smbcontrol
323
324 %doc docs/nsswitch/README.gz winbind.pam*
325 %attr(755,root,root) /lib/libnss_wins*
326 %attr(755,root,root) /lib/security/pam_winbind.so
327
328 %dir %{_libdir}
329 %attr(600,root,root) %config(noreplace) %verify(not size mtime md5) %{_libdir}/smbusers
330 %attr(754,root,root) /etc/rc.d/init.d/smb
331 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/samba
332 %attr(640,root,root) /etc/logrotate.d/samba
333 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/samba
334 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.samba
335 %{_mandir}/man1/smbstatus.1*
336 %{_mandir}/man1/smbcontrol.1*
337 %{_mandir}/man5/smbpasswd.5*
338 %{_mandir}/man7/samba.7*
339 %{_mandir}/man8/nmbd.8*
340 %{_mandir}/man8/smbd.8*
341 %{_mandir}/man8/smbpasswd.8*
342 %{_mandir}/man8/winbindd.8*
343
344 %dir /home/samba
345 %dir /var/lock/samba
346 %ghost /var/lock/samba/*
347
348 %attr(0750,root,root) %dir /var/log/samba
349 %attr(0750,root,root) %dir /var/log/archiv/samba
350 %attr(1777,root,root) %dir /var/spool/samba
351
352 %files client
353 %defattr(644,root,root,755)
354 %attr(755,root,root) /sbin/mount.smbfs
355 %attr(755,root,root) %{_bindir}/smbmount
356 %attr(755,root,root) %{_bindir}/smbmnt
357 %attr(755,root,root) %{_bindir}/smbumount
358 %{_mandir}/man8/smbmnt.8*
359 %{_mandir}/man8/smbmount.8*
360 %{_mandir}/man8/smbumount.8*
361 %attr(755,root,root) %{_bindir}/nmblookup
362 %attr(755,root,root) %{_bindir}/smbclient
363 %attr(755,root,root) %{_bindir}/smbtar
364 %attr(755,root,root) %{_bindir}/smbspool
365 %attr(755,root,root) %{_bindir}/smbcacls
366 %{_mandir}/man1/smbtar.1*
367 %{_mandir}/man1/smbclient.1*
368 %{_mandir}/man1/nmblookup.1*
369 %{_mandir}/man1/smbcacls.1*
370 %attr(755,root,root) %{_bindir}/rpcclient
371 %{_mandir}/man1/rpcclient.1*
372 %attr(755,root,root) %{_bindir}/wbinfo
373 %{_mandir}/man1/wbinfo.1*
374
375 %files common
376 %defattr(644,root,root,755)
377 %doc README.gz Manifest.gz WHATSNEW.txt.gz
378 %doc Roadmap.gz docs/faq docs/Registry/*
379 %doc docs/textdocs docs/htmldocs/*.* docs/{history,announce,THANKS}.gz
380 %config(noreplace) %verify(not size mtime md5) %{_libdir}/smb.conf
381 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_libdir}/lmhosts
382 %attr(755,root,root) %{_bindir}/make_smbcodepage
383 %attr(755,root,root) %{_bindir}/make_unicodemap
384 %attr(755,root,root) %{_bindir}/testparm
385 %attr(755,root,root) %{_bindir}/testprns
386 %attr(755,root,root) %{_bindir}/make_printerdef
387 %{_libdir}/codepages
388 %{_mandir}/man1/make_smbcodepage.1*
389 %{_mandir}/man1/make_unicodemap.1*
390 %{_mandir}/man1/testparm.1*
391 %{_mandir}/man1/testprns.1*
392 %{_mandir}/man5/smb.conf.5*
393 %{_mandir}/man5/lmhosts.5*
394
395 %files -n swat
396 %defattr(644,root,root,755)
397 %doc swat/README*
398 %attr(755,root,root) %{_sbindir}/swat
399 %{_datadir}/swat
400 %{_mandir}/man8/swat.8*
401 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/swat
402
403 %files -n pam_smbpass
404 %defattr(644,root,root,755)
405 %doc docs/pam_smbpass/*.gz docs/pam_smbpass/samples
406 %attr(755,root,root) /lib/security/pam_smbpass.so
This page took 0.073984 seconds and 4 git commands to generate.