head 1.2; access; symbols; locks; strict; comment @# @; 1.2 date 2025.01.29.17.28.29; author vins; state dead; branches; next 1.1; commitid iVZXAB38An19apHF; 1.1 date 2025.01.07.19.40.21; author vins; state Exp; branches; next ; commitid 6qUwLf539qVpBAEF; desc @@ 1.2 log @misc/hwdata: delete package Duplicate of sysutils/hwdata. @ text @$NetBSD: patch-Makefile,v 1.1 2025/01/07 19:40:21 vins Exp $ * Point to default sed tool path. * Support BSD install. * Correct pkgconfig dir. --- Makefile.orig 2025-01-03 09:15:23.000000000 +0000 +++ Makefile @@@@ -1,7 +1,7 @@@@ NAME=hwdata VERSION=$(shell awk '/Version:/ { print $$2 }' hwdata.spec) RELEASE=$(shell rpm -q --define 'dist %{nil}' --specfile --qf "%{release}" hwdata.spec) -ifeq ($(shell git rev-parse --abbrev-ref HEAD 2>/dev/null | sed -n 's/^\([^0-9-]\+\).*/\L\1/p'), rhel) +ifeq ($(shell git rev-parse --abbrev-ref HEAD 2>/dev/null | $(SED) -n 's/^\([^0-9-]\+\).*/\L\1/p'), rhel) # add revision to tag name for rhel branches TAGNAME := v$(VERSION)-$(RELEASE) else @@@@ -36,7 +36,7 @@@@ hwdata.pc: hwdata.pc.in if [ "$${datadir#$(prefix)}" != "$$datadir" ]; then \ datadir="\$${prefix}$${datadir#$(prefix)}"; \ fi; \ - sed -e 's|@@prefix@@|$(prefix)|g' \ + $(SED) -e 's|@@prefix@@|$(prefix)|g' \ -e "s|@@datadir@@|$$datadir|g" \ -e 's|@@pkgdatadir@@|$${datadir}/$(NAME)|g' \ -e 's|@@VERSION@@|$(VERSION)|g' \ @@@@ -44,16 +44,16 @@@@ hwdata.pc: hwdata.pc.in $< > $@@ install: Makefile.inc hwdata.pc - mkdir -p -m 755 $(DESTDIR)$(datadir)/$(NAME) + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(datadir)/$(NAME) for foo in $(IDFILES) ; do \ - install -m 644 $$foo $(DESTDIR)$(datadir)/$(NAME) ;\ + $(BSD_INSTALL_DATA) $$foo $(DESTDIR)$(datadir)/$(NAME)/$$foo ;\ done @@if [ "$(blacklist)" = true ]; then \ - mkdir -p -m 755 $(DESTDIR)$(libdir)/modprobe.d ;\ - install -m 644 -T blacklist.conf $(DESTDIR)$(libdir)/modprobe.d/dist-blacklist.conf ;\ + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(libdir)/modprobe.d ;\ + $(BSD_INSTALL_DATA) blacklist.conf $(DESTDIR)$(libdir)/modprobe.d/dist-blacklist.conf ;\ fi; - mkdir -p -m 755 $(DESTDIR)$(datadir)/pkgconfig - install -m 644 hwdata.pc $(DESTDIR)$(datadir)/pkgconfig/ + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(PKGCONFIG_DIR) + $(BSD_INSTALL_DATA) hwdata.pc $(DESTDIR)$(PKGCONFIG_DIR) commit: git commit -vas ||: @@@@ -109,7 +109,7 @@@@ clean: *.downloaded *.utf8 *.orig hwdata.pc ChangeLog clog clog: hwdata.spec - @@sed -n '/^%changelog/,/^$$/{/^%/d;/^$$/d;s/%%/%/g;p}' $< | tee $@@ + @@$(SED) -n '/^%changelog/,/^$$/{/^%/d;/^$$/d;s/%%/%/g;p}' $< | tee $@@ download: $(IDFILES) @@@@ -146,14 +146,14 @@@@ pnp.ids.orig: pnp.ids.csv pnp.ids: pnp.ids.orig pnp.ids.patch patch -p1 -o - pnp.ids.orig pnp.ids.patch | \ - sed 's/\tDO NOT USE - /\tInvalid Vendor Codename - /' >$@@ + $(SED) 's/\tDO NOT USE - /\tInvalid Vendor Codename - /' >$@@ %.utf8: %.downloaded @@text=`LANG=C file $?` - @@encoding=`echo "$$text" | sed -n 's/.*\(iso-8859\S\*\|cp1[12]\d\+\).*/\1/Ip'` + @@encoding=`echo "$$text" | $(SED) -n 's/.*\(iso-8859\S\*\|cp1[12]\d\+\).*/\1/Ip'` @@if [ -n "$$encoding" ]; then \ iconv -f "$$encoding" -t UTF-8 $?; \ else \ cat $?; \ - fi | sed 's/\s\+$$//' >$@@ + fi | $(SED) 's/\s\+$$//' >$@@ @ 1.1 log @misc/hwdata: initial import of package hwdata contains various hardware identification and configuration data, such as the pci.ids and usb.ids databases. @ text @d1 1 a1 1 $NetBSD$ @