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