# Copyright (c) 2000-2005, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # %define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}} %define section free Name: jfugue Version: 3.2 Release: %mkrel 4 Epoch: 0 Summary: Java API for programming music License: LGPL Url: http://www.jfugue.org/ Group: Development/Java # Source0: http://www.jfugue.org/jfugue-source.zip Patch0: build.patch BuildRequires: java-rpmbuild >= 1.6 BuildRequires: java >= 1.5 Requires: java >= 1.5 BuildRequires: ant %if ! %{gcj_support} BuildArch: noarch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if %{gcj_support} BuildRequires: java-gcj-compat-devel Requires(post): java-gcj-compat Requires(postun): java-gcj-compat %endif %description JFugue is an open-source Java API for programming music without the complexities of MIDI. %package javadoc Summary: Javadoc for %{name} Group: Development/Java Requires(post): /bin/rm,/bin/ln Requires(postun): /bin/rm %description javadoc Javadoc for %{name}. %prep %{__rm} -fr %{buildroot} %setup -q -c -n %{name}-%{version} %remove_java_binaries %patch0 -b .sav %build [ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java %{ant} dist %{ant} javadoc %install # jar %{__install} -d -m 755 %{buildroot}%{_javadir} %{__install} -m 644 dist/lib/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar %{__ln_s} %{_javadir}/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar # javadoc %{__install} -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version} %{__cp} -pr docs/* %{buildroot}%{_javadocdir}/%{name}-%{version} (cd %{buildroot}%{_javadocdir} && ln -sf %{name}-%{version} %{name}) %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif %clean %{__rm} -rf %{buildroot} %post javadoc %{__rm} -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} %postun javadoc if [ $1 -eq 0 ]; then %{__rm} -f %{_javadocdir}/%{name} fi %post %if %{gcj_support} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %postun %if %{gcj_support} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %files %defattr(-,root,root) %{_javadir}/* %if %{gcj_support} %attr(-,root,root) %{_libdir}/gcj/%{name} %endif %files javadoc %defattr(-,root,root) %dir %{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name}-%{version}/* %ghost %{_javadocdir}/%{name} %changelog * Thu Jul 24 2008 Thierry Vignaud <tvignaud@mandriva.com> 0:3.2-4mdv2009.0 + Revision: 247404 - rebuild - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Sun Dec 16 2007 Anssi Hannula <anssi@mandriva.org> 0:3.2-2mdv2008.1 + Revision: 120940 - buildrequire java-rpmbuild, i.e. build with icedtea on x86(_64) * Sat Dec 01 2007 Jaroslav Tulach <jtulach@mandriva.org> 0:3.2-1mdv2008.1 + Revision: 114333 - As usually I left in the spec file wrong group for javadoc package. Also this is first mdv release, not third. - Regenerating the build script diff to use different local path - More correct way to specify patch - using patch1 - The build requires source 1.5 - Using regular jfugue - rebuild - rebuild - import jfugue