]> git.pld-linux.org Git - packages/php-dompdf.git/blob - php-dompdf.spec
436375c402c45e7603de9aa433b1d5c4c6db9f0b
[packages/php-dompdf.git] / php-dompdf.spec
1 # TODO
2 # - external php-font-lib
3 # - external php-tcpdf
4 %define         pkgname dompdf
5 %define         php_min_version 5.2.7
6 %include        /usr/lib/rpm/macros.php
7 Summary:        HTML to PDF converter
8 Name:           php-%{pkgname}
9 Version:        0.6.1
10 Release:        1
11 License:        LGPL v2.1
12 Group:          Development/Languages/PHP
13 Source0:        https://github.com/dompdf/dompdf/releases/download/v%{version}/dompdf-%{version}.zip
14 # Source0-md5:  7ac81b1a96d4311cd47d756b48d01de4
15 Patch0:         config.patch
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
20 BuildRequires:  unzip
21 Requires:       php(core) >= %{php_min_version}
22 Requires:       php(date)
23 Requires:       php(dom)
24 Requires:       php(gd)
25 Requires:       php(iconv)
26 Requires:       php(json)
27 Requires:       php(mbstring)
28 Requires:       php(pcre)
29 Requires:       php(spl)
30 Requires:       php(xml)
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _noautoreq_pear  dompdf_config.inc.php .*Font_Binary_Stream.php
35
36 # exclude optional php dependencies
37 %define         _noautophp      php-curl php-pgsql php.*pgsql
38
39 # put it together for rpmbuild
40 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
41
42 %define         _appdir                 %{php_data_dir}/%{pkgname}
43 %define         _sysconfdir             /etc/%{pkgname}
44
45 %description
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.
51
52 %prep
53 %setup -qc
54 mv %{pkgname}/* .
55 %patch0 -p1
56
57 %install
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}
63
64 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
65 cp -a www/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %files
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
75 %{_appdir}
76 %{_examplesdir}/%{name}-%{version}
This page took 0.052227 seconds and 2 git commands to generate.