LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File bouncycastle-pg.spec of Package bouncycastle-pg (Project home:nieslony)

Name:       bouncycastle-pg
Version:    1.59
Release:    1
Summary:    Bouncycastle OpenPGP/BCPG
BuildArch:  noarch
License:    Apache
URL:        http://bouncycastle.org
Source0:    %{name}-%{version}.tar.gz
Group:      Development/Libraries/Java

BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  bouncycastle = %{version}

%if 0%{?fedora}
BuildRequires:  java-1.8.0-openjdk-devel lua
%endif
%if 0%{?centos_version}
BuildRequires:  java-1.8.0-openjdk-devel 
%endif
%if 0%{?suse_version}
BuildRequires:  java-1_8_0-openjdk-devel 
%endif

%Description
Bouncycastle OpenPGP/BCPG java library

%package javadoc
Summary: Javadoc for bouncycastle-pg
BuildArch:      noarch
Requires:   %{name} = %{version}

%description javadoc
HTML Javadoc for bouncycastle-pg

%prep
%setup -q

%build
mkdir build
javac -encoding utf8 -d build  -cp /usr/share/java/bcprov.jar $( find -name *java | grep -v /test/ )
jar cf bcpg-%{version}.jar -C build .

%install
mkdir -pv %{buildroot}/usr/share/java
install bcpg-%{version}.jar %{buildroot}/usr/share/java
pushd %{buildroot}/usr/share/java
ln -fs bcpg-%{version}.jar bcpg.jar  
popd

pushd javadoc
mkdir -pv %{buildroot}/usr/share/javadoc/%{name}
find -type f -exec install --mode=664 -v {} -D %{buildroot}/usr/share/javadoc/%{name}/{} \;
popd

mkdir -pv %{buildroot}/%_defaultdocdir/%{name}
install LICENSE.html %{buildroot}/%_defaultdocdir/%{name}

%files
/usr/share/java/*
%_defaultdocdir/%{name}
%_defaultdocdir/%{name}/*

%files javadoc
/usr/share/javadoc/*

%changelog
* Fri Jun 23 2017 Claas Nieslony <obs@nieslony.at> 6.1
- Initial version