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