File jps.spec of Package jps
%bcond_without bootstrap
Name: jps
Version: 0.1
Release: 0.1.20100222git%{?dist}
Summary: Gant based build framework and DSL
Group: Development/Tools
License: ASL 2.0
URL: http://github.com/shafirov/JPS
# git clone git://github.com/shafirov/JPS.git
# cd JPS
# git archive 73d9e48 |gzip -9 >jps.tar.gz
Source0: jps.tar.gz
Source1: jps.jar
Source2: javac2.jar
Patch0: jps-build.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%if %without bootstrap
BuildRequires: jps
BuildRequires: intellij-idea
%endif
BuildRequires: objectweb-asm
BuildRequires: gant
BuildRequires: jpackage-utils
BuildRequires: java-1.6.0-openjdk-devel
Requires: jpackage-utils
BuildArch: noarch
%description
Gant based build framework + dsl, with declarative project structure
definition and automatic IntelliJ IDEA projects build.
%prep
%setup -q -c
%patch0 -p1 -b .build
find -name '*.jar' -delete
%build
JARS="objectweb-asm/asm-commons"
%if %without bootstrap
CLASSPATH=$(build-classpath jps idea/javac2 $JARS) gant
%else
CLASSPATH=$(build-classpath $JARS):%{SOURCE1}:%{SOURCE2} gant
%endif
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_javadir}/jps
install -m644 build/deploy/jps.jar \
$RPM_BUILD_ROOT%{_javadir}/jps/jps-%{version}.jar
install -m644 build/deploy/gant_patches.jar \
$RPM_BUILD_ROOT%{_javadir}/jps/gant_patches-%{version}.jar
ln -sf jps-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/jps/jps.jar
ln -sf gant_patches-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/jps/gant_patches.jar
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_javadir}/jps
%doc samples
%changelog
* Wed Mar 3 2010 Lubomir Rintel <lkundrak@v3.sk> - 0.1-0.1.20100222git
- Update version number
* Mon Feb 22 2010 Lubomir Rintel <lkundrak@v3.sk> - 0-1.20100222git
- Initial packaging