From 033048637168e2db76a134caa76d6e420a00a6fa Mon Sep 17 00:00:00 2001 From: maxice8 Date: Mon, 12 Feb 2018 15:06:01 -0200 Subject: [PATCH] New package: fwupdate-10. --- common/shlibs | 1 + srcpkgs/fwupdate-devel | 1 + srcpkgs/fwupdate/INSTALL.msg | 4 +++ srcpkgs/fwupdate/patches/musl-strndupa.patch | 18 ++++++++++ srcpkgs/fwupdate/template | 38 ++++++++++++++++++++ 5 files changed, 62 insertions(+) create mode 120000 srcpkgs/fwupdate-devel create mode 100644 srcpkgs/fwupdate/INSTALL.msg create mode 100644 srcpkgs/fwupdate/patches/musl-strndupa.patch create mode 100644 srcpkgs/fwupdate/template diff --git a/common/shlibs b/common/shlibs index a574fc499f8..c24fccf1aa1 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3123,3 +3123,4 @@ libwayland-egl++.so.0.2 libwaylandpp-2.2.0_1 libwayland-client++.so.0.2 libwaylandpp-2.2.0_1 libwayland-cursor++.so.0.2 libwaylandpp-2.2.0_1 libwayland-client-extra++.so.0.2 libwaylandpp-2.2.0_1 +libfwup.so.1 fwupdate-10_1 diff --git a/srcpkgs/fwupdate-devel b/srcpkgs/fwupdate-devel new file mode 120000 index 00000000000..4e8c1ec30d6 --- /dev/null +++ b/srcpkgs/fwupdate-devel @@ -0,0 +1 @@ +fwupdate \ No newline at end of file diff --git a/srcpkgs/fwupdate/INSTALL.msg b/srcpkgs/fwupdate/INSTALL.msg new file mode 100644 index 00000000000..0116decaa53 --- /dev/null +++ b/srcpkgs/fwupdate/INSTALL.msg @@ -0,0 +1,4 @@ + +TO use the EFI firmware update executable, copy the /usr/lib/fwupdate/EFI +folder to your EFI partition + diff --git a/srcpkgs/fwupdate/patches/musl-strndupa.patch b/srcpkgs/fwupdate/patches/musl-strndupa.patch new file mode 100644 index 00000000000..3e487113f71 --- /dev/null +++ b/srcpkgs/fwupdate/patches/musl-strndupa.patch @@ -0,0 +1,18 @@ +--- linux/libfwup.c ++++ linux/libfwup.c +@@ -30,6 +30,15 @@ + #include "ucs2.h" + #include "fwup-efi.h" + ++#ifndef strndupa ++#define strndupa(s, n) \ ++ (__extension__ ({const char *__in = (s); \ ++ size_t __len = strnlen (__in, (n)) + 1; \ ++ char *__out = (char *) alloca (__len); \ ++ __out[__len-1] = '\0'; \ ++ (char *) memcpy (__out, __in, __len-1);})) ++#endif ++ + static int verbose; + #include "error.h" + diff --git a/srcpkgs/fwupdate/template b/srcpkgs/fwupdate/template new file mode 100644 index 00000000000..4c4a3605b92 --- /dev/null +++ b/srcpkgs/fwupdate/template @@ -0,0 +1,38 @@ +# Template file for 'fwupdate' +pkgname=fwupdate +version=10 +revision=1 +build_style=gnu-makefile +hostmakedepends="pkg-config" +makedepends="popt-devel libefivar-devel gnu-efi-libs elfutils-devel" +short_desc="Tool for using the ESRT and UpdateCapsule() to apply firmware updates" +maintainer="maxice8 " +license="GPL-2" +homepage="https://github.com/rhboot/fwupdate" +distfiles="https://github.com/rhboot/fwupdate/releases/download/${version}/fwupdate-${version}.tar.bz2" +checksum=73f42c6097049ab4490e88bd7742ac962f892e6660ee2af40254605d011ef33a +make_build_args="EFIDIR=void GNUEFIDIR=/usr/lib" +make_install_args="EFIDIR=void LIBDIR=/usr/lib" + +case "$XBPS_TARGET_MACHINE" in + x86_64|i686) makedepends+=" libsmbios-devel" ;; +esac + +post_install() { + vmkdir usr/lib/fwupdate + mv "${DESTDIR}"/boot/efi/EFI "${DESTDIR}"/usr/lib/fwupdate/EFI + rm -rf "${DESTDIR}"/boot + rm -rf "${DESTDIR}"/usr/src + rm -rf "${DESTDIR}"/usr/lib/debug + rm -rf "${DESTDIR}"/usr/lib/systemd +} + +fwupdate-devel_package() { + depends="${sourcepkg}-${version}_${revision} libefivar-devel" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +}