]>
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 |
609c9c2e | 18 | BuildRequires: fonts-TTF-freefont |
ba84953d | 19 | BuildRequires: rpmbuild(macros) >= 1.268 |
ec0c9764 | 20 | BuildRequires: unzip |
c0a0b18e | 21 | Requires: php(core) >= 5.0 |
ba84953d ER |
22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
00bed017 | 25 | %define _appdir %{php_data_dir}/%{pkgname} |
ba84953d ER |
26 | |
27 | %description | |
28 | Generic TCPDF screenshot TCPDF is a PHP class for generating PDF | |
29 | documents without requiring external extensions. TCPDF Supports UTF-8, | |
30 | Unicode, RTL languages and HTML. | |
31 | ||
02a10897 ER |
32 | %package fonts-dejavu |
33 | Summary: DejaVu fonts for TCPDF | |
34 | Group: Development/Libraries | |
35 | Requires: %{name} = %{version}-%{release} | |
36 | ||
37 | %description fonts-dejavu | |
38 | This package allow to use system DejaVu font faces in TCPDF. | |
39 | ||
609c9c2e ER |
40 | %package fonts-freefont |
41 | Summary: GNU FreeFonts for TCPDF | |
42 | Group: Development/Libraries | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | ||
45 | %description fonts-freefont | |
46 | This package allow to use system GNU FreeFont font faces in TCPDF. | |
47 | ||
6c2cbd52 ER |
48 | %package examples |
49 | Summary: TCPDF example programs | |
50 | Summary(pl.UTF-8): TCPDF programy przykładowe | |
51 | Group: Development/Libraries | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | ||
54 | %description examples | |
55 | TCPDF example programs. | |
56 | ||
57 | %description examples -l pl.UTF-8 | |
58 | TCPDF - przykładowe programy. | |
59 | ||
ba84953d | 60 | %prep |
02a10897 ER |
61 | %setup -qc |
62 | mv tcpdf/* . | |
3995e872 | 63 | %undos *.TXT |
ba84953d | 64 | |
00bed017 | 65 | # remove bundled fonts |
02a10897 | 66 | rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* fonts/ae_fonts_* |
00bed017 | 67 | |
68532b3a | 68 | %build |
609c9c2e ER |
69 | pkgs="fonts-TTF-DejaVu fonts-TTF-freefont" |
70 | install -d build/fonts | |
71 | for pkg in $pkgs; do | |
72 | fonts=$(rpm -ql $pkg | grep %{_fontsdir}/TTF | xargs | tr ' ' ',') | |
73 | %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $fonts -o build/fonts | |
68532b3a AM |
74 | done |
75 | ||
ba84953d ER |
76 | %install |
77 | rm -rf $RPM_BUILD_ROOT | |
00bed017 | 78 | install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_examplesdir}/%{name}-%{version}} |
ba84953d | 79 | |
11626367 | 80 | cp -a *.php config fonts include $RPM_BUILD_ROOT%{_appdir} |
609c9c2e | 81 | cp -a build/fonts/* $RPM_BUILD_ROOT%{_appdir}/fonts |
00bed017 | 82 | install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont |
ba84953d ER |
83 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
84 | ||
ba84953d ER |
85 | %clean |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %doc CHANGELOG.TXT README.TXT | |
00bed017 | 91 | %attr(755,root,root) %{_bindir}/tcpdf_addfont |
02a10897 ER |
92 | %dir %{_appdir} |
93 | %{_appdir}/config | |
94 | %{_appdir}/include | |
95 | %{_appdir}/tcpdf*.php | |
96 | ||
97 | %dir %{_appdir}/fonts | |
98 | %{_appdir}/fonts/aealarabiya* | |
99 | %{_appdir}/fonts/aefurat* | |
100 | %{_appdir}/fonts/cid0* | |
101 | %{_appdir}/fonts/courier* | |
02a10897 ER |
102 | %{_appdir}/fonts/helvetica* |
103 | %{_appdir}/fonts/hysmyeongjostdmedium* | |
104 | %{_appdir}/fonts/kozgopromedium* | |
105 | %{_appdir}/fonts/kozminproregular* | |
106 | %{_appdir}/fonts/msungstdlight* | |
107 | %{_appdir}/fonts/pdfacourier* | |
108 | %{_appdir}/fonts/pdfahelvetica* | |
109 | %{_appdir}/fonts/pdfasymbol* | |
110 | %{_appdir}/fonts/pdfatimes* | |
111 | %{_appdir}/fonts/pdfazapfdingbats* | |
112 | %{_appdir}/fonts/stsongstdlight* | |
113 | %{_appdir}/fonts/symbol* | |
114 | %{_appdir}/fonts/times* | |
115 | %{_appdir}/fonts/uni2cid_* | |
116 | %{_appdir}/fonts/zapfdingbats* | |
117 | ||
118 | %files fonts-dejavu | |
119 | %defattr(644,root,root,755) | |
120 | %{_appdir}/fonts/dejavusans* | |
121 | %{_appdir}/fonts/dejavuserif* | |
6c2cbd52 | 122 | |
609c9c2e ER |
123 | %files fonts-freefont |
124 | %defattr(644,root,root,755) | |
125 | %{_appdir}/fonts/freemono* | |
126 | %{_appdir}/fonts/freesans* | |
127 | %{_appdir}/fonts/freeserif* | |
128 | ||
6c2cbd52 ER |
129 | %files examples |
130 | %defattr(644,root,root,755) | |
ba84953d | 131 | %{_examplesdir}/%{name}-%{version} |