BR fonts-TTF-DejaVu
[packages/php-tcpdf.git] / php-tcpdf.spec
1 # TODO
2 # - config to /etc
3 %define         ver     %(echo %{version} | tr . _)
4 Summary:        TCPDF - PHP class for PDF
5 Name:           php-tcpdf
6 Version:        6.2.6
7 Release:        1
8 License:        LGPL v2.1
9 Group:          Development/Languages/PHP
10 Source0:        http://downloads.sourceforge.net/tcpdf/tcpdf_%{ver}.zip
11 # Source0-md5:  9185f0ca4ecc65fb8a1dc115ab96b52b
12 URL:            http://www.tcpdf.org/
13 BuildRequires:  fonts-TTF-DejaVu
14 BuildRequires:  rpmbuild(macros) >= 1.268
15 BuildRequires:  unzip
16 Requires:       php(core) >= 5.0
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _appdir         %{php_data_dir}/tcpdf
21
22 %description
23 Generic TCPDF screenshot TCPDF is a PHP class for generating PDF
24 documents without requiring external extensions. TCPDF Supports UTF-8,
25 Unicode, RTL languages and HTML.
26
27 %package examples
28 Summary:        TCPDF example programs
29 Summary(pl.UTF-8):      TCPDF programy przykładowe
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}-%{release}
32
33 %description examples
34 TCPDF example programs.
35
36 %description examples -l pl.UTF-8
37 TCPDF - przykładowe programy.
38
39 %prep
40 %setup -q -n tcpdf
41 %undos *.TXT
42
43 %build
44 for a in %{_datadir}/fonts/TTF/DejaVuS*; do
45         php tools/tcpdf_addfont.php -t TrueTypeUnicode -i $a
46 done
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_appdir},%{_examplesdir}/%{name}-%{version}}
51
52 cp -a *.php config fonts include $RPM_BUILD_ROOT%{_appdir}
53 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
54
55 rm -r $RPM_BUILD_ROOT%{_appdir}/fonts/*-*
56 rm -rf $RPM_BUILD_ROOT%{_appdir}/fonts/utils
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %files
62 %defattr(644,root,root,755)
63 %doc CHANGELOG.TXT README.TXT
64 %{_appdir}
65
66 %files examples
67 %defattr(644,root,root,755)
68 %{_examplesdir}/%{name}-%{version}
This page took 0.047089 seconds and 3 git commands to generate.