summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Lucas2018-08-12 15:39:05 -0400
committerJean Lucas2018-08-12 15:40:54 -0400
commitc5644673946bd621a15eb64e17bca18d945970d5 (patch)
tree8ca07f51851e15ff0a47c2078372419833944d59
downloadaur-fcode-utils.tar.gz
Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD33
-rw-r--r--fix-flags.patch52
3 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5dd26b7dd2f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Sun Aug 12 19:38:29 UTC 2018
+pkgbase = fcode-utils
+ pkgdesc = Utilities to process FCODE, OpenFirmware's byte code
+ pkgver = 1.0.2
+ pkgrel = 1
+ url = https://www.openfirmware.info/FCODE_suite
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = glibc
+ provides = romheaders
+ conflicts = fcode-utils-git
+ source = https://github.com/openbios/fcode-utils/archive/v1.0.2.tar.gz
+ source = fix-flags.patch
+ sha512sums = 103ae55c694d6d9bff41ff951d553ca221a74be6f334dc36f9de4310f7c71d663f8d73e7c8c80932a0a39f3e9cab4976cf1382a35d13267b3c61cdac2ba4f4f1
+ sha512sums = 0c37274bfa4cd37761eefc0fdd510e3935e653ba1828ece942651b03526960fc848d1a7b98259a1c1fe7cf85a8068aee46c848758a4225146c51599b6d7ee305
+
+pkgname = fcode-utils
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..27d0833bd37
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Jean Lucas <jean@4ray.co>
+
+pkgname=fcode-utils
+pkgver=1.0.2
+pkgrel=1
+pkgdesc="Utilities to process FCODE, OpenFirmware's byte code"
+arch=(i686 x86_64)
+url=https://www.openfirmware.info/FCODE_suite
+license=(GPL2)
+depends=(glibc)
+provides=(romheaders)
+conflicts=(fcode-utils-git)
+source=(https://github.com/openbios/fcode-utils/archive/v$pkgver.tar.gz
+ fix-flags.patch)
+sha512sums=('103ae55c694d6d9bff41ff951d553ca221a74be6f334dc36f9de4310f7c71d663f8d73e7c8c80932a0a39f3e9cab4976cf1382a35d13267b3c61cdac2ba4f4f1'
+ '0c37274bfa4cd37761eefc0fdd510e3935e653ba1828ece942651b03526960fc848d1a7b98259a1c1fe7cf85a8068aee46c848758a4225146c51599b6d7ee305')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -Np1 < "$srcdir"/fix-flags.patch
+}
+
+build() {
+ cd $pkgname-$pkgver
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ install -D detok/detok romheaders/romheaders toke/toke -t "$pkgdir"/usr/bin
+ install -Dm 644 README -t "$pkgdir"/usr/share/doc/fcode-utils
+ install -Dm 644 COPYING "$pkgdir"/usr/share/licenses/fcode-utils/LICENSE
+}
diff --git a/fix-flags.patch b/fix-flags.patch
new file mode 100644
index 00000000000..1a82fccf3ed
--- /dev/null
+++ b/fix-flags.patch
@@ -0,0 +1,52 @@
+diff --git a/detok/Makefile b/detok/Makefile
+index e7c7c04..284c509 100644
+--- a/detok/Makefile
++++ b/detok/Makefile
+@@ -29,8 +29,8 @@ STRIP = strip
+ INCLUDES = -I../shared
+
+ # Normal Flags:
+-CFLAGS = -O2 -Wall -Wno-pointer-sign
+-LDFLAGS =
++CFLAGS := $(CFLAGS) -Wall -Wno-pointer-sign
++LDFLAGS := $(LDFLAGS)
+
+ # Coverage:
+ #CFLAGS := $(CFLAGS) -fprofile-arcs -ftest-coverage
+diff --git a/romheaders/Makefile b/romheaders/Makefile
+index 3794aeb..c0ca9b5 100644
+--- a/romheaders/Makefile
++++ b/romheaders/Makefile
+@@ -22,7 +22,7 @@
+ #
+
+ CC = gcc
+-CFLAGS= -O2 -Wall -W -ansi -I../shared
++CFLAGS := $(CFLAGS) -Wall -W -ansi -I../shared
+
+ SOURCES = romheaders.c ../shared/classcodes.c
+
+@@ -31,7 +31,7 @@ SOURCES = romheaders.c ../shared/classcodes.c
+ all: romheaders
+
+ romheaders: $(SOURCES)
+- $(CC) $(CFLAGS) $(SOURCES) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) $(CFLAGS) $(SOURCES) -o $@
+ strip romheaders
+
+ clean:
+diff --git a/toke/Makefile b/toke/Makefile
+index 14ae095..fa4b845 100644
+--- a/toke/Makefile
++++ b/toke/Makefile
+@@ -29,8 +29,8 @@ STRIP = strip
+ INCLUDES = -I../shared
+
+ # Normal flags
+-CFLAGS = -O2 -Wall -Wno-pointer-sign -fno-strict-aliasing
+-LDFLAGS =
++CFLAGS := $(CFLAGS) -Wall -Wno-pointer-sign -fno-strict-aliasing
++LDFLAGS := $(LDFLAGS)
+
+ # Coverage:
+ #CFLAGS := $(CFLAGS) -fprofile-arcs -ftest-coverage