New samba 4 ebuild

git-svn-id: svn+ssh://svnintern.kmrc.de/projects/gentoo/iwm-overlay@9285 cbe59ace-07ea-0310-918e-868702b5370d
This commit is contained in:
Torsten Kurbad 2009-04-29 17:42:10 +00:00
parent 12191e7299
commit ea8943cf5d
2 changed files with 28 additions and 135 deletions

View File

@ -4,5 +4,5 @@ AUX samba-init 1133 RMD160 77a084e8f78665af0233f19dc9c4a49693360da1 SHA1 09d7f1d
AUX samba-xinetd 286 RMD160 c90bd8518082eb4c182d5f7bd223a76f8e3c7fab SHA1 b250c5ca539187d8b481bcfb6ea3a915d7e8b26b SHA256 964d06dc33beff38978a8f03cd12b05c33d8258ed73aa9ffbf137fe226de25b8
DIST samba-4.0.0alpha7.tar.gz 11927771 RMD160 551aface24e04e8b5665c1d2e12ec8bc7a725d0f SHA1 f59bedd40e0fd5a85e31ea4a06e8a4a874c6c9b7 SHA256 744d97ad7fc964efa27f02bdc4f93b533269e4e5e27639035ae80942510c743e
DIST samba-vscan-0.3.6c-beta5.tar.gz 248183 RMD160 6929c30b57e342c4bdf6a6b432fbe41c2ac70a74 SHA1 9e1b37225246ff2f19e37aceb97a680afc82cdda SHA256 bfe910d54add8dcb87d5babdf50127a6dcf079e0e90ad9947b4cbfdbe3e3037d
EBUILD samba-4.0.0_alpha7.ebuild 10073 RMD160 3dbdf0b6de0f150ea722c3fd9b6fe9d964117457 SHA1 6232ad5bc5e1e9dfbaa8a3df0eca3464e69baaca SHA256 aa5b2409cacd5d6646f0f4e4bee3fc70cc2c0e164feb92a53df0a584e7d2fc98
EBUILD samba-4.0.0_alpha7.ebuild 6688 RMD160 5c57867c8498b778276c309c952c255837e47768 SHA1 4ca5c18d31ff9c44f54b86c91a25b22ae79d7f57 SHA256 314a03d9661575249b989f5bcf79bef4c6d72ab6624b5b5ce8f575ae6f0db4be
MISC samba-9999.ebuild.old_svn 8339 RMD160 863bcbf1d8ebec56ae70eb428d1c99d1567ff2e3 SHA1 dfbcadc3241baaac7c9aea62d72ecae5924a0d3d SHA256 132bba6308140f951bae6d5e7860e40a212de58708ff3a7053045d5ba0656469

View File

