aboutsummaryrefslogtreecommitdiffstats
path: root/misc/usbids
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-04-18 20:55:41 +0800
committerbapt <bapt@FreeBSD.org>2014-04-18 20:55:41 +0800
commitc313102cb8c6b4117c2668be96593fb59f835370 (patch)
treeb41075c8d5636d8aaf05c070e4fbb5ce49a83c96 /misc/usbids
parent870384f09120499dfe1bbacc416a9bca9e953275 (diff)
downloadfreebsd-ports-gnome-c313102cb8c6b4117c2668be96593fb59f835370.tar.gz
freebsd-ports-gnome-c313102cb8c6b4117c2668be96593fb59f835370.tar.zst
freebsd-ports-gnome-c313102cb8c6b4117c2668be96593fb59f835370.zip
Add usb ids database, which will be used to populate informations
in an upcoming device library
Diffstat (limited to 'misc/usbids')
-rw-r--r--misc/usbids/Makefile54
-rw-r--r--misc/usbids/distinfo2
-rw-r--r--misc/usbids/pkg-descr4
3 files changed, 60 insertions, 0 deletions
diff --git a/misc/usbids/Makefile b/misc/usbids/Makefile
new file mode 100644
index 000000000000..a13aaf21b9ec
--- /dev/null
+++ b/misc/usbids/Makefile
@@ -0,0 +1,54 @@
+# Created by: Michael Johnson <ahze@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= usbids
+PORTVERSION= 20140203
+CATEGORIES= misc
+MASTER_SITES= http://files.etoilebsd.net/usbids/
+
+MAINTAINER= bapt@FreeBSD.org
+COMMENT= Database of all known IDs used in USB devices
+
+LICENSE= BSD3CLAUSE GPLv2 GPLv3
+LICENSE_COMB= dual
+
+NO_BUILD= yes
+USES= tar:xz
+
+PLIST_FILES= %%DATADIR%%/usb.ids
+PLIST_DIRS= %%DATADIR%%
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${DATADIR}/
+ ${INSTALL_DATA} ${WRKSRC}/usb.ids ${STAGEDIR}${DATADIR}/
+
+# maintainer section:
+
+MS_DIFF= ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}.diff
+MS_DISTFILES= usb.ids
+MS_MASTER_SITE= http://www.linux-usb.org/
+MS_VERSION= `${CAT} ${MS_VERSIONFILE}`
+MS_VERSIONFILE= ${MS_WRKSRC}/.version
+MS_WRKSRC= ${WRKSRC}/tmp
+
+maketar: do-clean extract
+ @${MKDIR} ${MS_WRKSRC}/
+ @${FETCH_CMD} -o ${MS_WRKSRC}/${MS_DISTFILES} ${MS_MASTER_SITE}${MS_DISTFILES}
+ @${AWK} '/^# Version/ { gsub(/\./,"", $$3); print $$3 }' \
+ ${MS_WRKSRC}/${MS_DISTFILES} > ${MS_VERSIONFILE}
+ @${MKDIR} ${MS_WRKSRC}/${PORTNAME}-${PORTVERSION}/ ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}/
+ @${MV} ${MS_WRKSRC}/${MS_DISTFILES} ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}/
+ @${CP} ${WRKSRC}/${MS_DISTFILES} ${MS_WRKSRC}/${PORTNAME}-${PORTVERSION}/${MS_DISTFILES}
+ @(cd ${MS_WRKSRC}/ && ${DIFF} -u ${PORTNAME}-${PORTVERSION}/${MS_DISTFILES} ${PORTNAME}-${MS_VERSION}/${MS_DISTFILES} > ${MS_DIFF}) || ${TRUE}
+ @if [ -s ${MS_DIFF} ]; then \
+ ${CP} -i ${MS_DIFF} ${.CURDIR}/; \
+ cd ${MS_WRKSRC}/ && ${TAR} -Jcf ${PORTNAME}-${MS_VERSION}.tar.xz ${PORTNAME}-${MS_VERSION}/; \
+ sudo ${INSTALL} -m 644 ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}.tar.xz ${DISTDIR}/; \
+ ${SED} -i '' -e '/^PORTVERSION=/ s|${PORTVERSION}|'${MS_VERSION}'|; /^PORTREVISION=/d' ${.CURDIR}/Makefile; \
+ cd ${.CURDIR}/ && ${MAKE_CMD} makesum; \
+ ${ECHO_MSG} "*** Update from ${PORTVERSION} to ${MS_VERSION}, diff: ${.CURDIR}/${PORTNAME}-${MS_VERSION}.diff ***"; \
+ else \
+ ${ECHO_MSG} "*** ${MS_MASTER_SITE}${MS_DISTFILES} is unchanged (${PORTVERSION}) ***"; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/misc/usbids/distinfo b/misc/usbids/distinfo
new file mode 100644
index 000000000000..d41fc3e7276b
--- /dev/null
+++ b/misc/usbids/distinfo
@@ -0,0 +1,2 @@
+SHA256 (usbids-20140203.tar.xz) = 965e87f874ae6574579aadf80f893ece73a1bbfd03f45fe92c6aad08af813417
+SIZE (usbids-20140203.tar.xz) = 143412
diff --git a/misc/usbids/pkg-descr b/misc/usbids/pkg-descr
new file mode 100644
index 000000000000..2c544dbb51d1
--- /dev/null
+++ b/misc/usbids/pkg-descr
@@ -0,0 +1,4 @@
+Database of all known ID's used in USB devices: ID's of vendors, devices,
+subsystems and device classes
+
+WWW: http://www.linux-usb.org/