# $Header: /home/cvsd/magellan-cvs/magellan-src/toolchain/toolchain-rsync/toolchain-rsync-2.6.4-r1.smage2,v 1.1 2005-07-04 00:41:38 niro Exp $ PNAME="toolchain-rsync" PVER="2.6.4" PBUILD="r1" SRCFILE="rsync-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/rsync-${PVER}" SRC_URI=( mirror://rsync/${SRCFILE} ) ## global toolchain var ## # export CFLAGS, CHOST, TOOLCHAIN_PREFIX export CFLAGS="-mtune=i486 -Os -pipe" export CXXFLAGS="${CFLAGS}" export TOOLCHAIN_PREFIX="/tools" zapmost() { local rootdir rootdir="${1}/" [ ! -e "$rootdir" ] && echo "zapmost: $rootdir not found; skipping..." && return 1 install -d ${BUILDDIR}/zap local dirs shift local x for x in ${*} do if [ "${x##*/}" = "${x}" ] then #one deep mv ${rootdir}${x} ${BUILDDIR}/zap else #more than one deep; create intermediate directories dirs=${x%/*} install -d ${BUILDDIR}/zap/${dirs} mv ${rootdir}${x} ${BUILDDIR}/zap/${x} fi done rm -rf ${rootdir}* mv ${BUILDDIR}/zap/* ${rootdir} } src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # change confdir to /etc/rsync rather than just /etc # (the --sysconfdir configure option doesn't work) sed -i 's|/etc/rsyncd.conf|/etc/rsync/rsyncd.conf|g' \ ${SRCDIR}/rsync.h || die # yes, updating the man page is very important sed -i 's|/etc/rsyncd|/etc/rsync/rsyncd|g' \ ${SRCDIR}/rsyncd.conf.5 || die } src_compile() { cd ${SRCDIR} # we want not hassle with libpopt dependencies # so we used with rsync bundled popt library ./configure \ --host=${CHOST} \ --prefix=${TOOLCHAIN_PREFIX} \ --with-rsh=ssh \ --with-included-popt \ --disable-nls \ || die mmake || die } src_install() { cd ${SRCDIR} make DESTDIR=${BINDIR} install || die # remove unwanted stuff KEEPFILES="bin/rsync" zapmost ${BINDIR}/${TOOLCHAIN_PREFIX} ${KEEPFILES} || die }