Blob Blame History Raw
%global groupId     org.glite
%global artifactId  jobid-api-java
%{!?_mavenpomdir: %global _mavenpomdir %{_datadir}/maven2/poms}

Name:           glite-jobid-api-java
Version:        1.3.8
Release:        2%{?dist}
Summary:        JAVA implementation of handling gLite jobid

License:        ASL 2.0
URL:            http://glite.cern.ch
Source:         http://scientific.zcu.cz/emi/emi.jobid.api-java/%{name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  ant
BuildRequires:  perl
BuildRequires:  perl(Getopt::Long)
BuildRequires:  perl(POSIX)
%if 0%{?rhel} >= 7 || 0%{?fedora}
BuildRequires:  apache-commons-codec
BuildRequires:  maven-local
%else
BuildRequires:  jakarta-commons-codec
BuildRequires:  java-devel
BuildRequires:  jpackage-utils
%endif
Requires:       jakarta-commons-codec
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 20
Requires:       java-headless
%else
Requires:       java
%endif
%if 0%{?rhel} <= 6 && ! 0%{?fedora}
Requires:       jpackage-utils
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
%endif

%description
JAVA implementation of library handling gLite jobid.


%package        javadoc
Summary:        Java API documentation for %{name}
Requires:       %{name} = %{version}-%{release}
%if 0%{?rhel} <= 6 && ! 0%{?fedora}
Requires:       jpackage-utils
%endif

%description    javadoc
This package contains java API documentation for java implementation of gLite
jobid.


%prep
%setup -q


%build
perl ./configure --root=/ --prefix=%{_prefix} --libdir=%{_lib}
make %{?_smp_mflags}


%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/api $RPM_BUILD_ROOT%{_javadocdir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
install -m 0644 JPP-%{name}.pom $RPM_BUILD_ROOT%{_mavenpomdir}
%if 0%{?add_maven_depmap:1}
%add_maven_depmap JPP-%{name}.pom %{name}.jar
%else
%add_to_maven_depmap %{groupId} %{artifactId} %{version} JPP %{name}
touch .mfiles
%endif


%if 0%{?rhel} <= 6 && ! 0%{?fedora}
%post
%update_maven_depmap
%endif


%if 0%{?rhel} <= 6 && ! 0%{?fedora}
%postun
%update_maven_depmap
%endif


%files -f .mfiles
%doc ChangeLog LICENSE
%if ! 0%{?add_maven_depmap:1}
%{_javadir}/%{name}.jar
%{_mavendepmapfragdir}/%{name}
%{_mavenpomdir}/JPP-%{name}.pom
%endif

%files javadoc
%{_javadocdir}/%{name}


%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat May 31 2014 František Dvořák <valtri@civ.zcu.cz> - 1.3.8-1
- New release 1.3.8 (L&B 4.1.1)
- Change jakarta-commons-codec BR/R in Fedora to apache-commons-codec
- Using .mfiles to build with javapackages 4.x

* Sun Feb 23 2014 František Dvořák <valtri@civ.zcu.cz> - 1.3.7-2
- EPEL 7 support
- Switch to java-headless (RB #1068106)

* Fri Nov 22 2013 František Dvořák <valtri@civ.zcu.cz> - 1.3.7-1
- New release 1.3.7 (L&B 4.0.12)
- Pom file patch not needed anymore

* Mon Aug 26 2013 František Dvořák <valtri@civ.zcu.cz> - 1.3.6-1
- Initial package