@ -14,51 +14,26 @@ SRC_URI="mirror://samba/samba4/${MY_P}.tar.gz
LICENSE="GPL-3 oav? ( GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
IUSE="acl ads async automount caps cups debug doc examples ipv6 kernel_linux ldap fam
pam quotas readline selinux swat syslog winbind oav"
IUSE="caps debug developer doc dso examples gnutls ldap python swat"
RDEPEND="dev-libs/popt
virtual/libiconv
acl? ( kernel_linux? ( sys-apps/acl ) )
cups? ( net-print/cups )
ipv6? ( sys-apps/xinetd )
ads? ( virtual/krb5 )
ldap? ( net-nds/openldap )
pam? ( virtual/pam )
readline? ( sys-libs/readline )
selinux? ( sec-policy/selinux-samba )
gnutls? ( >=net-libs/gnutls-2.0 )
ldap? ( >=net-nds/openldap-2.4.15 )
swat? ( sys-apps/xinetd )
syslog? ( virtual/logger )
fam? ( virtual/fam )
caps? ( sys-libs/libcap )"
DEPEND="${RDEPEND}"
# Tests are broken now :-(
RESTRICT="test nomirror"
RESTRICT="nomirror"
S=${WORKDIR}/${MY_P}
CONFDIR=${FILESDIR}/config
CONFDIR=${FILESDIR}/config-4.0
PRIVATE_DST=/var/lib/samba/private
pkg_setup() {
confutils_use_depend_all ads ldap
}
src_unpack() {
unpack ${A}
cd "${S}/source4"
# lazyldflags.patch: adds "-Wl,-z,now" to smb{mnt,umount}
# invalid-free-fix.patch: Bug #196015 (upstream: #5021)
#epatch \
# "${FILESDIR}/3.0.26a-lazyldflags.patch" \
# "${FILESDIR}/3.0.26a-invalid-free-fix.patch" \
# "${FILESDIR}/3.0.28-fix_broken_readdir_detection.patch" \
# "${FILESDIR}/3.0.28a-wrong_python_ldflags.patch"
#eautoconf -I. -Ilib/replace
# Ok, agreed, this is ugly. But it avoids a patch we
# need for every samba version and we don't need autotools
sed -i \
@ -66,29 +41,12 @@ src_unpack() {
-e 's|if test -d "$i/$l" ;|if test -d "$i/$l" -o -L "$i/$l";|' \
configure || die "sed failed"
rm "${S}/docs/manpages"/{mount,umount}.cifs.8
}
src_compile() {
cd "${S}/source4"
local myconf
local mylangs
local mymod_shared
python_version
myconf="--with-python=no"
use python && myconf="--with-python=${python}"
use winbind && mymod_shared="--with-shared-modules=idmap_rid"
if use ldap ; then
myconf="${myconf} $(use_with ads)"
use winbind && mymod_shared="${mymod_shared},idmap_ad"
fi
[[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
use hppa && myconf="${myconf} --disable-pie"
use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
@ -100,36 +58,21 @@ src_compile() {
fi
econf \
--with-fhs \
--sysconfdir=/etc/samba \
--localstatedir=/var \
--with-configdir=/etc/samba \
--with-libdir=/usr/$(get_libdir)/samba \
--with-pammodulesdir=$(getpam_mod_dir) \
--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 \
--enable-socket-wrapper \
--with-cifsmount=no \
--enable-automatic-dependencies \
--enable-fhs \
$(use_with acl acl-support) \
$(use_with async aio-support) \
$(use_with automount) \
$(use_enable cups) \
--enable-socket-wrapper \
$(use_with pthreads) \
$(use_enable gnutls) \
$(use_enable debug) \
$(use_enable fam) \
$(use_with ads krb5) \
$(use_with ldap) \
$(use_with pam) $(use_with pam pam_smbpass) \
$(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}
$(use_enable developer) \
$(use_enable dso) \
${myconf}
emake proto || die "emake proto failed"
emake everything || die "emake everything failed"
@ -144,7 +87,6 @@ src_compile() {
# setting to builtin to disable auto-detection
cd "${WORKDIR}/${VSCAN_P}"
econf \
--with-fhs \
--with-samba-source="${S}/source4" \
--with-libmksd-builtin \
--with-libkavdc-builtin \
@ -175,52 +117,17 @@ src_install() {
# remove .old stuff from /usr/bin:
rm -f "${D}"/usr/bin/*.old
# Removing executable bits from header-files
fperms 644 /usr/include/lib{msrpc,smbclient}.h
# Nsswitch extensions. Make link for wins and winbind resolvers
if use winbind ; then
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
if use kernel_linux ; then
# Warning: this can byte you if /usr is
# on a separate volume and you have to mount
# a smb volume before the local mount
dosym ../usr/bin/smbmount /sbin/mount.smbfs
fperms 4755 /usr/bin/smbmnt
fperms 4755 /usr/bin/smbumount
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
if use python ; then
emake DESTDIR="${D}" python_install || die "emake installpython failed"
# We're doing that manually
find "${D}/usr/$(get_libdir)/python${PYVER}/site-packages" -iname "*.pyc" -delete
fi
cd "${S}/source4"
# General config files
insinto /etc/samba
doins "${CONFDIR}"/{smbusers,lmhosts}
newins "${CONFDIR}/smb.conf.example-samba3" smb.conf.example
newins "${CONFDIR}/smb.conf.example" smb.conf.example
newpamd "${CONFDIR}/samba.pam" samba
use winbind && dopamd "${CONFDIR}/system-auth-winbind"
if use swat ; then
insinto /etc/xinetd.d
newins "${CONFDIR}/swat.xinetd" swat
@ -229,18 +136,8 @@ src_install() {
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 "${S}/examples/LDAP/samba.schema"
fi
if use ipv6 ; then
insinto /etc/xinetd.d
newins "${FILESDIR}/samba-xinetd" smb
fi
newinitd "${CONFDIR}/samba-init" samba
newconfd "${CONFDIR}/samba-conf" samba
# dirs
diropts -m0700 ; keepdir "${PRIVATE_DST}"
@ -256,7 +153,6 @@ src_install() {
dodoc "${FILESDIR}/README.gentoo"
dodoc "${S}"/{MAINTAINERS,README,Roadmap,WHATSNEW.txt}
dodoc "${CONFDIR}/nsswitch.conf-wins"
use winbind && dodoc "${CONFDIR}/nsswitch.conf-winbind"
if use examples ; then
insinto /usr/share/doc/${PF}
@ -269,6 +165,9 @@ src_install() {
fi
fi
insinto /usr/share/${PN}/setup
doins -r setup
if ! use doc ; then
if ! use swat ; then
rm -rf "${D}/usr/share/doc/${PF}/swat"
@ -319,27 +218,21 @@ pkg_postinst() {
einfo " change the /etc/xinetd.d/swat configuration"
fi
if use ipv6 ; then
einfo "ipv6 support must be enabled by xinetd:"
einfo " change the /etc/xinetd.d/smb configuration"
fi
elog "It is possible to start/stop daemons separately:"
elog " Create a symlink from /etc/init.d/samba.{smbd,nmbd,winbind} to"
elog " /etc/init.d/samba. Calling /etc/init.d/samba directly will start"
elog " the daemons configured in /etc/conf.d/samba"
elog "The mount/umount.cifs helper applications are not included anymore."
elog "Please install net-fs/mount-cifs instead."
elog "Specialized mount/umount.cifs helper applications are not yet available for"
elog "Samba 4.0."
elog "You may try to install net-fs/mount-cifs at your own risk."
if use oav ; then
elog "The configure snippets for various antivirus plugins are available here:"
elog " /usr/share/doc/${PF}/samba-vscan"
fi
ewarn "If you're upgrading from 3.0.24 or earlier, please make sure to"
ewarn "restart your clients to clear any cached information about the server."
ewarn "Otherwise they might not be able to connect to the volumes."
elog "The provision helper scripts for setting up LDAP backends, etc. are installed"
elog "/usr/share/samba/setup."
ewarn "If you're upgrading from 3.x.x, make sure to read the information on the"
ewarn "SambaWiki [http://wiki.samba.org/index.php/Samba4] to make yourself familiar"
ewarn "with the status of Samba 4 and the various differences to the 3.x branch."
}
pkg_postrm() {