rpms/proguard/F-11 README.dist, NONE, 1.1 import.log, NONE, 1.1 proguard, NONE, 1.1 proguard.desktop, NONE, 1.1 proguard.spec, NONE, 1.1 proguardgui, NONE, 1.1 retrace, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

François Kooman fkooman at fedoraproject.org
Fri Jun 12 12:54:33 UTC 2009


Author: fkooman

Update of /cvs/pkgs/rpms/proguard/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5947/F-11

Modified Files:
	.cvsignore sources 
Added Files:
	README.dist import.log proguard proguard.desktop proguard.spec 
	proguardgui retrace 
Log Message:
%changelog
* Mon Jun 10 2009 François Kooman <fkooman at tuxed.net> - 4.3-4
- move creation of icon inside spec
- add GenericName key in .desktop file for KDE users
- make the jar files versioned and create unversioned symlinks to them

* Mon Jun 9 2009 François Kooman <fkooman at tuxed.net> - 4.3-3
- more consistent use of name macro, consistent RPM_BUILD_ROOT variable naming
- indicate that proguard is a directory in files section
- remove redundant attr macro for gcj in files section
- require Java >=1.5
- Use favicon as icon for ProGuard
- keep timestamps when copying files

* Mon Jun 8 2009 François Kooman <fkooman at tuxed.net> - 4.3-2
- add .desktop file + requires
- describe why there are launch scripts included 
- add a README.dist describing how to use ProGuard now that it is packaged
- add GCJ AOT stuff

* Sat Jun 6 2009 François Kooman <fkooman at tuxed.net> - 4.3-1
- Initial Fedora package




--- NEW FILE README.dist ---
Using ProGuard 
==============

The documentation and examples reference the path in which ProGuard 
can be found. This does not match with the location the packaged version
can be found.

One runs ProGuard from the command line with:

	$ proguard [-options]

Or the ProGuard GUI from the command line with:

	$ proguardgui

Or retrace:

	$ retrace

There is also a menu entry available for the ProGuard GUI.

To obtain the correct class path for the ProGuard JAR files (if necessary) 
one should use:

	$ build-classpath proguard



--- NEW FILE import.log ---
proguard-4_3-4_fc11:F-11:proguard-4.3-4.fc11.src.rpm:1244811207


--- NEW FILE proguard ---
#!/bin/bash
. /usr/share/java-utils/java-functions

MAIN_CLASS=proguard.ProGuard

set_classpath "proguard"

run "$@"



--- NEW FILE proguard.desktop ---
[Desktop Entry]
Name=ProGuard
Comment=Java class file shrinker, optimizer, obfuscator and preverifier
GenericName=Java class file shrinker, optimizer, obfuscator and preverifier
Exec=proguardgui
Icon=proguard
Terminal=false
Type=Application
Categories=Development;Java;



--- NEW FILE proguard.spec ---
%global with_gcj %{!?_without_gcj:1}%{?_without_gcj:0}

Name:           proguard
Version:        4.3
Release:        4%{?dist}
Summary:        Java class file shrinker, optimizer, obfuscator and preverifier

Group:          Development/Tools
License:        GPLv2+
URL:            http://proguard.sourceforge.net
Source0:        http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
# source1 through 3 are the launch scripts, there are already launch scripts 
# included with ProGuard, but they don't follow Fedora practices as described 
# in Packaging:Java on the wiki
Source1:        proguard
Source2:        proguardgui
Source3:        retrace
Source4:        %{name}.desktop
Source5:        README.dist

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  jpackage-utils

%if %{with_gcj}
BuildRequires:    java-gcj-compat-devel >= 1.0.31
Requires(post):   java-gcj-compat >= 1.0.31
Requires(postun): java-gcj-compat >= 1.0.31
%else
BuildArch:      noarch
%endif

BuildRequires:  java-devel >= 1.5
BuildRequires:  ant
BuildRequires:  desktop-file-utils
# we convert the favicon.ico to png files of different sizes, so we require
# ImageMagick
BuildRequires:  ImageMagick
Requires:       jpackage-utils
Requires:       java >= 1.5

%description
ProGuard is a free Java class file shrinker, optimizer, obfuscator and 
preverifier. It detects and removes unused classes, fields, methods, and 
attributes. It optimizes bytecode and removes unused instructions. It 
renames the remaining classes, fields, and methods using short meaningless 
names. Finally, it preverifies the processed code for Java 6 or for Java 
Micro Edition. 

%prep
%setup -qn %{name}%{version}

# remove all jar and class files, the snippet from Packaging:Java does 
# not work
find -name '*.jar' -exec rm -f '{}' \;
find -name '*.class' -exec rm -f '{}' \;

# remove the Class-Path from MANIFESTs
sed -i '/class-path/I d' src/%{name}/gui/MANIFEST.MF
sed -i '/class-path/I d' src/%{name}/retrace/MANIFEST.MF

