Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/samba: samba-3.0.37.ebuild ChangeLog samba-3.3.8.ebuild samba-3.2.15.ebuild
Date: Fri, 02 Oct 2009 13:54:23
Message-Id: E1MtiaS-0004PH-4G@stork.gentoo.org
1 patrick 09/10/02 13:54:20
2
3 Modified: ChangeLog
4 Added: samba-3.0.37.ebuild samba-3.3.8.ebuild
5 samba-3.2.15.ebuild
6 Log:
7 Bump
8 (Portage version: 2.2_rc42/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.376 net-fs/samba/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.376&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.376&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?r1=1.375&r2=1.376
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v
20 retrieving revision 1.375
21 retrieving revision 1.376
22 diff -u -r1.375 -r1.376
23 --- ChangeLog 30 Sep 2009 20:10:49 -0000 1.375
24 +++ ChangeLog 2 Oct 2009 13:54:19 -0000 1.376
25 @@ -1,6 +1,14 @@
26 # ChangeLog for net-fs/samba
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.375 2009/09/30 20:10:49 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.376 2009/10/02 13:54:19 patrick Exp $
30 +
31 +*samba-3.3.8 (02 Oct 2009)
32 +*samba-3.2.15 (02 Oct 2009)
33 +*samba-3.0.37 (02 Oct 2009)
34 +
35 + 02 Oct 2009; Patrick Lauer <patrick@g.o> +samba-3.0.37.ebuild,
36 + +samba-3.2.15.ebuild, +samba-3.3.8.ebuild:
37 + Bump
38
39 30 Sep 2009; Jeroen Roovers <jer@g.o> samba-3.3.7.ebuild:
40 Marked ~hppa (bug #285952).
41
42
43
44 1.1 net-fs/samba/samba-3.0.37.ebuild
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.0.37.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.0.37.ebuild?rev=1.1&content-type=text/plain
48
49 Index: samba-3.0.37.ebuild
50 ===================================================================
51 # Copyright 1999-2009 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.0.37.ebuild,v 1.1 2009/10/02 13:54:19 patrick Exp $
54
55 inherit autotools eutils pam python multilib versionator confutils
56
57 VSCAN_P="samba-vscan-0.3.6c-beta5"
58 MY_P=${PN}-${PV/_/}
59
60 DESCRIPTION="A suite of SMB and CIFS client/server programs for UNIX"
61 HOMEPAGE="http://www.samba.org/"
62 SRC_URI="mirror://samba/${MY_P}.tar.gz
63 mirror://samba/old-versions/${MY_P}.tar.gz
64 oav? ( http://www.openantivirus.org/download/${VSCAN_P}.tar.gz )"
65 LICENSE="GPL-3 oav? ( GPL-2 LGPL-2.1 )"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
68 IUSE="acl ads async automount caps cups debug doc examples ipv6 kernel_linux ldap fam
69 pam python quotas readline selinux swat syslog winbind oav"
70
71 RDEPEND="dev-libs/popt
72 virtual/libiconv
73 acl? ( virtual/acl )
74 cups? ( net-print/cups )
75 ipv6? ( sys-apps/xinetd )
76 ads? ( virtual/krb5 )
77 ldap? ( net-nds/openldap )
78 pam? ( virtual/pam )
79 python? ( dev-lang/python )
80 readline? ( sys-libs/readline )
81 selinux? ( sec-policy/selinux-samba )
82 swat? ( sys-apps/xinetd )
83 syslog? ( virtual/logger )
84 fam? ( virtual/fam )
85 caps? ( sys-libs/libcap )"
86 DEPEND="${RDEPEND}"
87
88 # Tests are broken now :-(
89 RESTRICT="test"
90
91 S=${WORKDIR}/${MY_P}
92 CONFDIR=${FILESDIR}/config
93 PRIVATE_DST=/var/lib/samba/private
94
95 pkg_setup() {
96 confutils_use_depend_all ads ldap
97 }
98
99 src_unpack() {
100 unpack ${A}
101 cd "${S}/source"
102
103 # lazyldflags.patch: adds "-Wl,-z,now" to smb{mnt,umount}
104 # invalid-free-fix.patch: Bug #196015 (upstream: #5021)
105
106 epatch \
107 "${FILESDIR}/3.0.26a-lazyldflags.patch" \
108 "${FILESDIR}/3.0.26a-invalid-free-fix.patch" \
109 "${FILESDIR}/3.0.28-fix_broken_readdir_detection.patch" \
110 "${FILESDIR}/3.0.28a-wrong_python_ldflags.patch"
111
112 eautoconf -I. -Ilib/replace
113
114 # Ok, agreed, this is ugly. But it avoids a patch we
115 # need for every samba version and we don't need autotools
116 sed -i \
117 -e 's|"lib32" ||' \
118 -e 's|if test -d "$i/$l" ;|if test -d "$i/$l" -o -L "$i/$l";|' \
119 configure || die "sed failed"
120
121 rm "${S}/docs/manpages"/{mount,umount}.cifs.8
122
123 }
124
125 src_compile() {
126 cd "${S}/source"
127
128 local myconf
129 local mylangs
130 local mymod_shared
131
132 python_version
133 myconf="--with-python=no"
134 use python && myconf="--with-python=${python}"
135
136 use winbind && mymod_shared="--with-shared-modules=idmap_rid"
137 if use ldap ; then
138 myconf="${myconf} $(use_with ads)"
139 use winbind && mymod_shared="${mymod_shared},idmap_ad"
140 fi
141
142 [[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
143 use hppa && myconf="${myconf} --disable-pie"
144
145 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
146
147 # Otherwise we get the whole swat stuff installed
148 if ! use swat ; then
149 sed -i \
150 -e 's/^\(install:.*\)installswat \(.*\)/\1\2/' \
151 Makefile.in || die "sed failed"
152 fi
153
154 econf \
155 --with-fhs \
156 --sysconfdir=/etc/samba \
157 --localstatedir=/var \
158 --with-configdir=/etc/samba \
159 --with-libdir=/usr/$(get_libdir)/samba \
160 --with-pammodulesdir=$(getpam_mod_dir) \
161 --with-swatdir=/usr/share/doc/${PF}/swat \
162 --with-piddir=/var/run/samba \
163 --with-lockdir=/var/cache/samba \
164 --with-logfilebase=/var/log/samba \
165 --with-privatedir=${PRIVATE_DST} \
166 --with-libsmbclient \
167 --enable-socket-wrapper \
168 --with-cifsmount=no \
169 $(use_with acl acl-support) \
170 $(use_with async aio-support) \
171 $(use_with automount) \
172 $(use_enable cups) \
173 $(use_enable debug) \
174 $(use_enable fam) \
175 $(use_with ads krb5) \
176 $(use_with ldap) \
177 $(use_with pam) $(use_with pam pam_smbpass) \
178 $(use_with quotas) $(use_with quotas sys-quotas) \
179 $(use_with readline) \
180 $(use_with kernel_linux smbmount) \
181 $(use_with syslog) \
182 $(use_with winbind) \
183 ${myconf} ${mylangs} ${mymod_shared}
184
185 emake -j1 proto || die "emake proto failed"
186 emake -j1 everything || die "emake everything failed"
187
188 if use python ; then
189 emake -j1 python_ext || die "emake python_ext failed"
190 fi
191
192 if use oav ; then
193 # maintainer-info:
194 # - there are no known releases of mks or kavdc,
195 # setting to builtin to disable auto-detection
196 cd "${WORKDIR}/${VSCAN_P}"
197 econf \
198 --with-fhs \
199 --with-samba-source="${S}/source" \
200 --with-libmksd-builtin \
201 --with-libkavdc-builtin \
202 --without-symantec \
203 --with-filetype \
204 --with-fileregexp \
205 $(use_enable debug)
206 emake -j1 || die "emake oav plugins failed"
207 fi
208 }
209
210 src_test() {
211 cd "${S}/source"
212 emake test || die "tests failed"
213 }
214
215 src_install() {
216 cd "${S}/source"
217
218 emake DESTDIR="${D}" install-everything || die "emake install-everything failed"
219
220 # Extra rpctorture progs
221 local extra_bins="rpctorture"
222 for i in ${extra_bins} ; do
223 [[ -x "${S}/bin/${i}" ]] && dobin "${S}/bin/${i}"
224 done
225
226 # remove .old stuff from /usr/bin:
227 rm -f "${D}"/usr/bin/*.old
228
229 # Removing executable bits from header-files
230 fperms 644 /usr/include/lib{msrpc,smbclient}.h
231
232 # Nsswitch extensions. Make link for wins and winbind resolvers
233 if use winbind ; then
234 dolib.so nsswitch/libnss_wins.so
235 dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
236 dolib.so nsswitch/libnss_winbind.so
237 dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
238 fi
239
240 if use kernel_linux ; then
241 # Warning: this can byte you if /usr is
242 # on a separate volume and you have to mount
243 # a smb volume before the local mount
244 dosym ../usr/bin/smbmount /sbin/mount.smbfs
245 fperms 4755 /usr/bin/smbmnt
246 fperms 4755 /usr/bin/smbumount
247 fi
248
249 # bug #46389: samba doesn't create symlink anymore
250 # beaviour seems to be changed in 3.0.6, see bug #61046
251 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so.0
252 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so
253
254 # make the smb backend symlink for cups printing support (bug #133133)
255 if use cups ; then
256 dodir $(cups-config --serverbin)/backend
257 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
258 fi
259
260 if use python ; then
261 emake DESTDIR="${D}" python_install || die "emake installpython failed"
262 # We're doing that manually
263 find "${D}/usr/$(get_libdir)/python${PYVER}/site-packages" -iname "*.pyc" -delete
264 fi
265
266 cd "${S}/source"
267
268 # General config files
269 insinto /etc/samba
270 doins "${CONFDIR}"/{smbusers,lmhosts}
271 newins "${CONFDIR}/smb.conf.example-samba3" smb.conf.example
272
273 newpamd "${CONFDIR}/samba.pam" samba
274 use winbind && dopamd "${CONFDIR}/system-auth-winbind"
275 if use swat ; then
276 insinto /etc/xinetd.d
277 newins "${CONFDIR}/swat.xinetd" swat
278 else
279 rm -f "${D}/usr/sbin/swat"
280 rm -f "${D}/usr/share/man/man8/swat.8"
281 fi
282
283 newinitd "${FILESDIR}/samba-init" samba
284 newconfd "${FILESDIR}/samba-conf" samba
285
286 if use ldap ; then
287 insinto /etc/openldap/schema
288 doins "${S}/examples/LDAP/samba.schema"
289 fi
290
291 if use ipv6 ; then
292 insinto /etc/xinetd.d
293 newins "${FILESDIR}/samba-xinetd" smb
294 fi
295
296 # dirs
297 diropts -m0700 ; keepdir "${PRIVATE_DST}"
298 diropts -m1777 ; keepdir /var/spool/samba
299
300 diropts -m0755
301 keepdir /var/{log,run,cache}/samba
302 keepdir /var/lib/samba/{netlogon,profiles}
303 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
304 keepdir /usr/$(get_libdir)/samba/{rpc,idmap,auth}
305
306 # docs
307 dodoc "${FILESDIR}/README.gentoo"
308 dodoc "${S}"/{MAINTAINERS,README,Roadmap,WHATSNEW.txt}
309 dodoc "${CONFDIR}/nsswitch.conf-wins"
310 use winbind && dodoc "${CONFDIR}/nsswitch.conf-winbind"
311
312 if use examples ; then
313 insinto /usr/share/doc/${PF}
314 doins -r "${S}/examples/"
315 find "${D}/usr/share/doc/${PF}" -type d -print0 | xargs -0 chmod 755
316 find "${D}/usr/share/doc/${PF}/examples" ! -type d -print0 | xargs -0 chmod 644
317 if use python ; then
318 insinto /usr/share/doc/${PF}/python
319 doins -r "${S}/source/python/examples"
320 fi
321 fi
322
323 if ! use doc ; then
324 if ! use swat ; then
325 rm -rf "${D}/usr/share/doc/${PF}/swat"
326 else
327 rm -rf "${D}/usr/share/doc/${PF}/swat/help"/{guide,howto,devel}
328 rm -rf "${D}/usr/share/doc/${PF}/swat/using_samba"
329 fi
330 else
331 cd "${S}/docs"
332 insinto /usr/share/doc/${PF}
333 doins *.pdf
334 doins -r registry
335 dohtml -r htmldocs/*
336 fi
337
338 if use oav ; then
339 cd "${WORKDIR}/${VSCAN_P}"
340 emake DESTDIR="${D}" install || die "emake install oav plugins failed"
341 docinto samba-vscan
342 dodoc AUTHORS ChangeLog FAQ INSTALL NEWS README TODO
343 find . -iname "*.conf" -print0 | xargs -0 dodoc
344 fi
345 }
346
347 pkg_preinst() {
348 local PRIVATE_SRC=/etc/samba/private
349 if [[ ! -r "${ROOT}/${PRIVATE_DST}/secrets.tdb" \
350 && -r "${ROOT}/${PRIVATE_SRC}/secrets.tdb" ]] ; then
351 ebegin "Copying "${ROOT}"/${PRIVATE_SRC}/* to ${ROOT}/${PRIVATE_DST}/"
352 mkdir -p "${D}/${PRIVATE_DST}"
353 cp -pPRf "${ROOT}/${PRIVATE_SRC}"/* "${D}/${PRIVATE_DST}/"
354 eend $?
355 fi
356
357 if [[ ! -f "${ROOT}/etc/samba/smb.conf" ]] ; then
358 touch "${D}/etc/samba/smb.conf"
359 fi
360 }
361
362 pkg_postinst() {
363 if use python ; then
364 python_version
365 python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/samba
366 fi
367
368 if use swat ; then
369 einfo "swat must be enabled by xinetd:"
370 einfo " change the /etc/xinetd.d/swat configuration"
371 fi
372
373 if use ipv6 ; then
374 einfo "ipv6 support must be enabled by xinetd:"
375 einfo " change the /etc/xinetd.d/smb configuration"
376 fi
377
378 elog "It is possible to start/stop daemons separately:"
379 elog " Create a symlink from /etc/init.d/samba.{smbd,nmbd,winbind} to"
380 elog " /etc/init.d/samba. Calling /etc/init.d/samba directly will start"
381 elog " the daemons configured in /etc/conf.d/samba"
382
383 elog "The mount/umount.cifs helper applications are not included anymore."
384 elog "Please install net-fs/mount-cifs instead."
385
386 if use oav ; then
387 elog "The configure snippets for various antivirus plugins are available here:"
388 elog " /usr/share/doc/${PF}/samba-vscan"
389 fi
390
391 ewarn "If you're upgrading from 3.0.24 or earlier, please make sure to"
392 ewarn "restart your clients to clear any cached information about the server."
393 ewarn "Otherwise they might not be able to connect to the volumes."
394 }
395
396 pkg_postrm() {
397 if use python ; then
398 python_version
399 python_mod_cleanup /usr/$(get_libdir)/python${PYVER}/site-packages/samba
400 fi
401 }
402
403
404
405 1.1 net-fs/samba/samba-3.3.8.ebuild
406
407 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.3.8.ebuild?rev=1.1&view=markup
408 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.3.8.ebuild?rev=1.1&content-type=text/plain
409
410 Index: samba-3.3.8.ebuild
411 ===================================================================
412 # Copyright 1999-2009 Gentoo Foundation
413 # Distributed under the terms of the GNU General Public License v2
414 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.3.8.ebuild,v 1.1 2009/10/02 13:54:19 patrick Exp $
415
416 EAPI="2"
417
418 DESCRIPTION="Meta package for samba-{libs,client,server}"
419 HOMEPAGE="http://www.samba.org/"
420 LICENSE="GPL-3"
421 SLOT="0"
422 KEYWORDS="~amd64 ~hppa ~ppc64 ~x86"
423 IUSE="+client +server"
424
425 DEPEND=""
426 RDEPEND="~net-fs/samba-libs-${PV}
427 client? ( ~net-fs/samba-client-${PV} )
428 server? ( ~net-fs/samba-server-${PV} )"
429
430
431
432 1.1 net-fs/samba/samba-3.2.15.ebuild
433
434 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.2.15.ebuild?rev=1.1&view=markup
435 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.2.15.ebuild?rev=1.1&content-type=text/plain
436
437 Index: samba-3.2.15.ebuild
438 ===================================================================
439 # Copyright 1999-2009 Gentoo Foundation
440 # Distributed under the terms of the GNU General Public License v2
441 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.2.15.ebuild,v 1.1 2009/10/02 13:54:19 patrick Exp $
442
443 inherit eutils pam multilib versionator confutils
444
445 MY_P=${PN}-${PV/_/}
446
447 DESCRIPTION="A suite of SMB and CIFS client/server programs for UNIX"
448 HOMEPAGE="http://www.samba.org/"
449 SRC_URI="mirror://samba/${MY_P}.tar.gz"
450 LICENSE="GPL-3"
451 SLOT="0"
452 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
453
454 # disabled for now
455 #IUSE_LINGUAS="linguas_ja linguas_pl"
456
457 IUSE="${IUSE_LINGUAS} acl ads async automount caps cifsupcall cups doc examples ipv6 kernel_linux ldap fam
458 pam quotas readline selinux swat syslog winbind"
459
460 RDEPEND="dev-libs/popt
461 dev-libs/iniparser
462 virtual/libiconv
463 acl? ( virtual/acl )
464 cifsupcall? ( sys-apps/keyutils )
465 cups? ( net-print/cups )
466 ipv6? ( sys-apps/xinetd )
467 ads? ( virtual/krb5 sys-fs/e2fsprogs )
468 ldap? ( net-nds/openldap )
469 pam? ( virtual/pam )
470 readline? ( sys-libs/readline )
471 selinux? ( sec-policy/selinux-samba )
472 swat? ( sys-apps/xinetd )
473 syslog? ( virtual/logger )
474 fam? ( virtual/fam )
475 caps? ( sys-libs/libcap )"
476 DEPEND="${RDEPEND}"
477
478 S="${WORKDIR}/${MY_P}"
479 CONFDIR="${FILESDIR}/config-3.2"
480 PRIVATE_DST=/var/lib/samba/private
481
482 # Tests are currently broken due to hardcoded paths (due to --with-fhs)
483 # The problem is that --without-fhs lets samba use lockdir (which can be changed in smb.conf)
484 # which is wrong as well.
485 RESTRICT="test"
486
487 pkg_setup() {
488 confutils_use_depend_all ads ldap
489 confutils_use_depend_all cifsupcall ads
490 }
491
492 src_unpack() {
493 unpack ${A}
494 cd "${S}/source"
495
496 # Ok, agreed, this is ugly. But it avoids a patch we
497 # need for every samba version and we don't need autotools
498 sed -i \
499 -e 's|"lib32" ||' \
500 -e 's|if test -d "$i/$l" ;|if test -d "$i/$l" -o -L "$i/$l";|' \
501 configure || die "sed failed"
502
503 rm "${S}/docs/manpages"/{mount,umount}.cifs.8
504
505 sed -i \
506 -e 's|tdbsam|tdbsam:${PRIVATEDIR}/passdb.tdb|' \
507 "${S}/source/script/tests/selftest.sh" || die "sed failed"
508 }
509
510 src_compile() {
511 cd "${S}/source"
512
513 local myconf
514 local mylangs
515 local mymod_shared
516
517 # this doesn't seem to work ...
518 #mylangs="--with-manpages-langs=en"
519 #use linguas_ja && mylangs="${mylangs},ja"
520 #use linguas_pl && mylangs="${mylangs},pl"
521
522 use winbind && mymod_shared="--with-shared-modules=idmap_rid"
523 if use ldap ; then
524 myconf="${myconf} $(use_with ads)"
525 use winbind && mymod_shared="${mymod_shared},idmap_ad"
526 fi
527
528 [[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
529 use hppa && myconf="${myconf} --disable-pie"
530
531 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
532
533 # Otherwise we get the whole swat stuff installed
534 if ! use swat ; then
535 sed -i \
536 -e 's/^\(install:.*\)installswat \(.*\)/\1\2/' \
537 Makefile.in || die "sed failed"
538 fi
539
540 econf \
541 --with-fhs \
542 --sysconfdir=/etc/samba \
543 --localstatedir=/var \
544 --with-configdir=/etc/samba \
545 --with-libdir=/usr/$(get_libdir)/samba \
546 --with-pammodulesdir=$(getpam_mod_dir) \
547 --with-swatdir=/usr/share/doc/${PF}/swat \
548 --with-piddir=/var/run/samba \
549 --with-lockdir=/var/cache/samba \
550 --with-logfilebase=/var/log/samba \
551 --with-privatedir=${PRIVATE_DST} \
552 --with-libsmbclient \
553 --enable-socket-wrapper \
554 --enable-nss-wrapper \
555 --with-cifsmount=no \
556 --disable-dnssd \
557 $(use_with acl acl-support) \
558 $(use_with async aio-support) \
559 $(use_with automount) \
560 $(use_with cifsupcall) \
561 $(use_enable cups) \
562 $(use_enable fam) \
563 $(use_with ads krb5) \
564 $(use_with ads dnsupdate) \
565 $(use_with ldap) \
566 $(use_with pam) $(use_with pam pam_smbpass) \
567 $(use_with quotas) $(use_with quotas sys-quotas) \
568 $(use_with readline) \
569 $(use_with syslog) \
570 $(use_with winbind) \
571 ${myconf} ${mylangs} ${mymod_shared} || die "econf failed"
572
573 emake -j1 proto || die "emake proto failed"
574 emake -j1 everything || die "emake everything failed"
575
576 }
577
578 src_test() {
579 cd "${S}/source"
580 emake test || die "tests failed"
581 }
582
583 src_install() {
584 cd "${S}/source"
585
586 emake -j1 DESTDIR="${D}" install-everything || die "emake install-everything failed"
587
588 # Extra rpctorture progs
589 local extra_bins="rpctorture"
590 for i in ${extra_bins} ; do
591 [[ -x "${S}/bin/${i}" ]] && dobin "${S}/bin/${i}"
592 done
593
594 # remove .old stuff from /usr/bin:
595 rm -f "${D}"/usr/bin/*.old
596
597 # Removing executable bits from header-files
598 fperms 644 /usr/include/libsmbclient.h
599
600 # Nsswitch extensions. Make link for wins and winbind resolvers
601 if use winbind ; then
602 dolib.so nsswitch/libnss_wins.so
603 dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
604 dolib.so nsswitch/libnss_winbind.so
605 dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
606 fi
607
608 # bug #46389: samba doesn't create symlink anymore
609 # beaviour seems to be changed in 3.0.6, see bug #61046
610 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so
611 dosym samba/libsmbclient.so.0 /usr/$(get_libdir)/libsmbclient.so.0
612 dosym samba/libtalloc.so /usr/$(get_libdir)/libtalloc.so
613 dosym samba/libtalloc.so.1 /usr/$(get_libdir)/libtalloc.so.1
614 dosym samba/libtdb.so /usr/$(get_libdir)/libtdb.so
615 dosym samba/libtdb.so.1 /usr/$(get_libdir)/libtdb.so.1
616 dosym samba/libwbclient.so.0 /usr/$(get_libdir)/libwbclient.so.0
617 dosym samba/libsmbsharemodes.so.0 /usr/$(get_libdir)/libsmbsharemodes.so.0
618
619 # make the smb backend symlink for cups printing support (bug #133133)
620 if use cups ; then
621 dodir $(cups-config --serverbin)/backend
622 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
623 fi
624
625 cd "${S}/source"
626
627 # General config files
628 insinto /etc/samba
629 doins "${CONFDIR}"/{smbusers,lmhosts}
630 newins "${CONFDIR}/smb.conf.example-samba3" smb.conf.example
631
632 newpamd "${CONFDIR}/samba.pam" samba
633 use winbind && dopamd "${CONFDIR}/system-auth-winbind"
634 if use swat ; then
635 insinto /etc/xinetd.d
636 newins "${CONFDIR}/swat.xinetd" swat
637 else
638 rm -f "${D}/usr/sbin/swat"
639 rm -f "${D}/usr/share/man/man8/swat.8"
640 fi
641
642 newinitd "${FILESDIR}/samba-init" samba
643 newconfd "${FILESDIR}/samba-conf" samba
644
645 if use ldap ; then
646 insinto /etc/openldap/schema
647 doins "${S}/examples/LDAP/samba.schema"
648 fi
649
650 if use ipv6 ; then
651 insinto /etc/xinetd.d
652 newins "${FILESDIR}/samba-xinetd" smb
653 fi
654
655 # dirs
656 diropts -m0700 ; keepdir "${PRIVATE_DST}"
657 diropts -m1777 ; keepdir /var/spool/samba
658
659 diropts -m0755
660 keepdir /var/{log,run,cache}/samba
661 keepdir /var/lib/samba/{netlogon,profiles}
662 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
663 keepdir /usr/$(get_libdir)/samba/{rpc,idmap,auth}
664
665 # docs
666 dodoc "${FILESDIR}/README.gentoo"
667 dodoc "${S}"/{MAINTAINERS,README,Roadmap,WHATSNEW.txt}
668 dodoc "${CONFDIR}/nsswitch.conf-wins"
669 use winbind && dodoc "${CONFDIR}/nsswitch.conf-winbind"
670
671 if use examples ; then
672 insinto /usr/share/doc/${PF}
673 doins -r "${S}/examples/"
674 find "${D}/usr/share/doc/${PF}" -type d -print0 | xargs -0 chmod 755
675 find "${D}/usr/share/doc/${PF}/examples" ! -type d -print0 | xargs -0 chmod 644
676 fi
677
678 if ! use doc ; then
679 if ! use swat ; then
680 rm -rf "${D}/usr/share/doc/${PF}/swat"
681 else
682 rm -rf "${D}/usr/share/doc/${PF}/swat/help"/{guide,howto,devel}
683 rm -rf "${D}/usr/share/doc/${PF}/swat/using_samba"
684 fi
685 fi
686
687 }
688
689 pkg_preinst() {
690 local PRIVATE_SRC=/etc/samba/private
691 if [[ ! -r "${ROOT}/${PRIVATE_DST}/secrets.tdb" \
692 && -r "${ROOT}/${PRIVATE_SRC}/secrets.tdb" ]] ; then
693 ebegin "Copying ${ROOT}/${PRIVATE_SRC}/* to ${ROOT}/${PRIVATE_DST}/"
694 mkdir -p "${D}/${PRIVATE_DST}"
695 cp -pPRf "${ROOT}/${PRIVATE_SRC}"/* "${D}/${PRIVATE_DST}/"
696 eend $?
697 fi
698
699 if [[ ! -f "${ROOT}/etc/samba/smb.conf" ]] ; then
700 touch "${D}/etc/samba/smb.conf"
701 fi
702 }
703
704 pkg_postinst() {
705 if use swat ; then
706 einfo "swat must be enabled by xinetd:"
707 einfo " change the /etc/xinetd.d/swat configuration"
708 fi
709
710 if use ipv6 ; then
711 einfo "ipv6 support must be enabled by xinetd:"
712 einfo " change the /etc/xinetd.d/smb configuration"
713 fi
714
715 elog "It is possible to start/stop daemons separately:"
716 elog " Create a symlink from /etc/init.d/samba.{smbd,nmbd,winbind} to"
717 elog " /etc/init.d/samba. Calling /etc/init.d/samba directly will start"
718 elog " the daemons configured in /etc/conf.d/samba"
719
720 elog "The mount/umount.cifs helper applications are not included anymore."
721 elog "Please install net-fs/mount-cifs instead."
722
723 ewarn "If you're upgrading from 3.0.24 or earlier, please make sure to"
724 ewarn "restart your clients to clear any cached information about the server."
725 ewarn "Otherwise they might not be able to connect to the volumes."
726 }