2 # - external php-font-lib
5 %define php_min_version 5.2.7
6 %include /usr/lib/rpm/macros.php
7 Summary: HTML to PDF converter
12 Group: Development/Languages/PHP
13 Source0: https://github.com/dompdf/dompdf/releases/download/v%{version}/dompdf-%{version}.zip
14 # Source0-md5: 06c265913be9c0935c4f607617a7af0f
16 URL: http://dompdf.github.io/
17 BuildRequires: /usr/bin/php
18 BuildRequires: rpm-php-pearprov >= 4.4.2-11
19 BuildRequires: rpmbuild(macros) >= 1.461
21 Requires: php(core) >= %{php_min_version}
27 Requires: php(mbstring)
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _noautoreq_pear dompdf_config.inc.php .*Font_Binary_Stream.php
36 # exclude optional php dependencies
37 %define _noautophp php-curl php-pgsql php.*pgsql
39 # put it together for rpmbuild
40 %define _noautoreq %{?_noautophp} %{?_noautopear}
42 %define _appdir %{php_data_dir}/%{pkgname}
43 %define _sysconfdir /etc/%{pkgname}
46 dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly)
47 CSS 2.1 compliant HTML layout and rendering engine written in PHP. It
48 is a style-driven renderer: it will download and read external
49 stylesheets, inline style tags, and the style attributes of individual
50 HTML elements. It also supports most presentational HTML attributes.
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
60 cp -a dompdf.php load_font.php include lib $RPM_BUILD_ROOT%{_appdir}
61 cp -p dompdf_config.inc.php $RPM_BUILD_ROOT%{_sysconfdir}
62 ln -s %{_sysconfdir}/dompdf_config.inc.php $RPM_BUILD_ROOT%{_appdir}
64 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
65 cp -a www/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
68 rm -rf $RPM_BUILD_ROOT
71 %defattr(644,root,root,755)
72 %doc README.md CONTRIBUTING.md
73 %dir %attr(750,root,http) %{_sysconfdir}
74 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dompdf_config.inc.php
76 %{_examplesdir}/%{name}-%{version}