]>
Commit | Line | Data |
---|---|---|
ba84953d ER |
1 | # TODO |
2 | # - config to /etc | |
00bed017 | 3 | %define pkgname tcpdf |
ba84953d ER |
4 | %define ver %(echo %{version} | tr . _) |
5 | Summary: TCPDF - PHP class for PDF | |
00bed017 | 6 | Name: php-%{pkgname} |
406b91a1 | 7 | Version: 6.2.6 |
11626367 | 8 | Release: 1 |
ba84953d ER |
9 | License: LGPL v2.1 |
10 | Group: Development/Languages/PHP | |
c0a0b18e | 11 | Source0: http://downloads.sourceforge.net/tcpdf/tcpdf_%{ver}.zip |
406b91a1 | 12 | # Source0-md5: 9185f0ca4ecc65fb8a1dc115ab96b52b |
a13238bd | 13 | URL: http://www.tcpdf.org/ |
c6973e2d ER |
14 | BuildRequires: %{php_name}-cli |
15 | BuildRequires: %{php_name}-pcre | |
00bed017 | 16 | BuildRequires: %{php_name}-zlib |
853004dc | 17 | BuildRequires: fonts-TTF-DejaVu |
ba84953d | 18 | BuildRequires: rpmbuild(macros) >= 1.268 |
ec0c9764 | 19 | BuildRequires: unzip |
c0a0b18e | 20 | Requires: php(core) >= 5.0 |
ba84953d ER |
21 | BuildArch: noarch |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
00bed017 | 24 | %define _appdir %{php_data_dir}/%{pkgname} |
ba84953d ER |
25 | |
26 | %description | |
27 | Generic TCPDF screenshot TCPDF is a PHP class for generating PDF | |
28 | documents without requiring external extensions. TCPDF Supports UTF-8, | |
29 | Unicode, RTL languages and HTML. | |
30 | ||
6c2cbd52 ER |
31 | %package examples |
32 | Summary: TCPDF example programs | |
33 | Summary(pl.UTF-8): TCPDF programy przykładowe | |
34 | Group: Development/Libraries | |
35 | Requires: %{name} = %{version}-%{release} | |
36 | ||
37 | %description examples | |
38 | TCPDF example programs. | |
39 | ||
40 | %description examples -l pl.UTF-8 | |
41 | TCPDF - przykładowe programy. | |
42 | ||
ba84953d ER |
43 | %prep |
44 | %setup -q -n tcpdf | |
3995e872 | 45 | %undos *.TXT |
ba84953d | 46 | |
00bed017 ER |
47 | # remove bundled fonts |
48 | rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* | |
49 | ||
68532b3a | 50 | %build |
00bed017 ER |
51 | for a in %{_fontsdir}/TTF/DejaVuS*; do |
52 | %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $a | |
68532b3a AM |
53 | done |
54 | ||
ba84953d ER |
55 | %install |
56 | rm -rf $RPM_BUILD_ROOT | |
00bed017 | 57 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_examplesdir}/%{name}-%{version}} |
ba84953d | 58 | |
11626367 | 59 | cp -a *.php config fonts include $RPM_BUILD_ROOT%{_appdir} |
00bed017 | 60 | install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont |
ba84953d ER |
61 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
62 | ||
ba84953d ER |
63 | %clean |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
68 | %doc CHANGELOG.TXT README.TXT | |
00bed017 | 69 | %attr(755,root,root) %{_bindir}/tcpdf_addfont |
ba84953d | 70 | %{_appdir} |
6c2cbd52 ER |
71 | |
72 | %files examples | |
73 | %defattr(644,root,root,755) | |
ba84953d | 74 | %{_examplesdir}/%{name}-%{version} |