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