2 # - *.z are just gzcompress-ed .ttf files
3 %define ver %(echo %{version} | tr . _)
5 %define php_min_version 5.2.7
6 %include /usr/lib/rpm/macros.php
7 Summary: TCPDF - PHP class for PDF
12 Group: Development/Languages/PHP
13 Source0: http://downloads.sourceforge.net/tcpdf/tcpdf_%{ver}.zip
14 # Source0-md5: 9185f0ca4ecc65fb8a1dc115ab96b52b
15 URL: http://www.tcpdf.org/
16 BuildRequires: %{php_name}-cli
17 BuildRequires: %{php_name}-pcre
18 BuildRequires: %{php_name}-zlib
19 BuildRequires: fonts-TTF-DejaVu
20 BuildRequires: fonts-TTF-freefont
21 BuildRequires: rpm-php-pearprov >= 4.4.2-11
22 BuildRequires: rpmbuild(macros) >= 1.268
25 Requires: php(core) >= %{php_min_version}
30 Requires: php(mbstring)
31 Requires: php(openssl)
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _appdir %{php_data_dir}/%{pkgname}
38 %define _sysconfdir /etc/%{pkgname}
41 Generic TCPDF screenshot TCPDF is a PHP class for generating PDF
42 documents without requiring external extensions. TCPDF Supports UTF-8,
43 Unicode, RTL languages and HTML.
46 Summary: DejaVu fonts for TCPDF
47 Group: Development/Languages/PHP
48 Requires: %{name} = %{version}-%{release}
50 %description fonts-dejavu
51 This package allow to use system DejaVu font faces in TCPDF.
53 %package fonts-freefont
54 Summary: GNU FreeFonts for TCPDF
55 Group: Development/Languages/PHP
56 Requires: %{name} = %{version}-%{release}
58 %description fonts-freefont
59 This package allow to use system GNU FreeFont font faces in TCPDF.
62 Summary: TCPDF example programs
63 Summary(pl.UTF-8): TCPDF programy przykładowe
64 Group: Development/Languages/PHP
65 Requires: %{name} = %{version}-%{release}
68 TCPDF example programs.
70 %description examples -l pl.UTF-8
71 TCPDF - przykładowe programy.
78 # remove bundled fonts
79 rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* fonts/ae_fonts_*
82 pkgs="fonts-TTF-DejaVu fonts-TTF-freefont"
83 install -d build/fonts
85 fonts=$(rpm -ql $pkg | grep %{_fontsdir}/TTF | xargs | tr ' ' ',')
86 %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $fonts -o build/fonts
90 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},%{_bindir},%{_examplesdir}/%{name}-%{version}}
92 cp -a *.php fonts include $RPM_BUILD_ROOT%{_appdir}
93 cp -p config/*.php $RPM_BUILD_ROOT%{_sysconfdir}
94 cp -a build/fonts/* $RPM_BUILD_ROOT%{_appdir}/fonts
95 install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont
96 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
99 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
103 %doc CHANGELOG.TXT README.TXT
104 %dir %attr(750,root,http) %{_sysconfdir}
105 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tcpdf_config.php
106 %attr(755,root,root) %{_bindir}/tcpdf_addfont
109 %{_appdir}/tcpdf*.php
111 %dir %{_appdir}/fonts
112 %{_appdir}/fonts/aealarabiya*
113 %{_appdir}/fonts/aefurat*
114 %{_appdir}/fonts/cid0*
115 %{_appdir}/fonts/courier*
116 %{_appdir}/fonts/helvetica*
117 %{_appdir}/fonts/hysmyeongjostdmedium*
118 %{_appdir}/fonts/kozgopromedium*
119 %{_appdir}/fonts/kozminproregular*
120 %{_appdir}/fonts/msungstdlight*
121 %{_appdir}/fonts/pdfacourier*
122 %{_appdir}/fonts/pdfahelvetica*
123 %{_appdir}/fonts/pdfasymbol*
124 %{_appdir}/fonts/pdfatimes*
125 %{_appdir}/fonts/pdfazapfdingbats*
126 %{_appdir}/fonts/stsongstdlight*
127 %{_appdir}/fonts/symbol*
128 %{_appdir}/fonts/times*
129 %{_appdir}/fonts/uni2cid_*
130 %{_appdir}/fonts/zapfdingbats*
133 %defattr(644,root,root,755)
134 %{_appdir}/fonts/dejavusans*
135 %{_appdir}/fonts/dejavuserif*
137 %files fonts-freefont
138 %defattr(644,root,root,755)
139 %{_appdir}/fonts/freemono*
140 %{_appdir}/fonts/freesans*
141 %{_appdir}/fonts/freeserif*
144 %defattr(644,root,root,755)
145 %{_examplesdir}/%{name}-%{version}