summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2007-04-09 08:17:46 +0000
committerTiziano Müller <dev-zero@gentoo.org>2007-04-09 08:17:46 +0000
commit7f5aee171b0800cc6e60ee2f7baa4532beee5d94 (patch)
tree5574bb3ec716b71ded2ee59741b157c2813586db /net-fs
parentStable on amd64 wrt bug 173793 (diff)
downloadhistorical-7f5aee171b0800cc6e60ee2f7baa4532beee5d94.tar.gz
historical-7f5aee171b0800cc6e60ee2f7baa4532beee5d94.tar.bz2
historical-7f5aee171b0800cc6e60ee2f7baa4532beee5d94.zip
Removed obsolete patches. Moved conf.d/init.d files out of the tarball. Fixed bug #170072 (thanks to Roy Marples)
Package-Manager: portage-2.1.2.2
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/ChangeLog9
-rw-r--r--net-fs/samba/Manifest30
-rw-r--r--net-fs/samba/files/digest-samba-3.0.24-r19
-rw-r--r--net-fs/samba/files/samba-conf28
-rw-r--r--net-fs/samba/files/samba-init50
-rw-r--r--net-fs/samba/samba-3.0.24-r1.ebuild299
6 files changed, 417 insertions, 8 deletions
diff --git a/net-fs/samba/ChangeLog b/net-fs/samba/ChangeLog
index 2445e9e3d1bf..9843c9cb4fbe 100644
--- a/net-fs/samba/ChangeLog
+++ b/net-fs/samba/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-fs/samba
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.275 2007/03/01 11:53:00 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.276 2007/04/09 08:17:46 dev-zero Exp $
+
+*samba-3.0.24-r1 (09 Apr 2007)
+
+ 09 Apr 2007; Tiziano Müller <dev-zero@gentoo.org> +files/samba-conf,
+ +files/samba-init, +samba-3.0.24-r1.ebuild:
+ Removed obsolete patches. Moved conf.d/init.d files out of the tarball.
+ Fixed bug #170072 (thanks to Roy Marples)
01 Mar 2007; Daniel Black <dragonheart@gentoo.org> Manifest:
digest fix - bug #168842
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
index 31c68317440f..d6c6ab5638f9 100644
--- a/net-fs/samba/Manifest
+++ b/net-fs/samba/Manifest
@@ -5,8 +5,17 @@ AUX README.gentoo 3208 RMD160 858aee78e07bdc0ebee7bc6c2212d4c528325633 SHA1 819a
MD5 2c134a0ccc3f2cc76669edd86d7476df files/README.gentoo 3208
RMD160 858aee78e07bdc0ebee7bc6c2212d4c528325633 files/README.gentoo 3208
SHA256 9e87efa3fcea73becdfad4adb0fe677e1969c2951f03c47d1b0f4aeb00999578 files/README.gentoo 3208
+AUX samba-conf 1291 RMD160 326fb4beee8105d839d23e37f4989d7e332c996b SHA1 af7cd695f212d7ec022df05ba2f821a8f9878ab2 SHA256 dfaf474c3cbfa3d3b26d1531c6f5913739d5815c4b8083063934ee4fd6b38861
+MD5 341521b710d02d57a70acd49b1d4c06b files/samba-conf 1291
+RMD160 326fb4beee8105d839d23e37f4989d7e332c996b files/samba-conf 1291
+SHA256 dfaf474c3cbfa3d3b26d1531c6f5913739d5815c4b8083063934ee4fd6b38861 files/samba-conf 1291
+AUX samba-init 1046 RMD160 43ed0125d584d460259cebcabf2e78d5d6273784 SHA1 8484a4174a65773f6a0acc15530a66fc06f82500 SHA256 83e2052765cd617bb22737b55ab16f99660793de5fe615941bb34dbf1cc20959
+MD5 e7a1ead5581e54b041b39b12dbcb7893 files/samba-init 1046
+RMD160 43ed0125d584d460259cebcabf2e78d5d6273784 files/samba-init 1046
+SHA256 83e2052765cd617bb22737b55ab16f99660793de5fe615941bb34dbf1cc20959 files/samba-init 1046
DIST samba-3-gentoo-0.3.13.tar.bz2 16532 RMD160 9ad61f4391a7c452a40391551f222d6e8107e70b SHA1 40a1e2d5080ae022ff00ac60ed3e804d8d3763f5 SHA256 e910780553784c0fb41ffad25a8185c20879eb14b8d53ce888e5ad05dc0e4e93
DIST samba-3-gentoo-0.3.15.tar.bz2 15774 RMD160 facce158355559a300923272b655f6c0c50c8b3b SHA1 60d9f9d9d6c192213d775e45c3ceb6183971a486 SHA256 820758c4a8710da27fc1dc3f25729bce79fd0d2a92db5414353f5fe730f5c439
+DIST samba-3-gentoo-0.3.16.tar.bz2 14291 RMD160 c8388239352e981c03f7e99ff02dbaa13ad77e2a SHA1 66c5296801c530e22c86aee424410c71cfe93c80 SHA256 fe0ae6f8c2833cfdbab82a5ae2087045da4f27f6f07daba6fdc829a93b4e6508
DIST samba-3.0.22.tar.gz 17542657 RMD160 b41cffc999c524c1650d2dd3fbd063dc79741091 SHA1 76eba872b3e8f647e16d0d8d129e02848a7989d7 SHA256 781466885804343248afb74dfdd57df0c7165b252ded06a71c0f24827b2a8e2d
DIST samba-3.0.24.tar.gz 17708128 RMD160 f208dca645d07a195169e005a50fb4c4879254eb SHA1 216020b58abca191b8146f76f98a8bda3508fcd3 SHA256 c4e8de3426fbbcee7f338f5cf09052cbdf9a36ae638aeeeca10498ef8d5343e2
DIST samba-vscan-0.3.6b.tar.bz2 164471 RMD160 5cd81345b06f44b2febf3f24e62325322b1c6a3b SHA1 b11e8303380ee8d271a916a17a16cbab9d0d36f8 SHA256 14f78b624b047b90ddf4965998e7115d3b3ac97b3229154a302637d8e49adcd4
@@ -14,14 +23,18 @@ EBUILD samba-3.0.22-r3.ebuild 8711 RMD160 40287e62300a0fcf65c2ddb74d5586db8f2df9
MD5 a427d9cf029470f672a2465554e3d2a0 samba-3.0.22-r3.ebuild 8711
RMD160 40287e62300a0fcf65c2ddb74d5586db8f2df97e samba-3.0.22-r3.ebuild 8711
SHA256 ce3b7ce4156f30f09fc8703796e2b6beda57c04723643cb2661cad2290e874a8 samba-3.0.22-r3.ebuild 8711
+EBUILD samba-3.0.24-r1.ebuild 8416 RMD160 4ded93620247409e0a61d27dce3f73137b18dc79 SHA1 6e70fe875e2b833549f95b6d1f9258b6a4ce9422 SHA256 16d1e17ea9e8d2fc245240fce6f75039db5c4158abfde9dfd6ba5d83787991fa
+MD5 06acdc17579b53e1203002499177aab2 samba-3.0.24-r1.ebuild 8416
+RMD160 4ded93620247409e0a61d27dce3f73137b18dc79 samba-3.0.24-r1.ebuild 8416
+SHA256 16d1e17ea9e8d2fc245240fce6f75039db5c4158abfde9dfd6ba5d83787991fa samba-3.0.24-r1.ebuild 8416
EBUILD samba-3.0.24.ebuild 8405 RMD160 6cf7d1e65d1d90a6f8beafc468f4816d27613a1f SHA1 7ae515faba8960b795a3c130c5b81ba4231fec49 SHA256 16ed6b4eb143f75483028c68f7b173316bfa68e7e0ab48c2d6311d4080166cf3
MD5 5918d2a1fbd7eeb2c3919aa61f8ea582 samba-3.0.24.ebuild 8405
RMD160 6cf7d1e65d1d90a6f8beafc468f4816d27613a1f samba-3.0.24.ebuild 8405
SHA256 16ed6b4eb143f75483028c68f7b173316bfa68e7e0ab48c2d6311d4080166cf3 samba-3.0.24.ebuild 8405
-MISC ChangeLog 47084 RMD160 58ae5a06ce8826683364399b3e4bd7bc423dddfe SHA1 e47d3a66c3cdece3ab1ec51d2ff2714140f54938 SHA256 a5ea7ef6399c18e8c46bc9cfc728bf974725ef4fa15b5d8edbf33456b7cba255
-MD5 cf12581a8fbbe6865573f188fc09c566 ChangeLog 47084
-RMD160 58ae5a06ce8826683364399b3e4bd7bc423dddfe ChangeLog 47084
-SHA256 a5ea7ef6399c18e8c46bc9cfc728bf974725ef4fa15b5d8edbf33456b7cba255 ChangeLog 47084
+MISC ChangeLog 47350 RMD160 ab16d1732f38ceac6235556be078e5dd9bc9d073 SHA1 7aab7a2dc484fee9f617342c1afcb4dc1cae8c52 SHA256 a02d2df7a8b0b2825562ef70ea7edc57df5e831d32d670c05e57dce73025527b
+MD5 fc5f965d91ba216d2b7d895cf5ab4a9a ChangeLog 47350
+RMD160 ab16d1732f38ceac6235556be078e5dd9bc9d073 ChangeLog 47350
+SHA256 a02d2df7a8b0b2825562ef70ea7edc57df5e831d32d670c05e57dce73025527b ChangeLog 47350
MISC metadata.xml 489 RMD160 36eed0edca609c521314ae415efd57ca9acfecb4 SHA1 317e61704a10a3bd888d32c6834721f5d40d00ff SHA256 6f35f13dd39bb51d304fd59b5352c92bc35a957c9c9412c5c1f3f58e98519792
MD5 324855d88a5c326d1b45b5c7719d5536 metadata.xml 489
RMD160 36eed0edca609c521314ae415efd57ca9acfecb4 metadata.xml 489
@@ -32,10 +45,13 @@ SHA256 ec81536abaa1ab3b05885d89e9a0ccc34033018301fc8c9473542d7a01c56511 files/di
MD5 8108cc4de0f97e9bb076873e71dfbf88 files/digest-samba-3.0.24 768
RMD160 3fc1a13d13b9638d6c08b69dce6dd6893e03e4e7 files/digest-samba-3.0.24 768
SHA256 175e4abf1de4b025ee3f704cc7e02c1457286b186afded0c9753c02559494c61 files/digest-samba-3.0.24 768
+MD5 e899de085c153ac07e914eeb6e0d0ecb files/digest-samba-3.0.24-r1 768
+RMD160 f62fe0036cb69a6e84304089ec8a83dc8a068199 files/digest-samba-3.0.24-r1 768
+SHA256 4b66f0f4c47fbd739eb37e0a4dceb8ffd525131b9034dea75e3802ecdf06a824 files/digest-samba-3.0.24-r1 768
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.2 (GNU/Linux)
-iD8DBQFF8sAY8bi6rjpTunYRAkeNAKDXgPP2MbQ+2oB7OTdXAF2AC3+2iQCfShBB
-Vm7R9Lp5QvB4hxQVoIuXWTI=
-=oeVX
+iD8DBQFGGfa7GwVqY66cHjARAtFcAJ4o/1kyUfB9GdRX85zb7dHQjbQJIwCdHUgg
+6IIdVk4LlwV/3Z/hELYja1I=
+=8x31
-----END PGP SIGNATURE-----
diff --git a/net-fs/samba/files/digest-samba-3.0.24-r1 b/net-fs/samba/files/digest-samba-3.0.24-r1
new file mode 100644
index 000000000000..00360d37af2c
--- /dev/null
+++ b/net-fs/samba/files/digest-samba-3.0.24-r1
@@ -0,0 +1,9 @@
+MD5 ca3b7f83de0204ab79a9f0aea5a5051d samba-3-gentoo-0.3.16.tar.bz2 14291
+RMD160 c8388239352e981c03f7e99ff02dbaa13ad77e2a samba-3-gentoo-0.3.16.tar.bz2 14291
+SHA256 fe0ae6f8c2833cfdbab82a5ae2087045da4f27f6f07daba6fdc829a93b4e6508 samba-3-gentoo-0.3.16.tar.bz2 14291
+MD5 89273f67a6d8067cbbecefaa13747153 samba-3.0.24.tar.gz 17708128
+RMD160 f208dca645d07a195169e005a50fb4c4879254eb samba-3.0.24.tar.gz 17708128
+SHA256 c4e8de3426fbbcee7f338f5cf09052cbdf9a36ae638aeeeca10498ef8d5343e2 samba-3.0.24.tar.gz 17708128
+MD5 900502ba36b80620229b94e5129bc856 samba-vscan-0.3.6b.tar.bz2 164471
+RMD160 5cd81345b06f44b2febf3f24e62325322b1c6a3b samba-vscan-0.3.6b.tar.bz2 164471
+SHA256 14f78b624b047b90ddf4965998e7115d3b3ac97b3229154a302637d8e49adcd4 samba-vscan-0.3.6b.tar.bz2 164471
diff --git a/net-fs/samba/files/samba-conf b/net-fs/samba/files/samba-conf
new file mode 100644
index 000000000000..b67595ade6cb
--- /dev/null
+++ b/net-fs/samba/files/samba-conf
@@ -0,0 +1,28 @@
+#add "winbind" to the daemon_list if you also want winbind to start
+daemon_list="smbd nmbd"
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+my_service_name="samba"
+my_service_PRE="unset TMP TMPDIR"
+my_service_POST=""
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+smbd_start_options="-D"
+smbd_start="start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid"
+smbd_reload="killall -HUP smbd"
+
+nmbd_start_options="-D"
+nmbd_start="start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid"
+nmbd_reload="killall -HUP nmbd"
+
+winbind_start_options=""
+winbind_start="start-stop-daemon --start --quiet --exec /usr/sbin/winbindd -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/winbindd"
+winbind_reload="killall -HUP winbindd"
+
diff --git a/net-fs/samba/files/samba-init b/net-fs/samba/files/samba-init
new file mode 100644
index 000000000000..d1f17b882c00
--- /dev/null
+++ b/net-fs/samba/files/samba-init
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-init,v 1.13 2007/04/09 08:17:46 dev-zero Exp $
+
+opts="reload"
+
+depend() {
+ after slapd
+ need net
+ use cupsd
+}
+
+signal_do() {
+ local signal="$1"
+ [ -z "${signal}" ] && return 0
+
+ local result=0 last_result=0 daemon= cmd_exec=
+ for daemon in ${daemon_list} ; do
+ eval cmd_exec=\$${daemon}_${signal}
+ if [ -n "${cmd_exec}" ]; then
+ ebegin "${my_service_name} -> ${signal}: ${daemon}"
+ #echo ${cmd} '->' ${!cmd}
+ ${cmd_exec} > /dev/null
+ last_result=$?
+ eend ${last_result}
+ fi
+ result=$(( ${result} + ${last_result} ))
+ done
+ return ${result}
+}
+start() {
+ ${my_service_PRE}
+ signal_do start && return 0
+
+ eerror "Error: starting services (see system logs)"
+ signal_do stop
+ return 1
+}
+stop() {
+ ${my_service_PRE}
+ if signal_do stop ; then
+ ${my_service_POST}
+ return 0
+ fi
+}
+reload() {
+ ${my_service_PRE}
+ signal_do reload
+}
diff --git a/net-fs/samba/samba-3.0.24-r1.ebuild b/net-fs/samba/samba-3.0.24-r1.ebuild
new file mode 100644
index 000000000000..f23ecef4325d
--- /dev/null
+++ b/net-fs/samba/samba-3.0.24-r1.ebuild
@@ -0,0 +1,299 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.0.24-r1.ebuild,v 1.1 2007/04/09 08:17:46 dev-zero Exp $
+
+WANT_AUTOCONF="latest"
+WANT_AUTOMAKE="none"
+
+inherit eutils autotools versionator pam
+
+IUSE_LINGUAS="ja pl"
+IUSE="acl async automount caps cups doc examples kerberos kernel_linux ldap fam
+ linguas_ja linguas_pl
+ oav pam python quotas readline selinux swat syslog winbind"
+
+VSCAN_VER="0.3.6b"
+PATCH_VER="0.3.16"
+MY_P=${PN}-${PV/_/}
+MY_PP=${PN}-$(get_major_version)-gentoo-${PATCH_VER}
+S2=${WORKDIR}/${MY_P}
+S=${S2}/source
+PFVSCAN=${PN}-vscan-${VSCAN_VER}
+
+DESCRIPTION="SAMBA is a suite of SMB and CIFS client/server programs for UNIX"
+HOMEPAGE="http://www.samba.org/ http://www.openantivirus.org/projects.php"
+SRC_URI="mirror://gentoo/${MY_PP}.tar.bz2
+ mirror://samba/${MY_P}.tar.gz
+ mirror://samba/old-versions/${MY_P}.tar.gz
+ oav? ( mirror://sourceforge/openantivirus/${PFVSCAN}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+
+RDEPEND="dev-libs/popt
+ virtual/libiconv
+ acl? ( kernel_linux? ( sys-apps/acl ) )
+ cups? ( net-print/cups )
+ ldap? ( kerberos? ( virtual/krb5 ) net-nds/openldap )
+ pam? ( virtual/pam )
+ python? ( dev-lang/python )
+ readline? ( sys-libs/readline )
+ selinux? ( sec-policy/selinux-samba )
+ swat? ( sys-apps/xinetd )
+ syslog? ( virtual/logger )
+ fam? ( virtual/fam )
+ caps? ( sys-libs/libcap )"
+DEPEND="${RDEPEND}"
+
+PRIVATE_DST=/var/lib/samba/private
+PATCHDIR=${WORKDIR}/patches
+CONFDIR=${WORKDIR}/configs
+
+src_unpack() {
+ unpack ${A}
+ cd "${S2}"
+
+ export EPATCH_SUFFIX="patch"
+ epatch ${PATCHDIR}/general
+ if use oav ; then
+ cd ${WORKDIR}
+ if [[ -d ${PATCHDIR}/vscan ]] ; then
+ epatch ${PATCHDIR}/vscan
+ fi
+ cp -pPR ${WORKDIR}/${PFVSCAN} ${S2}/examples/VFS
+ fi
+
+ # patches screw with autotool files
+ cd "${S}"
+ eautoconf
+}
+
+src_compile() {
+ local myconf
+ local mylangs
+ local mymod_shared
+
+ mylangs="--with-manpages-langs=en"
+ use linguas_ja && mylangs="${mylangs},ja"
+ use linguas_pl && mylangs="${mylangs},pl"
+
+ use winbind && mymod_shared="--with-shared-modules=idmap_rid"
+ if use ldap ; then
+ myconf="${myconf} $(use_with kerberos ads)"
+ use winbind && mymod_shared="${mymod_shared},idmap_ad"
+ fi
+
+ [[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
+ use hppa && myconf="${myconf} --disable-pie"
+
+ use fam && export ac_cv_header_fam_h=yes || export ac_cv_header_fam_h=no
+ use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
+
+ econf \
+ --with-fhs \
+ --sysconfdir=/etc/samba \
+ --localstatedir=/var \
+ --with-configdir=/etc/samba \
+ --with-libdir=/usr/$(get_libdir)/samba \
+ --with-swatdir=/usr/share/doc/${PF}/swat \
+ --with-piddir=/var/run/samba \
+ --with-lockdir=/var/cache/samba \
+ --with-logfilebase=/var/log/samba \
+ --with-privatedir=${PRIVATE_DST} \
+ --with-libsmbclient \
+ --without-spinlocks \
+ --enable-socket-wrapper \
+ $(use_with acl acl-support) \
+ $(use_with async aio-support) \
+ $(use_with automount) \
+ $(use_enable cups) \
+ $(use_with kerberos krb5) \
+ $(use_with ldap) \
+ $(use_with pam) $(use_with pam pam_smbpass) \
+ $(use_with python) \
+ $(use_with quotas) $(use_with quotas sys-quotas) \
+ $(use_with readline) \
+ $(use_with kernel_linux smbmount) \
+ $(use_with syslog) \
+ $(use_with winbind) \
+ ${myconf} ${mylangs} ${mymod_shared} || die
+
+ emake proto || die "SAMBA make proto error"
+ emake everything || die "SAMBA make everything error"
+
+ emake rpctorture >& rpctorture.log || ewarn "rpctorture didn't build [that's ok!]"
+
+ if use python ; then
+ python python/setup.py build
+ fi
+
+ # Build samba-vscan plugins
+ if use oav ; then
+ cd ${S2}/examples/VFS/${PFVSCAN}
+ econf \
+ --with-fhs \
+ --libdir=/usr/$(get_libdir)/samba \
+ || die "${PFVSCAN} ./configure failed"
+ emake || die "Failed to make ${PFVSCAN}"
+ fi
+
+}
+
+src_install() {
+ local extra_bins="rpctorture"
+
+ emake DESTDIR="${D}" install-everything || die
+
+ # Extra rpctorture progs
+ for i in ${extra_bins} ; do
+ [[ -x ${S}/bin/${i} ]] && dobin "${S}"/bin/${i}
+ done
+
+ # remove .old stuff from /usr/bin:
+ rm -f "${D}"/usr/bin/*.old
+
+ # Nsswitch extensions. Make link for wins and winbind resolvers
+ if use winbind ; then
+ dolib.so "${S}"/nsswitch/libnss_wins.so || die
+ dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
+ dolib.so "${S}"/nsswitch/libnss_winbind.so || die
+ dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
+ fi
+
+ if use pam ; then
+ exeinto /$(get_libdir)/security
+ doexe "${S}"/bin/pam_smbpass.so || die
+ if use winbind ; then
+ exeinto /$(get_libdir)/security
+ doexe "${S}"/bin/pam_winbind.so || die
+ fi
+ fi
+
+ if use kernel_linux ; then
+ # mount backend
+ dodir /sbin
+ dosym ../usr/bin/smbmount /sbin/mount.smbfs
+ dosym ../usr/bin/mount.cifs /sbin/mount.cifs
+ fi
+
+ # bug #46389: samba doesn't create symlink anymore
+ # beaviour seems to be changed in 3.0.6, see bug #61046
+ dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so.0
+ dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so
+
+ # make the smb backend symlink for cups printing support (bug #133133)
+ if use cups ; then
+ dodir $(cups-config --serverbin)/backend
+ dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
+ fi
+
+ # VFS plugin modules
+ if use oav ; then
+ cd ${S2}/examples/VFS/${PFVSCAN}
+ make install DESTDIR=${D} || die "VFS: vscan error"
+ insinto /etc/samba
+ doins ${S2}/examples/VFS/${PFVSCAN}/openantivirus/*conf
+ fi
+
+ # Python extensions
+ if use python ; then
+ cd ${S}
+ python python/setup.py install --root=${D} || die
+ fi
+
+ # General config files
+ insinto /etc/samba
+ doins ${CONFDIR}/smbusers
+ newins ${CONFDIR}/smb.conf.example-samba3 smb.conf.example
+ doins ${CONFDIR}/lmhosts
+
+ newpamd ${CONFDIR}/samba.pam samba
+ use winbind && doins ${CONFDIR}/system-auth-winbind
+ if use swat ; then
+ insinto /etc/xinetd.d
+ newins ${CONFDIR}/swat.xinetd swat
+ else
+ rm -f "${D}"/usr/sbin/swat
+ rm -f "${D}"/usr/share/man/man8/swat.8
+ fi
+ newinitd "${FILESDIR}/samba-init" samba
+ newconfd "${FILESDIR}/samba-conf" samba
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins ${S2}/examples/LDAP/samba.schema
+ fi
+
+ # dirs
+ diropts -m0700 ; keepdir ${PRIVATE_DST}
+ diropts -m1777 ; keepdir /var/spool/samba
+
+ diropts -m0755
+ keepdir /var/{log,run,cache}/samba
+ keepdir /var/lib/samba/{netlogon,profiles}
+ keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
+ keepdir /usr/$(get_libdir)/samba/{rpc,idmap,auth}
+
+ # docs
+ dodoc ${FILESDIR}/README.gentoo
+ dodoc ${S2}/{COPYING,Manifest,README,Roadmap,WHATSNEW.txt}
+ dodoc ${CONFDIR}/nsswitch.conf-wins
+ use winbind && dodoc ${CONFDIR}/nsswitch.conf-winbind
+
+ if use oav ; then
+ docinto ${PFVSCAN}
+ cd ${WORKDIR}/${PFVSCAN}
+ dodoc AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README TODO
+ dodoc */*.conf
+ fi
+
+ if use examples ; then
+ docinto examples
+ cp -pPR ${S2}/examples/* "${D}"/usr/share/doc/${PF}/examples
+ find "${D}"/usr/share/doc/${PF} -type d -print0 | xargs -0 chmod 755
+ find "${D}"/usr/share/doc/${PF}/examples ! -type d -print0 | xargs -0 chmod 644
+ fi
+
+ if ! use doc ; then
+ if ! use swat ; then
+ rm -rf "${D}"/usr/share/doc/${PF}/swat
+ else
+ rm -rf "${D}"/usr/share/doc/${PF}/swat/help/{guide,howto,devel}
+ rm -rf "${D}"/usr/share/doc/${PF}/swat/using_samba
+ fi
+ fi
+
+ # Patch ChangeLog
+ docinto gentoo
+ dodoc ${PATCHDIR}/ChangeLog
+}
+
+pkg_preinst() {
+ local PRIVATE_SRC=/etc/samba/private
+ if [[ ! -r ${ROOT}/${PRIVATE_DST}/secrets.tdb \
+ && -r ${ROOT}/${PRIVATE_SRC}/secrets.tdb ]] ; then
+ ebegin "Copying ${ROOT}/${PRIVATE_SRC}/* to ${ROOT}/${PRIVATE_DST}/"
+ mkdir -p "${D}"/${PRIVATE_DST}
+ cp -pPRf "${ROOT}"/${PRIVATE_SRC}/* "${D}"/${PRIVATE_DST}/
+ eend $?
+ fi
+
+ if [[ ! -f ${ROOT}/etc/samba/smb.conf ]] ; then
+ touch "${D}"/etc/samba/smb.conf
+ fi
+}
+
+pkg_postinst() {
+ if use swat ; then
+ einfo "swat must be enabled by xinetd:"
+ einfo " change the /etc/xinetd.d/swat configuration"
+ fi
+ einfo "Latest info: README.gentoo in documentation directory"
+}
+
+pkg_postrm(){
+ # If stale docs, and one isn't re-emerging the latest version, removes
+ # (this is actually a portage bug, though)
+ [[ -n ${PF} && ! -f ${ROOT}/usr/lib/${PN}/en.msg ]] && \
+ rm -rf "${ROOT}"/usr/share/doc/${PF}
+}