2009-10-31 23:33:40 +00:00
|
|
|
|
|
|
|
# Track font name changes
|
2010-07-06 05:35:41 +00:00
|
|
|
%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
|
2009-10-31 23:33:40 +00:00
|
|
|
|
|
|
|
# who doesn't have xdg-open?
|
2010-10-06 01:06:43 +00:00
|
|
|
%define HTMLVIEW %{RHEL5}
|
2009-10-31 23:33:40 +00:00
|
|
|
|
|
|
|
# required for desktop file install
|
2010-07-06 05:35:41 +00:00
|
|
|
%define my_vendor %(test %{OTHER} == 1 && echo "fedora" || echo "redhat")
|
|
|
|
|
2010-07-07 02:38:20 +00:00
|
|
|
%define TESTS 0
|
2009-10-31 23:33:40 +00:00
|
|
|
|
|
|
|
Name: publican
|
2010-12-01 23:48:42 +00:00
|
|
|
Version: 2.4
|
2010-12-02 00:51:03 +00:00
|
|
|
Release: 1%{?dist}
|
2009-10-31 23:33:40 +00:00
|
|
|
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
|
2009-12-08 01:08:31 +00:00
|
|
|
Source0: https://fedorahosted.org/released/publican/Publican-%{version}.tar.gz
|
2009-10-31 23:33:40 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
2010-07-06 05:35:41 +00:00
|
|
|
# Limited to these arches on RHEL 6 due to PDF + Java limitations
|
|
|
|
%if %{RHEL6}
|
|
|
|
BuildArch: i386 x86_64
|
|
|
|
%else
|
2009-10-31 23:33:40 +00:00
|
|
|
BuildArch: noarch
|
2010-07-06 05:35:41 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
# Get rid of the old packages
|
|
|
|
Obsoletes: perl-Publican-WebSite < 1.5
|
|
|
|
Obsoletes: publican-WebSite-obsoletes < 1.21
|
2010-12-01 23:48:42 +00:00
|
|
|
# Do NOT support very old packages
|
|
|
|
#Provides: perl-Publican-WebSite = 1.5
|
|
|
|
#Provides: publican-WebSite-obsoletes = 1.21
|
2009-10-31 23:33:40 +00:00
|
|
|
|
|
|
|
BuildRequires: perl(Devel::Cover)
|
|
|
|
BuildRequires: perl(Module::Build)
|
|
|
|
BuildRequires: perl(Test::Exception)
|
|
|
|
BuildRequires: perl(Test::More)
|
2010-07-06 05:35:41 +00:00
|
|
|
BuildRequires: perl(Test::Pod)
|
2009-10-31 23:33:40 +00:00
|
|
|
BuildRequires: perl(Test::Pod::Coverage)
|
|
|
|
BuildRequires: perl(Test::Perl::Critic)
|
|
|
|
BuildRequires: perl(Archive::Tar)
|
2009-12-08 01:08:31 +00:00
|
|
|
BuildRequires: perl(Archive::Zip)
|
2009-10-31 23:33:40 +00:00
|
|
|
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)
|
2010-03-23 23:43:40 +00:00
|
|
|
BuildRequires: perl(Test::Pod)
|
2009-10-31 23:33:40 +00:00
|
|
|
BuildRequires: perl(version)
|
|
|
|
BuildRequires: perl(XML::LibXML) >= 1.67
|
|
|
|
BuildRequires: perl(XML::LibXSLT) >= 1.67
|
2010-10-26 02:22:23 +00:00
|
|
|
BuildRequires: perl(XML::Simple)
|
2009-10-31 23:33:40 +00:00
|
|
|
BuildRequires: perl(XML::TreeBuilder) >= 3.09-15
|
2010-07-06 05:35:41 +00:00
|
|
|
BuildRequires: fop >= 0.95
|
2009-10-31 23:33:40 +00:00
|
|
|
BuildRequires: batik
|
2010-07-06 05:35:41 +00:00
|
|
|
BuildRequires: docbook-style-xsl >= 1.75.2-5
|
2009-10-31 23:33:40 +00:00
|
|
|
BuildRequires: desktop-file-utils
|
2010-01-29 01:10:18 +00:00
|
|
|
BuildRequires: gettext
|
2010-07-06 05:35:41 +00:00
|
|
|
BuildRequires: perl-Template-Toolkit
|
|
|
|
BuildRequires: perl(DBD::SQLite)
|
2009-10-31 23:33:40 +00:00
|
|
|
|
|
|
|
# Most of these are handled automatically
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
|
|
Requires: perl(Locale::Maketext::Gettext)
|
2010-07-06 05:35:41 +00:00
|
|
|
Requires: fop >= 0.95
|
2009-12-08 01:08:31 +00:00
|
|
|
Requires: batik rpm-build
|
2010-07-06 05:35:41 +00:00
|
|
|
Requires: docbook-style-xsl >= 1.75.2-5
|
2009-10-31 23:33:40 +00:00
|
|
|
Requires: perl(XML::LibXML) >= 1.67
|
|
|
|
Requires: perl(XML::LibXSLT) >= 1.67
|
|
|
|
Requires: perl(XML::TreeBuilder) >= 3.09-15
|
2010-02-26 04:48:03 +00:00
|
|
|
Requires: gettext cvs
|
2010-07-06 05:35:41 +00:00
|
|
|
Requires: perl-Template-Toolkit
|
|
|
|
Requires: perl(DBD::SQLite)
|
2009-10-31 23:33:40 +00:00
|
|
|
|
|
|
|
# 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
|
2009-12-08 01:08:31 +00:00
|
|
|
#BuildRequires: java-1.5.0-sun java-1.5.0-sun-devel chkconfig
|
2009-10-31 23:33:40 +00:00
|
|
|
%endif
|
2010-07-06 05:35:41 +00:00
|
|
|
%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
|
2009-10-31 23:33:40 +00:00
|
|
|
%if %{OTHER}
|
|
|
|
Requires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
|
2010-01-29 01:10:18 +00:00
|
|
|
Requires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
|
2009-10-31 23:33:40 +00:00
|
|
|
Requires: lklug-fonts baekmuk-ttf-batang-fonts
|
|
|
|
|
|
|
|
BuildRequires: liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts
|
2010-01-29 01:10:18 +00:00
|
|
|
BuildRequires: cjkuni-uming-fonts ipa-gothic-fonts ipa-pgothic-fonts
|
2009-10-31 23:33:40 +00:00
|
|
|
BuildRequires: lklug-fonts baekmuk-ttf-batang-fonts
|
|
|
|
%endif
|
|
|
|
|
2009-12-08 01:08:31 +00:00
|
|
|
Obsoletes: Publican < 1.0
|
2010-12-01 23:48:42 +00:00
|
|
|
# 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
|
2009-10-31 23:33:40 +00:00
|
|
|
Group: Documentation
|
|
|
|
Summary: Documentation for the Publican package
|
2008-07-25 05:56:37 +00:00
|
|
|
%if %{HTMLVIEW}
|
2009-10-31 23:33:40 +00:00
|
|
|
Requires: htmlview
|
2008-07-25 05:56:37 +00:00
|
|
|
%else
|
2009-10-31 23:33:40 +00:00
|
|
|
Requires: xdg-utils
|
2008-07-25 05:56:37 +00:00
|
|
|
%endif
|
2009-12-08 01:08:31 +00:00
|
|
|
Obsoletes: Publican-doc < 1.0
|
2010-12-01 23:48:42 +00:00
|
|
|
# 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
|
2009-10-31 23:33:40 +00:00
|
|
|
%setup -q -n Publican-%{version}
|
2008-02-13 03:42:40 +00:00
|
|
|
|
|
|
|
%build
|
2009-10-31 23:33:40 +00:00
|
|
|
%{__perl} Build.PL installdirs=vendor
|
|
|
|
./Build
|
|
|
|
dir=`pwd` && cd Users_Guide && perl -I $dir/blib/lib $dir/blib/script/publican build \
|
2010-10-26 02:22:23 +00:00
|
|
|
--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
|
|
|
|
2009-10-31 23:33:40 +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
|
|
|
|
2009-10-31 23:33:40 +00:00
|
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
2008-02-13 03:42:40 +00:00
|
|
|
|
2010-01-29 01:10:18 +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
|
|
|
|
2010-07-06 05:35:41 +00:00
|
|
|
for file in po/*.po; do
|
2010-10-26 02:22:23 +00:00
|
|
|
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;
|
2010-07-06 05:35:41 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
%find_lang %{name}
|
|
|
|
|
2009-10-31 23:33:40 +00:00
|
|
|
%check
|
2010-07-06 05:35:41 +00:00
|
|
|
%if %{TESTS}
|
2010-03-23 23:43:40 +00:00
|
|
|
./Build test
|
2010-07-06 05:35:41 +00:00
|
|
|
%endif
|
2010-10-26 02:22:23 +00:00
|
|
|
|
2008-02-13 03:42:40 +00:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2010-07-06 05:35:41 +00:00
|
|
|
%files -f %{name}.lang
|
2008-02-13 03:42:40 +00:00
|
|
|
%defattr(-,root,root,-)
|
2009-12-08 01:08:31 +00:00
|
|
|
%doc CHANGES README COPYING Artistic
|
2010-07-06 05:35:41 +00:00
|
|
|
%{perl_vendorlib}/Publican.pm
|
|
|
|
%{perl_vendorlib}/Publican/*
|
|
|
|
%{_mandir}/man3/Publican*
|
2009-10-31 23:33:40 +00:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_bindir}/publican
|
|
|
|
%{_datadir}/publican
|
2010-10-26 02:22:23 +00:00
|
|
|
%config(noreplace) %{_datadir}/publican/default.db
|
2010-07-06 05:35:41 +00:00
|
|
|
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/publican-website.cfg
|
2010-10-26 02:22:23 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/bash_completion.d/_publican
|
2008-02-13 03:42:40 +00:00
|
|
|
|
|
|
|
%files doc
|
2009-10-31 23:33:40 +00:00
|
|
|
%defattr(-,root,root,-)
|
2009-11-02 03:59:09 +00:00
|
|
|
%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
|
2010-12-02 00:51:03 +00:00
|
|
|
* 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
|
2010-12-01 23:48:42 +00:00
|
|
|
|