2 # - *.z are just gzcompress-ed .ttf files
4 %define ver %(echo %{version} | tr . _)
5 Summary: TCPDF - PHP class for PDF
10 Group: Development/Languages/PHP
11 Source0: http://downloads.sourceforge.net/tcpdf/tcpdf_%{ver}.zip
12 # Source0-md5: 9185f0ca4ecc65fb8a1dc115ab96b52b
13 URL: http://www.tcpdf.org/
14 BuildRequires: %{php_name}-cli
15 BuildRequires: %{php_name}-pcre
16 BuildRequires: %{php_name}-zlib
17 BuildRequires: fonts-TTF-DejaVu
18 BuildRequires: fonts-TTF-freefont
19 BuildRequires: rpmbuild(macros) >= 1.268
21 Requires: php(core) >= 5.0
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _appdir %{php_data_dir}/%{pkgname}
26 %define _sysconfdir /etc/%{pkgname}
29 Generic TCPDF screenshot TCPDF is a PHP class for generating PDF
30 documents without requiring external extensions. TCPDF Supports UTF-8,
31 Unicode, RTL languages and HTML.
34 Summary: DejaVu fonts for TCPDF
35 Group: Development/Languages/PHP
36 Requires: %{name} = %{version}-%{release}
38 %description fonts-dejavu
39 This package allow to use system DejaVu font faces in TCPDF.
41 %package fonts-freefont
42 Summary: GNU FreeFonts for TCPDF
43 Group: Development/Languages/PHP
44 Requires: %{name} = %{version}-%{release}
46 %description fonts-freefont
47 This package allow to use system GNU FreeFont font faces in TCPDF.
50 Summary: TCPDF example programs
51 Summary(pl.UTF-8): TCPDF programy przykładowe
52 Group: Development/Languages/PHP
53 Requires: %{name} = %{version}-%{release}
56 TCPDF example programs.
58 %description examples -l pl.UTF-8
59 TCPDF - przykładowe programy.
66 # remove bundled fonts
67 rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* fonts/ae_fonts_*
70 pkgs="fonts-TTF-DejaVu fonts-TTF-freefont"
71 install -d build/fonts
73 fonts=$(rpm -ql $pkg | grep %{_fontsdir}/TTF | xargs | tr ' ' ',')
74 %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $fonts -o build/fonts
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},%{_bindir},%{_examplesdir}/%{name}-%{version}}
80 cp -a *.php fonts include $RPM_BUILD_ROOT%{_appdir}
81 cp -p config/*.php $RPM_BUILD_ROOT%{_sysconfdir}
82 cp -a build/fonts/* $RPM_BUILD_ROOT%{_appdir}/fonts
83 install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont
84 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
87 rm -rf $RPM_BUILD_ROOT
90 %defattr(644,root,root,755)
91 %doc CHANGELOG.TXT README.TXT
92 %dir %attr(750,root,http) %{_sysconfdir}
93 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tcpdf_config.php
94 %attr(755,root,root) %{_bindir}/tcpdf_addfont
100 %{_appdir}/fonts/aealarabiya*
101 %{_appdir}/fonts/aefurat*
102 %{_appdir}/fonts/cid0*
103 %{_appdir}/fonts/courier*
104 %{_appdir}/fonts/helvetica*
105 %{_appdir}/fonts/hysmyeongjostdmedium*
106 %{_appdir}/fonts/kozgopromedium*
107 %{_appdir}/fonts/kozminproregular*
108 %{_appdir}/fonts/msungstdlight*
109 %{_appdir}/fonts/pdfacourier*
110 %{_appdir}/fonts/pdfahelvetica*
111 %{_appdir}/fonts/pdfasymbol*
112 %{_appdir}/fonts/pdfatimes*
113 %{_appdir}/fonts/pdfazapfdingbats*
114 %{_appdir}/fonts/stsongstdlight*
115 %{_appdir}/fonts/symbol*
116 %{_appdir}/fonts/times*
117 %{_appdir}/fonts/uni2cid_*
118 %{_appdir}/fonts/zapfdingbats*
121 %defattr(644,root,root,755)
122 %{_appdir}/fonts/dejavusans*
123 %{_appdir}/fonts/dejavuserif*
125 %files fonts-freefont
126 %defattr(644,root,root,755)
127 %{_appdir}/fonts/freemono*
128 %{_appdir}/fonts/freesans*
129 %{_appdir}/fonts/freeserif*
132 %defattr(644,root,root,755)
133 %{_examplesdir}/%{name}-%{version}