Permalink
Browse files

substitute usb.id location in man page and update script

  • Loading branch information...
1 parent 27b14c4 commit 3a093ba5d1cac8e9cea10cc1af295f67718da024 @kaysievers kaysievers committed Apr 30, 2009
Showing with 21 additions and 5 deletions.
  1. +2 −1 .gitignore
  2. +16 −2 Makefile.am
  3. +1 −0 configure.ac
  4. +1 −1 lsusb.8 → lsusb.8.in
  5. +1 −1 update-usbids.sh → update-usbids.sh.in
View
3 .gitignore
@@ -15,4 +15,5 @@ depcomp
install-sh
missing
lsusb
-
+lsusb.8
+update-usbids.sh
View
18 Makefile.am
@@ -10,6 +10,9 @@ endif
sbin_PROGRAMS = \
lsusb
+sbin_SCRIPTS = \
+ update-usbids.sh
+
lsusb_SOURCES = \
lsusb.c \
lsusb-t.c \
@@ -25,17 +28,28 @@ lsusb_CPPFLAGS = \
lsusb_LDADD = \
$(LIBUSB_LIBS)
-dist_man_MANS = \
+man_MANS = \
lsusb.8
EXTRA_DIST = \
- usb.ids
+ usb.ids \
+ update-usbids.sh.in \
+ lsusb.8.in
+
+update-usbids.sh: update-usbids.sh.in
+ sed 's|@usbids@|$(datadir)/usb.ids|' $< >$@
+ chmod 755 $@
+
+lsusb.8: lsusb.8.in
+ sed 's|@usbids@|$(datadir)/usb.ids|' $< >$@
usb.ids.gz: usb.ids
gzip -c -9 usb.ids > usb.ids.gz
clean-local:
rm -f usb.ids.gz
+ rm -f lsusb.8
+ rm -f update-usbids.sh
distclean-local:
rm -rf autom4te.cache
View
1 configure.ac
@@ -39,6 +39,7 @@ echo "
=============
prefix: ${prefix}
+ datadir: ${datadir}
datarootdir: ${datarootdir}
mandir: ${mandir}
View
2 lsusb.8 → lsusb.8.in
@@ -55,7 +55,7 @@ If the specified device is not found, a non-zero exit code is returned.
.SH FILES
.TP
-.B /usr/share/usb.ids
+.B @usbids@
A list of all known USB ID's (vendors, products, classes, subclasses and protocols).
.SH SEE ALSO
View
2 update-usbids.sh → update-usbids.sh.in
@@ -6,7 +6,7 @@
set -e
SRC="http://www.linux-usb.org/usb.ids"
-DEST=usb.ids
+DEST=@usbids@
# if usb.ids is read-only (because the filesystem is read-only),
# then just skip this whole process.

0 comments on commit 3a093ba

Please sign in to comment.