cleanups
[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 %prep
27 %setup -q -n tcpdf
28 %undos *.TXT
29
30 %build
31 for a in %{_datadir}/fonts/TTF/DejaVuS*; do
32         php tools/tcpdf_addfont.php -t TrueTypeUnicode -i $a
33 done
34
35 %install
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{%{_appdir},%{_examplesdir}/%{name}-%{version}}
38
39 cp -a *.php config fonts include $RPM_BUILD_ROOT%{_appdir}
40 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
41
42 rm -r $RPM_BUILD_ROOT%{_appdir}/fonts/*-*
43 rm -rf $RPM_BUILD_ROOT%{_appdir}/fonts/utils
44
45 %clean
46 rm -rf $RPM_BUILD_ROOT
47
48 %files
49 %defattr(644,root,root,755)
50 %doc CHANGELOG.TXT README.TXT
51 %{_appdir}
52 %{_examplesdir}/%{name}-%{version}
This page took 0.143645 seconds and 3 git commands to generate.