From 147b493b30c162de7714dc940ce7ebac9be7498b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 7 Feb 2002 21:09:32 +0000 Subject: adding update-ldetect-lst to take care of directorized pcitable/usbtable/... --- Makefile | 3 ++- Makefile.config | 1 + ldetect-lst.spec | 12 ++++++++++-- lst/Makefile | 3 ++- update-ldetect-lst | 17 +++++++++++++++++ 5 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 update-ldetect-lst diff --git a/Makefile b/Makefile index 5df9bef6..ea16ed6c 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,9 @@ clean: make -C lst clean install: build - install -d $(bindir) $(dir) + install -d $(bindir) $(sbindir) $(dir) make -C lst install + install update-ldetect-lst $(sbindir) install convert/merge2pcitable.pl $(bindir) rpm: clean $(RPM) diff --git a/Makefile.config b/Makefile.config index 2233a65a..682dbdb7 100644 --- a/Makefile.config +++ b/Makefile.config @@ -2,4 +2,5 @@ project = ldetect-lst prefix = /usr datadir = $(prefix)/share bindir = $(prefix)/bin +sbindir = $(prefix)/sbin dir = $(datadir)/$(project) diff --git a/ldetect-lst.spec b/ldetect-lst.spec index 7d94b675..bc83c9cd 100644 --- a/ldetect-lst.spec +++ b/ldetect-lst.spec @@ -1,6 +1,6 @@ %define name ldetect-lst -%define version 0.1.2 -%define release 39mdk +%define version 0.1.3 +%define release 1mdk Name: %{name} Version: %{version} @@ -37,9 +37,14 @@ rm -rf $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT +%preun -p "/usr/sbin/update-ldetect-lst --clean" + +%post -p /usr/sbin/update-ldetect-lst + %files %defattr(-,root,root) %{_datadir}/%{name} +%{_sbindir}/* %files devel %defattr(-,root,root) @@ -47,6 +52,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/* %changelog +* Thu Feb 7 2002 Pixel 0.1.3-1mdk +- allow third party entries (using update-ldetect-lst) + * Tue Feb 5 2002 Pixel 0.1.2-39mdk - fix usbtable merge with kernel usbmap diff --git a/lst/Makefile b/lst/Makefile index 38bb9869..da4355f9 100644 --- a/lst/Makefile +++ b/lst/Makefile @@ -32,6 +32,7 @@ $(TABLES3): install: $(TMP_TABLES) $(TABLES3) for i in $(TABLES); do \ + mkdir -p $(dir)/$$i.d ; \ (echo "# !! The original version is available in CVS at" ; \ echo "# export CVSROOT=:pserver:anoncvs@cvs.mandrakesoft.com:/home/cvs/cooker" ; \ echo "# cvs login (password \`\`cvs'')" ; \ @@ -41,6 +42,6 @@ install: $(TMP_TABLES) $(TABLES3) echo "# export CVS_RSH=ssh" ; \ echo "# cvs checkout soft/$(project)" ; \ cat $$i.tmp \ - ) > $(dir)/$$i; done + ) > $(dir)/$$i.d/90default.lst; done install -m 644 ScannerDB.gz Cards+ CardsNames MonitorsDB isdn.db $(dir) diff --git a/update-ldetect-lst b/update-ldetect-lst new file mode 100644 index 00000000..77c119c4 --- /dev/null +++ b/update-ldetect-lst @@ -0,0 +1,17 @@ +#!/usr/bin/perl + +my $dir = '/usr/share/ldetect-lst'; +my @files = qw(pcitable usbtable isatable pcmciatable); + +if ($ARGV[0] eq '--clean') { + foreach (@files) { + unlink "$dir/$_"; + } +} else { + foreach (@files) { + my $d = "$dir/$_.d"; + -d $d or next; + my @l = sort glob("$d/*.lst") or next; + system("cat " . join(" ", @l) . " > $dir/$_"); + } +} -- cgit v1.2.1