File openproj.spec of Package openproj
#
# spec file for package openproj (Version 1.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
Name: openproj
Summary: Java based project manager
License: Other uncritical OpenSource License
Version: 1.3
Release: 1
Url: http://openproj.org/
Group: Productivity/Office/Management
Source0: %{name}-%{version}-src.tar.bz2
Source2: %{name}.desktop
Patch0: openproj-1.3-ibm-javac.patch
Patch1: openproj-1.3-openjdk6-javac.patch
Patch2: openproj-1.3-use-system-jars.patch
Requires: jre >= 1.5.0
BuildRequires: java-devel
BuildRequires: ant
BuildRequires: update-desktop-files
BuildRequires: jpackage-utils
PreReq: jpackage-utils
BuildRequires: ant-contrib
BuildRequires: ant-junit
BuildRequires: proguard
BuildRequires: jakarta-poi
BuildRequires: relaxngDatatype
BuildRequires: antlr
BuildRequires: asm2
BuildRequires: bsf
BuildRequires: jakarta-commons-cli
BuildRequires: xerces-j2
BuildRequires: bsh
BuildRequires: ecj
BuildRequires: xalan-j2
BuildRequires: jakarta-commons-beanutils
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-digester
BuildRequires: jakarta-commons-lang
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-commons-pool
BuildRequires: jcommon
BuildRequires: jlfgr
BuildRequires: nachocalendar
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A desktop replacement for Microsoft Project. It is capable of sharing
files with Microsoft Project and has very similar functionality (Gantt,
PERT diagram, histogram, charts, reports, detailed usage), as well as
tree views which aren't in MS Project.
Authors:
--------
Projity
%prep
%setup -q -n %{name}-%{version}-src
if [[ $(readlink -f /etc/alternatives/java_sdk | grep 'ibm') ]]; then
%patch0 -b .ibm-javac
else
%patch1 -b .openjdk-javac
fi
%patch2 -b .use-system-jars
# switch from the rt.jar to the core.jar (on IBM Java 1.5.0)
if [[ -f ${JAVA_HOME}/jre/lib/core.jar ]]; then
sed -i 's/\<rt\.jar/core.jar/' openproj_contrib/openproj_{contrib,exchange,exchange2,reports,script}.conf
fi
pushd openproj_contrib
# remove the proguard.jar for non IBM compilers
if [[ ! $(readlink -f /etc/alternatives/java_sdk | grep 'ibm') ]]; then
rm ant-lib/proguard.jar
fi
rm ant-lib/ant-contrib.jar
rm lib/{commons-*,jlfgr,junit,nachocalendar}.jar
rm lib/exchange/{jakarta-poi,namespace,relaxngDatatype}.jar
rm lib/groovy/{ant-1.6.5,antlr,bsf-2.3.0-rc1,commons-cli-1.0,xerces-2.4.0,asm*}.jar
rm lib/jasperreports/{bsh,xalan,jdt-compiler}.jar
popd
%build
build-jar-repository -p -s openproj_contrib/ant-lib \
ant-contrib
if [[ ! $(readlink -f /etc/alternatives/java_sdk | grep 'ibm') ]]; then
build-jar-repository -p -s openproj_contrib/ant-lib \
proguard
fi
export CLASSPATH=$(build-classpath bsh)
ant -Dant.build.javac.source=1.5 \
-Dant.build.javac.target=1.5 \
-f openproj_build/build.xml
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/lib
install -m 644 openproj_build/dist/lib/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/lib
install -m 644 openproj_build/dist/%{name}.jar $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/
# start scripts
install -m 755 openproj_build/resources/%{name}.sh $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
cat << -EOF > $RPM_BUILD_ROOT%{_bindir}/%{name}
#!/bin/sh
cd /usr/share/openproj-%{version}
sh openproj.sh
-EOF
# samples
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/samples
install -m 644 openproj_build/resources/samples/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/samples
# license
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}/
install -m 644 openproj_build/license/index.html $RPM_BUILD_ROOT%{_docdir}/%{name}/license.html
# mime-type
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/mime/packages
install -m 644 openproj_build/resources/%{name}.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/%{name}.xml
# icon
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 openproj_build/resources/%{name}.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/applications
# desktop menu
%suse_update_desktop_file -i %{name}
%post
if [ -f /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database /usr/share/mime > /dev/null
fi
%postun
if [ -f /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database /usr/share/mime > /dev/null
fi
%files
%defattr(755,root,root,755)
%{_bindir}/openproj
%defattr(-,root,root)
%dir %{_datadir}/%{name}-%{version}
%dir %{_datadir}/%{name}-%{version}/lib
%dir %{_datadir}/%{name}-%{version}/samples
%{_datadir}/%{name}-%{version}/%{name}.jar
%{_datadir}/%{name}-%{version}/%{name}.sh
%{_datadir}/%{name}-%{version}/lib/*
%{_datadir}/%{name}-%{version}/samples/*
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/applications/%{name}.desktop
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/license.html
%changelog
* Wed Sep 10 2008 mvyskocil@suse.cz
- Update to 1.3
- bzipped source codes
- remove unecessary unzip from Build Requires
- The openproj.sh is generated script in %%install section
- Fix build against openjdk6 - openproj-1.3-build.patch
- Usage of the system jar files, instead of bundled ones. The new Build
Requires of openproj are:
- ant-contrib, ant-junit, proguard, jakarta-poi, relaxngDatatype
- antlr, asm2, bsf, jakarta-commons-cli, xerces-j2, bsh, ecj
- xalan-j2, jakarta-commons-beanutils, jakarta-commons-collections
- jakarta-commons-digester, jakarta-commons-lang, jakarta-commons-logging
- jakarta-commons-pool, jcommon, jlfgr, nachocalendar
- source=1.5 -target=1.5
- Removal of the openproj-patch.sh and openproj-ibm-jdk.patch. Add a three
build ways in a prep and build sections:
- for sun/openjdk6 is necessary to use a system wide proguard, because
the bundled one is not compactible with this compiler
- for ibm javac 5 is necessary to replace a rt.jar to core.jar
- for ibm javac 6 is necessary te leave and use the bundled proguard
* Thu Nov 15 2007 mvyskocil@suse.cz
- added workaround to build on every of available platforms
* Mon Nov 12 2007 mvyskocil@suse.cz
- exclude architectures only to ix86 and x86_64 to avoid the abuilds
error messages
* Tue Nov 06 2007 mvyskocil@suse.cz
- could be built with Sun's compiler only
* Wed Oct 31 2007 mvyskocil@suse.cz
- first release of version 0.9.6 in Suse