aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2007-12-08 00:22:06 +0000
committerReuben Thomas <rrt@sc3d.org>2007-12-08 00:22:06 +0000
commit0bb8fa7892f906e3c7db0c309876691fea1148d4 (patch)
tree922fe08c81cd260aae2a01b20778fb3d96835b35
parente22de8ed6b9d3cfb9f000745a36c76551700b2fc (diff)
downloadplptools-0bb8fa7892f906e3c7db0c309876691fea1148d4.tar.gz
plptools-0bb8fa7892f906e3c7db0c309876691fea1148d4.tar.bz2
plptools-0bb8fa7892f906e3c7db0c309876691fea1148d4.zip
Remove kiodoc-update.pl.
Remove mention of versions of SuSE < 8 from plptools.spec.in.
-rw-r--r--conf/kiodoc-update.pl119
-rw-r--r--etc/plptools.spec.in6
2 files changed, 0 insertions, 125 deletions
diff --git a/conf/kiodoc-update.pl b/conf/kiodoc-update.pl
deleted file mode 100644
index 56e073f..0000000
--- a/conf/kiodoc-update.pl
+++ /dev/null
@@ -1,119 +0,0 @@
-#! /usr/bin/perl -w
-#
-# $Id$
-
-chomp(my $htmldir = `kde-config --expandvars --install html`);
-
-sub from($) {
- open(F, "<$_[0]") || die "Can't open $_[0] for read: $!\n";
- chomp(my @lines = <F>);
- close(F);
- return @lines;
-}
-
-sub collect_specified($) {
- my $cmd = "find $htmldir/*/kioslave -name $_[0].docbook";
- open(F, "$cmd |") || die "Can't run $cmd: $!\n";
- chomp(my @lines = <F>);
- close F;
- return grep(!/HTML\/default/, @lines);
-}
-
-sub get_id($) {
- my @lines = from($_[0]);
- foreach (@lines) {
- if (/\<article\s+.*id=\"(.+)\".*\>/i) {
- return "$1";
- }
- last if /\<title\>/i;
- }
- return "";
-}
-
-sub usage {
- die "Usage: kiodoc-update -a|-r kioslaveName";
-}
-
-sub update_cache($) {
- my $cache = $_[0];
- $cache =~ s/index\.docbook/index\.cache\.bz2/;
- system("meinproc --check --cache $cache $_[0]");
-}
-
-sub add_doc($) {
- my @files = collect_specified($_[0]);
- return if ($#files lt 0);
- foreach $idx (@files) {
- my $id = get_id($idx);
- die "Can't read ID attribute in $idx\n" if ($id eq "");
- my $ed = '<!ENTITY kio-' . $id . ' SYSTEM "' .
- "$_[0].docbook" . '">';
- my $er = '&kio-' . $id . ';';
- $idx =~ s/$_[0]\.docbook/index\.docbook/;
- next if (!(-e $idx));
- my @lines = from("$idx");
- my $state = 0;
- my @out = ();
- foreach (@lines) {
- $state = 3 if (($state == 2) && (/\&kio-/));
- $state = 1 if (($state == 0) && (/\<\!ENTITY kio-/));
- if ($state == 1) {
- if (/% addindex/) {
- push @out, "$ed\n";
- $state = 2;
- }
- if ($_ gt $ed) {
- push @out, "$ed\n";
- $state = 2;
- }
- }
- elsif ($state == 3) {
- if ($_ gt $er) {
- push @out, "$er\n";
- $state = 4;
- }
- if (/<\/part\>/i) {
- push @out, "$er\n";
- $state = 4;
- }
- }
- next if (/^$er$/);
- next if (/^$ed$/);
- push @out, "$_\n";
- }
- open(F, ">$idx") || die "Can't open $idx for write: $!\n";
- print F @out;
- close(F);
- update_cache($idx);
- }
-}
-
-sub remove_doc($) {
- my @files = collect_specified($_[0]);
- return if ($#files lt 0);
- my $re = "kio-" . get_id($files[0]) . '[\s;]';
- foreach $idx (@files) {
- $idx =~ s/$_[0]\.docbook/index\.docbook/;
- my @lines = from($idx);
- @lines = grep(!/$re/, @lines);
- open(F, ">$idx") || die "Can't open $idx for write: $!\n";
- print F join("\n", @lines) . "\n";
- close(F);
- update_cache($idx);
- }
-}
-
-my $worker = \&usage;
-
-while (defined ($ARGV[0])) {
- $_ = shift;
- if (/^-a$/) {
- $worker = \&add_doc;
- }
- elsif (/^-r$/) {
- $worker = \&remove_doc;
- }
- else {
- &$worker($_);
- }
-}
diff --git a/etc/plptools.spec.in b/etc/plptools.spec.in
index 1e725a6..fbc6ba0 100644
--- a/etc/plptools.spec.in
+++ b/etc/plptools.spec.in
@@ -175,10 +175,7 @@ make
mkdir -p $RPM_BUILD_ROOT/%{_prefix} $RPM_BUILD_ROOT%{_initrddir} \
# rpm's makeinstall doesn't work here!
make DESTDIR=$RPM_BUILD_ROOT install
-install -m 644 conf/kiodoc-update.pl \
- $RPM_BUILD_ROOT%{_datadir}/%{name}/kiodoc-update.pl
%if "%{isSUSE}" > "0"
-%if "%{REL}" >= "8.0"
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
cat>$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/psion<<EOF
START_NCPD=yes
@@ -188,11 +185,8 @@ PLPNFSD_ARGS=
START_PLPPRINTD=yes
PLPPRINTD_ARGS=
EOF
-install -m755 etc/psion.SuSE8 $RPM_BUILD_ROOT%{_initrddir}/psion
-%else
install -m755 etc/psion.SuSE $RPM_BUILD_ROOT%{_initrddir}/psion
%endif
-%endif
%if "%{isRH}" > "0"
install -m755 etc/psion $RPM_BUILD_ROOT%{_initrddir}/psion
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig