subpackage dejavu fonts
[packages/php-tcpdf.git] / php-tcpdf.spec
1 # TODO
2 # - config to /etc
3 %define         pkgname tcpdf
4 %define         ver     %(echo %{version} | tr . _)
5 Summary:        TCPDF - PHP class for PDF
6 Name:           php-%{pkgname}
7 Version:        6.2.6
8 Release:        1
9 License:        LGPL v2.1
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:  rpmbuild(macros) >= 1.268
19 BuildRequires:  unzip
20 Requires:       php(core) >= 5.0
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _appdir         %{php_data_dir}/%{pkgname}
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
31 %package fonts-dejavu
32 Summary:        DejaVu fonts for TCPDF
33 Group:          Development/Libraries
34 Requires:       %{name} = %{version}-%{release}
35
36 %description fonts-dejavu
37 This package allow to use system DejaVu font faces in TCPDF.
38
39 %package examples
40 Summary:        TCPDF example programs
41 Summary(pl.UTF-8):      TCPDF programy przykładowe
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44
45 %description examples
46 TCPDF example programs.
47
48 %description examples -l pl.UTF-8
49 TCPDF - przykładowe programy.
50
51 %prep
52 %setup -qc
53 mv tcpdf/* .
54 %undos *.TXT
55
56 # remove bundled fonts
57 rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* fonts/ae_fonts_*
58
59 %build
60 for a in %{_fontsdir}/TTF/DejaVuS*; do
61         %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $a
62 done
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_examplesdir}/%{name}-%{version}}
67
68 cp -a *.php config fonts include $RPM_BUILD_ROOT%{_appdir}
69 install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont
70 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(644,root,root,755)
77 %doc CHANGELOG.TXT README.TXT
78 %attr(755,root,root) %{_bindir}/tcpdf_addfont
79 %dir %{_appdir}
80 %{_appdir}/config
81 %{_appdir}/include
82 %{_appdir}/tcpdf*.php
83
84 %dir %{_appdir}/fonts
85 %{_appdir}/fonts/aealarabiya*
86 %{_appdir}/fonts/aefurat*
87 %{_appdir}/fonts/cid0*
88 %{_appdir}/fonts/courier*
89 %{_appdir}/fonts/freemono*
90 %{_appdir}/fonts/freesans*
91 %{_appdir}/fonts/freeserif*
92 %{_appdir}/fonts/helvetica*
93 %{_appdir}/fonts/hysmyeongjostdmedium*
94 %{_appdir}/fonts/kozgopromedium*
95 %{_appdir}/fonts/kozminproregular*
96 %{_appdir}/fonts/msungstdlight*
97 %{_appdir}/fonts/pdfacourier*
98 %{_appdir}/fonts/pdfahelvetica*
99 %{_appdir}/fonts/pdfasymbol*
100 %{_appdir}/fonts/pdfatimes*
101 %{_appdir}/fonts/pdfazapfdingbats*
102 %{_appdir}/fonts/stsongstdlight*
103 %{_appdir}/fonts/symbol*
104 %{_appdir}/fonts/times*
105 %{_appdir}/fonts/uni2cid_*
106 %{_appdir}/fonts/zapfdingbats*
107
108 %files fonts-dejavu
109 %defattr(644,root,root,755)
110 %{_appdir}/fonts/dejavusans*
111 %{_appdir}/fonts/dejavuserif*
112
113 %files examples
114 %defattr(644,root,root,755)
115 %{_examplesdir}/%{name}-%{version}
This page took 0.102852 seconds and 3 git commands to generate.