Sophie

Sophie

distrib > Fedora > 19 > i386 > by-pkgid > fabe604bd2d9863ab2765d571b840b83 > files > 4

juniversalchardet-1.0.3-1.fc19.src.rpm

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@libero.it> 1.0.3-1
- initial rpm