rpms/namazu/devel filter-requires-namazu.sh, NONE, 1.1 namazu-2.0.13-de.patch, NONE, 1.1 namazu-2.0.6-newgettext3.patch, NONE, 1.1 namazu-fixinutf8.patch, NONE, 1.1 namazu-linguas.patch, NONE, 1.1 namazu.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Akira Tagoh (tagoh) fedora-extras-commits at redhat.com
Mon May 30 02:23:27 UTC 2005


Author: tagoh

Update of /cvs/extras/rpms/namazu/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6010/devel

Modified Files:
	.cvsignore sources 
Added Files:
	filter-requires-namazu.sh namazu-2.0.13-de.patch 
	namazu-2.0.6-newgettext3.patch namazu-fixinutf8.patch 
	namazu-linguas.patch namazu.spec 
Log Message:
auto-import namazu-2.0.14-2 on branch devel from namazu-2.0.14-2.src.rpm


--- NEW FILE filter-requires-namazu.sh ---
#!/bin/sh

/usr/lib/rpm/find-requires $* | grep -v 'perl(nmzidx.pl)'

namazu-2.0.13-de.patch:

--- NEW FILE namazu-2.0.13-de.patch ---
diff -ruN namazu-2.0.13.orig/template/NMZ.head.de namazu-2.0.13/template/NMZ.head.de
--- namazu-2.0.13.orig/template/NMZ.head.de	2002-07-11 16:20:02.000000000 +0900
+++ namazu-2.0.13/template/NMZ.head.de	2004-04-16 15:54:38.547695254 +0900
@@ -22,14 +22,14 @@
 		   font-weight: bold; }
 --></style>
 </head>
-<body lang="dn">
+<body lang="de">
 <h1>Namazu: eine Volltext-Suchmaschine</h1>
 <p>
-Dieser Index enthält <!-- FILE --> 0 <!-- FILE --> Dokumente und
+Dieser Index enthält <!-- FILE --> 0 <!-- FILE --> Dokumente und
 <!-- KEY --> 0 <!-- KEY --> Keywords. 
 </p>
 <p>
-<strong>Zuletzt verändert: <!-- DATE --> date <!-- DATE --></strong>
+<strong>Zuletzt verändert: <!-- DATE --> date <!-- DATE --></strong>
 </p>
 <hr>
 <form method="GET" action="{cgi}">
@@ -63,8 +63,8 @@
 <option value="field:subject:descending">nach Titel, fallend</option>
 <option value="field:from:ascending">nach Autor, aufsteigend</option>
 <option value="field:from:descending">nach Autor, fallend</option>
-<option value="field:size:ascending">nach Größe, aufsteigend</option>
-<option value="field:size:descending">nach Größe, fallend</option>
+<option value="field:size:ascending">nach Größe, aufsteigend</option>
+<option value="field:size:descending">nach Größe, fallend</option>
 <option value="field:uri:ascending">nach URI, aufsteigend</option>
 <option value="field:uri:descending">nach URI, fallend</option>
 </select>

namazu-2.0.6-newgettext3.patch:

--- NEW FILE namazu-2.0.6-newgettext3.patch ---
--- namazu-2.0.6.orig/nmz/i18n.c	Sun Sep  2 16:13:37 2001
+++ namazu-2.0.6/nmz/i18n.c	Tue Sep 11 14:49:12 2001
@@ -50,57 +50,49 @@
  */
 
 static const char *guess_category_value ( const char *categoryname );
-static char *get_lang_by_category ( const char *categoryname );
 
 
 /* The following is (partly) taken from the gettext package.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.  */
+   Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.  */
 
 static const char *
 guess_category_value (const char *categoryname)
 {
+    const char *language;
     const char *retval;
 
     if (!strcmp(categoryname, "LC_MESSAGES")) {
 
 	/* The highest priority value is the `LANGUAGE' environment
-	   variable.  This is a GNU extension.  */
-	retval = getenv ("LANGUAGE");
-	if (retval != NULL && retval[0] != '\0')
-	    return retval;
+	   variable.  But we don't use the value if the currently selected
+	   locale is the C locale.  This is a GNU extension.  */
+	language = getenv ("LANGUAGE");
+	if (language != NULL && language[0] == '\0')
+	    language = NULL;
+    } else {
+	language = NULL;
     }
 
-    /* `LANGUAGE' is not set.  So we have to proceed with the POSIX
-       methods of looking to `LC_ALL', `LC_xxx', and `LANG'.  On some
-       systems this can be done by the `setlocale' function itself.  */
+    /* We have to proceed with the POSIX methods of looking to `LC_ALL',
+       `LC_xxx', and `LANG'.  On some systems this can be done by the
+       `setlocale' function itself.  */
 
     /* Setting of LC_ALL overwrites all other.  */
     retval = getenv ("LC_ALL");  
-    if (retval != NULL && retval[0] != '\0')
-	return retval;
-
-    /* Next comes the name of the desired category.  */
-    retval = getenv (categoryname);
-    if (retval != NULL && retval[0] != '\0')
-	return retval;
-
-    /* Last possibility is the LANG environment variable.  */
-    retval = getenv ("LANG");
-    if (retval != NULL && retval[0] != '\0')
-	return retval;
-
-    return NULL;
-}
+    if (retval == NULL || retval[0] == '\0') {
+	/* Next comes the name of the desired category.  */
+	retval = getenv (categoryname);
+	if (retval == NULL || retval[0] == '\0') {
+	    /* Last possibility is the LANG environment variable.  */
+	    retval = getenv ("LANG");
+	    if (retval == NULL || retval[0] == '\0')
+		/* We use C as the default domain.  POSIX says this is
+		   implementation defined.  */
+		return "C";
+	}
+    }
 
