# Copyright (c) 2000-2008, 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 ucname FontBox Name: fontbox Epoch: 0 Version: 0.1.0 Release: 2%{?dist} Summary: Font parsing and information library Group: Development/Libraries License: BSD URL: http://sourceforge.net/projects/fontbox/ Source0: http://downloads.sourceforge.net/fontbox/FontBox-0.1.0.zip Source1: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/fontbox/fontbox/0.1.0/fontbox-0.1.0.pom BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: jpackage-utils >= 0:1.7.3 BuildRequires: java-devel >= 0:1.5.0 BuildRequires: ant >= 0:1.6.5 BuildRequires: ant-nodeps Requires: java >= 0:1.5.0 Requires(post): jpackage-utils >= 0:1.7.3 Requires(postun): jpackage-utils >= 0:1.7.3 %description FontBox is an open source Java library for parsing font files and providing low level data structures for accessing font information. %package javadoc Summary: Javadoc for %{name} Group: Documentation %description javadoc %{summary}. %package manual Summary: Documents for %{name} Group: Documentation %description manual %{summary}. %prep %setup -q -n %{ucname}-%{version} %{__chmod} -R go=u-w * for j in $(find . -name "*.jar"); do %{__mv} $j $j.no done %build unset CLASSPATH ant package javadoc %install %{__rm} -rf $RPM_BUILD_ROOT # jars %{__install} -d -m 755 $RPM_BUILD_ROOT%{_javadir} %{__install} -m 644 lib/%{ucname}-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} for jar in *-%{version}* do %{__ln_s} -f ${jar} `echo $jar| %{__sed} "s|-%{version}||g"` done) %add_to_maven_depmap org.fontbox %{name} %{version} JPP %{name} # pom %{__install} -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms %{__install} -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom # javadoc %{__install} -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %{__cp} -pr docs/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %{__ln_s} %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink # manual %{__install} -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{__rm} -rf docs/javadoc %{__cp} -pr docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %clean %{__rm} -rf $RPM_BUILD_ROOT %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root,-) %{_javadir}/*.jar %{_datadir}/maven2/poms/* %{_mavendepmapfragdir}/* %files javadoc %defattr(-,root,root,-) %doc %{_javadocdir}/%{name}-%{version} %doc %{_javadocdir}/%{name} %files manual %defattr(-,root,root,-) %doc %{_docdir}/%{name}-%{version} %changelog * Thu Jul 16 2009 Alexander Kahl - 0:0.1.0-2 - re-release for Fedora - general cleanup - invalid group Development/Java -> Development/Libraries - invalid group Development/Documentation -> Documentation * Tue Mar 31 2009 Ralph Apel 0:0.1.0-1.jpp5 - First JPP-5 release