Author: glen Date: Sun Nov 18 13:06:13 2007 GMT Module: SPECS Tag: HEAD ---- Log message: - new, based on jpackage
---- Files affected: SPECS: jcommon.spec (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: SPECS/jcommon.spec diff -u /dev/null SPECS/jcommon.spec:1.1 --- /dev/null Sun Nov 18 14:06:13 2007 +++ SPECS/jcommon.spec Sun Nov 18 14:06:08 2007 @@ -0,0 +1,118 @@ +# $Revision$, $Date$ +# +# Conditional build: +%bcond_without javadoc # don't build javadoc +%bcond_without tests # don't build and run tests +# +%include /usr/lib/rpm/macros.java +Summary: Common library +Name: jcommon +Version: 0.9.1 +Release: 1 +Epoch: 0 +License: LGPL +URL: http://www.jfree.org/jcommon/index.html +Source0: http://dl.sourceforge.net/jfreechart/%{name}-%{version}.tar.gz +# Source0-md5: 19e1900a46ac0cb673288f319fbc757e +Patch0: %{name}-ant.patch +Group: Development/Languages/Java +BuildRequires: ant +BuildRequires: jpackage-utils >= 0:1.5 +BuildRequires: junit +BuildRequires: rpmbuild(macros) >= 1.300 +%if %(locale -a | grep -q '^en_US$'; echo $?) +BuildRequires: glibc-localedb-all +%endif +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +Collection of classes used by Object Refinery Projects, for example +jfreechart + +%package test +Summary: Test tasks for %{name} +Group: Development/Languages/Java +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: junit + +%description test +All test tasks for %{name}. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation + +%description javadoc +Javadoc for %{name}. + +%description javadoc -l fr +Javadoc pour %{name}. + +%prep +%setup -q +%patch0 -p1 +# remove all binary libs +find . -name '*.jar' | xargs rm -v + +%build +export CLASSPATH=$(build-classpath junit) +export LC_ALL=en_US # source code not US-ASCII +%ant -f ant/build.xml -Dbuildstable=true -Dproject.outdir=. -Dbasedir=. \ + compile %{?with_tests:compile-junit-tests} %{?with_javadoc:javadoc} + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_javadir}/%{name} +# jars +install -d $RPM_BUILD_ROOT%{_javadir} +install %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir} +ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar +%if %{with tests} +install junit/%{name}-%{version}-junit.jar $RPM_BUILD_ROOT%{_javadir} +ln -s %{name}-%{version}-junit.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-junit.jar +%endif + +# javadoc +%if %{with javadoc} +install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%post javadoc +ln -nfs %{name}-%{version} %{_javadocdir}/%{name} + +%files +%defattr(644,root,root,755) +%doc README.txt +%{_javadir}/%{name}.jar +%{_javadir}/%{name}-%{version}.jar +%dir %{_javadir}/%{name} + +%if %{with tests} +%files test +%defattr(644,root,root,755) +%{_javadir}/%{name}-%{version}-junit.jar +%{_javadir}/%{name}-junit.jar +%endif + +%if %{with javadoc} +%files javadoc +%defattr(644,root,root,755) +%{_javadocdir}/%{name}-%{version} +%ghost %{_javadocdir}/%{name} +%endif + +%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) +%changelog +* %{date} PLD Team <[EMAIL PROTECTED]> +All persons listed below can be reached at <cvs_login>@pld-linux.org + +$Log$ +Revision 1.1 2007-11-18 13:06:08 glen +- new, based on jpackage + ================================================================ _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
