cleanup bundled fonts in prep, install addfont tool
[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}-zlib
15 BuildRequires:  fonts-TTF-DejaVu
16 BuildRequires:  rpmbuild(macros) >= 1.268
17 BuildRequires:  unzip
18 Requires:       php(core) >= 5.0
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         _appdir         %{php_data_dir}/%{pkgname}
23
24 %description
25 Generic TCPDF screenshot TCPDF is a PHP class for generating PDF
26 documents without requiring external extensions. TCPDF Supports UTF-8,
27 Unicode, RTL languages and HTML.
28
29 %package examples
30 Summary:        TCPDF example programs
31 Summary(pl.UTF-8):      TCPDF programy przykładowe
32 Group:          Development/Libraries
33 Requires:       %{name} = %{version}-%{release}
34
35 %description examples
36 TCPDF example programs.
37
38 %description examples -l pl.UTF-8
39 TCPDF - przykładowe programy.
40
41 %prep
42 %setup -q -n tcpdf
43 %undos *.TXT
44
45 # remove bundled fonts
46 rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-*
47
48 %build
49 for a in %{_fontsdir}/TTF/DejaVuS*; do
50         %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $a
51 done
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_examplesdir}/%{name}-%{version}}
56
57 cp -a *.php config fonts include $RPM_BUILD_ROOT%{_appdir}
58 install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont
59 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(644,root,root,755)
66 %doc CHANGELOG.TXT README.TXT
67 %attr(755,root,root) %{_bindir}/tcpdf_addfont
68 %{_appdir}
69
70 %files examples
71 %defattr(644,root,root,755)
72 %{_examplesdir}/%{name}-%{version}
This page took 0.073079 seconds and 3 git commands to generate.