[jBCrypt] Adapt to current packaging guidelines
Michal Srb
msrb at fedoraproject.org
Thu Nov 28 06:49:32 UTC 2013
commit a4eb5d6c9fda5e0b96a18ea6f6322081899a24a7
Author: Michal Srb <msrb at redhat.com>
Date: Thu Nov 28 07:40:57 2013 +0100
Adapt to current packaging guidelines
- Add javadoc subpackage
- Build with Maven
.gitignore | 2 +
jBCrypt.spec | 59 ++++++++++++++++++++++++++-------------------------------
sources | 3 +-
3 files changed, 31 insertions(+), 33 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 244a505..180297f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
jBCrypt-0.3.tar.gz
+/LICENSE
+/jbcrypt-0.3m.tar.gz
diff --git a/jBCrypt.spec b/jBCrypt.spec
index f85184e..7cd3247 100644
--- a/jBCrypt.spec
+++ b/jBCrypt.spec
@@ -1,60 +1,55 @@
Name: jBCrypt
Version: 0.3
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: Strong password hashing for Java
-Group: Development/Libraries
License: ISC
URL: http://www.mindrot.org/projects/jBCrypt/
-Source0: http://www.mindrot.org/files/jBCrypt/jBCrypt-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# tarball with pom.xml:
+# svn export http://jbcrypt.googlecode.com/svn/tags/jbcrypt-0.3m jBCrypt-0.3
+# tar czvf jbcrypt-0.3m.tar.gz jBCrypt-0.3
+Source0: jbcrypt-%{version}m.tar.gz
+Source1: http://www.mindrot.org/files/%{name}/LICENSE
BuildArch: noarch
-BuildRequires: java-devel
-BuildRequires: jpackage-utils
+BuildRequires: maven-local
BuildRequires: junit
-Requires: java
-Requires: jpackage-utils
-
%description
A Java implementation of OpenBSD's Blowfish password hashing code.
+%package javadoc
+Summary: API documentation for %{name}
+
+%description javadoc
+This package contains the API documentation for %{name}.
%prep
%setup -q
+cp %{SOURCE1} .
-%build
-javac BCrypt.java
-jar cvf jBCrypt.jar BCrypt.class
-
-# compile test cases too
-javac -encoding UTF-8 -cp %{_javadir}/junit.jar:jBCrypt.jar TestBCrypt.java
-jar cvf jBCrypt-test.jar TestBCrypt.class
+%mvn_file : %{name}/%{name} %{name}
+%build
+%mvn_build
%install
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{_javadir}
-cp jBCrypt.jar $RPM_BUILD_ROOT%{_javadir}/jBCrypt.jar
-
+%mvn_install
-%check
-java -cp %{_javadir}/junit.jar:jBCrypt.jar:jBCrypt-test.jar TestBCrypt
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
-%files
-%defattr(-,root,root,-)
-%doc LICENSE README
-%{_javadir}/%{name}.jar
+%files -f .mfiles
+%dir %{_javadir}/%{name}
+%doc LICENSE
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE
%changelog
+* Fri Oct 18 2013 Michal Srb <msrb at redhat.com> - 0.3-10
+- Adapt to current packaging guidelines
+- Add javadoc subpackage
+- Build with Maven
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources
index 22ef315..e029b00 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-84bc904669f532b7a55fc656c0f5c6d6 jBCrypt-0.3.tar.gz
+8ac9e65ef0e09deedd05f8e131b5b2e5 LICENSE
+05c88c97c6fbd6adfda6d7f83d77a134 jbcrypt-0.3m.tar.gz
More information about the scm-commits
mailing list