publican/publican.spec

239 lines
8.2 KiB
RPMSpec
Raw Normal View History

# Track font name changes
%define RHEL5 %(test %{?dist} == .el5 && echo 1 || echo 0)
%define RHEL6 %(test %{?dist} == .el6 && echo 1 || echo 0)
# Assume not rhel means FC11+ ... ugly
%define OTHER 1
%if %{RHEL6}
%define OTHER 0
%endif
%if %{RHEL5}
%define OTHER 0
%endif
# who doesn't have xdg-open?
* Wed Oct 06 2010 Jeff Fearn <jfearn@redhat.com> 2.2-0 - Extend callout graphics to 40; adjust colour and font BZ #629804 <r.landmann@redhat.com> - Make keycombo example consistent with RHEL6 behaviour. BZ #618735 <r.landmann@redhat.com> - Restrict CSS style for edition to title pages to avoid applying to bibliographies <r.landmann@redhat.com> - Fix images/icon.svg breaking rpm build. BZ #612515 - Fix empty term breaking PDF build. BZ #614728 - Fix footnote not catching modified para. BZ #565903 - Fix SRPM not including web labels. BZ #621036 - Update tocs when home page is updated. BZ #612027 - Don't display stats for unused languages. BZ #613500 - Fix admonitions/varlistentry not having IDs. BZ #616112 - Fix procedure/itemizedlist/orderedlist not having IDs. BZ #612817 - Catch invalid revision in translation. BZ #621721 - Limit index.html redirection to installed languages. BZ #612009 - Fix smaller width being overridden by max_image_width. BZ #613140 - Fix support for def_lang for web sites. BZ #622030 - Remove ant trails from selected links. - Add --novalid option to disable validation when building. BZ #616142 - Revert change to escaping ', ", >, <. BZ #628266 - Add support for product and version splash pages. BZ #613502 - Fix unused version breaking product hiding. - Add support for alerts for parameters. - Add bash completion. - Validate revnumber for changelog. BZ #628464 - Add basic man page support. BZ #632027 - Add basic support for line numbers. BZ #629463 - Add warning messages for out of date translations. - Add productname to IGNOREBLOCKS. BZ #625316 - Add OPDS support. BZ #615831 - Fix translated labels in web nav. BZ #631647 - Remove highlighting from output of prompt tag in html. BZ #618902 <ryanlerch@gmail.com> - Resize index title font to a sane size. BZ #624392 - Fix misapplied fonts for CJK. BZ #628786 - Fix attributes breaking translation merge. BZ #638816 - Fix entities missing from RPM description. BZ #626254 - Add bridgehead_in_toc parameter. BZ #616123 - Support '--lang all' for lang_stats. - Left align CJK in PDF. BZ #639811 - Fix constraint regex on docname and productname. BZ #640082
2010-10-06 01:06:43 +00:00
%define HTMLVIEW %{RHEL5}
# required for desktop file install
%define my_vendor %(test %{OTHER} == 1 && echo "fedora" || echo "redhat")
%define TESTS 0
Name: publican
Version: 2.5
Release: 2%{?dist}
Summary: Common files and scripts for publishing with DocBook XML
# For a breakdown of the licensing, refer to LICENSE
License: (GPLv2+ or Artistic) and CC0
Group: Applications/Publishing
URL: https://publican.fedorahosted.org
Source0: https://fedorahosted.org/released/publican/Publican-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Limited to these arches on RHEL 6 due to PDF + Java limitations
%if %{RHEL6}
BuildArch: i386 x86_64
%else
BuildArch: noarch
%endif
# Get rid of the old packages
Obsoletes: perl-Publican-WebSite < 1.5
Obsoletes: publican-WebSite-obsoletes < 1.21
# Do NOT support very old packages
#Provides: perl-Publican-WebSite = 1.5
#Provides: publican-WebSite-obsoletes = 1.21
BuildRequires: perl(Devel::Cover)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Test::Exception)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Test::Perl::Critic)
BuildRequires: perl(Archive::Tar)
BuildRequires: perl(Archive::Zip)
BuildRequires: perl(Carp)
BuildRequires: perl(Config::Simple)
BuildRequires: perl(Cwd)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(DateTime)
BuildRequires: perl(DateTime::Format::DateParse)
BuildRequires: perl(Encode)
BuildRequires: perl(File::Copy::Recursive)
BuildRequires: perl(File::Find)
BuildRequires: perl(File::Find::Rule)
BuildRequires: perl(File::Path)
BuildRequires: perl(File::pushd)
BuildRequires: perl(HTML::FormatText)
BuildRequires: perl(HTML::TreeBuilder)
BuildRequires: perl(I18N::LangTags::List)
BuildRequires: perl(Image::Magick)
BuildRequires: perl(Image::Size)
BuildRequires: perl(Locale::Maketext::Gettext)
BuildRequires: perl(Locale::Language)
BuildRequires: perl(Locale::PO)
BuildRequires: perl(Makefile::Parser)
BuildRequires: perl(Syntax::Highlight::Engine::Kate)
BuildRequires: perl(Term::ANSIColor)
BuildRequires: perl(Text::Wrap)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(version)
BuildRequires: perl(XML::LibXML) >= 1.67
BuildRequires: perl(XML::LibXSLT) >= 1.67
BuildRequires: perl(XML::Simple)
BuildRequires: perl(XML::TreeBuilder) >= 3.09-15
BuildRequires: fop >= 0.95
BuildRequires: batik
BuildRequires: docbook-style-xsl >= 1.75.2-5
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: perl-Template-Toolkit
BuildRequires: perl(DBD::SQLite)
# Most of these are handled automatically
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(Locale::Maketext::Gettext)
Requires: fop >= 0.95
Requires: batik rpm-build
Requires: docbook-style-xsl >= 1.75.2-5
Requires: perl(XML::LibXML) >= 1.67
Requires: perl(XML::LibXSLT) >= 1.67
Requires: perl(XML::TreeBuilder) >= 3.09-15
Requires: gettext cvs
Requires: perl-Template-Toolkit
Requires: perl(DBD::SQLite)
# Pull in the fonts for all languages, else you can't build translated PDF in brew/koji
%if %{RHEL5}
Requires: fonts-bengali fonts-chinese fonts-chinese-zysong fonts-gujarati
Requires: fonts-hindi fonts-japanese fonts-kannada fonts-korean
Requires: fonts-malayalam fonts-oriya fonts-punjabi fonts-sinhala
Requires: fonts-tamil fonts-telugu liberation-fonts
BuildRequires: fonts-bengali fonts-chinese fonts-chinese-zysong fonts-gujarati
BuildRequires: fonts-hindi fonts-japanese fonts-kannada fonts-korean
BuildRequires: fonts-malayalam fonts-oriya fonts-punjabi fonts-sinhala
BuildRequires: fonts-tamil fonts-telugu liberation-fonts
#BuildRequires: java-1.5.0-sun java-1.5.0-sun-devel chkconfig
%endif
%if %{RHEL6}
Requires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
Requires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
Requires: lklug-fonts baekmuk-ttf-batang-fonts
BuildRequires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
BuildRequires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
BuildRequires: lklug-fonts baekmuk-ttf-batang-fonts
%endif
%if %{OTHER}
Requires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
Requires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
Requires: lklug-fonts baekmuk-ttf-batang-fonts
BuildRequires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
BuildRequires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
BuildRequires: lklug-fonts baekmuk-ttf-batang-fonts
%endif
Obsoletes: Publican < 1.0
# Do NOT support very old packages
#Provides: Publican = 1.0
2008-02-13 03:42:40 +00:00
%description
2008-09-10 01:22:51 +00:00
Publican is a DocBook publication system, not just a DocBook processing tool.
As well as ensuring your DocBook XML is valid, publican works to ensure
your XML is up to publishable standard.
2008-02-13 03:42:40 +00:00
%package doc
Group: Documentation
Summary: Documentation for the Publican package
2008-07-25 05:56:37 +00:00
%if %{HTMLVIEW}
Requires: htmlview
2008-07-25 05:56:37 +00:00
%else
Requires: xdg-utils
2008-07-25 05:56:37 +00:00
%endif
Obsoletes: Publican-doc < 1.0
# Do NOT support very old packages
#Provides: Publican-doc = 1.0
2008-02-13 03:42:40 +00:00
%description doc
2008-09-10 01:22:51 +00:00
Publican is a tool for publishing material authored in DocBook XML.
This guide explains how to to create and build books and articles
using publican. It is not a DocBook XML tutorial and concentrates
solely on using the publican tools.
2008-02-13 03:42:40 +00:00
%prep
%setup -q -n Publican-%{version}
2008-02-13 03:42:40 +00:00
%build
%{__perl} Build.PL installdirs=vendor
./Build
dir=`pwd` && cd Users_Guide && perl -I $dir/blib/lib $dir/blib/script/publican build \
--formats=html-desktop --publish --langs=all \
--common_config="$dir/blib/datadir" \
--common_content="$dir/blib/datadir/Common_Content"
2008-02-13 03:42:40 +00:00
%install
rm -rf $RPM_BUILD_ROOT
2008-07-25 05:56:37 +00:00
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
2008-07-25 05:56:37 +00:00
%{_fixperms} $RPM_BUILD_ROOT/*
2008-02-13 03:42:40 +00:00
./fop-ttc-metric.pl --outdir $RPM_BUILD_ROOT%{_datadir}/publican/fop/font-metrics --conffile $RPM_BUILD_ROOT%{_datadir}/publican/fop/fop.xconf
2008-02-13 03:42:40 +00:00
sed -i -e 's|@@FILE@@|%{_docdir}/%{name}-doc-%{version}/en-US/index.html|' %{name}.desktop
sed -i -e 's|@@ICON@@|%{_docdir}/%{name}-doc-%{version}/en-US/images/icon.svg|' %{name}.desktop
2008-07-25 05:56:37 +00:00
%if %{HTMLVIEW}
sed -i -e 's|xdg-open|htmlview|' %{name}.desktop
%endif
2008-02-28 05:33:25 +00:00
desktop-file-install --vendor="%{my_vendor}" --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{name}.desktop
2008-02-13 03:42:40 +00:00
for file in po/*.po; do
lang=`echo "$file" | sed -e 's/po\/\(.*\)\.po/\1/'`;
mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES;
msgfmt $file -o $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo;
done
%find_lang %{name}
%check
%if %{TESTS}
./Build test
%endif
2008-02-13 03:42:40 +00:00
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
2008-02-13 03:42:40 +00:00
%defattr(-,root,root,-)
%doc CHANGES README COPYING Artistic
%{perl_vendorlib}/Publican.pm
%{perl_vendorlib}/Publican/*
%{_mandir}/man3/Publican*
%{_mandir}/man1/*
%{_bindir}/publican
%{_datadir}/publican
%config(noreplace) %{_datadir}/publican/default.db
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/publican-website.cfg
%config(noreplace) %{_sysconfdir}/bash_completion.d/_publican
2008-02-13 03:42:40 +00:00
%files doc
%defattr(-,root,root,-)
%doc Users_Guide/publish/desktop/*
2008-02-28 05:33:25 +00:00
%{_datadir}/applications/%{my_vendor}-%{name}.desktop
2008-02-13 03:42:40 +00:00
%doc fdl.txt
%changelog
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Dec 2 2010 Rüdiger Landmann <r.landmann@redhat.com> 2.5-1
- Rebase on new upstream version -- BZ#659589 BZ#659590 BZ#659591
* Thu Dec 2 2010 Rüdiger Landmann <r.landmann@redhat.com> 2.4-1
- Rebase on new upstream version -- BZ#659127 BZ#659128 BZ#659129