Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 371f378791b6ec58b04dc0f8e0092016 > files > 6

clapham-0.1.003-4.fc14.src.rpm

Name:           clapham
Version:        0.1.003
Release:        4%{?dist}
Summary:        Railroad diagram generator for computer languages
URL:            http://clapham.hydromatic.net/
License:        GPLv2
# NOTE: Clapham is not under a GPLv2+ license, because it only allows
# use of later versions if they are "approved by The Eigenbase Project".
Group:          Applications/Engineering

Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}-src.zip
Source1:        %{name}.sh

# Remove use of Apache Ivy, unnecessary to build Fedora RPM:
Patch0:         %{name}-noivy.patch

# Set library paths for Fedora:
Patch1:         %{name}-libdir.patch

# Replace gratuitous use of Microsoft Word (non-Unicode) character codes in
# a source file:
Patch2:         %{name}-msword.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  dos2unix
BuildRequires:  batik javacc
BuildRequires:  ant ant-nodeps java-devel >= 1:1.6.0 jpackage-utils

Requires:       batik xml-commons-apis
Requires:       java >= 1:1.6.0 jpackage-utils


%description
Clapham is an open-source railroad diagram generator.
Railroad diagrams are a graphical way of representing the grammar of a
computer language. When a computer language is large, even people who
use the language day-to-day have trouble remembering its nuances. A
railroad diagram represents the grammar visually, and is easier to
understand by non- or semi-technical users.

%package javadoc
Summary:        Javadocs for clapham
Requires:       %{name} = %{version}-%{release}

%description javadoc
This package contains the API documentation for the Clapham railroad
diagram generator.

%prep
%setup -q
%patch0 -p1 -b .noivy
%patch1 -p1 -b .libdir
%patch2 -p1 -b .msword
rm ivy.xml ivysettings.xml
find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;
dos2unix README.txt

%build
ant jar javadoc

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_javadir}
install -m644 %{name}.jar %{buildroot}%{_javadir}/
mkdir -p %{buildroot}%{_bindir}
install -m644 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
mkdir -p %{buildroot}%{_javadocdir}
cp -a doc/api %{buildroot}%{_javadocdir}/%{name}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_javadir}/%{name}.jar
%attr(755, root, root) %{_bindir}/%{name}
%doc README.txt
%doc VERSION.txt
# example input files:
%doc testsrc/net/hydromatic/%{name}/example/*.bnf
%doc testsrc/net/hydromatic/%{name}/example/*.java
# example code:
%doc testsrc/net/hydromatic/%{name}/test/*.java

%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}

%changelog
* Wed Apr 27 2011 Eric Smith <eric@brouhaha.com> - 0.1.003-4
- added javadoc subpackage dependency on main package
- changed javadoc subpackage summary for consistency with other Java packages

* Mon Apr 11 2011 Eric Smith <eric@brouhaha.com> - 0.1.003-3
- changed license from GPLv2+ to GPLv2, with comment explaining.
- added comments explaining purpose of patches.

* Thu Apr  7 2011 Eric Smith <eric@brouhaha.com> - 0.1.003-2
- minor spec file changes based on package review comments by
  Mario Blättermann.

* Sun Jan  9 2011 Eric Smith <eric@brouhaha.com> - 0.1.003-1
- initial version