# why is this executable?
chmod -x examples/dictionaries/shakespeare.txt

# this will create three png files from the favicon that contains multiple size 
# icons: 0: 48x48, 1: 32x32, 2: 16x16
convert docs/favicon.ico %{name}.png
cp -p %{name}-0.png %{name}48.png
cp -p %{name}-1.png %{name}32.png
cp -p %{name}-2.png %{name}16.png

# add README.dist
cp -p %{SOURCE5} .

%build
cd build/
# build ProGuard, ProGuardGUI, retrace and anttask
ant -Dant.jar=%{_javadir}/ant.jar basic anttask

%install
rm -rf ${RPM_BUILD_ROOT}

mkdir -p ${RPM_BUILD_ROOT}%{_javadir}/%{name}/
cp -p lib/%{name}.jar ${RPM_BUILD_ROOT}%{_javadir}/%{name}/%{name}-%{version}.jar
(cd ${RPM_BUILD_ROOT}%{_javadir}/%{name}/ && ln -sf %{name}-%{version}.jar %{name}.jar)
cp -p lib/%{name}gui.jar ${RPM_BUILD_ROOT}%{_javadir}/%{name}/%{name}gui-%{version}.jar
(cd ${RPM_BUILD_ROOT}%{_javadir}/%{name}/ && ln -sf %{name}gui-%{version}.jar %{name}gui.jar)
cp -p lib/retrace.jar ${RPM_BUILD_ROOT}%{_javadir}/%{name}/retrace-%{version}.jar
(cd ${RPM_BUILD_ROOT}%{_javadir}/%{name}/ && ln -sf retrace-%{version}.jar retrace.jar)

mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
cp -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_bindir}/
cp -p %{SOURCE2} ${RPM_BUILD_ROOT}%{_bindir}/
cp -p %{SOURCE3} ${RPM_BUILD_ROOT}%{_bindir}/
chmod +x ${RPM_BUILD_ROOT}%{_bindir}/*

#install the desktop file for proguardgui
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE4}

#copy icons
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/48x48/apps
cp -p %{name}48.png ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/32x32/apps
cp -p %{name}32.png ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/16x16/apps
cp -p %{name}16.png ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png

%if %{with_gcj}
%{_bindir}/aot-compile-rpm
%endif

%post
%if %{with_gcj}
if [ -x %{_bindir}/rebuild-gcj-db ] 
then
%{_bindir}/rebuild-gcj-db
fi
%endif

# update icon cache
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
%if %{with_gcj}
if [ -x %{_bindir}/rebuild-gcj-db ] 
then
%{_bindir}/rebuild-gcj-db
fi
%endif

# update icon cache
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root,-)
%{_javadir}/%{name}/
%{_bindir}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/*/*/apps/*

%if %{with_gcj}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif

%doc README examples/ docs/ README.dist

%changelog
* Mon Jun 10 2009 François Kooman <fkooman at tuxed.net> - 4.3-4
- move creation of icon inside spec
- add GenericName key in .desktop file for KDE users
- make the jar files versioned and create unversioned symlinks to them

* Mon Jun 9 2009 François Kooman <fkooman at tuxed.net> - 4.3-3
- more consistent use of name macro, consistent RPM_BUILD_ROOT variable naming
- indicate that proguard is a directory in files section
- remove redundant attr macro for gcj in files section
- require Java >=1.5
- Use favicon as icon for ProGuard
- keep timestamps when copying files

* Mon Jun 8 2009 François Kooman <fkooman at tuxed.net> - 4.3-2
- add .desktop file + requires
- describe why there are launch scripts included 
- add a README.dist describing how to use ProGuard now that it is packaged
- add GCJ AOT stuff

* Sat Jun 6 2009 François Kooman <fkooman at tuxed.net> - 4.3-1
- Initial Fedora package



--- NEW FILE proguardgui ---
#!/bin/bash
. /usr/share/java-utils/java-functions

MAIN_CLASS=proguard.gui.ProGuardGUI

set_classpath "proguard"

run "$@"



--- NEW FILE retrace ---
#!/bin/bash
. /usr/share/java-utils/java-functions

MAIN_CLASS=proguard.retrace.ReTrace

set_classpath "proguard"

run "$@"



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/proguard/F-11/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	10 Jun 2009 21:10:25 -0000	1.1
+++ .cvsignore	12 Jun 2009 12:54:02 -0000	1.2
@@ -0,0 +1 @@
+proguard4.3.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/proguard/F-11/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	10 Jun 2009 21:10:25 -0000	1.1
+++ sources	12 Jun 2009 12:54:03 -0000	1.2
@@ -0,0 +1 @@
+01ef52a1d3faa9eef3aa3385b8b5685d  proguard4.3.tar.gz




More information about the fedora-extras-commits mailing list