%global group_id biz.source_code %global src_ver 2010-12-19 %global short_name base64coder Name: %{short_name}-java Version: 20101219 Release: 1%{?dist} Summary: Fast and compact Base64 encoder/decoder library License: EPL or LGPLv2+ or GPLv2+ or ASL 2.0+ or BSD Group: Development/Libraries # http://www.source-code.biz/base64coder/java/ URL: http://www.source-code.biz/%{short_name}/java/ # The following link always contains the latest release and therefore it's impossible to reproduce a specific version. # Please, check the changelog contained in the archive if You need to verify the package version. # # wget http://www.source-code.biz/base64coder/java/base64coder.zip -O base64coder-%{src_ver}.zip Source0: %{short_name}-%{src_ver}.zip Source1: http://repo2.maven.org/maven2/biz/source_code/%{short_name}/%{src_ver}/%{short_name}-%{src_ver}.pom BuildArch: noarch BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: maven BuildRequires: maven-surefire-provider-junit4 Requires: java Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils %description Base64Coder is a fast and compact Base64 encoder/decoder class. There is no Base64 encoder/decoder in the standard Java SDK class library. The undocumented classes sun.misc.BASE64Encoder and sun.misc.BASE64Decoder should not be used. Explanation: http://java.sun.com/products/jdk/faq/faq-sun-packages.html %package javadoc Summary: API documentation for %{name} Group: Documentation Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -c # copy POM into the build dir cp %{SOURCE1} pom.xml # remove all bundled stuff rm -rf target # convert CR+LF to LF sed -i 's/\r//g' README.txt CHANGES.txt %build mvn-rpmbuild install %install # jars install -d -m 755 %{buildroot}%{_javadir} install -p -m 644 target/%{short_name}-%{src_ver}.jar %{buildroot}%{_javadir}/%{short_name}.jar # pom install -d -m 755 %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom %add_to_maven_depmap %{group_id} %{short_name} %{src_ver} JPP %{short_name} # javadoc install -d -m 755 %{buildroot}%{_javadocdir}/%{short_name} cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{short_name} %post %update_maven_depmap %postun %update_maven_depmap %files %doc README.txt CHANGES.txt %{_javadir}/%{short_name}.jar %{_mavenpomdir}/JPP-%{short_name}.pom %{_mavendepmapfragdir}/%{name} %files javadoc %doc %{_javadocdir}/%{short_name} %changelog * Mon May 30 2011 Jaromir Capik - 20101219-1 - Initial version of the package