From fc782ff8d2a807dad481dffd22a02c120a53ca7e Mon Sep 17 00:00:00 2001 From: Aster Boese Date: Tue, 28 Jul 2026 18:09:35 +0200 Subject: [PATCH] temp/hwinfo: fork from Alpine to expect udevadm in bin Signed-off-by: Aster Boese Part-of: --- temp/hwinfo/APKBUILD | 53 ++++++++++++++++++++++ temp/hwinfo/respect-flags.patch | 78 +++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 temp/hwinfo/APKBUILD create mode 100644 temp/hwinfo/respect-flags.patch diff --git a/temp/hwinfo/APKBUILD b/temp/hwinfo/APKBUILD new file mode 100644 index 000000000..2d178c5ba --- /dev/null +++ b/temp/hwinfo/APKBUILD @@ -0,0 +1,53 @@ +# Forked from Alpine to remove patch expecting udevadm in sbin. Drop after bin-merge +maintainer="Aster Boese " +pkgname=hwinfo +_pkgver=25.4 +pkgver=9999.$_pkgver +pkgrel=0 +pkgdesc="Hardware information tool" +url="https://github.com/openSUSE/hwinfo" +arch="all" +license="GPL-2.0-or-later" +makedepends="flex perl linux-headers util-linux-dev libx86emu-dev" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" +source="$pkgname-$_pkgver.tar.gz::https://github.com/openSUSE/hwinfo/archive/$_pkgver.tar.gz + respect-flags.patch + " +options="!check" # no tests provided +builddir="$srcdir/$pkgname-$_pkgver" + +export HWINFO_VERSION=$_pkgver + +build() { + # Build full and tiny static libraries. + #make tinystatic # FIXME: fails + # this takes forever but it's not stuck + make -j1 static + cp src/libhd*.a . + make clean + + # Build full shared library. + make -j1 shared LIBDIR=/usr/lib +} + +package() { + make install \ + LIBDIR=/usr/lib \ + DESTDIR="$pkgdir" + + rmdir "$pkgdir"/sbin "$pkgdir"/usr/lib || true + + install -m 644 -t "$pkgdir"/usr/lib/ libhd.a + #install -m 644 -t "$pkgdir"/usr/lib/ libhd_tiny.a # FIXME: disabled above + + 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=" +0d850a076ad23f8ae35144b3552e16c86ff3ae7d0c0b56f9aa535f1163c6d1ecec5cdd72004f8b65c0f8772f8330c96c4ca26ac38576b1065a61abb83b227722 hwinfo-25.4.tar.gz +2016f76bdfd65fb9b8f331ed82d6e5a1a85ab003615fe6815c3b41127398ae25fedd83abada9930dcbc9409fda69cf701ebdc5f12874e518784e194fcf4a0ff8 respect-flags.patch +" diff --git a/temp/hwinfo/respect-flags.patch b/temp/hwinfo/respect-flags.patch new file mode 100644 index 000000000..9542a9275 --- /dev/null +++ b/temp/hwinfo/respect-flags.patch @@ -0,0 +1,78 @@ +diff --git a/Makefile.common b/Makefile.common +index c8741b4..b239ad5 100644 +--- a/Makefile.common ++++ b/Makefile.common +@@ -18,11 +18,9 @@ LIBHD_VERSION := $(shell cat $(TOPDIR)/VERSION) + 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 -fvisibility=hidden + + LDFLAGS += -Lsrc +diff --git a/src/Makefile b/src/Makefile +index 587edd5..e088a54 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -12,7 +12,7 @@ include $(TOPDIR)/Makefile.common + #endif + + $(LIBHD): $(OBJS) +- ar r $@ $? ++ $(AR) r $@ $? + @rm -f $(LIBHD_D) + + ifdef SHARED_FLAGS +diff --git a/src/hd/Makefile b/src/hd/Makefile +index 64d8a5c..125ab7b 100644 +--- a/src/hd/Makefile ++++ b/src/hd/Makefile +@@ -8,4 +8,4 @@ version.h: $(TOPDIR)/VERSION + @echo "#define HD_VERSION_STRING \"`cat $(TOPDIR)/VERSION`\"" >$@ + + $(LIBHD_D): $(OBJS) +- ar r $(LIBHD) $? ++ $(AR) r $(LIBHD) $? +diff --git a/src/ids/Makefile b/src/ids/Makefile +index 473ec3f..115d449 100644 +--- a/src/ids/Makefile ++++ b/src/ids/Makefile +@@ -48,10 +48,10 @@ endif + 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 + +diff --git a/src/isdn/Makefile b/src/isdn/Makefile +index 5e52e6b..d0d6737 100644 +--- a/src/isdn/Makefile ++++ b/src/isdn/Makefile +@@ -5,5 +5,5 @@ SUBDIRS = cdb + include $(TOPDIR)/Makefile.common + + $(LIBHD_D): $(OBJS) +- ar r $(LIBHD) $? ++ $(AR) r $(LIBHD) $? + +diff --git a/src/smp/Makefile b/src/smp/Makefile +index bcba090..9722da1 100644 +--- a/src/smp/Makefile ++++ b/src/smp/Makefile +@@ -4,4 +4,4 @@ TARGETS = $(LIBHD_D) + include $(TOPDIR)/Makefile.common + + $(LIBHD_D): $(OBJS) +- ar r $(LIBHD) $? ++ $(AR) r $(LIBHD) $?