File zap.spec of Package zap
#
# spec file for package zap
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Alessandro de Oliveira Faria (A.K.A. CABELO) <cabelo@opensuse.org> or <alessandro.faria@owasp.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _zapdir /usr/share/zap
Name: zap
Version: 2.16.0
Release: 3.2
Summary: Zed Attack Proxy
Group: System/Security
Provides: owasp-zap = %{version}
Obsoletes: owasp-zap < %{version}
License: Apache-2.0
URL: https://www.zaproxy.org/
Source0: https://github.com/zaproxy/zaproxy/releases/download/%{version}/ZAP_%{version}_Linux.tar.gz
Source1: %{name}.desktop
Source2: %{name}.png
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
BuildArch: noarch
BuildRequires: fdupes
Requires: java >= 17
%description
The Zed Attack Proxy (ZAP) is an easy to use integrated penetration testing tool for finding
vulnerabilities in web applications. It is designed to be used by people with a wide range of
security experience and as such is ideal for developers and functional testers who are new to
penetration testing. ZAP provides automated scanners as well as a set of tools that allow you
to find security vulnerabilities manually.
%prep
%setup -n ZAP_%{version}
%build
%install
sed -Ei "1{\@/usr/bin/env@d}" \
zap.sh
install -d $RPM_BUILD_ROOT%{_zapdir}
cp -r db lang lib license plugin xml $RPM_BUILD_ROOT%{_zapdir}
cp README $RPM_BUILD_ROOT%{_zapdir}
install -m 644 zap-%{version}.jar $RPM_BUILD_ROOT%{_zapdir}
install -m 755 zap.sh $RPM_BUILD_ROOT%{_zapdir}
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 644 $RPM_SOURCE_DIR/%{name}.png $RPM_BUILD_ROOT/usr/share/pixmaps
install -d %{buildroot}/usr/share/applications/
install -m 644 $RPM_SOURCE_DIR/%{name}.desktop %{buildroot}/usr/share/applications/
%fdupes $RPM_BUILD_ROOT%{_zapdir}
%files
%defattr(-,root,root,-)
%{_zapdir}/*
%dir %{_datadir}/applications/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%dir %{_datadir}/zap
%changelog