- up to 6.0.084
[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.0.084
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:  1d3a5385a550bdc2808ca45126a78a18
12 URL:            http://www.tcpdf.org/
13 BuildRequires:  rpmbuild(macros) >= 1.268
14 BuildRequires:  unzip
15 Requires(triggerpostun):        sed >= 4.0
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 %prep
28 %setup -q -n tcpdf
29
30 %{__sed} -i -e 's,\r$,,' *.TXT
31
32 %build
33 for a in /usr/share/fonts/TTF/DejaVuS*; do
34         php tools/tcpdf_addfont.php -t TrueTypeUnicode -i $a;
35 done
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{_appdir},%{_examplesdir}/%{name}-%{version}}
40
41 cp -a *.php config fonts include $RPM_BUILD_ROOT%{_appdir}
42
43 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
44
45 rm -rf $RPM_BUILD_ROOT%{_appdir}/fonts/*-*
46 rm -rf $RPM_BUILD_ROOT%{_appdir}/fonts/utils
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %files
52 %defattr(644,root,root,755)
53 %doc CHANGELOG.TXT README.TXT
54 %{_appdir}
55
56 %{_examplesdir}/%{name}-%{version}
This page took 0.113815 seconds and 3 git commands to generate.