Bläddra i källkod

upgrading package: leo 1.27 -> 1.31

Ralf S. Engelschall 17 år sedan
förälder
incheckning
21acce6215
2 ändrade filer med 20 tillägg och 36 borttagningar
  1. 8 28
      leo/leo.patch
  2. 12 8
      leo/leo.spec

+ 8 - 28
leo/leo.patch

@@ -1,7 +1,7 @@
 Index: leo
---- leo.orig	2007-02-14 09:20:42 +0100
-+++ leo	2007-10-20 10:06:00 +0200
-@@ -34,8 +34,8 @@
+--- leo.orig	2008-04-07 15:28:59 +0200
++++ leo	2008-04-08 08:44:13 +0200
+@@ -31,8 +31,8 @@
  #
  my $highlight = 1;
  my $default_c = "\033[0m";    # reset default terminal color
@@ -10,29 +10,9 @@ Index: leo
 +my $bold_c    = "\033[0;1m";  # bold text
 +my $blue_c    = "\033[0;34m"; # blue color
  
- my $ip        = "dict.leo.org";
- my $port      = "80";
-@@ -378,6 +378,9 @@
-   # remove hard whitespaces
-   $site =~ s/ //gs;
- 
-+  # remove special characters
-+  $site =~ s/ //gs;
-+
-   # remove remaining tags (beside td and tr)
-   $site =~ s/<\/*(i|a|b|font|small|strong)>//gsi;
- 
-@@ -399,6 +402,9 @@
-   # remove javascript links
-   $site =~ s/<a onclick[^>]*>//gsi;
- 
-+  # remove sub/super-script word annotations
-+  $site =~ s/<(sub|sup)>.*?<\/\1>//gsi;
-+
-   # make single line per entry
-   my @segments = split /<\/TR>\s*<TR>/i, $site;
-   my $progress;
-@@ -517,18 +523,13 @@
+ my $version   = "1.31";
+ my $config    = $ENV{HOME} . "/.leo";
+@@ -267,18 +267,13 @@
      # dict entry
      $entry->{left} =~ s/^(.*)$/$1 . " " x ($maxsize - length($1))/e;
      if ($highlight) {
@@ -47,8 +27,8 @@ Index: leo
  
 -print "$copy_c" if $highlight;
 -print "\n     Fetched by leo $version via http://dict.leo.org/";
--print "\n     Copyright  ©  LEO  Dictionary Team 1995-2007";
--print "\n     [leo] GPL Copyleft © Thomas Linden 2000-2007\n\n";
+-print "\n     Copyright  ©  LEO  Dictionary Team 1995-2008";
+-print "\n     [leo] GPL Copyleft © Thomas Linden 2000-2008\n\n";
 -print "$default_c" if $highlight;
  
  

+ 12 - 8
leo/leo.spec

@@ -31,17 +31,17 @@ Distribution: OpenPKG Community
 Class:        EVAL
 Group:        Searching
 License:      GPL
-Version:      1.27
-Release:      20080101
+Version:      1.31
+Release:      20080408
 
 #   list of sources
-Source0:      http://www.daemon.de/files/mirror/ftp.daemon.de/scip/Scripts/leo-%{version}.tar.gz
+Source0:      http://www.daemon.de/files/mirror/ftp.daemon.de/scip/PerlModules/WWW-Dict-Leo-Org-%{version}.tar.gz
 Patch0:       leo.patch
 
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20040130, perl
+BuildPreReq:  OpenPKG, openpkg >= 20040130, perl, perl-openpkg
 PreReq:       OpenPKG, openpkg >= 20040130, perl, perl-db
 AutoReq:      no
 AutoReqProv:  no
@@ -54,18 +54,21 @@ AutoReqProv:  no
     prog leo = {
         version   = %{version}
         url       = http://www.daemon.de/ScriptsLeo
-        regex     = leo-(__VER__)\.tar\.gz
+        regex     = WWW-Dict-Leo-Org-(__VER__)\.tar\.gz
     }
 
 %prep
-    %setup -q
+    %setup -q -n WWW-Dict-Leo-Org-%{version}
     %patch -p0
 
 %build
-    %{l_prefix}/bin/pod2man leo.pod >leo.1
+    %{l_prefix}/bin/pod2man leo >leo.1
 
 %install
     rm -rf $RPM_BUILD_ROOT
+    %{l_prefix}/bin/perl-openpkg prepare
+    %{l_prefix}/bin/perl-openpkg configure build install
+    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
     %{l_shtool} mkdir -f -p -m 755 \
         $RPM_BUILD_ROOT%{l_prefix}/bin \
         $RPM_BUILD_ROOT%{l_prefix}/man/man1
@@ -74,7 +77,8 @@ AutoReqProv:  no
         leo $RPM_BUILD_ROOT%{l_prefix}/bin/
     %{l_shtool} install -c -m 644 \
         leo.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
-    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+        %{l_files_std} `cat perl-openpkg-files`
 
 %files -f files