Update to current packaging guidelines

This commit is contained in:
Mikolaj Izdebski 2013-06-14 20:08:55 +02:00
parent a8cde954c2
commit 6fa9d5d0d7

View File

@ -1,50 +1,14 @@
# Copyright (c) 2000-2005, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
Name: jzlib Name: jzlib
Version: 1.1.1 Version: 1.1.1
Release: 3%{?dist} Release: 4%{?dist}
Epoch: 0 Epoch: 0
Summary: Re-implementation of zlib in pure Java Summary: Re-implementation of zlib in pure Java
Group: Development/Libraries
License: BSD License: BSD
URL: http://www.jcraft.com/jzlib/ URL: http://www.jcraft.com/jzlib/
BuildArch: noarch
Source0: http://www.jcraft.com/jzlib/jzlib-%{version}.zip Source0: http://www.jcraft.com/jzlib/jzlib-%{version}.zip
BuildArch: noarch
BuildRequires: jpackage-utils
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: maven-resources-plugin
Requires: java
Requires: jpackage-utils
%description %description
The zlib is designed to be a free, general-purpose, legally unencumbered The zlib is designed to be a free, general-purpose, legally unencumbered
@ -54,61 +18,45 @@ The zlib was written by Jean-loup Gailly (compression) and Mark Adler
(decompression). (decompression).
%package javadoc %package javadoc
Summary: Javadoc for %{name} Summary: API documentation for %{name}
Group: Documentation
Requires: jpackage-utils
%description javadoc %description javadoc
%{summary}. %{summary}.
%package demo %package demo
Summary: Examples for %{name} Summary: Examples for %{name}
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
%description demo %description demo
%{summary}. %{summary}.
%prep %prep
%setup -q %setup -q
%mvn_file : %{name}
%build %build
mvn-rpmbuild install javadoc:aggregate %mvn_build
%install %install
# jars %mvn_install
install -Dpm 644 target/%{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}.jar
# javadoc
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# examples # examples
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/%{name} install -dm 755 %{buildroot}%{_datadir}/%{name}
cp -pr example/* $RPM_BUILD_ROOT%{_datadir}/%{name} cp -pr example/* %{buildroot}%{_datadir}/%{name}
# pom %files -f .mfiles
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar
%files
%{_javadir}/%{name}.jar
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
%doc LICENSE.txt %doc LICENSE.txt
%files javadoc %files javadoc -f .mfiles-javadoc
%{_javadocdir}/%{name}
%doc LICENSE.txt %doc LICENSE.txt
%files demo %files demo
%doc %{_datadir}/%{name} %doc %{_datadir}/%{name}
%changelog %changelog
* Fri Jun 14 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.1.1-4
- Update to current packaging guidelines
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.1.1-3 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild