# https://src.fedoraproject.org/rpms/owasp-java-encoder/raw/jmc/f/owasp-java-encoder.spec %{?scl:%scl_package owasp-java-encoder} %{!?scl:%global pkg_name %{name}} Name: %{scl_prefix}owasp-java-encoder Version: 1.2.2 Release: 2%{?dist} Summary: Collection of high-performance low-overhead contextual encoders License: BSD URL: https://github.com/OWASP/owasp-java-encoder/ Source0: https://github.com/OWASP/owasp-java-encoder/archive/v1.2.2.tar.gz # add OSGi metadata Patch0: 0_manifest.patch BuildArch: noarch BuildRequires: %{?scl_prefix_maven}maven-local BuildRequires: %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-source-plugin) BuildRequires: %{?scl_prefix_maven}mvn(org.sonatype.oss:oss-parent:pom:) %description The OWASP Encoders package is a collection of high-performance low-overhead contextual encoders, that when utilized correctly, is an effective tool in preventing Web Application security vulnerabilities such as Cross-Site Scripting. %package javadoc Summary: Javadoc for %{name} %description javadoc %{summary}. %prep %setup -q -n %{pkg_name}-%{version} %patch0 -p1 # add version number in OSGi metadata sed -i '/^Bundle-SymbolicName: org.owasp.encoder$/a Bundle-Version: %{version}' %{_builddir}/%{pkg_name}-%{version}/META-INF/MANIFEST.MF %pom_disable_module jsp %pom_disable_module esapi %pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin # analysis tool for testing coverage is not required %pom_remove_plugin :cobertura-maven-plugin %build %{?scl:scl enable %{scl_maven} %{scl} - << "EOFSCL"} %mvn_build # inject OSGi manifest jar ufm %{_builddir}/%{pkg_name}-%{version}/core/target/encoder-%{version}.jar %{_builddir}/%{pkg_name}-%{version}/META-INF/MANIFEST.MF %{?scl:EOFSCL} %install %{?scl:scl enable %{scl_maven} %{scl} - << "EOFSCL"} %mvn_install %{?scl:EOFSCL} %files -f .mfiles %doc README.md %license LICENSE %files javadoc -f .mfiles-javadoc %doc README.md %license LICENSE %changelog * Mon Nov 19 2018 Jie Kang - 1.2.2-2 - SCL-ize package * Fri Nov 16 2018 Salman Siddiqui - 1.2.2-1 - Version update * Wed Aug 08 2018 Salman Siddiqui - 1.2.1-1 - Initial packaging