143 lines
4.1 KiB
RPMSpec
143 lines
4.1 KiB
RPMSpec
%define javahome /usr/lib/jvm/jdk-openjdk
|
|
%define majver %(echo %version | cut -d. -f 1-2)
|
|
Name: java-proguard
|
|
Version: 7.4.1
|
|
Release: 1mamba
|
|
Summary: ProGuard Java Optimizer and Obfuscator
|
|
Group: Development/Libraries/Java
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: https://www.guardsquare.com/proguard
|
|
Source0: https://github.com/Guardsquare/proguard/releases/download/v%{version}/proguard-%{version}.tar.gz
|
|
Source2: proguardgui.png
|
|
License: GPL
|
|
## AUTOBUILDREQ-BEGIN
|
|
## AUTOBUILDREQ-END
|
|
BuildRequires: javapackages
|
|
BuildRequires: java-openjdk
|
|
Requires: javapackages
|
|
|
|
%description
|
|
ProGuard is a free Java class file shrinker, optimizer, and obfuscator. It removes unused classes, fields, methods, and attributes. It then optimizes the bytecode. It then renames the remaining classes, fields, and methods using short meaningless names.
|
|
|
|
%package gui
|
|
Group: Development/Tools
|
|
Summary: GUI for ProGuard
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
Requires: javapackages
|
|
|
|
%description gui
|
|
ProGuard, Java class file shrinker, optimizer, obfuscator, and preverifier.
|
|
This package contains a GUI for ProGuard.
|
|
|
|
%package manual
|
|
Group: Documentation
|
|
Summary: Manual for %{name}
|
|
|
|
%description manual
|
|
ProGuard, Java class file shrinker, optimizer, obfuscator, and preverifier.
|
|
This package contains documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n proguard-%{version}
|
|
sed -i "s|/lib/|/share/java/proguard/|" bin/proguard.sh bin/proguardgui.sh bin/retrace.sh
|
|
|
|
%build
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
mkdir -p %{buildroot}%{_javadir}/proguard
|
|
|
|
install -p -m 644 lib/proguard.jar \
|
|
%{buildroot}%{_javadir}/proguard/proguard-%{version}.jar
|
|
install -p -m 644 lib/proguardgui.jar \
|
|
%{buildroot}%{_javadir}/proguard/proguardgui-%{version}.jar
|
|
install -p -m 644 lib/retrace.jar \
|
|
%{buildroot}%{_javadir}/proguard/retrace-%{version}.jar
|
|
|
|
(
|
|
cd %{buildroot}%{_javadir}/proguard
|
|
for jar in *-%{version}*; do
|
|
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
|
|
done
|
|
)
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
install -m 755 bin/proguard.sh %{buildroot}%{_bindir}/proguard
|
|
install -m 755 bin/proguardgui.sh %{buildroot}%{_bindir}/proguard-gui
|
|
install -m 755 bin/retrace.sh %{buildroot}%{_bindir}/retrace
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/applications
|
|
|
|
cat > proguard-gui.desktop << _END
|
|
[Desktop Entry]
|
|
Name=ProGuard
|
|
Comment=Java class file shrinker, optimizer, obfuscator and preverifier
|
|
Exec=proguard-gui
|
|
Terminal=false
|
|
Type=Application
|
|
Icon=proguard
|
|
Categories=Development;Java;
|
|
_END
|
|
|
|
desktop-file-install --mode=644 --dir=%{buildroot}%{_datadir}/applications proguard-gui.desktop
|
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/proguard.png
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%post gui
|
|
touch --no-create %{_datadir}/icons/hicolor
|
|
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
|
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
|
|
fi
|
|
:
|
|
|
|
%postun gui
|
|
touch --no-create %{_datadir}/icons/hicolor
|
|
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
|
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
|
|
fi
|
|
:
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_bindir}/proguard
|
|
%{_bindir}/retrace
|
|
%dir %{_javadir}/proguard
|
|
%{_javadir}/proguard/proguard-%{version}.jar
|
|
%{_javadir}/proguard/proguard.jar
|
|
%{_javadir}/proguard/retrace-%{version}.jar
|
|
%{_javadir}/proguard/retrace.jar
|
|
%doc LICENSE
|
|
|
|
%files gui
|
|
%defattr(-,root,root)
|
|
%{_bindir}/proguard-gui
|
|
%{_javadir}/proguard/proguardgui-%{version}.jar
|
|
%{_javadir}/proguard/proguardgui.jar
|
|
%{_datadir}/applications/proguard-gui.desktop
|
|
%{_datadir}/pixmaps/proguard.png
|
|
|
|
%files manual
|
|
%defattr(-,root,root)
|
|
%doc docs examples
|
|
|
|
%changelog
|
|
* Wed Jan 31 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 7.4.1-1mamba
|
|
- update to 7.4.1
|
|
|
|
* Mon Jan 17 2011 gil <puntogil@libero.it> 4.5.1-1mamba
|
|
- update to 4.5.1
|
|
|
|
* Wed Jun 02 2010 gil <puntogil@libero.it> 4.4-2mamba
|
|
- rebuilt with sun-java 6u20
|
|
|
|
* Wed Dec 16 2009 gil <puntogil@libero.it> 4.4-1mamba
|
|
- update to 4.4
|
|
|
|
* Wed Apr 15 2009 gil <puntogil@libero.it> 4.3-1mamba
|
|
- package created by autospec
|