[velocity] Update to current packaging guidelines
Mikolaj Izdebski
mizdebsk at fedoraproject.org
Fri Nov 28 05:14:39 UTC 2014
commit b46342cec86b1f7b0933573df1541e5d297645e9
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date: Fri Nov 28 06:09:02 2014 +0100
Update to current packaging guidelines
velocity.spec | 73 +++++++++++----------------------------------------------
1 files changed, 14 insertions(+), 59 deletions(-)
---
diff --git a/velocity.spec b/velocity.spec
index 725050e..1c29a86 100644
--- a/velocity.spec
+++ b/velocity.spec
@@ -1,59 +1,21 @@
-# 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: velocity
Version: 1.7
-Release: 15%{?dist}
+Release: 16%{?dist}
Epoch: 0
Summary: Java-based template engine
License: ASL 2.0
URL: http://velocity.apache.org/
+BuildArch: noarch
+
Source0: http://www.apache.org/dist/%{name}/engine/%{version}/%{name}-%{version}.tar.gz
Source1: http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}.pom
+
Patch0: 0001-Remove-avalon-logkit.patch
Patch1: 0004-Use-log4j-1.2.17.patch
Patch2: 0003-Use-system-jars.patch
Patch3: 0004-JDBC-41-compat.patch
Patch4: 0001-Don-t-use-Werken-XPath.patch
Patch5: 0006-Skip-Java-8-incompatible-test.patch
-Requires: apache-commons-collections
-Requires: apache-commons-logging
-Requires: apache-commons-lang
-Requires: servlet3
-Requires: jakarta-oro
-Requires: junit
-Requires: hsqldb-lib
-Requires: jaxen
-Requires: jdom
-Requires: bcel
-Requires: log4j
BuildRequires: javapackages-local
BuildRequires: ant
@@ -70,10 +32,10 @@ BuildRequires: jaxen
BuildRequires: jdom
BuildRequires: bcel
BuildRequires: log4j
+BuildRequires: apache-parent
# It fails one of the arithmetic test cases with gcj
BuildRequires: java-devel >= 1:1.6.0
-BuildArch: noarch
%description
Velocity is a Java-based template engine. It permits anyone to use the
@@ -118,7 +80,7 @@ Demonstrations and samples for %{name}.
# -----------------------------------------------------------------------------
%prep
-%setup -q -n %{name}-%{version}
+%setup -q
# remove bundled libs/classes (except those used for testing)
find . -name '*.jar' -o -name '*.class' -not -path '*test*' -print -delete
@@ -182,24 +144,15 @@ sed -i 's/\r//' docs/api/stylesheet.css docs/api/package-list
# -----------------------------------------------------------------------------
%install
-
-# jars
-install -d -m 755 %{buildroot}%{_javadir}
-install -p -m 644 bin/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-
-# javadoc
-install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
-cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name}
+%mvn_file : %{name}
+%mvn_alias : %{name}:%{name}
+%mvn_artifact pom.xml bin/%{name}-%{version}.jar
+%mvn_install -J docs/api
# data
install -d -m 755 %{buildroot}%{_datadir}/%{name}
cp -pr examples test %{buildroot}%{_datadir}/%{name}
-# Maven metadata
-install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-
-%add_maven_depmap -a "%{name}:%{name}"
-
%files -f .mfiles
%doc LICENSE NOTICE README.txt
@@ -208,15 +161,17 @@ install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%doc LICENSE NOTICE
%doc docs/*
-%files javadoc
+%files javadoc -f .mfiles-javadoc
%doc LICENSE NOTICE
-%{_javadocdir}/%{name}
%files demo
%doc LICENSE NOTICE
%{_datadir}/%{name}
%changelog
+* Fri Nov 28 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 0:1.7-16
+- Update to current packaging guidelines
+
* Thu Sep 4 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 0:1.7-15
- Require hsqldb-lib instead of hsqldb
More information about the scm-commits
mailing list