[Jpackage-commits] dist/jchardet/devel .cvsignore, 1.1, 1.2 jchardet-1.0.pom, NONE, 1.1 jchardet-build.patch, NONE, 1.1 jchardet.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 20:54:59 CEST 2008


Update of /home/projects/jpackage/cvs/dist/jchardet/devel
In directory ryu.zarb.org:/tmp/cvs-serv18760/devel

Modified Files:
	.cvsignore sources 
Added Files:
	jchardet-1.0.pom jchardet-build.patch jchardet.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jchardet/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 18:54:28 -0000	1.1
--- .cvsignore	28 May 2008 18:54:57 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ chardet.zip

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jchardet/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 18:54:28 -0000	1.1
--- sources	28 May 2008 18:54:57 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 4091d24451ee9a840933bce34b9e3a55  chardet.zip

--- NEW FILE: jchardet-build.patch ---
--- intl/chardet/java/build.xml.sav0	2003-06-29 15:55:04.000000000 +0200
+++ intl/chardet/java/build.xml	2008-04-21 20:03:20.000000000 +0200
@@ -6,6 +6,7 @@
   <property name="src" location="src"/>
   <property name="build" location="build"/>
   <property name="dist"  location="dist"/>
+  <property name="javadocdir" value="apidocs"/>
 
   <target name="init">
     <!-- Create the time stamp -->
@@ -35,5 +36,22 @@
     <delete dir="${build}"/>
     <delete dir="${dist}"/>
   </target>
+
+  <target name="javadoc" description="o Generate javadoc" depends="compile">
+    <mkdir dir="${javadocdir}"></mkdir>
+    <mkdir dir="jdocsrc/org/mozilla/intl/chardet"></mkdir>
+    <copy todir="jdocsrc/org/mozilla/intl/chardet">
+      <fileset dir="src"/>
+    </copy>
+
+    <tstamp>
+      <format pattern="-yyyy" property="year"></format>
+    </tstamp>
+    <property name="copyright" value="Copyright &copy;  . All Rights Reserved."></property>
+    <property name="title" value="JChardet 1.0 API"></property>
+    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="jdocsrc" packagenames="org.mozilla.intl.chardet.*">
+    </javadoc>
+  </target>
+
 </project>
 

--- NEW FILE: jchardet.spec ---
# Copyright (c) 2000-2008, JPackage Project
# 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.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# 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
# OWNER 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.
#

%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

# If you don't want to build with maven, and use straight ant instead,
# give rpmbuild option '--without maven'

%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

%define section     free

Name:           jchardet
Version:        1.0
Release:        1jpp
Epoch:          0
Summary:        Java port of mozilla's automatic charset detection algorithm
License:        Open Source
Group:          Development/Java
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
URL:            http://jchardet.sourceforge.net/
Source0:        http://downloads.sourceforge.net/jchardet/chardet.zip
Source1:        http://repo1.maven.org/maven2/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.pom
Patch0:         jchardet-build.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%if %{gcj_support}
BuildRequires:    gnu-crypto
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif


%if ! %{gcj_support}
BuildArch:      noarch
%endif

BuildRequires:  jpackage-utils >= 0:1.7.4
BuildRequires:  java-devel = 0:1.5.0
BuildRequires:  ant >= 0:1.6.5

Requires:  java >= 0:1.5.0
Requires(post):    jpackage-utils >= 0:1.7.4
Requires(postun):  jpackage-utils >= 0:1.7.4

%description
Jchardet is a java port of the source from mozilla's automatic
charset detection algorithm. The original author is Frank Tang.
What is available here is the java port of that code. The 
original source in C++ can be found from 
http://lxr.mozilla.org/mozilla/source/intl/chardet/ 
More information can be found at 
http://www.mozilla.org/projects/intl/chardet.html

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc
%{summary}.

%prep
%setup -q -n mozilla
%patch0 -b .sav0

%build
cd intl/chardet/java/
export JAVA_HOME=%{_jvmdir}/java-1.5.0
export CLASSPATH=
ant -Dbuild.sysclasspath=only dist javadoc


%install
rm -rf $RPM_BUILD_ROOT
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 intl/chardet/java/dist/lib/chardet.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%add_to_maven_depmap net.sourceforge.jchardet %{name} %{version} JPP %{name}
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# pom
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom

install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr intl/chardet/java/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
  rm -f %{_javadocdir}/%{name}
fi

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%defattr(-,root,root,-)
%{_javadir}/*
%{_datadir}/maven2
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{subname}-%{version}.jar.*
%endif

%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}


%changelog
* Mon Apr 21 2008 Ralph Apel <r.apel at r-apel.de> - 0:1.0-1jpp
- First JPP release
- Validate build in mock


--- NEW FILE: jchardet-1.0.pom ---
<?xml version="1.0"?><project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>net.sourceforge.jchardet</groupId>
  <artifactId>jchardet</artifactId>
  <name>Java port of Mozilla charset detector</name>
  <version>1.0</version>
  <description>Java port of Mozilla&#39;s automatic charset detection algorithm.
        See... <a href=\"http://www.mozilla.org/projects/intl/chardet.html\">
        http://www.mozilla.org/projects/intl/chardet.html </a>for
        the details of the orginal code and Author.</description>
  <url>http://maven.apache.org</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:cvs:pserver:anonymous at jchardet.cvs.sourceforge.net:/cvsroot/jchardet</connection>
    <url>http://jchardet.cvs.sourceforge.net/jchardet/</url>
  </scm>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.4</source>
          <target>1.4</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <distributionManagement>
    <status>deployed</status>
  </distributionManagement>
</project>



More information about the JPackage-commits mailing list