uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,45 @@
From 428c6e0eb604b63a67fda6af445c10c8ae3c1826 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg@phi-gamma.net>
Date: Sun, 27 Jan 2019 21:37:13 +0100
Subject: [PATCH] makefile: fix installation
- comment hard-coded $(CC)
- avoid full paths during install
- set proper permissions
---
Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 9268c6f..0797579 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ MW=-Wformat -Werror=format-security -Wall
CFLAGS1 = -Wall -Wstrict-prototypes -s -O2 -fomit-frame-pointer -Wno-unused-result $(LARGEFILEFLAGS) $(MW)
-CC=gcc
+#CC=gcc
# also using contents of usin CPPFLAGS, CFLAGS, LDFLAGS out of environment
# variables, if they exist
@@ -94,9 +94,14 @@ clean:
rm -f regtest/statsize regtest/statsize64
cd regtest; /bin/sh regtest.clean
+ifndef DESTDIR
+install:
+ $(error Please specify install prefix as $$DESTDIR)
+else
install: afio
- cp afio /usr/local/bin
- cp afio.1 /usr/share/man/man1
+ install -Dm755 afio $(DESTDIR)/bin/afio
+ install -Dm644 afio.1 $(DESTDIR)/share/man/man1/afio.1
+endif
# generate default list of -E extensions from manpage
# note: on sun, I had to change awk command below to nawk or gawk
--
2.18.1

View file

@ -0,0 +1,33 @@
{ lib, stdenv, fetchFromGitHub } :
stdenv.mkDerivation rec {
version = "2.5.2";
pname = "afio";
src = fetchFromGitHub {
owner = "kholtman";
repo = "afio";
rev = "v${version}";
sha256 = "1vbxl66r5rp5a1qssjrkfsjqjjgld1cq57c871gd0m4qiq9rmcfy";
};
/*
* A patch to simplify the installation and for removing the
* hard coded dependency on GCC.
*/
patches = [ ./0001-makefile-fix-installation.patch ];
installFlags = [ "DESTDIR=$(out)" ];
meta = {
homepage = "https://github.com/kholtman/afio";
description = "Fault tolerant cpio archiver targeting backups";
platforms = lib.platforms.all;
/*
* Licensing is complicated due to the age of the code base, but
* generally free. See the file ``afio_license_issues_v5.txt`` for
* a comprehensive discussion.
*/
license = lib.licenses.free;
};
}