%define reldate 20090428 %define cvstag %{reldate}cvs Name: l2fprod-common Version: 7.3 Release: 6.%{cvstag}%{?dist} Summary: In JavaSE missing Swing components, inspired from modern user interfaces Group: Development/Libraries License: ASL 2.0 URL: http://www.l2fprod.com/common/ # cvs -d:pserver:guest@cvs.dev.java.net:/cvs login # cvs -d:pserver:guest@cvs.dev.java.net:/cvs co l2fprod-common # tar -cjf l2fprod-common-%{version}-%{cvstag}.tar.bz2 l2fprod-common Source0: %{name}-%{version}-%{cvstag}.tar.bz2 #Source0: https://l2fprod-common.dev.java.net/files/documents/1218/53087/%{name}-%{version}-%{reldate}.zip BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: jcalendar BuildRequires: nachocalendar Requires: java >= 1:1.6.0 Requires: jpackage-utils %description Swing has lot of components built-in but still some are missing. This provides the developer community with these missing components, components inspired from modern user interfaces. %package javadoc Summary: Javadocs for l2fprod-common Group: Documentation Requires: %name = %{version}-%{release} Requires: jpackage-utils %description javadoc l2fprod-common development documentation. %prep %setup -q -n %{name} # Clean up the CVS directories contained in the cvs-snapshot tarball find . -type d -name CVS | xargs rm -rf # Change the line endings but preserve the timestamp %{__sed} -i.tmp 's/\r//' LICENSE.txt touch -r LICENSE.txt.tmp LICENSE.txt # We can't build this module without the spring framework. # The spring framework is not yet in the Fedora repos. rm -rf docs lib src/java/springrcp # The only file with another license. We don't need/use it, therefore we delete it to keep this ASL 2.0 only. rm -f src/tests/com/l2fprod/common/demo/MainUnitTest.java %build mkdir target cp -a src/java target find target -name '*.java' -exec rm -f {} \; find src/java -name '*.java' -print0 | xargs -0 javac -d target -cp `build-classpath nachocalendar jcalendar` jar -cf %{name}-%{version}.jar -C target . find src/java -name '*.java' -print0 | xargs -0 javadoc -d doc -classpath `build-classpath nachocalendar jcalendar` %install rm -rf $RPM_BUILD_ROOT # jar install -d $RPM_BUILD_ROOT%{_javadir}/%{name} install -m644 %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-all-%{version}.jar ln -s %{name}-all-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-all.jar for dir in src/java/*/; do subname=$(basename $dir) for exception in demo springrcp; do if [ $subname = $exception ] ; then continue 2 ; fi done ln -sf %{name}-all-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-${subname}.jar ln -sf %{name}-all-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-${subname}-%{version}.jar done # javadoc install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -rp doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE.txt %dir %{_javadir}/%{name} %{_javadir}/%{name}/%{name}-*.jar %files javadoc %defattr(-,root,root,-) %dir %{_javadocdir}/%{name} %{_javadocdir}/%{name}/* %changelog * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.3-6.20090428cvs - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Apr 30 2009 Sandro Mathys <red at fedoraproject.org> - 7.3-5.20090428cvs - Finishing touch before importing into Fedora CVS. * Wed Apr 29 2009 Sandro Mathys <red at fedoraproject.org> - 7.3-4.20090428cvs - Added deletion of the only file that is not ASL 2.0 to prep. - CVS directories are now being removed in prep. - Several minor changes to the spec file mainly for non-technical reasons (i.e. easier to maintain/read output). * Tue Apr 28 2009 Sandro Mathys <red at fedoraproject.org> - 7.3-3.20090428cvs - Moved to latest cvs as license issues have been fixed there but no new upstream archive has been released. * Thu Dec 18 2008 Sandro Mathys <red at fedoraproject.org> - 7.3-2 - The classpath for javac and javadoc is no longer hardcoded with the absolute path. Instead, build-classpath is used to retrieve the absolute path. * Tue Dec 16 2008 Sandro Mathys <red at fedoraproject.org> - 7.3-1 - initial build