# $Id$ PNAME="xfsprogs" PVER="3.0.3" PBUILD="r1" PCATEGORIE="sys-fs" STATE="unstable" DESCRIPTION="Administration and debugging tools for the XFS file system." HOMEPAGE="http://oss.sgi.com/projects/xfs/" DEPEND=">= virtual/glibc >= sys-fs/e2fsprogs-1.41" SDEPEND=">= sys-dev/gettext-0.17 >= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( ftp://oss.sgi.com/projects/xfs/cmd_tars/${SRCFILE} ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) #UP2DATE="updatecmd ftp://oss.sgi.com/projects/xfs/cmd_tars | grep ${PNAME} | sed -n 's/.*_\(.*\)-[0-9]\..*/\1/;$ p'" UP2DATE="updatecmd ftp://oss.sgi.com/projects/xfs/cmd_tars | grep ${PNAME} | lasttarball gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix CFLAGS and some install pathes sed -i "/^PKG_DOC_DIR/s:=.*:= /usr/share/doc/${PNAME}-${PVER}:" \ include/builddefs.in || die # extreme dirty fix: # it complains always about: # libtool: compile: unable to infer tagged configuration # libtool: compile: specify a tag with `--tag' # make: *** [parser.o] Error 1 # # to fix that we set the needed tag to libtool: # --tag=CXX # sed -i '/^LIBTOOL/s:=.*:= @LIBTOOL@ --tag=CXX:g' \ # include/builddefs.in || die # create configure scripts mlibtoolize || die autoconf --force || die } src_compile() { cd ${SRCDIR} # enable CFLAGS export OPTIMIZER="${CFLAGS}" # disable debug code export DEBUG=-DNDEBUG mconfigure \ --bindir=/bin \ --sbindir=/sbin \ --libexecdir=/$(mlibdir) \ --enable-gettext \ || die mmake || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/$(mlibdir) || die make DIST_ROOT=${BINDIR} \ DK_INC_DIR=${BINDIR}/usr/include/disk \ install install-dev \ || die # missing link mlink /$(mlibdir)/libhandle.so.1 /$(mlibdir)/libhandle.so || die # fix .la file sed -e 's:installed=no:installed=yes:g' \ libhandle/.libs/libhandle.la \ > ${BINDIR}/usr/$(mlibdir)/libhandle.la \ || die # move static lib to /usr/lib mv ${BINDIR}/$(mlibdir)/*.a ${BINDIR}/usr/$(mlibdir)/ || die # we want compressed docs rm -rf ${BINDIR}/usr/share/doc || die # prune unneeded docs rm doc/{CHANGES.gz,INSTALL,Makefile} || die # sometime /var/tmp exist, remove it, to keep the right permissions [[ -d ${BINDIR}/var ]] && rm -rf ${BINDIR}/var minstalldocs doc/* || die }