misc/hwdata: install pkg-config file

Reported by:	Jan Beich <jbeich@FreeBSD.org>
PR:		266367
This commit is contained in:
Tobias C. Berner 2022-09-17 18:12:07 +02:00
parent f05377d668
commit 4ba7d06e46
3 changed files with 34 additions and 10 deletions

View File

@ -11,19 +11,17 @@ WWW= https://github.com/vcrhonek/hwdata
LICENSE= GPLv2+ MIT
LICENSE_COMB= dual
BUILD_DEPENDS= ginstall:sysutils/coreutils
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= vcrhonek
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} \
--datadir=${DATADIR}
BINARY_ALIAS= install=ginstall
NO_ARCH= yes
NO_BUILD= yes
_ID_FILES= pci.ids pnp.ids usb.ids
PLIST_FILES= ${_ID_FILES:C,^,${DATADIR}/,}
do-install:
${MKDIR} ${STAGEDIR}${DATADIR}/
.for _id_file in ${_ID_FILES}
${INSTALL_DATA} ${WRKSRC}/${_id_file} ${STAGEDIR}${DATADIR}/
.endfor
.include <bsd.port.mk>

View File

@ -0,0 +1,20 @@
--- Makefile.orig 2022-09-07 07:07:17 UTC
+++ Makefile
@@ -48,10 +48,8 @@ install: Makefile.inc hwdata.pc
for foo in $(IDFILES) ; do \
install -m 644 $$foo $(DESTDIR)$(datadir)/$(NAME) ;\
done
- mkdir -p -m 755 $(DESTDIR)$(libdir)/modprobe.d
- install -m 644 -T blacklist.conf $(DESTDIR)$(libdir)/modprobe.d/dist-blacklist.conf
- mkdir -p -m 755 $(DESTDIR)$(datadir)/pkgconfig
- install -m 644 hwdata.pc $(DESTDIR)$(datadir)/pkgconfig/
+ mkdir -p -m 755 $(DESTDIR)$(prefix)/libdata/pkgconfig
+ install -m 644 hwdata.pc $(DESTDIR)$(prefix)/libdata/pkgconfig/
commit:
git commit -vas ||:
@@ -159,4 +157,3 @@ pnp.ids: pnp.ids.orig pnp.ids.patch
else \
cat $?; \
fi | sed 's/\s\+$$//' >$@
-

6
misc/hwdata/pkg-plist Normal file
View File

@ -0,0 +1,6 @@
libdata/pkgconfig/hwdata.pc
%%DATADIR%%/hwdata/iab.txt
%%DATADIR%%/hwdata/oui.txt
%%DATADIR%%/hwdata/pci.ids
%%DATADIR%%/hwdata/pnp.ids
%%DATADIR%%/hwdata/usb.ids