[juniversalchardet] Initial import (#1002703).

gil gil at fedoraproject.org
Sat Oct 19 22:07:08 UTC 2013


commit 51218398172fd4767635803a23e4500c2ca4c97f
Author: gil <puntogil at libero.it>
Date:   Sun Oct 20 00:07:02 2013 +0200

    Initial import (#1002703).

 .gitignore                          |    1 +
 juniversalchardet-1.0.3-build.patch |   50 ++++++++++++++++++++++++
 juniversalchardet-1.0.3.pom         |   46 ++++++++++++++++++++++
 juniversalchardet.spec              |   72 +++++++++++++++++++++++++++++++++++
 sources                             |    1 +
 5 files changed, 170 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..51757d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/juniversalchardet-1.0.3.tar.gz
diff --git a/juniversalchardet-1.0.3-build.patch b/juniversalchardet-1.0.3-build.patch
new file mode 100644
index 0000000..2293890
--- /dev/null
+++ b/juniversalchardet-1.0.3-build.patch
@@ -0,0 +1,50 @@
+--- build.xml	2008-07-23 14:46:29.000000000 +0200
++++ build.xml-gil	2013-01-21 11:49:53.832802087 +0100
+@@ -72,7 +72,7 @@
+ 		</javac>
+ 	</target>
+ 
+-	<target name="example" depends="dist">
++	<target name="example">
+ 		<javac	sourcepath=""
+ 				srcdir="${example}"
+ 				destdir="${example}"
+@@ -83,6 +83,10 @@
+ 			<exclude name="**/.svn/"/>
+ 			<exclude name="**/*Test.java"/>
+ 		</javac>
++		<jar	destfile="${dist}/juniversalchardet-example-${version}.jar"
++				basedir="${example}"
++				excludes="**/.svn/"
++		/>
+ 	</target>
+ 
+ 	<target name="dist" depends="compile">
+@@ -100,4 +104,27 @@
+ 			</fileset>
+ 		</delete>
+ 	</target>
++
++	<target name="javadoc">
++		<mkdir dir="${dist}/docs"/>
++		<tstamp>
++			<format property="year" pattern="yyyy" />
++		</tstamp>
++		<javadoc
++			destdir="${dist}/docs"
++			sourcepath="${src}"
++			access="protected"
++			old="false"
++			source="1.5"
++			verbose="false"
++			version="true"
++			use="true"
++			author="true"
++			windowtitle="juniversalchardet ${version} API">
++			<classpath refid="example.classpath"/>
++			<doctitle><![CDATA[<h2>juniversalchardet ${version} API</h2>]]></doctitle>
++			<bottom><![CDATA[<i>Copyright &#169; ${year}. All rights reserved</i>]]></bottom>
++		</javadoc>
++	</target>
++
+ </project>
diff --git a/juniversalchardet-1.0.3.pom b/juniversalchardet-1.0.3.pom
new file mode 100644
index 0000000..d4dacc5
--- /dev/null
+++ b/juniversalchardet-1.0.3.pom
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.googlecode.juniversalchardet</groupId>
+	<artifactId>juniversalchardet</artifactId>
+	<version>1.0.3</version>
+	<packaging>jar</packaging>
+	<name>juniversalchardet</name>
+	<description>Java port of universalchardet</description>
+	<url>http://juniversalchardet.googlecode.com/</url>
+	<licenses>
+		<license>
+			<name>Mozilla Public License 1.1 (MPL 1.1)</name>
+			<url>http://www.mozilla.org/MPL/MPL-1.1.html</url>
+			<distribution>repo</distribution>
+		</license>
+	</licenses>
+	<scm>
+		<connection>scm:svn:http://juniversalchardet.googlecode.com/svn/trunk/</connection>
+		<url>http://code.google.com/p/juniversalchardet/source/browse/</url>
+	</scm>
+	<developers>
+		<developer>
+			<id>takscape</id>
+			<email>takscape at gmail.com</email>
+		</developer>
+	</developers>
+	<build>
+		<sourceDirectory>${basedir}/src</sourceDirectory>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.2</version>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<properties>
+		<project.build.sourceEncoding>us-ascii</project.build.sourceEncoding>
+	</properties>
+</project>
\ No newline at end of file
diff --git a/juniversalchardet.spec b/juniversalchardet.spec
new file mode 100644
index 0000000..1a56365
--- /dev/null
+++ b/juniversalchardet.spec
@@ -0,0 +1,72 @@
+Name:          juniversalchardet
+Version:       1.0.3
+Release:       1%{?dist}
+Summary:       A Java port of Mozilla's universalchardet
+# ALL files are under MPL (v1.1) GPL license
+# build.xml and c/* under MPL 1.1/GPL 2.0/LGPL 2.1 license
+License:       MPLv1.1 or GPLv2+ or LGPLv2+
+URL:           http://code.google.com/p/juniversalchardet/
+Source0:       http://juniversalchardet.googlecode.com/files/%{name}-%{version}.tar.gz
+Source1:       http://repo1.maven.org/maven2/com/googlecode/%{name}/%{name}/%{version}/%{name}-%{version}.pom
+# added javadoc task
+# fix example build
+Patch0:        %{name}-1.0.3-build.patch
+
+BuildRequires: java-devel
+BuildRequires: javapackages-tools
+BuildRequires: ant
+
+Requires:      java
+Requires:      javapackages-tools
+BuildArch:     noarch
+
+%description
+juniversalchardet is a Java port of 'universalchardet',
+that is the encoding detector library of Mozilla.
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n %{name}
+find . -name "*.class" -delete
+find . -name "*.jar" -delete
+
+%patch0 -p0
+
+sed -i 's/\r//' readme.txt
+
+%build
+
+%ant dist javadoc example
+
+%install
+
+mkdir -p %{buildroot}%{_javadir}
+install -pm 644 dist/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+install -pm 644 dist/%{name}-example-%{version}.jar %{buildroot}%{_javadir}/%{name}-example.jar
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr dist/docs/* %{buildroot}%{_javadocdir}/%{name}
+
+%files
+%{_javadir}/%{name}.jar
+%{_javadir}/%{name}-example.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%doc MPL-1.1.txt readme.txt
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc MPL-1.1.txt
+
+%changelog
+* Mon Jan 21 2013 gil cattaneo <puntogil at libero.it> 1.0.3-1
+- initial rpm
\ No newline at end of file
diff --git a/sources b/sources
index e69de29..bd241e2 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a6a7886d826214b41a9e62e664f32026  juniversalchardet-1.0.3.tar.gz


More information about the scm-commits mailing list