From 672b0603c1af1315e8ed11cfe86e9bca21c64ff1 Mon Sep 17 00:00:00 2001 From: meator Date: Sun, 17 Oct 2021 10:52:31 +0200 Subject: [PATCH] New package: hwinfo-21.80 --- srcpkgs/hwinfo-devel | 1 + srcpkgs/hwinfo/files/ids.patch | 13 ++++++++ srcpkgs/hwinfo/files/isdn.patch | 24 +++++++++++++++ srcpkgs/hwinfo/template | 54 +++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 120000 srcpkgs/hwinfo-devel create mode 100644 srcpkgs/hwinfo/files/ids.patch create mode 100644 srcpkgs/hwinfo/files/isdn.patch create mode 100644 srcpkgs/hwinfo/template diff --git a/srcpkgs/hwinfo-devel b/srcpkgs/hwinfo-devel new file mode 120000 index 00000000000..06fad11f436 --- /dev/null +++ b/srcpkgs/hwinfo-devel @@ -0,0 +1 @@ +hwinfo \ No newline at end of file diff --git a/srcpkgs/hwinfo/files/ids.patch b/srcpkgs/hwinfo/files/ids.patch new file mode 100644 index 00000000000..e6d016cf1c8 --- /dev/null +++ b/srcpkgs/hwinfo/files/ids.patch @@ -0,0 +1,13 @@ +--- a/src/ids/Makefile 2021-10-01 13:55:16.000000000 +0200 ++++ b/src/ids/Makefile 2021-10-26 13:05:51.241897833 +0200 +@@ -56,8 +56,8 @@ + hd_ids.c: hd_ids.h hd_ids_tiny.h + + hd_ids.h hd.ids: check_hd $(IDFILES) +- ./check_hd --check --sort --cfile hd_ids.h $(IDFILES) ++ check_hd --check --sort --cfile hd_ids.h $(IDFILES) + + hd_ids_tiny.h: check_hd hd.ids +- ./check_hd --mini --cfile hd_ids_tiny.h --log=hd_tiny.log --out=hd_tiny.ids hd.ids ++ check_hd --mini --cfile hd_ids_tiny.h --log=hd_tiny.log --out=hd_tiny.ids hd.ids + diff --git a/srcpkgs/hwinfo/files/isdn.patch b/srcpkgs/hwinfo/files/isdn.patch new file mode 100644 index 00000000000..47fa7824039 --- /dev/null +++ b/srcpkgs/hwinfo/files/isdn.patch @@ -0,0 +1,24 @@ +Remove isdn_cdb.h from TARGETS, so it won't be recompiled again. This is unnecessary +because it is already being made explicitly. +Remove isdn_cdb.h from CLEANFILES. The template uses make clean to clean junk from +isdn_cdb.h, but it needs isdn_cdb.h, so this will not delete it. +--- a/src/isdn/cdb/Makefile 2021-10-01 13:55:16.000000000 +0200 ++++ b/src/isdn/cdb/Makefile 2021-10-26 12:59:56.810695582 +0200 +@@ -1,6 +1,6 @@ + TOPDIR = ../../.. +-TARGETS = mk_isdnhwdb isdn_cdb.h ISDN.CDB.hwdb +-CLEANFILES = isdn_cdb isdn_cdb.h lex.yy.c ISDN.CDB.txt mk_isdnhwdb ISDN.CDB.hwdb ++TARGETS = mk_isdnhwdb ISDN.CDB.hwdb ++CLEANFILES = isdn_cdb lex.yy.c ISDN.CDB.txt mk_isdnhwdb ISDN.CDB.hwdb + + include $(TOPDIR)/Makefile.common + +@@ -28,6 +28,6 @@ + + mk_isdnhwdb.o: mk_isdnhwdb.c cdb_read.h lex.yy.c + +-ISDN.CDB.hwdb: mk_isdnhwdb ISDN.CDB.txt ++ISDN.CDB.hwdb: ISDN.CDB.txt + rm -f ISDN.CDB.hwdb +- ./mk_isdnhwdb ISDN.CDB.txt ISDN.CDB.hwdb ++ mk_isdnhwdb ISDN.CDB.txt ISDN.CDB.hwdb diff --git a/srcpkgs/hwinfo/template b/srcpkgs/hwinfo/template new file mode 100644 index 00000000000..1d945b98e52 --- /dev/null +++ b/srcpkgs/hwinfo/template @@ -0,0 +1,54 @@ +# Template file for 'hwinfo' +pkgname=hwinfo +version=21.80 +revision=1 +build_style=gnu-makefile +make_use_env=yes +make_build_args="HWINFO_VERSION=${version} LIBDIR=/usr/lib${XBPS_TARGET_WORDSIZE}" +make_install_args="${make_build_args}" +hostmakedepends="perl flex" +makedepends="libx86emu-devel libuuid-devel" +short_desc="Hardware information tool" +maintainer="meator " +license="GPL-2.0-or-later" +homepage="https://github.com/openSUSE/hwinfo" +distfiles="https://github.com/openSUSE/hwinfo/archive/refs/tags/${version}.tar.gz" +checksum=ea944271793df091af560ac6e82dcd1271aa83f22aeeada031789df1b5407ebe +disable_parallel_build=yes + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" hwinfo" +fi + +post_patch() { + if [ "$CROSS_BUILD" ]; then + for p in ${FILESDIR}/*; do + patch -p1 < $p + done + fi +} + +pre_build() { + if [ "$CROSS_BUILD" ]; then + CC=gcc CFLAGS= LDFLAGS= make ${make_build_args} -C src/isdn/cdb isdn_cdb.h + make -C src/isdn/cdb clean + fi +} + +post_install() { + mv ${DESTDIR}/usr/sbin ${DESTDIR}/usr/bin + + for m in doc/*.[1-9]; do + vman ${m} + done +} + +hwinfo-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig + } +}