# $Id$ PNAME="samba" PVER="3.5.9" PBUILD="r2" PCATEGORIE="net-fs" DESCRIPTION="Samba provides seamless file and print services to SMB/CIFS clients." HOMEPAGE="http://www.samba.org" DEPEND=">= virtual/glibc >= dev-libs/popt-1.16 >= sys-libs/ncurses-5.9" SDEPEND=">= sys-dev/automake-4 >= sys-dev/autoconf-5 >= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" FILESDIR="${SOURCEDIR}/samba" ALX_ONLY_KEEP="etc/samba/smb.conf etc/rc.d/init.d/nmbd usr/bin/net usr/sbin/nmbd var/run/samba var/cache/samba var/lib/samba" REMOVE_DEPRECATED_MAGE_TARGETS=1 sminclude mtools alx-split SRC_URI=( http://us1.samba.org/samba/ftp/stable/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd http://ftp.samba.org/pub/samba | grep ${PNAME}-[0-9].* | lasttarball gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # examples: to be copied as docs rm -rf ${SRCDIR}/examples.ORIG || die # add our vendor suffix sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die cd ${SRCDIR}/source3 sh script/mkversion.sh || die # compilation fix # (u)mount.cifs is broken; missing include/version.h header ln -snf ../include ${SRCDIR}/source3/client || die } src_compile() { cd ${SRCDIR}/source3 # remove swat completely now; since we have no httpd server yet # if really needed we make an extra package to save diskspace # --disable-swat option is there, no patches needed anymore ;) mconfigure \ --with-fhs \ --sysconfdir=/etc/samba \ --localstatedir=/var \ --with-configdir=/etc/samba \ --libdir=/usr/$(mlibdir)/samba \ --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \ --with-piddir=/var/run/samba \ --with-lockdir=/var/cache/samba \ --with-logfilebase=/var/log/samba \ --with-privatedir=/var/lib/samba/private \ --enable-shared-libs \ --without-cifsmount \ --without-automount \ --without-libsmbclient \ --without-syslog \ --without-acl-support \ --disable-cups \ --without-krb5 \ --without-ldap \ --without-readline \ --without-winbind \ --without-pam \ --without-pam_smbpass \ --without-quotas \ --without-sys-quotas \ --disable-swat \ --disable-avahi \ --disable-developer \ --disable-dmalloc \ || die mmake proto || die mmake everything || die } alx_generic_src_install() { cd ${SRCDIR}/source3 # needed directories by samba at runtime mkeepdir /var/run/samba || die mkeepdir /var/lib/samba || die mkeepdir /var/cache/samba || die make DESTDIR=${BINDIR} install-everything || die # if exist remove *.old binaries if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]] then for i in ${BINDIR}/usr/bin/*.old do [[ -e ${i} ]] && rm -f ${i} || die done fi # our initscript minstalldir /etc/rc.d/init.d/|| die mcinjectexec nmbd.rc /etc/rc.d/init.d/nmbd || die # create a mininmal configuration to get nmbd working minstalldir /etc/samba || die echo '[global]' > ${BINDIR}/etc/samba/smb.conf || die echo 'workgroup = WORKGROUP' >> ${BINDIR}/etc/samba/smb.conf || die echo '#netbios name = ' >> ${BINDIR}/etc/samba/smb.conf || die echo 'dns proxy = no' >> ${BINDIR}/etc/samba/smb.conf || die # other docs cd ${SRCDIR} minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die } postinstall() { mstartservice nmbd } postremove() { mstopservice nmbd }