diff options
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | nicer_flags.patch | 50 |
4 files changed, 109 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d354a2718689 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = fcode-utils-git + pkgdesc = A set of utilities to process FCODE, OpenFirmware's byte code + pkgver = v1.0.2.r20.gd89219a + pkgrel = 1 + url = https://www.openfirmware.info/FCODE_suite + arch = x86_64 + arch = i686 + license = GPL2 + license = CPL + makedepends = git + depends = glibc + provides = romheaders + source = git+https://github.com/openbios/fcode-utils.git + source = nicer_flags.patch + sha256sums = SKIP + sha256sums = eba18cb2f7ecc20a4018a9e79f79d0845b42adba3320240933bd881f3901034e + +pkgname = fcode-utils-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..72e8ffc0db8a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..87c4e5261e04 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Cebtenzzre <cebtenzzre (at) gmail (dot) com> + +_pkgname=fcode-utils +pkgname="${_pkgname}-git" +pkgver=v1.0.2.r20.gd89219a +pkgrel=1 +pkgdesc="A set of utilities to process FCODE, OpenFirmware's byte code" +arch=(x86_64 i686) +url='https://www.openfirmware.info/FCODE_suite' +license=(GPL2 CPL) +depends=('glibc') +makedepends=('git') +source=("git+https://github.com/openbios/${_pkgname}.git" + 'nicer_flags.patch') +sha256sums=('SKIP' + 'eba18cb2f7ecc20a4018a9e79f79d0845b42adba3320240933bd881f3901034e') +provides=('romheaders') + +pkgver() { + cd "$_pkgname" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$_pkgname" + + # Fix the not-so-nice flag replacement and ignoring + patch -p1 -i ../nicer_flags.patch +} + +build() { + cd "$_pkgname" + make +} + +package() { + cd "$_pkgname" + make install DESTDIR="$pkgdir/usr" +} diff --git a/nicer_flags.patch b/nicer_flags.patch new file mode 100644 index 000000000000..1ffe111e77b0 --- /dev/null +++ b/nicer_flags.patch @@ -0,0 +1,50 @@ +diff --git a/detok/Makefile b/detok/Makefile +index 235966a..9c6cdd1 100644 +--- a/detok/Makefile ++++ b/detok/Makefile +@@ -30,8 +30,7 @@ STRIP = strip + INCLUDES = -I../shared + + # Normal Flags: +-CFLAGS = -O2 -Wall #-Wextra +-LDFLAGS = ++CFLAGS := $(CFLAGS) -Wall + + # Coverage: + #CFLAGS := $(CFLAGS) -fprofile-arcs -ftest-coverage +diff --git a/romheaders/Makefile b/romheaders/Makefile +index cdb3d51..bdfa227 100644 +--- a/romheaders/Makefile ++++ b/romheaders/Makefile +@@ -27,7 +27,7 @@ PROGRAM = romheaders + DESTDIR = /usr/local + CC ?= gcc + STRIP = strip +-CFLAGS = -O2 -Wall -Wextra ++CFLAGS := $(CFLAGS) -Wall -Wextra + INCLUDES = -I../shared + + SOURCES = romheaders.c ../shared/classcodes.c +@@ -37,7 +37,7 @@ SOURCES = romheaders.c ../shared/classcodes.c + all: romheaders + + romheaders: $(SOURCES) +- $(CC) $(CFLAGS) $(INCLUDES) $(SOURCES) -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) $(SOURCES) -o $@ + $(STRIP) romheaders + + clean: +diff --git a/toke/Makefile b/toke/Makefile +index 0b9c928..0928d13 100644 +--- a/toke/Makefile ++++ b/toke/Makefile +@@ -30,8 +30,7 @@ STRIP = strip + INCLUDES = -I../shared + + # Normal flags +-CFLAGS = -O2 -Wall #-Wextra +-LDFLAGS = ++CFLAGS := $(CFLAGS) -Wall + + # Coverage: + #CFLAGS := $(CFLAGS) -fprofile-arcs -ftest-coverage |