aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hwinfo
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-02-20 02:04:35 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-02-20 02:05:42 +0100
commit17e281c1687d7940aeca40b8ced8d684aac0fda5 (patch)
tree7bb3adc7021c46fca9f75a1ccbd45c38cdb635b7 /testing/hwinfo
parentca927f3cb21e8de10c1312a531680b05a7750486 (diff)
downloadaports-17e281c1687d7940aeca40b8ced8d684aac0fda5.tar.bz2
aports-17e281c1687d7940aeca40b8ced8d684aac0fda5.tar.xz
testing/hwinfo: new aport
https://github.com/openSUSE/hwinfo Hardware information tool
Diffstat (limited to 'testing/hwinfo')
-rw-r--r--testing/hwinfo/APKBUILD51
-rw-r--r--testing/hwinfo/respect-flags.patch66
2 files changed, 117 insertions, 0 deletions
diff --git a/testing/hwinfo/APKBUILD b/testing/hwinfo/APKBUILD
new file mode 100644
index 0000000000..b6444413cd
--- /dev/null
+++ b/testing/hwinfo/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=hwinfo
+pkgver=21.52
+pkgrel=0
+pkgdesc="Hardware information tool"
+url="https://github.com/openSUSE/hwinfo"
+arch="all"
+license="GPL-2.0-or-later"
+makedepends="$depends_dev flex perl libx86emu-dev linux-headers"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+source="$pkgname-$pkgver.tar.gz::https://github.com/openSUSE/$pkgname/archive/$pkgver.tar.gz
+ respect-flags.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+options="!check" # no tests provided
+
+export HWINFO_VERSION=$pkgver
+
+build() {
+ cd "$builddir"
+
+ # Build full and tiny static libraries.
+ make tinystatic
+ make static
+ cp src/libhd*.a .
+ make clean
+
+ # Build full shared library.
+ make shared LIBDIR=/usr/lib
+}
+
+package() {
+ cd "$builddir"
+
+ make install \
+ LIBDIR=/usr/lib \
+ DESTDIR="$pkgdir"
+
+ rmdir "$pkgdir"/sbin "$pkgdir"/usr/lib || true
+
+ install -m 644 -t "$pkgdir"/usr/lib/ libhd.a libhd_tiny.a
+
+ mkdir -p "$pkgdir"/usr/share/man/man1
+ cp doc/*.1 "$pkgdir"/usr/share/man/man1/
+
+ mkdir -p "$pkgdir"/usr/share/man/man8
+ cp doc/*.8 "$pkgdir"/usr/share/man/man8/
+}
+
+sha512sums="a0d15d548fdbb02a1d0250e0a125b1d53e65b58e5325cff6f1c8a84b9b67a3da5f7575701c065214650523ef6ec59ed6c26f531a0878ea528099c6c06b6f48ae hwinfo-21.52.tar.gz
+1a78d21c97bb2b699804c20622b7309573ba3d8dcfdaa8c2c31be42cba42a342e4a4fb451551ee4d1af9384ba455363727cc37839a26550871cca139b5a0ba20 respect-flags.patch"
diff --git a/testing/hwinfo/respect-flags.patch b/testing/hwinfo/respect-flags.patch
new file mode 100644
index 0000000000..3cd205d841
--- /dev/null
+++ b/testing/hwinfo/respect-flags.patch
@@ -0,0 +1,66 @@
+--- a/Makefile.common
++++ b/Makefile.common
+@@ -18,11 +18,9 @@
+ LIBHD_MINOR_VERSION := $(shell cut -d . -f 2 $(TOPDIR)/VERSION)
+ LIBHD_MAJOR_VERSION := $(shell cut -d . -f 1 $(TOPDIR)/VERSION)
+
+-RPM_OPT_FLAGS ?= -O2
+-
+ CC ?= gcc
+ LD = ld
+-CFLAGS += $(RPM_OPT_FLAGS) -Wall -Wno-pointer-sign -pipe -g $(SHARED_FLAGS) $(EXTRA_FLAGS) -I$(TOPDIR)/src/hd
++CFLAGS += -Wall -Wno-pointer-sign $(SHARED_FLAGS) $(EXTRA_FLAGS) -I$(TOPDIR)/src/hd
+ SHARED_FLAGS = -fPIC
+
+ LDFLAGS += -Lsrc
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -12,7 +12,7 @@
+ #endif
+
+ $(LIBHD): $(OBJS)
+- ar r $@ $?
++ $(AR) r $@ $?
+ @rm -f $(LIBHD_D)
+
+ ifdef SHARED_FLAGS
+--- a/src/hd/Makefile
++++ b/src/hd/Makefile
+@@ -12,4 +12,4 @@
+ @perl -pi -e "s/define\s+HD_MINOR_VERSION\s+\d+/define HD_MINOR_VERSION\t$(LIBHD_MINOR_VERSION)/" $@
+
+ $(LIBHD_D): $(OBJS)
+- ar r $(LIBHD) $?
++ $(AR) r $(LIBHD) $?
+--- a/src/ids/Makefile
++++ b/src/ids/Makefile
+@@ -48,10 +48,10 @@
+ IDFILES += src/pci src/storage src/sound src/mouse src/braille
+
+ $(LIBHD_D): hd_ids.o
+- ar r $(LIBHD) $?
++ $(AR) r $(LIBHD) $?
+
+ check_hd: check_hd.c
+- $(CC) $(CFLAGS) $< -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $< -o $@
+
+ hd_ids.c: hd_ids.h hd_ids_tiny.h
+
+--- a/src/isdn/Makefile
++++ b/src/isdn/Makefile
+@@ -5,5 +5,5 @@
+ include $(TOPDIR)/Makefile.common
+
+ $(LIBHD_D): $(OBJS)
+- ar r $(LIBHD) $?
++ $(AR) r $(LIBHD) $?
+
+--- a/src/smp/Makefile
++++ b/src/smp/Makefile
+@@ -4,4 +4,4 @@
+ include $(TOPDIR)/Makefile.common
+
+ $(LIBHD_D): $(OBJS)
+- ar r $(LIBHD) $?
++ $(AR) r $(LIBHD) $?