summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2010-11-05 15:28:58 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2010-11-05 15:28:58 +0000
commit49963cc61e4083d5fb948f4563083e25b6ce0802 (patch)
treec5fd8c7ea75b24dd41562cba94f9cbc820cace75 /net-fs
parentMove use dependant calls from global scope to pkg_setup. (diff)
downloadhistorical-49963cc61e4083d5fb948f4563083e25b6ce0802.tar.gz
historical-49963cc61e4083d5fb948f4563083e25b6ce0802.tar.bz2
historical-49963cc61e4083d5fb948f4563083e25b6ce0802.zip
old
Package-Manager: portage-2.2.0_alpha3/cvs/Linux x86_64
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/ChangeLog6
-rw-r--r--net-fs/samba/Manifest6
-rw-r--r--net-fs/samba/samba-3.4.8.ebuild390
-rw-r--r--net-fs/samba/samba-3.5.5.ebuild427
4 files changed, 6 insertions, 823 deletions
diff --git a/net-fs/samba/ChangeLog b/net-fs/samba/ChangeLog
index 39b8afd24ce5..8dced1684722 100644
--- a/net-fs/samba/ChangeLog
+++ b/net-fs/samba/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-fs/samba
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.452 2010/11/05 15:24:44 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.453 2010/11/05 15:28:58 scarabeus Exp $
+
+ 05 Nov 2010; Tomáš Chvátal <scarabeus@gentoo.org> -samba-3.4.8.ebuild,
+ -samba-3.5.5.ebuild:
+ old
05 Nov 2010; Tomáš Chvátal <scarabeus@gentoo.org> samba-3.5.6.ebuild:
Move use dependant calls from global scope to pkg_setup.
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
index c24465eb52b4..175239954697 100644
--- a/net-fs/samba/Manifest
+++ b/net-fs/samba/Manifest
@@ -20,15 +20,11 @@ AUX 3.5/swat.xinetd 527 RMD160 8b2364e6fda8cecc75feef8129347ebc545ecc43 SHA1 98f
AUX 3.5/system-auth-winbind.pam 705 RMD160 666533e99283449d60a97fd4fcd704d72212b871 SHA1 a1fe11d7a4f7501c938c03121e4ad950c515f75e SHA256 eca81593dc1b3e2be19bba7a128d71474243216a7783ed788320ca51cf6ea6c7
AUX samba-3.4.2-lib.tevent.python.mk 177 RMD160 3ed0264790f5ce15106528cd485c83611f6ebeb5 SHA1 ab048fb7ba236621d82cc305ce85d129d38d32a8 SHA256 3eab52d42a0cbc070d011a131f9a56f4b3da10b2791fec514948fd8d2d013153
AUX samba4.initd 634 RMD160 0d1028c3520102a7a2c4a7dd73723b66295db740 SHA1 cf2e0bcdb1783f1fb2ed256442f051b98ad70d64 SHA256 df553df5cfb8d8305566accd62bff23dac4772ad4a2eb7d3b1328a5651113cad
-DIST samba-3.4.8.tar.gz 34851288 RMD160 a43d6fcfa3745754afca9d2c35682f69217b3040 SHA1 941daefd092e94eb9fb57d4617fcc6844c967317 SHA256 5237bc7a32e0eafd70b78c9cd6735e46dbad0c6f9794f50476b50dd1b43752d6
DIST samba-3.4.9.tar.gz 34850281 RMD160 1c724ac3bee4f1a5b547a89cd5f899226aac6717 SHA1 2e16ee2398d232a0bd6e457df8b5b3d45217ad22 SHA256 593952940f6c460a8486906aff55c56c8168c0f74d2d016bb55d080259048b8e
-DIST samba-3.5.5.tar.gz 30807931 RMD160 3af88b26399f3602ce1c050c453fa56e55bb750f SHA1 c02e40ba0d1d9787e7cc5cc636929291f0b318ae SHA256 1b720bdb668cd621795c94ef4e07f7de303379f812ea05818e8f2b1dd1ab4003
DIST samba-3.5.6.tar.gz 30803319 RMD160 0993c0ac080fd873860e176f3efe0ba07d1e99e1 SHA1 5eb31e8d542d5b65867cfa5290f97783ea4628d3 SHA256 466410868375d19a286ac3fc5d9f3c267ce359189f8e0d76e72ec10bd54247da
DIST samba-4.0.0alpha11.tar.gz 13917363 RMD160 3ec5597de6a2c80eaa426712101777fa92786b5c SHA1 8ed2befbbd45f6501d9e6036bcdfb332431a7b4f SHA256 ec9f4a9153b9e2c233420642ee98a8b944322e8b39a9b6912430fb24e88b81b9
-EBUILD samba-3.4.8.ebuild 11250 RMD160 022ae9b501e00a3fcd719db70f88ca724da3926d SHA1 c38da7955a99985f7d88e5b56832ec7841ddea67 SHA256 a4383c4664c255b495cba5a0bf8a146a8fafc8d1dd313f88ddbfc09369558603
EBUILD samba-3.4.9.ebuild 11253 RMD160 8f5533661f954415eb4ff42ab01db3edf683ad28 SHA1 8395f1649e410eae5604be5feba944b01c750fd9 SHA256 4cf8299e93e3c20a60f810e69ed8ae67a330af093a0d5d6b499bc25733efecd2
-EBUILD samba-3.5.5.ebuild 12314 RMD160 e819136fbd1f8c1f739e8a51fd5888817fac1f13 SHA1 4715d37d16eda58ff0becfbb6d64c461ee9d6e30 SHA256 f237deddc2d080349c5ba3ac4d1c2f9431f146d0070663589c5cf4fb6dcaf43e
EBUILD samba-3.5.6.ebuild 12354 RMD160 edd543630461c4c57e5677deb96da9a2fbb8044f SHA1 245debb9583f791ca7aff95c3cca234072fec25d SHA256 b992abbc2ffcc9b4f450d209dfdd8aa3ae845eee1eac5bdfcd0543350e245fef
EBUILD samba-4.0.0_alpha11.ebuild 4231 RMD160 efebbeed51868bf0cf51f6151b531f3e65834db2 SHA1 49169a33b69d1a69ecc102d8010c7b11f9256117 SHA256 02427fccf34de0f6aea8960d664b85a51fb80cce7bd107bc53111df386fb0660
-MISC ChangeLog 75607 RMD160 98c16907cfdad87d5f3645859d4163e1ca44ca25 SHA1 a5c627d7f1758f5fffafc49a5bac5e2325aba3d5 SHA256 8abbd54f4fd088740852726a42b7b4ed813e7c7104c9aa79b57923616859fc68
+MISC ChangeLog 75713 RMD160 1904cb629772222973b8f9b156b68ca9195775d1 SHA1 b4e727b8025b7b6f3252efa907d7aba5b8fe1d6a SHA256 34b7093aca3344c84655518285acb219c7e5ba3c95330808e36b72ef7531b514
MISC metadata.xml 1365 RMD160 2f64795a1d7d7c42fef60ebf208dd7b857786e47 SHA1 5c76d183a1f4f77832415fce1eb02e7ee4ecea2f SHA256 adffcfd42c6c2895909ba3eb6dda9a398d9d499fbced64c6c65d51ac71a0374b
diff --git a/net-fs/samba/samba-3.4.8.ebuild b/net-fs/samba/samba-3.4.8.ebuild
deleted file mode 100644
index da5c5ea796d2..000000000000
--- a/net-fs/samba/samba-3.4.8.ebuild
+++ /dev/null
@@ -1,390 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.4.8.ebuild,v 1.10 2010/08/16 00:56:42 jer Exp $
-
-EAPI="2"
-
-inherit pam confutils versionator multilib
-
-MY_PV=${PV/_/}
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="Library bits of the samba network filesystem"
-HOMEPAGE="http://www.samba.org/"
-SRC_URI="mirror://samba/${P}.tar.gz"
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
-IUSE="acl addns ads aio avahi caps +client cluster cups debug doc examples fam
- ldap ldb +netapi pam quota +readline +server +smbclient smbsharemodes swat
- syslog winbind "
-
-DEPEND="dev-libs/popt
- !net-fs/samba-client
- !net-fs/samba-libs
- !net-fs/samba-server
- sys-libs/talloc
- sys-libs/tdb
- virtual/libiconv
- ads? ( virtual/krb5 sys-fs/e2fsprogs
- client? ( sys-apps/keyutils ) )
- avahi? ( net-dns/avahi )
- caps? ( sys-libs/libcap )
- client? ( !net-fs/mount-cifs
- dev-libs/iniparser )
- cluster? ( dev-db/ctdb )
- cups? ( net-print/cups )
- debug? ( dev-libs/dmalloc )
- fam? ( virtual/fam )
- ldap? ( net-nds/openldap )
- pam? ( virtual/pam
- winbind? ( dev-libs/iniparser ) )
- readline? ( >=sys-libs/readline-5.2 )
- syslog? ( virtual/logger )"
-
-RDEPEND="${DEPEND}"
-
-# Disable tests since we don't want to build that much here
-RESTRICT="test"
-
-SBINPROGS=""
-BINPROGS=""
-
-if use server ; then
- SBINPROGS="${SBINPROGS} bin/smbd bin/nmbd"
- BINPROGS="${BINPROGS} bin/testparm bin/smbstatus bin/smbcontrol bin/pdbedit
- bin/profiles bin/sharesec bin/eventlogadm"
-
- use swat && SBINPROGS="${SBINPROGS} bin/swat"
- use winbind && SBINPROGS="${SBINPROGS} bin/winbindd"
- use ads && use winbind && SBIN_PROGS="${SBINPROGS} bin/winbind_krb5_locator"
-fi
-
-if use client ; then
- BINPROGS="${BINPROGS} bin/smbclient bin/net bin/smbget bin/smbtree
- bin/nmblookup bin/smbpasswd bin/rpcclient bin/smbcacls bin/smbcquotas
- bin/ntlm_auth"
-
- use ads && SBINPROGS="${SBINPROGS} bin/cifs.upcall"
-fi
-
-use cups && BINPROGS="${BINPROGS} bin/smbspool"
-use ldb && BINPROGS="${BINPROGS} bin/ldbedit bin/ldbsearch bin/ldbadd bin/ldbdel bin/ldbmodify bin/ldbrename";
-use winbind && BINPROGS="${BINPROGS} bin/wbinfo"
-
-S="${WORKDIR}/${MY_P}/source3"
-
-# TODO:
-# - enable iPrint on Prefix/OSX and Darwin?
-# - selftest-prefix? selftest?
-# - AFS?
-
-CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
-
-pkg_setup() {
- if use winbind &&
- [[ $(tc-getCC)$ == *gcc* ]] &&
- [[ $(gcc-major-version)$(gcc-minor-version) -lt 43 ]]
- then
- eerror "It is a known issue that ${P} will not build with "
- eerror "winbind use flag enabled when using gcc < 4.3 ."
- eerror "Please use at least the latest stable gcc version."
- die "Using sys-devel/gcc < 4.3 with winbind use flag."
- fi
-
- confutils_use_depend_all ads ldap
- confutils_use_depend_all swat server
- confutils_use_depend_all client netapi
-}
-
-src_prepare() {
- cp "${FILESDIR}/samba-3.4.2-lib.tevent.python.mk" "../lib/tevent/python.mk"
-
- # ensure that winbind has correct ldflags (QA notice)
- sed -i \
- -e 's|LDSHFLAGS="|LDSHFLAGS="\\${LDFLAGS} |g' \
- configure || die "sed failed"
-}
-
-src_configure() {
- local myconf
-
- # Filter out -fPIE
- [[ ${CHOST} == *-*bsd* ]] || use hppa && myconf="${myconf} --disable-pie"
-
- # Upstream refuses to make this configurable
- use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
-
- # use_with doesn't accept 2 USE-flags
- if use client && use ads ; then
- myconf="${myconf} --with-cifsupcall"
- else
- myconf="${myconf} --without-cifsupcall"
- fi
-
- # Notes:
- # - automount is only needed in conjunction with NIS and we don't have that
- # anymore => LDAP?
- # - --without-dce-dfs and --without-nisplus-home can't be passed to configure but are disabled by default
- econf ${myconf} \
- --with-piddir=/var/run/samba \
- --sysconfdir=/etc/samba \
- --localstatedir=/var \
- $(use_enable debug developer) \
- --enable-largefile \
- --enable-socket-wrapper \
- --enable-nss-wrapper \
- $(use_enable swat) \
- $(use_enable debug dmalloc) \
- $(use_enable cups) \
- --disable-iprint \
- $(use_enable fam) \
- --enable-shared-libs \
- --disable-dnssd \
- $(use_enable avahi) \
- --with-fhs \
- --with-privatedir=/var/lib/samba/private \
- --with-rootsbindir=/var/cache/samba \
- --with-lockdir=/var/cache/samba \
- --with-swatdir=/usr/share/doc/${PF}/swat \
- --with-configdir=/etc/samba \
- --with-logfilebase=/var/log/samba \
- --with-pammodulesdir=$(getpam_mod_dir) \
- --without-afs \
- --without-fake-kaserver \
- --without-vfs-afsacl \
- $(use_with ldap) \
- $(use_with ads) \
- $(use_with ads krb5 /usr) \
- $(use_with ads dnsupdate) \
- --without-automount \
- $(use_with client cifsmount) \
- $(use_with pam) \
- $(use_with pam pam_smbpass) \
- $(use_with syslog) \
- $(use_with quota quotas) \
- $(use_with quota sys-quotas) \
- --without-utmp \
- --without-lib{talloc,tdb} \
- $(use_with netapi libnetapi) \
- $(use_with smbclient libsmbclient) \
- $(use_with smbsharemodes libsmbsharemodes) \
- $(use_with addns libaddns) \
- $(use_with cluster ctdb /usr) \
- $(use_with cluster cluster-support) \
- $(use_with acl acl-support) \
- $(use_with aio aio-support) \
- --with-sendfile-support \
- $(use_with winbind) \
- --without-included-popt \
- --without-included-iniparser
-}
-
-src_compile() {
- # compile libs
- if use addns ; then
- einfo "make addns library"
- emake libaddns || die "emake libaddns failed"
- fi
- if use netapi ; then
- einfo "make netapi library"
- emake libnetapi || die "emake libnetapi failed"
- fi
- if use smbclient ; then
- einfo "make smbclient library"
- emake libsmbclient || die "emake libsmbclient failed"
- fi
- if use smbsharemodes ; then
- einfo "make smbsharemodes library"
- emake libsmbsharemodes || die "emake libsmbsharemodes failed"
- fi
-
- # compile modules
- emake modules || die "building modules failed"
-
- # compile pam moudles
- if use pam ; then
- einfo "make pam modules"
- emake pam_modules || die "emake pam_modules failed";
- fi
-
- # compile winbind nss modules
- if use winbind ; then
- einfo "make nss modules"
- emake nss_modules || die "emake nss_modules failed";
- fi
-
- # compile utilities
- if [ -n "${BINPROGS}" ] ; then
- einfo "make binprogs"
- emake ${BINPROGS} || die "emake binprogs failed";
- fi
- if [ -n "${SBINPROGS}" ] ; then
- einfo "make sbinprogs"
- emake ${SBINPROGS} || die "emake sbinprogs failed";
- fi
-
- if use client ; then
- einfo "make {,u}mount.cifs"
- emake bin/{,u}mount.cifs || die "emake {,u}mount.cifs failed"
- fi
-}
-
-src_install() {
- # install libs
- if use addns ; then
- einfo "install addns library"
- emake installlibaddns DESTDIR="${D}" || die "emake install libaddns failed"
- fi
- if use netapi ; then
- einfo "install netapi library"
- emake installlibnetapi DESTDIR="${D}" || die "emake install libnetapi failed"
- fi
- if use smbclient ; then
- einfo "install smbclient library"
- emake installlibsmbclient DESTDIR="${D}" || die "emake install libsmbclient failed"
- fi
- if use smbsharemodes ; then
- einfo "install smbsharemodes library"
- emake installlibsmbsharemodes DESTDIR="${D}" || die "emake install libsmbsharemodes failed"
- fi
-
- # install modules
- emake installmodules DESTDIR="${D}" || die "installing modules failed"
-
- if use pam ; then
- einfo "install pam modules"
- emake installpammodules DESTDIR="${D}" || die "emake installpammodules failed"
-
- if use winbind ; then
- newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
- doman ../docs/manpages/pam_winbind.8
- fi
-
- newpamd "${CONFDIR}/samba.pam" samba
- dodoc pam_smbpass/README
- fi
-
- # Nsswitch extensions. Make link for wins and winbind resolvers
- if use winbind ; then
- einfo "install libwbclient"
- emake installlibwbclient DESTDIR="${D}" || die "emake installlibwbclient failed"
- dolib.so ../nsswitch/libnss_wins.so
- dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
- dolib.so ../nsswitch/libnss_winbind.so
- dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
- fi
-
- # install binaries
- insinto /usr
- for prog in ${SBINPROGS} ; do
- dosbin ${prog} || die "installing ${prog} failed"
- doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
- done
-
- for prog in ${BINPROGS} ; do
- dobin ${prog} || die "installing ${prog} failed"
- doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
- done
-
- # install server components
- if use server ; then
- doman ../docs/manpages/vfs* ../docs/manpages/samba.7
-
- diropts -m0700
- keepdir /var/lib/samba/private
-
- diropts -m1777
- keepdir /var/spool/samba
-
- diropts -m0755
- keepdir /var/{cache,log}/samba
- keepdir /var/lib/samba/{netlogon,profiles}
- keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
- keepdir /usr/$(get_libdir)/samba/{auth,pdb,rpc,idmap,nss_info,gpext}
-
- newconfd "${CONFDIR}/samba.confd" samba
- newinitd "${CONFDIR}/samba.initd" samba
-
- insinto /etc/samba
- doins "${CONFDIR}"/{smbusers,lmhosts}
-
- if use ldap ; then
- insinto /etc/openldap/schema
- doins ../examples/LDAP/samba.schema
- fi
-
- if use swat ; then
- insinto /etc/xinetd.d
- newins "${CONFDIR}/swat.xinetd" swat
- script/installswat.sh "${D}" "${ROOT}/usr/share/doc/${PF}/swat" "${S}" \
- || die "installing swat failed"
- fi
-
- dodoc ../MAINTAINERS ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
- fi
-
- # install client files ({u,}mount.cifs into /)
- if use client ; then
- into /
- dosbin bin/{u,}mount.cifs || die "u/mount.cifs not around"
- doman ../docs/manpages/{u,}mount.cifs.8 || die "can't create man pages"
- fi
-
- # install the spooler to cups
- use cups && dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
-
- # install misc files
- insinto /etc/samba
- doins "${CONFDIR}"/smb.conf.default
- doman ../docs/manpages/smb.conf.5
-
- insinto /usr/"$(get_libdir)"/samba
- doins ../codepages/{valid.dat,upcase.dat,lowcase.dat}
-
- # install docs
- if use doc ; then
- dohtml -r ../docs/htmldocs/*
- dodoc ../docs/*.pdf
- fi
-
- # install examples
- if use examples ; then
- einfo "install examples"
- insinto /usr/share/doc/${PF}/examples
-
- if use smbclient ; then
- doins -r ../examples/libsmbclient
- fi
-
- if use winbind ; then
- doins -r ../examples/pam_winbind ../examples/nss
- fi
-
- if use server ; then
- doins -r \
- auth autofs dce-dfs LDAP logon misc pdb perfcounter \
- printer-accounting printing scripts tridge validchars VFS
- fi
- fi
-
- # Remove empty installation directories
- rmdir --ignore-fail-on-non-empty \
- "${D}/usr/$(get_libdir)/samba" \
- "${D}/usr"/{sbin,bin} \
- "${D}/usr/share"/{man,locale,} \
- "${D}/var"/{run,lib/samba/private,lib/samba,lib,cache/samba,cache,} \
- # || die "tried to remove non-empty dirs, this seems like a bug in the ebuild"
-}
-
-pkg_postinst() {
- elog "The default passdb backend has been changed to 'tdbsam' in samba 3.4!"
- elog "That breaks existing setups using the 'smbpasswd' backend without"
- elog "explicit declaration!"
- elog "Please use 'passdb backend = smbpasswd' if you would like to stick to the"
- elog "'smbpasswd' backend or convert your smbpasswd entries using e.g. "
- elog "'pdbedit -i smbpasswd -e tdbsam'."
- elog "For further information make sure to read the release notes at"
- elog "http://samba.org/samba/history/${P}.html and "
- elog "http://samba.org/samba/history/${PN}-3.4.0.html"
-}
diff --git a/net-fs/samba/samba-3.5.5.ebuild b/net-fs/samba/samba-3.5.5.ebuild
deleted file mode 100644
index 76ae7c0be0ce..000000000000
--- a/net-fs/samba/samba-3.5.5.ebuild
+++ /dev/null
@@ -1,427 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.5.5.ebuild,v 1.2 2010/09/27 16:40:37 leio Exp $
-
-EAPI="2"
-
-inherit pam confutils versionator multilib eutils
-
-MY_PV=${PV/_/}
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="Library bits of the samba network filesystem"
-HOMEPAGE="http://www.samba.org/"
-SRC_URI="mirror://samba/${P}.tar.gz"
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="acl addns ads aio avahi caps +client cluster cups debug doc examples fam
- ldap ldb +netapi pam quota +readline +server +smbclient smbsharemodes swat
- syslog winbind "
-
-DEPEND="dev-libs/popt
- !net-fs/samba-client
- !net-fs/samba-libs
- !net-fs/samba-server
- sys-libs/talloc
- sys-libs/tdb
- virtual/libiconv
- ads? ( virtual/krb5 sys-fs/e2fsprogs
- client? ( sys-apps/keyutils ) )
- avahi? ( net-dns/avahi )
- caps? ( sys-libs/libcap )
- client? ( !net-fs/mount-cifs
- dev-libs/iniparser )
- cluster? ( dev-db/ctdb )
- cups? ( net-print/cups )
- debug? ( dev-libs/dmalloc )
- fam? ( virtual/fam )
- ldap? ( net-nds/openldap )
- pam? ( virtual/pam
- winbind? ( dev-libs/iniparser ) )
- readline? ( >=sys-libs/readline-5.2 )
- syslog? ( virtual/logger )"
-
-RDEPEND="${DEPEND}"
-
-# Disable tests since we don't want to build that much here
-RESTRICT="test"
-
-SBINPROGS=""
-BINPROGS=""
-KRBPLUGIN=""
-PLUGINEXT=".so"
-SHAREDMODS=""
-
-if use server ; then
- SBINPROGS="${SBINPROGS} bin/smbd bin/nmbd"
- BINPROGS="${BINPROGS} bin/testparm bin/smbstatus bin/smbcontrol bin/pdbedit
- bin/profiles bin/sharesec bin/eventlogadm"
-
- use swat && SBINPROGS="${SBINPROGS} bin/swat"
- use winbind && SBINPROGS="${SBINPROGS} bin/winbindd"
- use ads && use winbind && KRBPLUGIN="${KRBPLUGIN} bin/winbind_krb5_locator"
-fi
-
-if use client ; then
- BINPROGS="${BINPROGS} bin/smbclient bin/net bin/smbget bin/smbtree
- bin/nmblookup bin/smbpasswd bin/rpcclient bin/smbcacls bin/smbcquotas
- bin/ntlm_auth"
-
- use ads && SBINPROGS="${SBINPROGS} bin/cifs.upcall"
-fi
-
-use cups && BINPROGS="${BINPROGS} bin/smbspool"
-use ldb && BINPROGS="${BINPROGS} bin/ldbedit bin/ldbsearch bin/ldbadd bin/ldbdel bin/ldbmodify bin/ldbrename";
-
-if use winbind ; then
- BINPROGS="${BINPROGS} bin/wbinfo"
- SHAREDMODS="${SHAREDMODS}idmap_rid"
- use ads && SHAREDMODS="${SHAREDMODS},idmap_ad"
- use ldap && SHAREDMODS="${SHAREDMODS},idmap_ldap"
-fi
-
-S="${WORKDIR}/${MY_P}/source3"
-
-# TODO:
-# - enable iPrint on Prefix/OSX and Darwin?
-# - selftest-prefix? selftest?
-# - AFS?
-
-CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
-
-pkg_setup() {
- if use winbind &&
- [[ $(tc-getCC)$ == *gcc* ]] &&
- [[ $(gcc-major-version)$(gcc-minor-version) -lt 43 ]]
- then
- eerror "It is a known issue that ${P} will not build with "
- eerror "winbind use flag enabled when using gcc < 4.3 ."
- eerror "Please use at least the latest stable gcc version."
- die "Using sys-devel/gcc < 4.3 with winbind use flag."
- fi
-
- confutils_use_depend_all ads ldap
- confutils_use_depend_all swat server
-}
-
-src_prepare() {
- cp "${FILESDIR}/samba-3.4.2-lib.tevent.python.mk" "../lib/tevent/python.mk"
-
- # ensure that winbind has correct ldflags (QA notice)
- sed -i \
- -e 's|LDSHFLAGS="|LDSHFLAGS="\\${LDFLAGS} |g' \
- configure || die "sed failed"
-}
-
-src_configure() {
- local myconf
-
- # Filter out -fPIE
- [[ ${CHOST} == *-*bsd* ]] || use hppa && myconf="${myconf} --disable-pie"
-
- # Upstream refuses to make this configurable
- use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
-
- # use_with doesn't accept 2 USE-flags
- if use client && use ads ; then
- myconf="${myconf} --with-cifsupcall"
- else
- myconf="${myconf} --without-cifsupcall"
- fi
-
- # Notes:
- # - automount is only needed in conjunction with NIS and we don't have that
- # anymore => LDAP?
- # - --without-dce-dfs and --without-nisplus-home can't be passed to configure but are disabled by default
- econf ${myconf} \
- --with-piddir=/var/run/samba \
- --sysconfdir=/etc/samba \
- --localstatedir=/var \
- $(use_enable debug developer) \
- --enable-largefile \
- --enable-socket-wrapper \
- --enable-nss-wrapper \
- $(use_enable swat) \
- $(use_enable debug dmalloc) \
- $(use_enable cups) \
- --disable-iprint \
- $(use_enable fam) \
- --enable-shared-libs \
- --disable-dnssd \
- $(use_enable avahi) \
- --with-fhs \
- --with-privatedir=/var/lib/samba/private \
- --with-rootsbindir=/var/cache/samba \
- --with-lockdir=/var/cache/samba \
- --with-swatdir=/usr/share/doc/${PF}/swat \
- --with-configdir=/etc/samba \
- --with-logfilebase=/var/log/samba \
- --with-pammodulesdir=$(getpam_mod_dir) \
- --without-afs \
- --without-fake-kaserver \
- --without-vfs-afsacl \
- $(use_with ldap) \
- $(use_with ads) \
- $(use_with ads krb5 /usr) \
- $(use_with ads dnsupdate) \
- --without-automount \
- $(use_with client cifsmount) \
- $(use_with client cifsumount) \
- $(use_with pam) \
- $(use_with pam pam_smbpass) \
- $(use_with syslog) \
- $(use_with quota quotas) \
- $(use_with quota sys-quotas) \
- --without-utmp \
- --without-lib{talloc,tdb} \
- $(use_with netapi libnetapi) \
- $(use_with smbclient libsmbclient) \
- $(use_with smbsharemodes libsmbsharemodes) \
- $(use_with addns libaddns) \
- $(use_with cluster ctdb /usr) \
- $(use_with cluster cluster-support) \
- $(use_with acl acl-support) \
- $(use_with aio aio-support) \
- --with-sendfile-support \
- $(use_with winbind) \
- --with-shared-modules=${SHAREDMODS} \
- --without-included-popt \
- --without-included-iniparser
-}
-
-src_compile() {
- # compile libs
- if use addns ; then
- einfo "make addns library"
- emake libaddns || die "emake libaddns failed"
- fi
- if use netapi ; then
- einfo "make netapi library"
- emake libnetapi || die "emake libnetapi failed"
- fi
- if use smbclient ; then
- einfo "make smbclient library"
- emake libsmbclient || die "emake libsmbclient failed"
- fi
- if use smbsharemodes ; then
- einfo "make smbsharemodes library"
- emake libsmbsharemodes || die "emake libsmbsharemodes failed"
- fi
-
- # compile modules
- emake modules || die "building modules failed"
-
- # compile pam moudles
- if use pam ; then
- einfo "make pam modules"
- emake pam_modules || die "emake pam_modules failed";
- fi
-
- # compile winbind nss modules
- if use winbind ; then
- einfo "make nss modules"
- emake nss_modules || die "emake nss_modules failed";
- fi
-
- # compile utilities
- if [ -n "${BINPROGS}" ] ; then
- einfo "make binprogs"
- emake ${BINPROGS} || die "emake binprogs failed";
- fi
- if [ -n "${SBINPROGS}" ] ; then
- einfo "make sbinprogs"
- emake ${SBINPROGS} || die "emake sbinprogs failed";
- fi
-
- if [ -n "${KRBPLUGIN}" ] ; then
- einfo "make krbplugin"
- emake ${KRBPLUGIN}${PLUGINEXT} || die "emake krbplugin failed";
- fi
-
- if use client ; then
- einfo "make {,u}mount.cifs"
- emake bin/{,u}mount.cifs || die "emake {,u}mount.cifs failed"
- fi
-}
-
-src_install() {
- # install libs
- if use addns ; then
- einfo "install addns library"
- emake installlibaddns DESTDIR="${D}" || die "emake install libaddns failed"
- fi
- if use netapi ; then
- einfo "install netapi library"
- emake installlibnetapi DESTDIR="${D}" || die "emake install libnetapi failed"
- fi
- if use smbclient ; then
- einfo "install smbclient library"
- emake installlibsmbclient DESTDIR="${D}" || die "emake install libsmbclient failed"
- fi
- if use smbsharemodes ; then
- einfo "install smbsharemodes library"
- emake installlibsmbsharemodes DESTDIR="${D}" || die "emake install libsmbsharemodes failed"
- fi
-
- # install modules
- emake installmodules DESTDIR="${D}" || die "installing modules failed"
-
- if use pam ; then
- einfo "install pam modules"
- emake installpammodules DESTDIR="${D}" || die "emake installpammodules failed"
-
- if use winbind ; then
- newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
- doman ../docs/manpages/pam_winbind.8
- fi
-
- newpamd "${CONFDIR}/samba.pam" samba
- dodoc pam_smbpass/README
- fi
-
- # Nsswitch extensions. Make link for wins and winbind resolvers
- if use winbind ; then
- einfo "install libwbclient"
- emake installlibwbclient DESTDIR="${D}" || die "emake installlibwbclient failed"
- dolib.so ../nsswitch/libnss_wins.so
- dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
- dolib.so ../nsswitch/libnss_winbind.so
- dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
- fi
-
- # install binaries
- insinto /usr
- for prog in ${SBINPROGS} ; do
- dosbin ${prog} || die "installing ${prog} failed"
- doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
- done
-
- for prog in ${BINPROGS} ; do
- dobin ${prog} || die "installing ${prog} failed"
- doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
- done
-
- # install krbplugin
- if [ -n "${KRBPLUGIN}" ] ; then
- if has_version app-crypt/mit-krb5 ; then
- insinto /usr/$(get_libdir)/krb5/plugins/libkrb5
- doins ${KRBPLUGIN}${PLUGINEXT} || die "installing
- ${KRBPLUGIN}${PLUGINEXT} failed"
- elif has_version app-crypt/heimdal ; then
- insinto /usr/$(get_libdir)/plugin/krb5
- doins ${KRBPLUGIN}${PLUGINEXT} || die "installing
- ${KRBPLUGIN}${PLUGINEXT} failed"
- fi
- insinto /usr
- for prog in ${KRBPLUGIN} ; do
- doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
- done
- fi
-
- # install server components
- if use server ; then
- doman ../docs/manpages/vfs* ../docs/manpages/samba.7
-
- diropts -m0700
- keepdir /var/lib/samba/private
-
- diropts -m1777
- keepdir /var/spool/samba
-
- diropts -m0755
- keepdir /var/{cache,log}/samba
- keepdir /var/lib/samba/{netlogon,profiles}
- keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
- keepdir /usr/$(get_libdir)/samba/{auth,pdb,rpc,idmap,nss_info,gpext}
-
- newconfd "${CONFDIR}/samba.confd" samba
- newinitd "${CONFDIR}/samba.initd" samba
-
- insinto /etc/samba
- doins "${CONFDIR}"/{smbusers,lmhosts}
-
- if use ldap ; then
- insinto /etc/openldap/schema
- doins ../examples/LDAP/samba.schema
- fi
-
- if use swat ; then
- insinto /etc/xinetd.d
- newins "${CONFDIR}/swat.xinetd" swat
- script/installswat.sh "${D}" "${ROOT}/usr/share/doc/${PF}/swat" "${S}" \
- || die "installing swat failed"
- fi
-
- dodoc ../MAINTAINERS ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
- fi
-
- # install client files ({u,}mount.cifs into /)
- if use client ; then
- into /
- dosbin bin/{u,}mount.cifs || die "u/mount.cifs not around"
- doman ../docs/manpages/{u,}mount.cifs.8 || die "can't create man pages"
- fi
-
- # install the spooler to cups
- if use cups ; then
- dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
- fi
-
- # install misc files
- insinto /etc/samba
- doins "${CONFDIR}"/smb.conf.default
- doman ../docs/manpages/smb.conf.5
-
- insinto /usr/"$(get_libdir)"/samba
- doins ../codepages/{valid.dat,upcase.dat,lowcase.dat}
-
- # install docs
- if use doc ; then
- dohtml -r ../docs/htmldocs/*
- dodoc ../docs/*.pdf
- fi
-
- # install examples
- if use examples ; then
- insinto /usr/share/doc/${PF}/examples
-
- if use smbclient ; then
- doins -r ../examples/libsmbclient
- fi
-
- if use winbind ; then
- doins -r ../examples/pam_winbind ../examples/nss
- fi
-
- if use server ; then
- cd ../examples
- doins -r auth autofs dce-dfs LDAP logon misc pdb \
- perfcounter printer-accounting printing scripts tridge \
- validchars VFS
- fi
- fi
-
- # Remove empty installation directories
- rmdir --ignore-fail-on-non-empty \
- "${D}/usr/$(get_libdir)/samba" \
- "${D}/usr"/{sbin,bin} \
- "${D}/usr/share"/{man,locale,} \
- "${D}/var"/{run,lib/samba/private,lib/samba,lib,cache/samba,cache,} \
- # || die "tried to remove non-empty dirs, this seems like a bug in the ebuild"
-}
-
-pkg_postinst() {
- elog "The default value of 'wide links' has been changed to 'no' in samba 3.5"
- elog "to avoid an insecure default configuration"
- elog "('wide links = yes' and 'unix extensions = yes'). For more details,"
- elog "please see http://www.samba.org/samba/news/symlink_attack.html ."
- elog ""
- elog "An EXPERIMENTAL implementation of the SMB2 protocol has been added."
- elog "SMB2 can be enabled by setting 'max protocol = smb2'. SMB2 is a new "
- elog "implementation of the SMB protocol used by Windows Vista and higher"
- elog ""
- elog "For further information make sure to read the release notes at"
- elog "http://samba.org/samba/history/${P}.html and "
- elog "http://samba.org/samba/history/${PN}-3.5.0.html"
-}