summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timo Gurr <tgurr@exherbo.org> 2017-05-26 15:11:54 +0200
committerAvatar Timo Gurr <tgurr@exherbo.org> 2017-05-29 11:01:29 +0200
commit736b8d1de365be0566c8bb283b8ea8ded0219072 (patch)
tree7850cf96860973f1bf3fbeb11320a0b60446fe37
parent428ca1291a7c0e41a7fc120d002b4109cb7fd8ad (diff)
downloadhardware-736b8d1de365be0566c8bb283b8ea8ded0219072.tar.gz
hardware-736b8d1de365be0566c8bb283b8ea8ded0219072.tar.xz
fwupdate: initial exheres
Change-Id: Id0f78f742c4dcd24c47f3b9056e356fef7167694 Reviewed-on: https://galileo.mailstation.de/gerrit/9148 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Timo Gurr <tgurr@exherbo.org>
-rw-r--r--packages/sys-apps/fwupdate/files/fwupdate-8-pkgconfig.patch40
-rw-r--r--packages/sys-apps/fwupdate/fwupdate-8.exheres-063
2 files changed, 103 insertions, 0 deletions
diff --git a/packages/sys-apps/fwupdate/files/fwupdate-8-pkgconfig.patch b/packages/sys-apps/fwupdate/files/fwupdate-8-pkgconfig.patch
new file mode 100644
index 0000000..4ca3d02
--- /dev/null
+++ b/packages/sys-apps/fwupdate/files/fwupdate-8-pkgconfig.patch
@@ -0,0 +1,40 @@
+Source: Timo Gurr <tgurr@exherbo.org>
+Upstream: TODO
+Reason: Prefixed pkg-config
+
+diff -Naur fwupdate-9/linux/Makefile fwupdate-9.new/linux/Makefile
+--- fwupdate-9/linux/Makefile 2017-03-06 21:36:55.000000000 +0100
++++ fwupdate-9.new/linux/Makefile 2017-05-26 14:32:40.105956252 +0200
+@@ -18,11 +18,11 @@
+ PJONES =
+ BIN_CCLDFLAGS = $(foreach lib,$(BIN_LIBS),-l$(lib)) \
+ $(foreach pklib,$(PKLIBS), \
+- $(shell pkg-config --libs-only-l --libs-only-other $(pklib))) \
++ $(shell $(PKG_CONFIG) --libs-only-l --libs-only-other $(pklib))) \
+ $(LDFLAGS) -pie -fPIE -Wl,-z,relro,-z,now -L.
+ LIB_CCLDFLAGS = $(foreach lib,$(LIB_LIBS),-l$(lib)) \
+ $(foreach pklib,$(PKLIBS), \
+- $(shell pkg-config --libs-only-l --libs-only-other $(pklib))) \
++ $(shell $(PKG_CONFIG) --libs-only-l --libs-only-other $(pklib))) \
+ $(LDFLAGS) -shared -fPIC -Wl,-z,relro,-z,now
+
+ ifeq ($(HAVE_LIBSMBIOS),yes)
+@@ -36,7 +36,7 @@
+ -DLOCALEDIR=\"$(localedir)\" -D_GNU_SOURCE \
+ -DFWUP_EFI_DIR_NAME=\"$(EFIDIR)\" \
+ -I$(TOPDIR)/linux/include -iquote$(TOPDIR)/include/ \
+- $(foreach pklib,$(PKLIBS), $(shell pkg-config --cflags $(pklib))) \
++ $(foreach pklib,$(PKLIBS), $(shell $(PKG_CONFIG) --cflags $(pklib))) \
+ $(PJONES)
+
+ BINTARGETS=fwupdate
+diff -Naur fwupdate-9/Make.defaults fwupdate-9.new/Make.defaults
+--- fwupdate-9/Make.defaults 2017-03-06 21:36:55.000000000 +0100
++++ fwupdate-9.new/Make.defaults 2017-05-26 14:32:08.907457810 +0200
+@@ -1,5 +1,6 @@
+ INSTALL ?= install
+ MAKE ?= make
++PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
+ CC = $(CROSS_COMPILE)gcc
+ LD = $(CROSS_COMPILE)ld
+ OBJCOPY = $(CROSS_COMPILE)objcopy
diff --git a/packages/sys-apps/fwupdate/fwupdate-8.exheres-0 b/packages/sys-apps/fwupdate/fwupdate-8.exheres-0
new file mode 100644
index 0000000..b97fe09
--- /dev/null
+++ b/packages/sys-apps/fwupdate/fwupdate-8.exheres-0
@@ -0,0 +1,63 @@
+# Copyright 2017 Timo Gurr <tgurr@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require github [ user=rhinstaller release=${PV} suffix=tar.bz2 ]
+
+SUMMARY="Tools for using the ESRT and UpdateCapsule() to apply firmware updates"
+
+LICENCES="GPL-2"
+SLOT="0"
+PLATFORMS="~amd64"
+MYOPTIONS=""
+
+DEPENDENCIES="
+ build:
+ virtual/pkg-config
+ build+run:
+ dev-libs/popt
+ sys-apps/libsmbios
+ sys-boot/efivar
+ sys-boot/gnu-efi
+"
+
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/${PN}-8-pkgconfig.patch
+)
+
+DEFAULT_SRC_COMPILE_PARAMS=(
+ CROSS_COMPILE=$(exhost --tool-prefix)
+ EFIDIR="exherbo"
+ GNUEFIDIR="/usr/$(exhost --target)/lib"
+)
+
+DEFAULT_SRC_INSTALL_PARAMS=(
+ CROSS_COMPILE=$(exhost --tool-prefix)
+ EFIDIR="exherbo"
+ GNUEFIDIR="/usr/$(exhost --target)/lib"
+ prefix="/usr/$(exhost --target)/"
+ libdir="/usr/$(exhost --target)/lib"
+ datadir="/usr/share/"
+ mandir="/usr/share/man/"
+)
+
+src_test() {
+ :
+}
+
+src_install() {
+ default
+
+ edo rmdir "${IMAGE}"/boot/efi/EFI/exherbo/fw
+ edo rmdir "${IMAGE}"/usr/share/fwupdate
+
+ edo mv "${IMAGE}"/boot "${IMAGE}"/usr/share/doc/${PNVR}/boot
+
+ edo rm -r "${IMAGE}"/usr/$(exhost --target)/lib/debug/.build-id
+ edo rm -r "${IMAGE}"/usr/$(exhost --target)/src
+}
+
+pkg_postinst() {
+ elog "Copy the file /usr/share/doc/${PNVR}/boot/efi/EFI/exherbo/fwupx64.efi to"
+ elog "/boot/efi/EFI/exherbo and create a /boot/efi/EFI/exherbo/fw directory."
+}
+