File proguard.spec of Package proguard
102
1
#
2
# spec file for package proguard
3
#
4
# Copyright (c) 2019 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
Name: proguard
20
Version: 6.2.0
21
Release: 0
22
Summary: Java class file shrinker, optimizer, obfuscator and preverifier
23
License: GPL-2.0-or-later
24
Group: Development/Libraries/Java
25
URL: https://www.guardsquare.com/en/proguard
26
Source0: http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
27
BuildRequires: java-devel >= 8
28
BuildRequires: maven-local
29
BuildRequires: mvn(com.google.code.gson:gson)
30
BuildRequires: mvn(org.apache.ant:ant)
31
Requires: javapackages-tools
32
Obsoletes: %{name}-manual
33
34
BuildArch: noarch
35
36
%description
37
ProGuard is a free Java class file shrinker, optimizer, obfuscator and
38
preverifier. It detects and removes unused classes, fields, methods, and
39
attributes. It optimizes bytecode and removes unused instructions. It
40
renames the remaining classes, fields, and methods using short meaningless
41
names. Finally, it preverifies the processed code for Java 6 or for Java
42
Micro Edition.
43
44
%package gui
45
Summary: GUI for %{name}
46
Group: Development/Libraries/Java
47
Requires: javapackages-tools
48
49
%description gui
50
A GUI for %{name}.
51
52
%package -n ant-%{name}
53
Summary: Ant task for %{name}
54
Group: Development/Libraries/Java
55
56
%description -n ant-%{name}
57
Ant task for %{name}
58
59
60
%prep
61
%setup -q -n %{name}%{version}
62
63
find -name '*.jar' -print -delete
64
find -name '*.class' -print -delete
65
66
%pom_disable_module ../gradle buildscripts
67
%pom_xpath_remove -r pom:addClasspath buildscripts
68
%pom_remove_plugin -r :maven-source-plugin buildscripts
69
%pom_remove_plugin -r :maven-javadoc-plugin buildscripts
70
71
%mvn_package :*anttask anttask
72
%mvn_package :*gui gui
73
%mvn_file :%{name}-base %{name}/%{name}-base %{name}/%{name}
74
75
%build
76
%mvn_build -f -j -- -f buildscripts/pom.xml -Dsource=8
77
78
%install
79
%mvn_install
80
81
mkdir -p %{buildroot}%{_bindir}
82
%jpackage_script proguard.ProGuard "" "" %{name} %{name} true
83
%jpackage_script proguard.gui.ProGuardGUI "" "" %{name} %{name}-gui true
84
%jpackage_script proguard.retrace.ReTrace "" "" %{name} %{name}-retrace true
85
86
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
87
echo "proguard" > %{buildroot}%{_sysconfdir}/ant.d/%{name}
88
89
%files -f .mfiles
90
%{_bindir}/%{name}
91
%{_bindir}/%{name}-retrace
92
%doc README.md
93
%license LICENSE.md LICENSE_exception.md
94
95
%files -n ant-%{name} -f .mfiles-anttask
96
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
97
98
%files gui -f .mfiles-gui
99
%{_bindir}/%{name}-gui
100
101
%changelog
102