fwupdate: 10 -> 12 (#44710)
This commit is contained in:
parent
90ed75d522
commit
85d5d71444
2 changed files with 2 additions and 120 deletions
|
@ -1,16 +1,14 @@
|
|||
{ efivar, fetchurl, gettext, gnu-efi, libsmbios, pkgconfig, popt, stdenv }:
|
||||
let
|
||||
version = "10";
|
||||
version = "12";
|
||||
in stdenv.mkDerivation {
|
||||
name = "fwupdate-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/rhinstaller/fwupdate/releases/download/${version}/fwupdate-${version}.tar.bz2";
|
||||
sha256 = "0fpk3q0msq2l0bs2mvk0cqp8jbwnmi17ggc81r4v96h4jxh2rx3k";
|
||||
sha256 = "00w7jsg7wrlq4cpfz26m9rbv2jwyf0sansf343vfq02fy5lxars1";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/rhboot/fwupdate/pull/99
|
||||
./fix-paths.patch
|
||||
./do-not-create-sharedstatedir.patch
|
||||
];
|
||||
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
--- a/Make.defaults
|
||||
+++ b/Make.defaults
|
||||
@@ -18,19 +18,20 @@
|
||||
ABIDIFF := abidiff
|
||||
ABIDW := abidw
|
||||
prefix ?= /usr/
|
||||
-prefix := $(abspath $(prefix))/
|
||||
+prefix := $(abspath $(prefix))
|
||||
+exec_prefix ?= $(prefix)
|
||||
ARCH = $(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
|
||||
ifeq ($(ARCH),x86_64)
|
||||
- LIBDIR ?= $(prefix)lib64
|
||||
+ LIBDIR ?= $(exec_prefix)/lib64
|
||||
endif
|
||||
ifeq ($(ARCH),ia32)
|
||||
- LIBDIR ?= $(prefix)lib
|
||||
+ LIBDIR ?= $(exec_prefix)/lib
|
||||
endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
- LIBDIR ?= $(prefix)lib64
|
||||
+ LIBDIR ?= $(exec_prefix)/lib64
|
||||
endif
|
||||
ifeq ($(ARCH),arm)
|
||||
- LIBDIR ?= $(prefix)lib
|
||||
+ LIBDIR ?= $(exec_prefix)/lib
|
||||
endif
|
||||
LIBDIR ?= unknown
|
||||
ifeq ($(LIBDIR),unknown)
|
||||
@@ -45,13 +46,13 @@
|
||||
GNUEFIDIR ?= $(LIBDIR)/gnuefi
|
||||
libdir ?= $(LIBDIR)
|
||||
pcdir ?= $(libdir)/pkgconfig
|
||||
-mandir ?= $(prefix)share/man
|
||||
-includedir ?= $(prefix)include
|
||||
-bindir ?= $(prefix)bin
|
||||
-datadir ?= $(prefix)share
|
||||
+mandir ?= $(prefix)/share/man
|
||||
+includedir ?= $(prefix)/include
|
||||
+bindir ?= $(exec_prefix)/bin
|
||||
+datadir ?= $(prefix)/share
|
||||
localedir ?= $(datadir)/locale
|
||||
-libexecdir ?= $(prefix)libexec
|
||||
-libdatadir ?= $(prefix)lib
|
||||
+libexecdir ?= $(exec_prefix)/libexec
|
||||
+libdatadir ?= $(exec_prefix)/lib
|
||||
sharedstatedir ?= /var/lib
|
||||
|
||||
EFIDIR ?= $(shell x=$$(which --skip-alias --skip-functions git 2>/dev/null) ; [ -n "$$x" ] && git config --get fwupdate.efidir)
|
||||
@@ -63,8 +64,8 @@
|
||||
ESPMOUNTPOINT = "/boot/efi"
|
||||
endif
|
||||
|
||||
-DEBUGINFO ?= $(prefix)lib/debug
|
||||
-DEBUGSOURCE ?= $(prefix)src/debug
|
||||
+DEBUGINFO ?= $(exec_prefix)/lib/debug
|
||||
+DEBUGSOURCE ?= $(prefix)/src/debug
|
||||
TARGETDIR ?= $(ESPMOUNTPOINT)/EFI/$(EFIDIR)
|
||||
|
||||
.PHONY: check_efidir_error
|
||||
--- a/linux/Makefile
|
||||
+++ b/linux/Makefile
|
||||
@@ -93,16 +93,19 @@
|
||||
sed -e "s,@@VERSION@@,$(VERSION),g" \
|
||||
-e "s,@@FWUP_MAJOR_VERSION@@,$(MAJOR_VERSION),g" \
|
||||
-e "s,@@FWUP_MINOR_VERSION@@,$(MINOR_VERSION),g" \
|
||||
+ -e "s,@@PREFIX@@,$(prefix),g" \
|
||||
+ -e "s,@@EXEC_PREFIX@@,$(exec_prefix),g" \
|
||||
-e "s,@@SHAREDSTATEDIR@@,$(sharedstatedir),g" \
|
||||
-e "s,@@ESPMOUNTPOINT@@,$(ESPMOUNTPOINT),g" \
|
||||
-e "s,@@EFIDIR@@,$(EFIDIR),g" \
|
||||
-e "s,@@LIBDIR@@,$(libdir),g" \
|
||||
-e "s,@@LIBEXECDIR@@,$(libexecdir),g" \
|
||||
+ -e "s,@@INCLUDEDIR@@,$(includedir),g" \
|
||||
$< > $@
|
||||
|
||||
tester : tester.c
|
||||
- $(CC) -Wall -Werror -ggdb -L. -I./include -I/usr/include/efivar \
|
||||
- -lefivar -lfwup -o $@ $^
|
||||
+ $(CC) -Wall -Werror -ggdb -L. -I./include $(shell $(PKG_CONFIG) --cflags efivar) \
|
||||
+ $(shell $(PKG_CONFIG) --libs efivar) -lfwup -o $@ $^
|
||||
|
||||
test : tester
|
||||
LD_LIBRARY_PATH=$(shell pwd) ./tester
|
||||
@@ -134,6 +137,6 @@
|
||||
$(INSTALL) -d -m 755 $(DESTDIR)$(libdatadir)/systemd/system
|
||||
$(INSTALL) -m 644 cleanup.service \
|
||||
$(DESTDIR)$(libdatadir)/systemd/system/fwupdate-cleanup.service
|
||||
- $(INSTALL) -d -m 755 $(DESTDIR)/usr/share/bash-completion/completions/
|
||||
+ $(INSTALL) -d -m 755 $(DESTDIR)$(datadir)/bash-completion/completions/
|
||||
$(INSTALL) -m 755 $(VPATH)/bash-completion \
|
||||
- $(DESTDIR)/usr/share/bash-completion/completions/fwupdate
|
||||
+ $(DESTDIR)$(datadir)/bash-completion/completions/fwupdate
|
||||
--- a/linux/fwup.pc.in
|
||||
+++ b/linux/fwup.pc.in
|
||||
@@ -1,7 +1,7 @@
|
||||
-prefix=/usr
|
||||
-exec_prefix=/usr
|
||||
+prefix=@@PREFIX@@
|
||||
+exec_prefix=@@EXEC_PREFIX@@
|
||||
libdir=@@LIBDIR@@
|
||||
-includedir=/usr/include
|
||||
+includedir=@@INCLUDEDIR@@
|
||||
|
||||
Name: fwup
|
||||
Description: Library for deployment of UEFI firmware updates.
|
||||
--- a/linux/libfwup.c
|
||||
+++ b/linux/libfwup.c
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <dell-wmi-smi.h>
|
||||
#ifdef FWUPDATE_HAVE_LIBSMBIOS__
|
||||
-#include </usr/include/smbios_c/token.h>
|
||||
+#include <smbios_c/token.h>
|
||||
#include <smbios_c/smi.h>
|
||||
#endif
|
||||
|
Loading…
Reference in a new issue