Blob Blame Raw
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
# Debuginfo is not useful for OCaml programs since gdb doesn't know about OCaml
%global debug_package %{nil}

Name:           bibtex2html
Version:        1.94
Release:        1%{?dist}
Summary:        Collection of tools for translating from BibTeX to HTML

Group:          Applications/Publishing
License:        GPLv2
URL:            http://www.lri.fr/~filliatr/bibtex2html/index.en.html
Source0:        http://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  ocaml >= 3.10.0
BuildRequires:  perl
BuildRequires:  tex(latex)
# temp conditional until ocaml works on ppc64
%ifnarch ppc64 
BuildRequires:  hevea
%endif

ExcludeArch: sparc64 s390 s390x

%description
bibtex2html is a collection of tools for translating from BibTeX to HTML. 
They allow to produce, from a set of bibliography files in BibTeX format, 
a bibliography in HTML format.

%prep
%setup -q
for file in CHANGES ; do
   mv $file timestamp && \
   iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp && \
   touch -r timestamp $file && \
   rm timestamp
done

%build
%configure 
make %{?_smp_mflags}
# temp conditional until ocaml works on ppc64
%ifnarch ppc64
make doc
%else
make manual.ps
%endif

%install
rm -rf %{buildroot}
%{__perl} -pi -e 's|^BINDIR=.*|BINDIR=%{buildroot}%{_bindir}|g;' Makefile
%{__perl} -pi -e 's|^MANDIR =.*|MANDIR=%{buildroot}%{_mandir}|g;' Makefile
make install 

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc CHANGES README GPL COPYING manual.dvi manual.ps 
# temp conditional until ocaml works on ppc64
%ifnarch ppc64
%doc manual.html
%endif
%{_mandir}/man1/*.1.gz
%{_bindir}/*

%changelog
* Fri Oct 02 2009 Guido Grazioli <guido.grazioli@gmail.com> - 1.94-1
- Upstream 1.94

* Tue Sep 22 2009 Dennis Gilmore <dennis@ausil.us> - 1.93-5
- ExcludeArch sparc64 s390 s390x

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.93-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Mar 19 2009 Guido Grazioli <guido.grazioli@gmail.com> 1.93-3
- added manual (no html on ppc64 until hevea available)

* Wed Mar 18 2009 Guido Grazioli <guido.grazioli@gmail.com> 1.93-2
- sanitized charset conversion
- added smp make flags

* Tue Mar 17 2009 Guido Grazioli <guido.grazioli@gmail.com> 1.93-1
- initial packaging