]>
Commit | Line | Data |
---|---|---|
ec2bb6c8 JB |
1 | # TODO: |
2 | # - common-web | |
3 | # - fix tests (currently they require wkhtmltopdf built with patched qt) | |
42d3ece6 JB |
4 | # |
5 | # Conditional build: | |
ec2bb6c8 | 6 | %bcond_with tests # do perform "./Build test" |
42d3ece6 JB |
7 | # |
8 | %include /usr/lib/rpm/macros.perl | |
9 | Summary: Publishing tool based on DocBook XML | |
10 | Summary(pl.UTF-8): Narzędzie do publikowania, oparte na formacie Docbook XML | |
11 | Name: publican | |
833a387f | 12 | Version: 3.1.5 |
42d3ece6 JB |
13 | Release: 1 |
14 | License: CC0 (Common Content files), GPL v2+ or Artistic v1.0 (the rest) | |
15 | Group: Applications/Publishing/XML | |
16 | Source0: https://fedorahosted.org/releases/p/u/publican/Publican-v%{version}.tar.gz | |
833a387f | 17 | # Source0-md5: 6f235cb87a6a21e712511ead0a882352 |
42d3ece6 | 18 | Patch0: %{name}-test.patch |
42d3ece6 JB |
19 | URL: https://fedorahosted.org/publican/ |
20 | BuildRequires: perl-Archive-Tar | |
21 | BuildRequires: perl-Archive-Zip | |
22 | BuildRequires: perl-Config-Simple | |
23 | BuildRequires: perl-DBI | |
24 | BuildRequires: perl-DateTime | |
25 | BuildRequires: perl-DateTime-Format-DateParse | |
26 | BuildRequires: perl-Devel-Cover | |
27 | BuildRequires: perl-Encode | |
28 | BuildRequires: perl-File-Copy-Recursive >= 0.38 | |
29 | BuildRequires: perl-File-Find-Rule | |
65d835e8 | 30 | BuildRequires: perl-File-Inplace |
42d3ece6 JB |
31 | BuildRequires: perl-File-Which |
32 | BuildRequires: perl-File-pushd | |
33 | BuildRequires: perl-HTML-Format | |
34 | BuildRequires: perl-HTML-FormatText-WithLinks | |
35 | BuildRequires: perl-HTML-FormatText-WithLinks-AndTables >= 0.02 | |
36 | BuildRequires: perl-HTML-Tree | |
37 | BuildRequires: perl-I18N-LangTags | |
38 | BuildRequires: perl-IO-String | |
ec2bb6c8 | 39 | BuildRequires: perl-List-MoreUtils |
42d3ece6 JB |
40 | BuildRequires: perl-Locale-Maketext-Gettext |
41 | BuildRequires: perl-Locale-PO | |
42 | BuildRequires: perl-Makefile-Parser | |
43 | BuildRequires: perl-Module-Build | |
ec2bb6c8 | 44 | BuildRequires: perl-Sort-Versions |
42d3ece6 JB |
45 | BuildRequires: perl-String-Similarity |
46 | BuildRequires: perl-Syntax-Highlight-Engine-Kate | |
47 | BuildRequires: perl-Template-Toolkit | |
48 | BuildRequires: perl-Term-ANSIColor | |
49 | BuildRequires: perl-Text-CSV_XS | |
50 | BuildRequires: perl-XML-LibXML >= 1.67 | |
51 | BuildRequires: perl-XML-LibXSLT >= 1.67 | |
52 | BuildRequires: perl-XML-Simple | |
53 | BuildRequires: perl-XML-TreeBuilder >= 4.0 | |
54 | BuildRequires: perl-devel >= 1:5.8.0 | |
55 | BuildRequires: perl-version | |
56 | BuildRequires: rpm-perlprov >= 4.1-13 | |
57 | %if %{with tests} | |
58 | BuildRequires: docbook-style-xsl >= 1.76.1 | |
59 | BuildRequires: perl-Test-Pod >= 1.14 | |
60 | BuildRequires: perl-Test-Pod-Coverage >= 1.04 | |
61 | BuildRequires: perl-Test-Simple | |
62 | # because of WEB_TEMPLATE_PATH in publican script | |
ec2bb6c8 | 63 | BuildRequires: publican >= 3.1 |
42d3ece6 JB |
64 | BuildRequires: wkhtmltopdf |
65 | %endif | |
66 | Requires: docbook-style-xsl >= 1.76.1 | |
67 | Requires: perl-File-Copy-Recursive >= 0.38 | |
68 | Requires: perl-HTML-FormatText-WithLinks-AndTables >= 0.02 | |
69 | Requires: perl-XML-LibXML >= 1.67 | |
70 | Requires: perl-XML-LibXSLT >= 1.67 | |
71 | Requires: perl-XML-TreeBuilder >= 4.0 | |
72 | Requires: wkhtmltopdf | |
73 | # to produce RPMs | |
74 | Suggests: rpm-build | |
75 | BuildArch: noarch | |
76 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
77 | ||
78 | # FIXME | |
79 | %define wwwdir %{_datadir}/html/docs | |
80 | ||
81 | %description | |
82 | Publican is a DocBook publication system, not just a DocBook | |
83 | processing tool. As well as ensuring your DocBook XML is valid, | |
84 | Publican works to ensure your XML is up to publishable standard. | |
85 | ||
86 | %description -l pl.UTF-8 | |
87 | Publican to docbookowy system publikacji, nie będący tylko narzędziem | |
88 | do przetwarzania DocBooka. Poza sprawdzeniem, że DocBook XML jest | |
89 | poprawny, Publican sprawdza, czy XML jest zgodny z aktualnym | |
90 | standardem publikacji. | |
91 | ||
92 | %package doc | |
93 | Summary: Documentation for the Publican package | |
94 | Summary(pl.UTF-8): Dokumentacja do pakietu Publican | |
95 | License: FDL | |
96 | Group: Documentation | |
97 | ||
98 | %description doc | |
99 | Publican is a tool for publishing material authored in DocBook XML. | |
100 | This guide explains how to create and build books and articles using | |
101 | Publican. It is not a DocBook XML tutorial and concentrates solely on | |
102 | using the Publican tools. | |
103 | ||
104 | %description doc -l pl.UTF-8 | |
105 | Publican to narzędzie do tworzenia publikacji z materiałów pisanych w | |
106 | formacie DocBook XML. Ten podręcznik opisuje tworzenie książek oraz | |
107 | artykułów przy użyciu pakietu Publican. Nie jest to podręcznik do | |
108 | DocBook XML-a i skupia się wyłącznie na użyciu narzędzi z pakietu | |
109 | Publican. | |
110 | ||
111 | %package common-web | |
112 | Summary: Website style for common brand | |
113 | Summary(pl.UTF-8): Styl strony WWW dla ogólnego szablonu | |
114 | Group: Documentation | |
115 | Requires: %{name} = %{version}-%{release} | |
116 | ||
117 | %description common-web | |
118 | Website style for common brand. | |
119 | ||
120 | %description common-web -l pl.UTF-8 | |
121 | Styl strony WWW dla ogólnego szablonu. | |
122 | ||
123 | %package -n bash-completion-publican | |
124 | Summary: bash-completion for Publican | |
125 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla programu Publican | |
126 | Group: Applications/Shells | |
127 | Requires: bash-completion | |
128 | ||
129 | %description -n bash-completion-publican | |
130 | bash-completion for Publican. | |
131 | ||
132 | %description -n bash-completion-publican -l pl.UTF-8 | |
133 | Bashowe uzupełnianie parametrów dla programu Publican. | |
134 | ||
135 | %prep | |
136 | %setup -q -n Publican-v%{version} | |
137 | %patch0 -p1 | |
42d3ece6 JB |
138 | |
139 | %build | |
140 | %{__perl} Build.PL \ | |
141 | installdirs=vendor \ | |
142 | --nocolours=1 | |
143 | ./Build | |
144 | ||
145 | %{?with_tests:./Build test} | |
146 | ||
147 | # publish Users_Guide | |
148 | dir=$(pwd) | |
149 | cd Users_Guide | |
150 | %{__perl} -CA -I $dir/blib/lib $dir/blib/script/publican build \ | |
151 | --formats=html-desktop \ | |
152 | --publish \ | |
153 | --langs=all \ | |
154 | --common_config="$dir/blib/datadir" \ | |
155 | --common_content="$dir/blib/datadir/Common_Content" \ | |
156 | --nocolours | |
157 | ||
158 | %install | |
159 | rm -rf $RPM_BUILD_ROOT | |
160 | ||
161 | ./Build install \ | |
162 | destdir=$RPM_BUILD_ROOT | |
163 | ||
164 | for f in po/*.po ; do | |
165 | lang=$(basename "$f" .po) | |
166 | install -d $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES | |
167 | msgfmt -c -v -o $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/publican.mo "$f" | |
168 | done | |
169 | ||
170 | %if 0 | |
171 | install -d $RPM_BUILD_ROOT%{wwwdir}/common | |
172 | dir=$(pwd) | |
173 | cd datadir/Common_Content/common | |
174 | %{__perl} -CA -I $dir/blib/lib $dir/blib/script/publican install_brand --web --path=$RPM_BUILD_ROOT%{wwwdir}/common | |
175 | %endif | |
176 | ||
ec2bb6c8 JB |
177 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{sr@Latn,sr@latin} |
178 | ||
42d3ece6 JB |
179 | %find_lang %{name} |
180 | ||
181 | %clean | |
182 | rm -rf $RPM_BUILD_ROOT | |
183 | ||
184 | %files -f %{name}.lang | |
185 | %defattr(644,root,root,755) | |
186 | %doc CC0 Changes LICENSE README TODO | |
187 | %attr(755,root,root) %{_bindir}/db4-2-db5 | |
188 | %attr(755,root,root) %{_bindir}/db5-valid | |
189 | %attr(755,root,root) %{_bindir}/publican | |
190 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/publican-website.cfg | |
191 | %{perl_vendorlib}/Publican.pm | |
192 | %{perl_vendorlib}/Publican | |
193 | %{_datadir}/publican | |
194 | %{_mandir}/man1/publican.1p* | |
195 | %{_mandir}/man3/Publican*.3pm* | |
196 | ||
197 | %files doc | |
198 | %defattr(644,root,root,755) | |
199 | %doc Users_Guide/publish/desktop/* | |
200 | ||
201 | %files -n bash-completion-publican | |
202 | %defattr(644,root,root,755) | |
203 | /etc/bash_completion.d/_publican |