[snowball-java] Initial import (#1005785).

gil gil at fedoraproject.org
Thu Jan 23 13:15:55 UTC 2014


commit 07f019e80c31f5a4f77ab65df9221ed452a1d926
Author: gil <puntogil at libero.it>
Date:   Thu Jan 23 14:16:06 2014 +0100

    Initial import (#1005785).

 .gitignore                                  |    1 +
 snowball-BSD-license.txt                    |   25 ++++++++++
 snowball-java.spec                          |   68 +++++++++++++++++++++++++++
 snowball-notice.txt                         |   11 ++++
 snowball-remove-unreachable-statement.patch |   29 +++++++++++
 snowball-template-pom.xml                   |   53 +++++++++++++++++++++
 sources                                     |    1 +
 7 files changed, 188 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4d4e368 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libstemmer_java.tgz
diff --git a/snowball-BSD-license.txt b/snowball-BSD-license.txt
new file mode 100644
index 0000000..c40db43
--- /dev/null
+++ b/snowball-BSD-license.txt
@@ -0,0 +1,25 @@
+Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
+Copyright (c) 2002, Richard Boulton.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/snowball-java.spec b/snowball-java.spec
new file mode 100644
index 0000000..1b85736
--- /dev/null
+++ b/snowball-java.spec
@@ -0,0 +1,68 @@
+Name:          snowball-java
+Version:       0
+Release:       0.1.20130902%{?dist}
+Summary:       Java stemming algorithm library
+License:       BSD
+URL:           http://snowball.tartarus.org/index.php
+Source0:       http://snowball.tartarus.org/dist/libstemmer_java.tgz
+# Custom pom file
+Source1:       snowball-template-pom.xml
+# http://snowball.tartarus.org/license.php
+Source2:       snowball-notice.txt
+# see http://snowball.tartarus.org/license.php
+# http://www.opensource.org/licenses/bsd-license.html
+Source3:       snowball-BSD-license.txt
+# Build fix remove 'break;' 
+Patch0:        snowball-remove-unreachable-statement.patch
+
+BuildRequires: java-devel
+BuildRequires: maven-local
+BuildArch:     noarch
+
+%description
+Snowball is a small string processing language
+designed for creating stemming algorithms
+for use in Information Retrieval.
+
+This package contains all you need to include the
+snowball stemming algorithms into a Java
+project of your own. If you use this,
+you don't need to use the snowball compiler,
+or worry about the internals of the
+stemmers in any way.
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n libstemmer_java
+
+%patch0 -p0
+
+cp -p %{SOURCE1} pom.xml
+sed -i "s|@VERSION@|%{version}|" pom.xml
+
+cp -p %{SOURCE2} notice.txt
+cp -p %{SOURCE3} license.txt
+sed -i 's/\r//' license.txt notice.txt
+
+%build
+
+%mvn_file : %{name}
+%mvn_build
+
+%install
+%mvn_install
+
+%files -f .mfiles
+%doc license.txt notice.txt
+
+%files javadoc -f .mfiles-javadoc
+%doc license.txt notice.txt
+
+%changelog
+* Mon Sep 02 2013 gil cattaneo <puntogil at libero.it> 0-0.1.20130902
+- initial rpm
\ No newline at end of file
diff --git a/snowball-notice.txt b/snowball-notice.txt
new file mode 100644
index 0000000..1de37d8
--- /dev/null
+++ b/snowball-notice.txt
@@ -0,0 +1,11 @@
+All the software given out on this Snowball site is covered by the BSD License
+(see http://www.opensource.org/licenses/bsd-license.html ), with Copyright (c) 2001,
+Dr Martin Porter, and (for the Java developments) Copyright (c) 2002, Richard Boulton.
+
+Essentially, all this means is that you can do what you like with the code,
+except claim another Copyright for it, or claim that it is issued under a different license.
+The software is also issued without warranties, which means that if anyone suffers through its use,
+they cannot come back and sue you. You also have to alert anyone to whom you give the
+Snowball software to the fact that it is covered by the BSD license.
+
+We have not bothered to insert the licensing arrangement into the text of the Snowball software.
\ No newline at end of file
diff --git a/snowball-remove-unreachable-statement.patch b/snowball-remove-unreachable-statement.patch
new file mode 100644
index 0000000..46f6be8
--- /dev/null
+++ b/snowball-remove-unreachable-statement.patch
@@ -0,0 +1,29 @@
+--- java/org/tartarus/snowball/ext/frenchStemmer.java	2013-04-28 08:01:24.000000000 +0200
++++ java/org/tartarus/snowball/ext/frenchStemmer.java-gil	2013-09-02 18:17:56.055397810 +0200
+@@ -997,7 +997,7 @@
+                             // <-, line 155
+                             slice_from("ant");
+                             return false;
+-                            break;
++                            //break;
+                         case 14:
+                             // (, line 156
+                             // call RV, line 156
+@@ -1010,7 +1010,7 @@
+                             // <-, line 156
+                             slice_from("ent");
+                             return false;
+-                            break;
++                            //break;
+                         case 15:
+                             // (, line 158
+                             // test, line 158
+@@ -1031,7 +1031,7 @@
+                             // delete, line 158
+                             slice_del();
+                             return false;
+-                            break;
++                            //break;
+                     }
+                     return true;
+                 }
diff --git a/snowball-template-pom.xml b/snowball-template-pom.xml
new file mode 100644
index 0000000..ae154a5
--- /dev/null
+++ b/snowball-template-pom.xml
@@ -0,0 +1,53 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>org.tartarus</groupId>
+	<artifactId>snowball</artifactId>
+	<packaging>jar</packaging>
+	<version>@VERSION@</version>
+
+	<name>Snowball</name>
+	<inceptionYear>2002</inceptionYear>
+	<url>http://snowball.tartarus.org/</url>
+	<description>Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval.</description>
+
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
+
+	<!--dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies-->
+
+	<build>
+
+		<directory>target</directory>
+
+		<sourceDirectory>java</sourceDirectory>
+		<testSourceDirectory>java</testSourceDirectory>
+
+		<outputDirectory>target/classes</outputDirectory>
+		<testOutputDirectory>target/test-classes</testOutputDirectory>
+
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.0</version>
+				<configuration>
+					<fork>true</fork>
+					<meminitial>128m</meminitial>
+					<maxmem>512m</maxmem>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+		</plugins>			
+	</build>
+</project>
diff --git a/sources b/sources
index e69de29..a42a816 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c710d725e3039689f74ce30126f84110  libstemmer_java.tgz


More information about the scm-commits mailing list