-static char *
-get_lang_by_category(const char *categoryname) 
-{
-    char *lang;
-    lang = (char *)guess_category_value(categoryname);
-    if (lang == NULL)
-	return "C";
-    else
-	return lang;
+    return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
 }
 
 /*
@@ -115,7 +107,7 @@
     const char* env;
 
     env = guess_category_value("LC_MESSAGES");
-    if (env == NULL && *lang != '\0') {
+    if (env == "C" && lang[0] != '\0') {
 #ifdef HAVE_SETENV
 	setenv("LANG", lang, 1);
 #else
@@ -145,13 +137,13 @@
 char *
 nmz_get_lang(void)
 {
-    return get_lang_by_category("LC_MESSAGES");
+    return (char *)guess_category_value("LC_MESSAGES");
 }
 
 char *
 nmz_get_lang_ctype(void)
 {
-    return get_lang_by_category("LC_CTYPE");
+    return (char *)guess_category_value("LC_CTYPE");
 }
 
 /*
--- namazu-2.0.6.orig/pl/util.pl	Fri Jul 27 11:19:43 2001
+++ namazu-2.0.6/pl/util.pl	Sat Aug 11 20:51:27 2001
@@ -214,12 +214,17 @@
 }
 
 sub set_lang () {
-    for my $cand (("LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG")) {
+    for my $cand (("LC_ALL", "LC_MESSAGES", "LANG")) {
 	if (defined($ENV{$cand})) {
 	    $util::LANG_MSG = $ENV{$cand};
 	    last;
 	}
     }
+
+    if ($util::LANG_MSG ne "C" && defined($ENV{"LANGUAGE"})){
+	$util::LANG_MSG = $ENV{"LANGUAGE"};
+    }
+
     for my $cand (("LC_ALL", "LC_CTYPE", "LANG")) {
 	if (defined($ENV{$cand})) {
 	    $util::LANG = $ENV{$cand};

namazu-fixinutf8.patch:

--- NEW FILE namazu-fixinutf8.patch ---
diff -uNr namazu-2.0.13/filter/Makefile.am utf8.namazu-2.0.13/filter/Makefile.am
--- namazu-2.0.13/filter/Makefile.am	2003-08-24 19:41:55.000000000 +0900
+++ utf8.namazu-2.0.13/filter/Makefile.am	2004-04-15 16:12:10.000000000 +0900
@@ -20,6 +20,8 @@
 	      hnf.pl \
 	      html.pl \
 	      mailnews.pl \
+	      langspec.txt \
+	      langspec.txt.utf8 \
 	      man.pl \
 	      mhonarc.pl \
 	      msword.pl \
diff -uNr namazu-2.0.13/filter/Makefile.in utf8.namazu-2.0.13/filter/Makefile.in
--- namazu-2.0.13/filter/Makefile.in	2004-04-14 03:09:02.000000000 +0900
+++ utf8.namazu-2.0.13/filter/Makefile.in	2004-04-15 16:13:32.000000000 +0900
@@ -167,7 +167,9 @@
               rtf.pl \
               apachecache.pl \
               macbinary.pl \
-              mp3.pl
+              mp3.pl \
+	      langspec.txt \
+	      langspec.txt.utf8
 
 
 EXTRA_DIST = $(filter_DATA)
diff -uNr namazu-2.0.13/filter/hnf.pl utf8.namazu-2.0.13/filter/hnf.pl
--- namazu-2.0.13/filter/hnf.pl	2001-11-29 18:31:43.000000000 +0900
+++ utf8.namazu-2.0.13/filter/hnf.pl	2004-04-15 16:12:10.000000000 +0900
@@ -69,8 +69,10 @@
 
     my $mark = "# ";
     my $end  = "--";
-    $mark = "¢£" if util::islang("ja");
-    $end  = "¢§" if util::islang("ja");
+    my $char = util::read_langspec_char_from_file ("./langspec.txt", "hnf.pl_filter_1");
+    $mark = $char if (util::islang("ja") && $char ne "");
+    $char = util::read_langspec_char_from_file ("./langspec.txt", "hnf.pl_filter_2");
+    $end = $char if (util::islang("ja") && $char ne "");
 
     get_uri($cfile, $fields);
     hnf_filter($contref, $weighted_str, $fields, $headings, $cfile, 
diff -uNr namazu-2.0.13/filter/langspec.txt utf8.namazu-2.0.13/filter/langspec.txt
--- namazu-2.0.13/filter/langspec.txt	1970-01-01 09:00:00.000000000 +0900
+++ utf8.namazu-2.0.13/filter/langspec.txt	2004-04-15 16:12:10.000000000 +0900
@@ -0,0 +1,8 @@
+mailnews.pl_mailnews_citation_filter_1: (^\s*((([\xa1-\xfe][\xa1-\xfe]){1,8}|([\x21-\x7e]{1,16}))\s*(¡£|¡¥|\.|¡¤|,|¡¢|\@|¡÷|¤Î)\s*){0,2}\s*(([\xa1-\xfe][\xa1-\xfe]){1,8}|([\x21-\x7e]{1,16}))\s*(¤Ç¤¹|¤È¿½¤·¤Þ¤¹|¤È¤â¤¦¤·¤Þ¤¹|¤È¤¤¤¤¤Þ¤¹)(.{0,2})?\s*$)
+mailnews.pl_mailnews_citation_filter_2: (^\s*(Date:|Subject:|Message-ID:|From:|·ï̾|º¹½Ð¿Í|Æü»þ))|(^.+(ÊÖ»ö¤Ç¤¹|reply\s*¤Ç¤¹|Û©¤¯|¤¤¤ï¤¯|½ñ¤­¤Þ¤·¤¿|¸À¤¤¤Þ¤·¤¿|ÏäÇ|wrote|said|writes|says)(.{0,2})?\s*$)|(^.*In .*(article|message))|(<\S+\@([\w\-.]\.)+\w+>)
+man.pl_man_filter_1: ^(?:NAME|̾Á°|̾¾Î)\s*\n(.*?)\n\n
+man.pl_man_filter_2: \A(.+^(?:DESCRIPTION ²òÀâ|DESCRIPTIONS?|SHELL GRAMMAR|INTRODUCTION|¡Ú³µÍסÛ|²òÀâ|ÀâÌÀ|µ¡Ç½ÀâÌÀ|´ðËܵ¡Ç½ÀâÌÀ)\s*\n)
+hnf.pl_filter_1: ¢£
+hnf.pl_filter_2: ¢§
+gfilter.pl_line_adjust_filter: (¡£|¡¢)$
+wakati.pl_wakatize_japanese: (.+ )̾»ì
diff -uNr namazu-2.0.13/filter/langspec.txt.utf8 utf8.namazu-2.0.13/filter/langspec.txt.utf8
--- namazu-2.0.13/filter/langspec.txt.utf8	1970-01-01 09:00:00.000000000 +0900
+++ utf8.namazu-2.0.13/filter/langspec.txt.utf8	2004-04-15 16:12:10.000000000 +0900
@@ -0,0 +1,8 @@
+mailnews.pl_mailnews_citation_filter_1: (^\s*((([\xa1-\xfe][\xa1-\xfe]){1,8}|([\x21-\x7e]{1,16}))\s*(。|.|\.|,|,|、|\@|@|の)\s*){0,2}\s*(([\xa1-\xfe][\xa1-\xfe]){1,8}|([\x21-\x7e]{1,16}))\s*(です|と申します|ともうします|といいます)(.{0,2})?\s*$)
+mailnews.pl_mailnews_citation_filter_2: (^\s*(Date:|Subject:|Message-ID:|From:|件名|差出人|日時))|(^.+(返事です|reply\s*です|曰く|いわく|書きました|言いました|話で|wrote|said|writes|says)(.{0,2})?\s*$)|(^.*In .*(article|message))|(<\S+\@([\w\-.]\.)+\w+>)
+man.pl_man_filter_1: ^(?:NAME|名前|名称)\s*\n(.*?)\n\n
+man.pl_man_filter_2: \A(.+^(?:DESCRIPTION 解説|DESCRIPTIONS?|SHELL GRAMMAR|INTRODUCTION|【概要】|解説|説明|機能説明|基本機能説明)\s*\n)
+hnf.pl_filter_1: â– 
+hnf.pl_filter_2: â–¼
+gfilter.pl_line_adjust_filter: (。|、)$
+wakati.pl_wakatize_japanese: (.+ )名詞
diff -uNr namazu-2.0.13/filter/mailnews.pl utf8.namazu-2.0.13/filter/mailnews.pl
--- namazu-2.0.13/filter/mailnews.pl	2004-03-21 00:48:30.000000000 +0900
+++ utf8.namazu-2.0.13/filter/mailnews.pl	2004-04-15 16:12:10.000000000 +0900
@@ -182,13 +182,23 @@
     $$contref = "";
 
     # Greeting at the beginning (first one or two lines)
+    my $regexp = util::read_langspec_char_from_file ("./langspec.txt", "mailnews.pl_mailnews_citation_filter_1");
     for (my $i = 0; $i < 2 && defined($tmp[$i]); $i++) {
-	if ($tmp[$i] =~ /(^\s*((([\xa1-\xfe][\xa1-\xfe]){1,8}|([\x21-\x7e]{1,16}))\s*(¡£|¡¥|\.|¡¤|,|¡¢|\@|¡÷|¤Î)\s*){0,2}\s*(([\xa1-\xfe][\xa1-\xfe]){1,8}|([\x21-\x7e]{1,16}))\s*(¤Ç¤¹|¤È¿½¤·¤Þ¤¹|¤È¤â¤¦¤·¤Þ¤¹|¤È¤¤¤¤¤Þ¤¹)(.{0,2})?\s*$)/) {
-	    # for searching debug info by perl -n00e 'print if /^<<<</'
-	    util::dprint("\n\n<<<<$tmp[$i]>>>>\n\n");
-	    $omake .= $tmp[$i] . "\n";
-	    $tmp[$i] = "";
-        }
+	if ($regexp eq "") {
+	    if ($tmp[$i] =~ /(^\s*((([\xa1-\xfe][\xa1-\xfe]){1,8}|([\x21-\x7e]{1,16}))\s*(\.|,|\@)\s*){0,2}\s*(([\xa1-\xfe][\xa1-\xfe]){1,8}|([\x21-\x7e]{1,16}))\s*(.{0,2})?\s*$)/) {
+		# for searching debug info by perl -n00e 'print if /^<<<</'
+		util::dprint("\n\n<<<<$tmp[$i]>>>>\n\n");
+		$omake .= $tmp[$i] . "\n";
+		$tmp[$i] = "";
+            }
+	} else {
+	    if ($tmp[$i] =~ /$regexp/) {
+		# for searching debug info by perl -n00e 'print if /^<<<</'
+		util::dprint("\n\n<<<<$tmp[$i]>>>>\n\n");
+		$omake .= $tmp[$i] . "\n";
+		$tmp[$i] = "";
+            }
+	}
     }
 
     # Isolate citation parts.
@@ -213,11 +223,22 @@
         # Process only first five paragrahs.
 	# And don't handle the paragrah which has five or longer lines.
 	# Hmm, this regex looks very hairly.
-	if ($i < 5 && ($line =~ tr/\n/\n/) <= 5 && $line =~ /(^\s*(Date:|Subject:|Message-ID:|From:|·ï̾|º¹½Ð¿Í|Æü»þ))|(^.+(ÊÖ»ö¤Ç¤¹|reply\s*¤Ç¤¹|Û©¤¯|¤¤¤ï¤¯|½ñ¤­¤Þ¤·¤¿|¸À¤¤¤Þ¤·¤¿|ÏäÇ|wrote|said|writes|says)(.{0,2})?\s*$)|(^.*In .*(article|message))|(<\S+\@([\w\-.]\.)+\w+>)/im) {
-	    util::dprint("\n\n<<<<$line>>>>\n\n");
-	    $omake .= $line . "\n";
-	    $line = "";
-	    next;
+	$regexp = util::read_langspec_char_from_file ("./langspec.txt", "mailnews.pl_mailnews_citation_filter_2");
+
+	if ($regexp eq "") {
+	    if ($i < 5 && ($line =~ tr/\n/\n/) <= 5 && $line =~ /(^\s*(Date:|Subject:|Message-ID:|From:))|(^.+(wrote|said|writes|says)(.{0,2})?\s*$)|(^.*In .*(article|message))|(<\S+\@([\w\-.]\.)+\w+>)/im) {
+		util::dprint("\n\n<<<<$line>>>>\n\n");
+		$omake .= $line . "\n";
+		$line = "";
+		next;
+	    }
+        } else {
+	    if ($i < 5 && ($line =~ tr/\n/\n/) <= 5 && $line =~ /$regexp/im) {
+		util::dprint("\n\n<<<<$line>>>>\n\n");
+		$omake .= $line . "\n";
+		$line = "";
+		next;
+	    }
 	}
 	$$contref .= $line. "\n\n";
         $i++;
diff -uNr namazu-2.0.13/filter/man.pl utf8.namazu-2.0.13/filter/man.pl
--- namazu-2.0.13/filter/man.pl	2002-02-13 16:39:14.000000000 +0900
+++ utf8.namazu-2.0.13/filter/man.pl	2004-04-15 16:12:10.000000000 +0900
@@ -140,17 +140,36 @@
     my $weight = $conf::Weight{'html'}->{'title'};
     $$weighted_str .= "\x7f$weight\x7f$title\x7f/$weight\x7f\n";
 
-    if ($$contref =~ /^(?:NAME|̾Á°|̾¾Î)\s*\n(.*?)\n\n/ms) {
-	$name = "$1::\n";
-	$weight = $conf::Weight{'html'}->{'h1'};
-	$$weighted_str .= "\x7f$weight\x7f$1\x7f/$weight\x7f\n";
+    my $regexp = util::read_langspec_char_from_file ("./langspec.txt", "man.pl_man_filter_1");
+
+    if ($regexp eq "") {
+	if ($$contref =~ /^(?:NAME)\s*\n(.*?)\n\n/ms) {
+	    $name = "$1::\n";
+	    $weight = $conf::Weight{'html'}->{'h1'};
+	    $$weighted_str .= "\x7f$weight\x7f$1\x7f/$weight\x7f\n";
+	}
+    } else {
+	if ($$contref =~ /$regexp/ms) {
+	    $name = "$1::\n";
+	    $weight = $conf::Weight{'html'}->{'h1'};
+	    $$weighted_str .= "\x7f$weight\x7f$1\x7f/$weight\x7f\n";
+	}
     }
 
-    if ($$contref =~ 
-	s/\A(.+^(?:DESCRIPTION ²òÀâ|DESCRIPTIONS?|SHELL GRAMMAR|INTRODUCTION|¡Ú³µÍסÛ|²òÀâ|ÀâÌÀ|µ¡Ç½ÀâÌÀ|´ðËܵ¡Ç½ÀâÌÀ)\s*\n)//ims) 
-    {
-	$$contref = $name . $$contref;
-	$$weighted_str .= "\x7f1\x7f$1\x7f/1\x7f\n";
+    $regexp = util::read_langspec_char_from_file ("./langspec.txt", "man.pl_man_filter_2");
+
+    if ($regexp eq "") {
+	if ($$contref =~ 
+	    s/\A(.+^(?:DESCRIPTIONS?|SHELL GRAMMAR|INTRODUCTION)\s*\n)//ims) 
+	{
+	    $$contref = $name . $$contref;
+	    $$weighted_str .= "\x7f1\x7f$1\x7f/1\x7f\n";
+	}
+    } else {
+	if ($$contref =~ s/$regexp//ims) {
+	    $$contref = $name . $$contref;
+	    $$weighted_str .= "\x7f1\x7f$1\x7f/1\x7f\n";
+	}
     }
 }
 
diff -uNr namazu-2.0.13/pl/gfilter.pl utf8.namazu-2.0.13/pl/gfilter.pl
--- namazu-2.0.13/pl/gfilter.pl	2004-01-31 03:28:19.000000000 +0900
+++ utf8.namazu-2.0.13/pl/gfilter.pl	2004-04-15 16:12:10.000000000 +0900
@@ -90,13 +90,14 @@
     return undef unless defined($$text);
 
     my @tmp = split(/\n/, $$text);
+    my $regexp = util::read_langspec_char_from_file ("../filter/langspec.txt", "gfilter.pl_line_adjust_filter");
     for my $line (@tmp) {
 	$line .= "\n";
 	$line =~ s/^[ \>\|\#\:]+//;
 	$line =~ s/ +$//;
 	$line =~ s/\n// if (($line =~ /[\xa1-\xfe]\n*$/) &&
 			    (length($line) >=40));
-	$line =~ s/(¡£|¡¢)$/$1\n/;
+	$line =~ s/$regexp/$1\n/ if ($regexp ne "");
 	$line =~ s/([a-z])-\n/$1/;  # for hyphenation.
     }
     $$text = join('', @tmp);
diff -uNr namazu-2.0.13/pl/util.pl utf8.namazu-2.0.13/pl/util.pl
--- namazu-2.0.13/pl/util.pl	2004-03-19 00:54:09.000000000 +0900
+++ utf8.namazu-2.0.13/pl/util.pl	2004-04-15 16:12:10.000000000 +0900
@@ -331,4 +331,36 @@
     }
 }
 
+sub read_langspec_char_from_file ($$) {
+    my ($file, $func) = @_;
+
+    require I18N::Langinfo;
+
+    I18N::Langinfo->import (qw (langinfo CODESET));
+
+    my $locale_encoding = langinfo (CODESET ());
+
+    if (defined $locale_encoding && $locale_encoding eq 'UTF-8') {
+	$locale_encoding = ".utf8";
+    } else {
+	$locale_encoding = "";
+    }
+
+    my $fh = util::fopen ($file . $locale_encoding) || print "\n\n$file$locale_encoding can't read.\n\n" && return "";
+    my @regexp = <$fh>;
+    my $retval = "";
+    $fh->close;
+
+    for my $regexp (@regexp) {
+	if ($regexp =~ /^$func: (.*)$/) {
+	    $retval = $1;
+	}
+    }
+
+    if ($retval eq "") {
+	util::dprint ("\n\n$file$locale_encoding has no entry for $func\n\n");
+    }
+    return $retval;
+}
+
 1;
diff -uNr namazu-2.0.13/pl/wakati.pl utf8.namazu-2.0.13/pl/wakati.pl
--- namazu-2.0.13/pl/wakati.pl	2004-03-04 16:25:57.000000000 +0900
+++ utf8.namazu-2.0.13/pl/wakati.pl	2004-04-15 16:12:48.000000000 +0900
@@ -53,8 +53,10 @@
     # Collect only noun words when -m option is specified.
     if ($var::Opt{'noun'}) {
 	$$content = "";
-	$$content .= shift(@tmp) =~ /(.+ )\xcc\xbe\xbb\xec/ ? $1 : "" while @tmp; 
-	# noun (meisi) in Japanese "cc be bb ec"
+ 	my $regexp = util::read_langspec_char_from_file ("../filter/langspec.txt", "wakati.pl_wakatize_japanese");
+ 	if ($regexp ne "") {
+ 	    $$content .= shift(@tmp) =~ /$regexp/ ? $1 : "" while @tmp; 
+ 	}
     } else {
 	$$content = join("\n", @tmp);
     }

namazu-linguas.patch:

--- NEW FILE namazu-linguas.patch ---
diff -ruN namazu-2.0.13.orig/configure.in namazu-2.0.13/configure.in
--- namazu-2.0.13.orig/configure.in	2004-04-14 02:48:27.000000000 +0900
+++ namazu-2.0.13/configure.in	2004-04-14 21:25:49.129113800 +0900
@@ -85,7 +85,7 @@
 dnl *
 dnl * I18N
 dnl *
-ALL_LINGUAS="ja ja_JP.SJIS es fr"
+ALL_LINGUAS="ja es fr"
 AM_GNU_GETTEXT([external])
 AM_LC_MESSAGES
 


--- NEW FILE namazu.spec ---
%define _use_internal_dependency_generator 0

# XXX is this right - it was /var/lib before FHS macros
%define _localstatedir	/var/lib
%define _libexecdir	/var/www/cgi-bin

Summary:	Namazu is a full-text search engine
Name:		namazu
Version:	2.0.14
Release: 2
License:	GPL
Group:		Applications/Text
URL:		http://www.namazu.org/
BuildRequires:	perl >= 5.6.0, perl-NKF >= 1.70, perl-Text-Kakasi >= 1.00
BuildPreReq:	perl-File-MMagic >= 1.12
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Requires:	perl >= 5.6.0, perl-File-MMagic >= 1.12, perl-NKF >= 1.70
Requires:	kakasi >= 2.3.0, perl-Text-Kakasi >= 1.00

## recompressed with bzip instead of gzip
Source:		http://www.namazu.org/stable/%{name}-%{version}.tar.gz

Patch0:		namazu-linguas.patch
Patch1:		namazu-2.0.6-newgettext3.patch
Patch2:		namazu-fixinutf8.patch
Patch3:		namazu-2.0.13-de.patch

Source1:        filter-requires-namazu.sh
%define __find_requires %{SOURCE1}

%description
Namazu is a full-text search engine software intended for easy use.
Not only it works as CGI program for small or medium scale WWW
search engine, but also works as personal use such as search system
for local HDD.


%package devel
Summary:	Libraries and include files of Namazu
Group:		Development/Libraries
Requires:	%{name} = %{version}

%description devel
Libraries and include files of Namazu.


%package cgi
Summary:	a CGI interface for Namazu
Group:		Applications/Text
Requires:	%{name} = %{version}
Requires:	webserver

%description cgi
A CGI interface for Namazu.


%prep 
%setup -q
%patch0 -p1 -b .linguas
%patch1 -p1 -b .newgettext
%patch2 -p1 -b .fixinutf8
%patch3 -p1 -b .fixde

%build
%configure

if [ "$SMP" != "" ]; then
  make -j$SMP "MAKE=make -j$SMP"
else
  make
fi

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%makeinstall

mv $RPM_BUILD_ROOT%{_sysconfdir}/namazu/namazurc-sample \
	$RPM_BUILD_ROOT%{_sysconfdir}/namazu/namazurc
sed -e "s/\(\$ADDRESS = 'webmaster@\).*\(';\)/\1\2/" $RPM_BUILD_ROOT%{_sysconfdir}/namazu/mknmzrc-sample > $RPM_BUILD_ROOT%{_sysconfdir}/namazu/mknmzrc
rm $RPM_BUILD_ROOT%{_sysconfdir}/namazu/mknmzrc-sample
chmod 755 -R $RPM_BUILD_ROOT%{_localstatedir}/namazu
chmod 755 -R $RPM_BUILD_ROOT%{_localstatedir}/namazu/index

# don't ship ja.po for sjis.
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ja_JP.SJIS
rm -rf $RPM_BUILD_ROOT%{_datadir}/namazu/etc
rm -rf $RPM_BUILD_ROOT%{_datadir}/namazu/doc
rm -rf $RPM_BUILD_DIR/%{name}-%{version}/doc/en/Makefile*
rm -rf $RPM_BUILD_DIR/%{name}-%{version}/doc/ja/Makefile*

%find_lang %{name}

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS ChangeLog ChangeLog.1 CREDITS COPYING HACKING
%doc INSTALL README NEWS THANKS TODO
%doc etc/namazu.png doc/en doc/namazu.css
%lang(es) %doc README-es
%lang(ja) %doc HACKING-ja INSTALL-ja README-ja doc/ja
%dir %{_sysconfdir}/namazu
%dir %{_datadir}/namazu
%dir %{_datadir}/namazu/filter
%dir %{_datadir}/namazu/pl
%dir %{_datadir}/namazu/template
%config %{_sysconfdir}/namazu/*
%{_bindir}/namazu
%{_bindir}/bnamazu
%{_bindir}/*nmz
%{_bindir}/mailutime
%{_bindir}/nmzgrep
%{_bindir}/nmzmerge
%{_libdir}/*.so.*
%{_mandir}/man1/*
%{_datadir}/namazu/filter/*
%{_datadir}/namazu/pl/*
%{_datadir}/namazu/template/*
%dir %{_localstatedir}/namazu
%dir %{_localstatedir}/namazu/index

%files devel
%defattr(-, root, root)
%dir %{_includedir}/namazu
%{_bindir}/nmz-config
%{_includedir}/namazu/*.h
%{_libdir}/*.so
%{_libdir}/*a

%files cgi
%defattr(-, root, root)
%{_libexecdir}/namazu.cgi


%changelog
* Thu Mar 17 2005 Akira TAGOH <tagoh at redhat.com> - 2.0.14-2
- rebuilt

* Fri Dec 17 2004 Akira TAGOH <tagoh at redhat.com> - 2.0.14-1
- Security fix release.
  http://namazu.org/security.html

* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Fri Apr 16 2004 Akira TAGOH <tagoh at redhat.com> 2.0.13-2
- namazu-2.0.13-de.patch: applied to fix German templates.

* Fri Apr 16 2004 Akira TAGOH <tagoh at redhat.com> 2.0.13-1
- New upstream release.
- namazu-2.0.13-linguas.patch: updated.
- namazu-2.0.13-fixinutf8.patch: updated.
- namazu-2.0.12-de.diff: removed.

* Tue Mar 02 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Wed Jun 04 2003 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Thu Jan 23 2003 Akira TAGOH <tagoh at redhat.com> 2.0.12-5
- namazu-2.0.12-fixinutf8.patch: applied to fix 'Malformed UTF-8 character'. (#80113)

* Wed Jan 22 2003 Tim Powers <timp at redhat.com>
- rebuilt

* Wed Jan 08 2003 Akira TAGOH <tagoh at redhat.com> 2.0.12-3
- don't use rpms internal dep generator (#80966)

* Fri Nov 29 2002 Tim Powers <timp at redhat.com> 2.0.12-2
- remove second %%prep statement that rpm is choking on 

* Mon Nov 11 2002 Akira TAGOH <tagoh at redhat.com> 2.0.12-1
- New upstream release.
- namazu-2.0.12-de.diff: applied to add german templetes.
- remove duplicated files. but it was marked as unpackaged files.

* Thu Jul 18 2002 Akira TAGOH <tagoh at redhat.com> 2.0.10-8
- add the owned directory.

* Fri Jun 21 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Thu May 30 2002 Chip Turner <cturner at redhat.com>
- add dependency filter for bogus perl dependencies

* Thu May 23 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Mon Mar 25 2002 Akira TAGOH <tagoh at redhat.com> 2.0.10-4
- Don't ship ja.po for sjis.
- Striped our hostname from mknmzrc.
- Fix directories permission on /var/lib/namazu.

* Wed Feb 27 2002 Akira TAGOH <tagoh at redhat.com> 2.0.10-3
- Build against new environment.

* Wed Jan 09 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Thu Dec 27 2001 Akira TAGOH <tagoh at redhat.com> 2.0.10-1
- New upstream release.
  includes a security fix by upstream.

* Fri Nov 30 2001 Akira TAGOH <tagoh at redhat.com> 2.0.9-1
- New upstream release.

* Tue Nov 27 2001 Akira TAGOH <tagoh at redhat.com> 2.0.8-1
- New upstream release.

* Tue Oct 30 2001 Akira TAGOH <tagoh at redhat.com> 2.0.7-2
- Fixed autoconf issue.

* Wed Oct 17 2001 Akira TAGOH <tagoh at redhat.com> 2.0.7-1
- Rebuild for Red Hat Linux.

* Fri Sep 14 2001 Ryuji Abe <rug at namazu.org> 2.0.7-1
- fix newgettext patch again.

* Tue Sep 11 2001 Ryuji Abe <rug at namazu.org> 2.0.6-2
- fix newgettext patch.

* Mon Aug 13 2001 Ryuji Abe <rug at namazu.org> 2.0.6-1
- update to 2.0.6

* Thu Jul 26 2001 Ryuji Abe <rug at namazu.org>
- fix %%files

* Sat Jun 23 2001 Ryuji Abe <rug at namazu.org>
- fix summary and %%description

* Thu May 31 2001 Ryuji Abe <rug at namazu.org>
- fix %%files
- fix again cgi-bin location to /var/www/cgi-bin

* Mon May 28 2001 Ryuji Abe <rug at namazu.org>
- clean up spec file
- more macros
- provide cgi package
- fix cgi-bin location /home/httpd/cgi-bin to /var/www/namazu-cgi-bin

* Wed Mar 21 2001 Ryuji Abe <rug at namazu.org>
- Rebuilt for 7.1 beta
- more macros
- fix dependencies
- exclude unnecessary ja_JP.SJIS catalog.

* Thu Oct 26 2000 Ryuji Abe <rug at namazu.org>
- Requires perl-File-MMagic >= 1.09.
- Add BuildRequires.

* Tue Aug 22 2000 Ryuji Abe <rug at namazu.org>
- Fixed %%localstatedir /var to /var/lib.

* Tue Apr 25 2000 Ryuji Abe <rug at namazu.org>
- Ignore %%{prefix}/share/namazu/etc.

* Sun Feb 20 2000 Ryuji Abe <raeva at t3.rim.or.jp>
- Install namazu.cgi at /home/httpd/cgi-bin.
- Fixed typo.

* Sat Feb 19 2000 Satoru Takabayashi <satoru-t at is.aist-nara.ac.jp>
- Change URL.

* Tue Feb 15 2000 Ryuji Abe <raeva at t3.rim.or.jp>
- Delete package entries elisp and cgi.

* Wed Feb 02 2000 Ryuji Abe <raeva at t3.rim.or.jp>
- Adapted for namazu-current.
- Changed group Utilities/Text -> Applications/Text.

* Thu Dec 30 1999 Ryuji Abe <raeva at t3.rim.or.jp>
- rpm-3.0.x adaptations.
- Added package entries elisp and cgi (currently comment out). 
  [Merged SAKA Toshihide's changes for Kondara MNU/Linux.]

* Mon Nov 08 1999 Ryuji Abe <raeva at t3.rim.or.jp>
- Changed includedir %%{prefix}/include/namazu.
- Bug fix at configure section.

* Thu Nov 04 1999 Ryuji Abe <raeva at t3.rim.or.jp>
- Added nmz-config in devel package.

* Wed Nov 03 1999 Ryuji Abe <raeva at t3.rim.or.jp>
- Use our definite macros, ver, rel, prefix, sysconfdir, and localstatedir.
- If configure not found, use autogen.sh.
- Optimized for SMP environment.
- Build devel package.

* Tue Oct 12 1999 Ryuji Abe <raeva at t3.rim.or.jp>
- Fixed correctly executables entry at %%files.
- Added missing /usr/share/locale entry at %%files.
 
* Thu Aug 26 1999 Ryuji Abe <raeva at t3.rim.or.jp>
- Requires perl >= 5.004.
- Delete Packager tag.
- Clean up at %%prep.
- Use CFLAGS="$RPM_OPT_FLAGS" at %%build.
- Use $RPM_BUILD_ROOT variables at %%install.
- Change configure option at %%build and %%files for new namazu directory structure.

* Sun May 23 1999 Taku Kudoh <taku at TAHOO.ORG>
- 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/namazu/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	30 May 2005 02:22:01 -0000	1.1
+++ .cvsignore	30 May 2005 02:23:25 -0000	1.2
@@ -0,0 +1 @@
+namazu-2.0.14.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/namazu/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	30 May 2005 02:22:01 -0000	1.1
+++ sources	30 May 2005 02:23:25 -0000	1.2
@@ -0,0 +1 @@
+17d7253ec58241a95c0b80d469be63b2  namazu-2.0.14.tar.gz




More information about the fedora-extras-commits mailing list