mvel/mvel.spec

66 lines
2.1 KiB
RPMSpec
Raw Normal View History

2020-07-31 16:18:23 +08:00
%global namedreltag .Final
%global namedversion %{version}%{?namedreltag}
Name: mvel
Version: 2.2.8
Release: 1
Summary: MVFLEX Expression Language
License: ASL 2.0
Url: https://github.com/mvel/mvel
Source0: https://github.com/mvel/mvel/archive/%{name}2-%{namedversion}.tar.gz
Source1: %{name}-script
Patch0: %{name}-2.2.7.Final-use-system-asm.patch
Patch1: %{name}-2.2.8.Final-tests.patch
BuildRequires: maven-local mvn(com.thoughtworks.xstream:xstream) mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-surefire-report-plugin) mvn(org.ow2.asm:asm)
BuildRequires: mvn(org.ow2.asm:asm-util)
Requires: javapackages-tools
BuildArch: noarch
%description
MVEL is a powerful expression language for Java-based applications. It
provides a plethora of features and is suited for everything from the
smallest property binding and extraction, to full blown scripts.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{name}2-%{namedversion}
find . -name "*.jar" -delete
find . -name "*.class" -delete
rm ASM-LICENSE.txt
%patch0 -p1
rm -rf src/main/java/org/mvel2/asm
%patch1 -p1
sed -i '/Unsafe/d' src/main/java/org/mvel2/util/JITClassLoader.java
%pom_remove_plugin :maven-source-plugin
%pom_xpath_remove "pom:project/pom:build/pom:extensions"
sed -i 's/\r//' LICENSE.txt
native2ascii -encoding UTF8 src/main/java/org/mvel2/sh/ShellSession.java src/main/java/org/mvel2/sh/ShellSession.java
%mvn_file :%{name}2 %{name}
%build
%mvn_build -f
%install
%mvn_install
mkdir -p %{buildroot}%{_bindir}
install -pm 755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
%files -f .mfiles
%{_bindir}/%{name}
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog
* Sat Jul 25 2020 leiju <leiju4@huawei.com> - 2.2.8-1
- Package init