# $Header: /magellan-cvs/smage/newt/newt-0.52.9-r1.smage2,v 1.1 2008/04/09 21:37:28 niro Exp $ PNAME="newt" PVER="0.52.10" PBUILD="r1" PCATEGORIE="dev-libs" STATE="unstable" DESCRIPTION="Redhat's Newt windowing toolkit development files." HOMEPAGE="https://fedorahosted.org/newt/" DEPEND=">= sys-libs/slang-2.1 >= dev-libs/popt-1.14 >= dev-lang/python-2.6" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" # get python version -> ex 2.4 sminclude python SRC_URI=( https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/ | lasttarball gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix libdir sed -i "s:\(libdir =\).*:\1 \$(prefix)/$(mlibdir):g" Makefile.in || die # use DESTDIR instead of instroot sed -i 's:instroot:DESTDIR:g' ${SRCDIR}/Makefile.in || die } src_compile() { cd ${SRCDIR} mconfigure || die mmake -j1 PYTHONVERS=python$(get_python_version) RPM_OPT_FLAGS="${CFLAGS}" || die } src_install() { cd ${SRCDIR} # the RPM_OPT_FLAGS="ERROR" is there to catch a build error # if it fails, that means something in src_compile() didn't build properly make DESTDIR=${BINDIR} PYTHONVERS=python$(get_python_version) RPM_OPT_FLAGS=ERROR install || die minstalldocs CHANGES COPYING peanuts.py popcorn.py tutorial.sgml || die }