summaryrefslogtreecommitdiff
path: root/sysutils/fwupd-efi/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/fwupd-efi/Makefile')
-rw-r--r--sysutils/fwupd-efi/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/sysutils/fwupd-efi/Makefile b/sysutils/fwupd-efi/Makefile
new file mode 100644
index 000000000000..2dcbb12f1e69
--- /dev/null
+++ b/sysutils/fwupd-efi/Makefile
@@ -0,0 +1,45 @@
+PORTNAME= fwupd-efi
+DISTVERSION= 1.8
+PORTREVISION= 1
+CATEGORIES= sysutils
+
+MAINTAINER= decke@FreeBSD.org
+COMMENT= EFI Application used by uefi-capsule plugin in fwupd
+WWW= https://fwupd.org/
+
+LICENSE= LGPL21
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libgnuefi.a:devel/gnu-efi \
+ ${PYTHON_PKGNAMEPREFIX}pefile>0:devel/py-pefile@${PY_FLAVOR}
+
+USES= meson pkgconfig python shebangfix
+USE_GITHUB= yes
+GH_ACCOUNT= fwupd
+
+USE_GCC= yes
+SHEBANG_GLOB= *.py
+
+MESON_ARGS= -Defi-includedir=${LOCALBASE}/include/efi \
+ -Defi-ldsdir=${LOCALBASE}/lib \
+ -Dgenpeimg=disabled \
+ -Dpython=${PYTHON_CMD}
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == amd64
+FW_ARCH="x64"
+.elif ${ARCH} == i386
+FW_ARCH="ia32"
+.else
+FW_ARCH=${ARCH}
+.endif
+
+PLIST_FILES= libdata/pkgconfig/fwupd-efi.pc \
+ libexec/fwupd/efi/fwupd${FW_ARCH}.efi
+
+post-patch:
+ # use objcopy from binutils because GNU specific flags are used
+ @${REINPLACE_CMD} "s|find_program('objcopy')|find_program('${LOCALBASE}/bin/objcopy')|g" \
+ ${WRKSRC}/meson.build
+
+.include <bsd.port.post.mk>