# $Id$ PNAME="efivar" PVER="37" PBUILD="r1" PCAT="sys-apps" DESCRIPTION="Tools and library to manipulate EFI variables." HOMEPAGE="https://github.com/rhinstaller/efivar" DEPEND=">= dev-libs/popt-1.16" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools rpath SRC_URI=( #https://github.com/rhboot/${PNAME}/archive/${SRCFILE} https://github.com/rhboot/${PNAME}/releases/download/${PVER}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd https://github.com/rhboot/${PNAME}/releases | highesttarball" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # no optimizations #sed 's:-O0:-Os:g' -i Make.defaults || die # fix rpath #sed 's:-rpath,$(TOPDIR)/src:-rpath,$(libdir):g' -i src/test/Makefile || die } src_compile() { cd ${SRCDIR} maddflag CFLAGS "-flto" || die export CFLAGS # not parallel safe mmake -j1 V=1 libdir="/usr/$(mlibdir)/" bindir="/usr/bin/" mandir="/usr/share/man/" includedir="/usr/include/" || die mmake -j1 V=1 -C src/test libdir="/usr/$(mlibdir)/" bindir="/usr/bin/" mandir="/usr/share/man/" includedir="/usr/include/" || die } src_install() { cd ${SRCDIR} mmake -j1 V=1 DESTDIR=${BINDIR} libdir="/usr/$(mlibdir)/" bindir="/usr/bin/" mandir="/usr/share/man/" includedir="/usr/include/" install || die minstalldir /usr/bin || die minstallexec src/test/tester /usr/bin/efivar-tester || die # remove rpath mdeleterpath || die minstalldocs AUTHORS COPYING README* TODO || die }