summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-07 21:09:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-07 21:09:32 +0000
commit147b493b30c162de7714dc940ce7ebac9be7498b (patch)
tree96e1e89c8bcd08008ded7fe14666f2f34891c3ab
parent5a075baba358ea6f515652565cb48ab070c78721 (diff)
downloadldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.tar
ldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.tar.gz
ldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.tar.bz2
ldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.tar.xz
ldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.zip
adding update-ldetect-lst to take care of directorized pcitable/usbtable/...
-rw-r--r--Makefile3
-rw-r--r--Makefile.config1
-rw-r--r--ldetect-lst.spec12
-rw-r--r--lst/Makefile3
-rw-r--r--update-ldetect-lst17
5 files changed, 32 insertions, 4 deletions
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 <pixel@mandrakesoft.com> 0.1.3-1mdk
+- allow third party entries (using update-ldetect-lst)
+
* Tue Feb 5 2002 Pixel <pixel@mandrakesoft.com> 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/$_");
+ }
+}