Blob Blame History Raw
Name:             paranamer
Version:          2.4.1
Release:          2%{?dist}
Summary:          Library for accessing non-private method parameter names at run-time
Group:            Development/Libraries
License:          BSD
URL:              http://paranamer.codehaus.org

# git clone git://git.codehaus.org/paranamer-git.git paranamer-2.4.1
# cd paranamer-2.4.1 && git checkout paranamer-2.4.1
# find . -name '*.jar' -delete
# rm -rf .git
# cd .. && tar cafJ paranamer-2.4.1-CLEAN.tar.xz paranamer-2.4.1
Source0:          paranamer-%{version}-CLEAN.tar.xz

# Removed distribution, unnecessary
Patch0:           paranamer-%{version}-pom.patch

BuildArch:        noarch

BuildRequires:    jpackage-utils
BuildRequires:    java-devel
BuildRequires:    maven
BuildRequires:    maven-compiler-plugin
BuildRequires:    maven-install-plugin
BuildRequires:    maven-jar-plugin
BuildRequires:    maven-javadoc-plugin

Requires:         jpackage-utils
Requires:         java

%description
It is a library that allows the parameter names of non-private methods
and constructors to be accessed at runtime.

%package javadoc
Summary:          Javadocs for %{name}
Group:            Documentation
Requires:         jpackage-utils

%description javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q

%patch0 -p1

chmod -x LICENSE.txt

%build
# No jmock package available
mvn-rpmbuild -Dmaven.test.skip=true install javadoc:aggregate

%install
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}

# JAR
install -pm 644 paranamer-generator/target/paranamer-generator-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-generator.jar
install -pm 644 paranamer-maven-plugin/target/paranamer-maven-plugin-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-maven-plugin.jar
install -pm 644 paranamer-integration-tests/it-011/target/paranamer-it-011-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-it-011.jar
install -pm 644 paranamer-ant/target/paranamer-ant-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-ant.jar
install -pm 644 paranamer/target/paranamer-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}.jar

# POM
install -pm 644 paranamer-generator/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}-generator.pom
install -pm 644 paranamer-maven-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}-maven-plugin.pom
install -pm 644 paranamer-integration-tests/it-011/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}-it-011.pom
install -pm 644 paranamer-integration-tests/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}-it.pom
install -pm 644 paranamer-ant/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}-ant.pom
install -pm 644 paranamer/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}.pom
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}-parent.pom

# DEPMAP
%add_maven_depmap JPP.%{name}-%{name}-generator.pom %{name}/%{name}-generator.jar
%add_maven_depmap JPP.%{name}-%{name}-maven-plugin.pom %{name}/%{name}-maven-plugin.jar
%add_maven_depmap JPP.%{name}-%{name}-it-011.pom %{name}/%{name}-it-011.jar
%add_maven_depmap JPP.%{name}-%{name}-ant.pom %{name}/%{name}-ant.jar
%add_maven_depmap JPP.%{name}-%{name}.pom %{name}/%{name}.jar

%add_maven_depmap JPP.%{name}-%{name}-it.pom
%add_maven_depmap JPP.%{name}-%{name}-parent.pom

# APIDOCS
cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}

%files
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%{_javadir}/*
%doc LICENSE.txt

%files javadoc
%{_javadocdir}/%{name}
%doc LICENSE.txt

%changelog
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Mar 12 2012 Marek Goldmann <mgoldman@redhat.com> 2.4.1-1
- Upstream release 2.4.1
- Cleanup in spec file

* Mon Mar 12 2012 Marek Goldmann <mgoldman@redhat.com> 2.2-2
- Updated summary and url

* Tue Feb 21 2012 Marek Goldmann <mgoldman@redhat.com> 2.2-1
- Initial packaging