aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs/samba/samba-3.6.22-r1.ebuild')
-rw-r--r--net-fs/samba/samba-3.6.22-r1.ebuild267
1 files changed, 143 insertions, 124 deletions
diff --git a/net-fs/samba/samba-3.6.22-r1.ebuild b/net-fs/samba/samba-3.6.22-r1.ebuild
index 6996fd1..536dff0 100644
--- a/net-fs/samba/samba-3.6.22-r1.ebuild
+++ b/net-fs/samba/samba-3.6.22-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=4
-inherit pam versionator multilib eutils flag-o-matic systemd
+inherit pam-multilib versionator multilib eutils flag-o-matic systemd eutils-multilib multilib-minimal
MY_PV=${PV/_/}
MY_P="${PN}-${MY_PV}"
@@ -14,50 +14,44 @@ HOMEPAGE="http://www.samba.org/"
SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+KEYWORDS="~amd64"
IUSE="acl addns ads +aio avahi caps +client cluster cups debug dmapi doc examples fam
ldap ldb +netapi pam quota +readline selinux +server +smbclient smbsharemodes
swat syslog +winbind"
-DEPEND="dev-libs/popt
- >=sys-libs/talloc-2.0.5
- >=sys-libs/tdb-1.2.9
- >=sys-libs/tevent-0.9.18
- virtual/libiconv
- ads? ( virtual/krb5 sys-fs/e2fsprogs
- client? ( sys-apps/keyutils ) )
- avahi? ( net-dns/avahi[dbus] )
- caps? ( sys-libs/libcap )
+DEPEND="dev-libs/popt[${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-2.0.5[${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.2.9[${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.9.18[${MULTILIB_USEDEP}]
+ virtual/libiconv[${MULTILIB_USEDEP}]
+ ads? ( virtual/krb5[${MULTILIB_USEDEP}] sys-fs/e2fsprogs[${MULTILIB_USEDEP}]
+ client? ( sys-apps/keyutils[${MULTILIB_USEDEP}] ) )
+ avahi? ( net-dns/avahi[dbus,${MULTILIB_USEDEP}] )
+ caps? ( sys-libs/libcap[${MULTILIB_USEDEP}] )
client? ( !net-fs/mount-cifs
- dev-libs/iniparser )
- cluster? ( >=dev-db/ctdb-1.13 )
- cups? ( net-print/cups )
- debug? ( dev-libs/dmalloc )
- dmapi? ( sys-apps/dmapi )
- fam? ( virtual/fam )
- ldap? ( net-nds/openldap )
- ldb? ( sys-libs/ldb )
- pam? ( virtual/pam
- winbind? ( dev-libs/iniparser )
+ dev-libs/iniparser[${MULTILIB_USEDEP}] )
+ cluster? ( >=dev-db/ctdb-1.13[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups[${MULTILIB_USEDEP}] )
+ debug? ( dev-libs/dmalloc[${MULTILIB_USEDEP}] )
+ dmapi? ( sys-apps/dmapi[${MULTILIB_USEDEP}] )
+ fam? ( virtual/fam[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+ ldb? ( sys-libs/ldb[${MULTILIB_USEDEP}] )
+ pam? ( virtual/pam[${MULTILIB_USEDEP}]
+ winbind? ( dev-libs/iniparser[${MULTILIB_USEDEP}] )
)
- readline? ( >=sys-libs/readline-5.2 )
- selinux? ( sec-policy/selinux-samba )
+ readline? ( >=sys-libs/readline-5.2[${MULTILIB_USEDEP}] )
+ selinux? ( sec-policy/selinux-samba[${MULTILIB_USEDEP}] )
syslog? ( virtual/logger )"
RDEPEND="${DEPEND}
- kernel_linux? ( ads? ( net-fs/cifs-utils[ads] )
- client? ( net-fs/cifs-utils ) )"
+ kernel_linux? ( ads? ( net-fs/cifs-utils[ads,${MULTILIB_USEDEP}] )
+ client? ( net-fs/cifs-utils[${MULTILIB_USEDEP}] ) )"
# Disable tests since we don't want to build that much here
RESTRICT="test"
-SBINPROGS=""
-BINPROGS=""
-KRBPLUGIN=""
-PLUGINEXT=".so"
-SHAREDMODS=""
-
-S="${WORKDIR}/${MY_P}/source3"
+S="${WORKDIR}/${MY_P}"
# TODO:
# - enable iPrint on Prefix/OSX and Darwin?
@@ -71,6 +65,8 @@ REQUIRED_USE="
swat? ( server )
"
+MULTILIB_PARALLEL_PHASES="src_configure"
+
pkg_pretend() {
if [[ ${MERGE_TYPE} != binary ]]; then
if use winbind &&
@@ -85,38 +81,43 @@ pkg_pretend() {
fi
}
-pkg_setup() {
- if use server ; then
+my_env_setup() {
+ SBINPROGS="" BINPROGS="" KRBPLUGIN="" PLUGINEXT=".so" SHAREDMODS=""
+
+ if use server && multilib_build_binaries; then
SBINPROGS="${SBINPROGS} bin/smbd bin/nmbd"
BINPROGS="${BINPROGS} bin/testparm bin/smbstatus bin/smbcontrol bin/pdbedit
bin/profiles bin/sharesec bin/eventlogadm bin/smbta-util
$(usex client "" "bin/smbclient")"
use swat && SBINPROGS="${SBINPROGS} bin/swat"
- use winbind && SBINPROGS="${SBINPROGS} bin/winbindd"
- use ads && use winbind && KRBPLUGIN="${KRBPLUGIN} bin/winbind_krb5_locator"
+ use winbind && multilib_build_binaries && SBINPROGS="${SBINPROGS} bin/winbindd"
+ multilib_build_binaries && use ads && use winbind && KRBPLUGIN="${KRBPLUGIN} bin/winbind_krb5_locator"
fi
- if use client ; then
+ if multilib_build_binaries && 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"
fi
- use cups && BINPROGS="${BINPROGS} bin/smbspool"
+ multilib_build_binaries && 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"
+ multilib_build_binaries && \
+ BINPROGS="${BINPROGS} bin/wbinfo"
SHAREDMODS="${SHAREDMODS}idmap_rid,idmap_hash"
use ads && SHAREDMODS="${SHAREDMODS},idmap_ad"
use cluster && SHAREDMODS="${SHAREDMODS},idmap_tdb2"
use ldap && SHAREDMODS="${SHAREDMODS},idmap_ldap,idmap_adex"
fi
+ cd source3
}
src_prepare() {
+ cd source3
cp "${FILESDIR}/samba-3.4.2-lib.tevent.python.mk" "../lib/tevent/python.mk"
# ensure that winbind has correct ldflags (QA notice)
@@ -124,16 +125,19 @@ src_prepare() {
-e 's|LDSHFLAGS="|LDSHFLAGS="\\${LDFLAGS} |g' \
configure || die "sed failed"
cd "${WORKDIR}/${MY_P}" && epatch "${CONFDIR}"/smb.conf.default.patch
+ multilib_copy_sources
}
-src_configure() {
+multilib_src_configure() {
+ my_env_setup
+
local myconf
# Filter out -fPIE
[[ ${CHOST} == *-*bsd* ]] && myconf+=" --disable-pie"
#Allowing alpha/s390/sh to build
- if use alpha || use s390 || use sh ; then
+ if abi_arch_use alpha || abi_arch_use s390 || abi_arch_use sh ; then
replace-flags -O? -O1
fi
@@ -206,7 +210,8 @@ src_configure() {
--without-included-iniparser
}
-src_compile() {
+multilib_src_compile() {
+ my_env_setup
# compile libs
if use addns ; then
einfo "make addns library"
@@ -257,7 +262,8 @@ src_compile() {
}
-src_install() {
+multilib_src_install() {
+ my_env_setup
# pkgconfig files installation needed, bug #464818
local pkgconfigdir=/usr/$(get_libdir)/pkgconfig
@@ -292,7 +298,7 @@ src_install() {
einfo "install pam modules"
emake installpammodules DESTDIR="${D}"
- if use winbind ; then
+ if multilib_is_best_abi && use winbind; then
newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
doman ../docs/manpages/pam_winbind.8
# bug #376853
@@ -300,8 +306,10 @@ src_install() {
doins ../examples/pam_winbind/pam_winbind.conf || die
fi
- newpamd "${CONFDIR}/samba.pam" samba
- dodoc pam_smbpass/README
+ if multilib_is_best_abi; then
+ newpamd "${CONFDIR}/samba.pam" samba
+ dodoc pam_smbpass/README
+ fi
fi
# Nsswitch extensions. Make link for wins and winbind resolvers
@@ -314,36 +322,39 @@ src_install() {
dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
insinto $pkgconfigdir
doins pkgconfig/wbclient.pc
- einfo "install libwbclient related manpages"
- doman ../docs/manpages/idmap_rid.8
- doman ../docs/manpages/idmap_hash.8
- if use ldap ; then
- doman ../docs/manpages/idmap_adex.8
- doman ../docs/manpages/idmap_ldap.8
- fi
- if use ads ; then
- doman ../docs/manpages/idmap_ad.8
+ if multilib_is_best_abi; then
+ einfo "install libwbclient related manpages"
+ doman ../docs/manpages/idmap_rid.8
+ doman ../docs/manpages/idmap_hash.8
+ if use ldap ; then
+ doman ../docs/manpages/idmap_adex.8
+ doman ../docs/manpages/idmap_ldap.8
+ fi
+ if use ads ; then
+ doman ../docs/manpages/idmap_ad.8
+ fi
fi
fi
# install binaries
- insinto /usr
- for prog in ${SBINPROGS} ; do
- dosbin ${prog}
- doman ../docs/manpages/${prog/bin\/}*
- done
-
- for prog in ${BINPROGS} ; do
- dobin ${prog}
- doman ../docs/manpages/${prog/bin\/}*
- done
-
- # install scripts
- if use client ; then
- dobin script/findsmb
- doman ../docs/manpages/findsmb.1
- fi
+ if multilib_build_binaries; then
+ insinto /usr
+ for prog in ${SBINPROGS} ; do
+ dosbin ${prog}
+ doman ../docs/manpages/${prog/bin\/}*
+ done
+ for prog in ${BINPROGS} ; do
+ dobin ${prog}
+ doman ../docs/manpages/${prog/bin\/}*
+ done
+
+ # install scripts
+ if use client ; then
+ dobin script/findsmb
+ doman ../docs/manpages/findsmb.1
+ fi
+ fi
# install krbplugin
if [ -n "${KRBPLUGIN}" ] ; then
if has_version app-crypt/mit-krb5 ; then
@@ -354,86 +365,94 @@ src_install() {
doins ${KRBPLUGIN}${PLUGINEXT}
fi
insinto /usr
- for prog in ${KRBPLUGIN} ; do
- doman ../docs/manpages/${prog/bin\/}*
- done
+ if multilib_is_best_abi; then
+ for prog in ${KRBPLUGIN} ; do
+ doman ../docs/manpages/${prog/bin\/}*
+ done
+ fi
fi
# install server components
- if use server ; then
- doman ../docs/manpages/vfs* ../docs/manpages/samba.7
+ if multilib_is_best_abi ; then
+ if use server ; then
+ doman ../docs/manpages/vfs* ../docs/manpages/samba.7
- diropts -m0700
- keepdir /var/lib/samba/private
+ diropts -m0700
+ keepdir /var/lib/samba/private
- diropts -m1777
- keepdir /var/spool/samba
+ 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}
+ 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
+ newconfd "${CONFDIR}/samba.confd" samba
+ newinitd "${CONFDIR}/samba.initd" samba
- insinto /etc/samba
- doins "${CONFDIR}"/{smbusers,lmhosts}
+ insinto /etc/samba
+ doins "${CONFDIR}"/{smbusers,lmhosts}
- if use ldap ; then
- insinto /etc/openldap/schema
- doins ../examples/LDAP/samba.schema
- fi
+ 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 "${ED}" "${EROOT}/usr/share/doc/${PF}/swat" "${S}"
- fi
+ if use swat ; then
+ insinto /etc/xinetd.d
+ newins "${CONFDIR}/swat.xinetd" swat
+ script/installswat.sh "${ED}" "${EROOT}/usr/share/doc/${PF}/swat" "${S}"
+ fi
- dodoc ../MAINTAINERS.txt ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
+ dodoc ../MAINTAINERS.txt ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
+ fi
fi
# install the spooler to cups
- if use cups ; then
+ if multilib_is_best_abi && use cups ; then
dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
fi
# install misc files
- insinto /etc/samba
- doins ../examples/smb.conf.default
- doman ../docs/manpages/smb.conf.5
+ if multilib_is_best_abi ; then
+ insinto /etc/samba
+ doins ../examples/smb.conf.default
+ doman ../docs/manpages/smb.conf.5
- insinto /usr/"$(get_libdir)"/samba
- doins ../codepages/{valid.dat,upcase.dat,lowcase.dat}
+ 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 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
+ # install examples
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
- if use smbclient ; then
- doins -r ../examples/libsmbclient
- fi
+ if use smbclient ; then
+ doins -r ../examples/libsmbclient
+ fi
- if use winbind ; then
- doins -r ../examples/pam_winbind ../examples/nss
- 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
+ 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
fi
+}
+multilib_src_install_all() {
# Remove empty installation directories
rmdir --ignore-fail-on-non-empty \
"${ED}/usr/$(get_libdir)/samba" \