]> git.pld-linux.org Git - packages/php-tcpdf.git/blame - php-tcpdf.spec
- up to 6.2.12
[packages/php-tcpdf.git] / php-tcpdf.spec
CommitLineData
aea9e640
ER
1# NOTE:
2# - *.z are just gzcompress-ed .ttf files
ba84953d 3%define ver %(echo %{version} | tr . _)
87c494a8
ER
4%define pkgname tcpdf
5%define php_min_version 5.2.7
6%include /usr/lib/rpm/macros.php
ba84953d 7Summary: TCPDF - PHP class for PDF
00bed017 8Name: php-%{pkgname}
20434d1f 9Version: 6.2.12
11626367 10Release: 1
ba84953d
ER
11License: LGPL v2.1
12Group: Development/Languages/PHP
c0a0b18e 13Source0: http://downloads.sourceforge.net/tcpdf/tcpdf_%{ver}.zip
20434d1f 14# Source0-md5: 904160b3eb1ba1ed2881d2d64b782486
a13238bd 15URL: http://www.tcpdf.org/
c6973e2d
ER
16BuildRequires: %{php_name}-cli
17BuildRequires: %{php_name}-pcre
00bed017 18BuildRequires: %{php_name}-zlib
853004dc 19BuildRequires: fonts-TTF-DejaVu
609c9c2e 20BuildRequires: fonts-TTF-freefont
87c494a8 21BuildRequires: rpm-php-pearprov >= 4.4.2-11
ba84953d 22BuildRequires: rpmbuild(macros) >= 1.268
ec0c9764 23BuildRequires: unzip
87c494a8
ER
24Requires: php(bcmath)
25Requires: php(core) >= %{php_min_version}
26Requires: php(date)
27Requires: php(gd)
28Requires: php(hash)
29Requires: php(json)
30Requires: php(mbstring)
31Requires: php(openssl)
32Requires: php(pcre)
33Requires: php(xml)
ba84953d
ER
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
00bed017 37%define _appdir %{php_data_dir}/%{pkgname}
aea9e640 38%define _sysconfdir /etc/%{pkgname}
ba84953d
ER
39
40%description
41Generic TCPDF screenshot TCPDF is a PHP class for generating PDF
42documents without requiring external extensions. TCPDF Supports UTF-8,
43Unicode, RTL languages and HTML.
44
02a10897
ER
45%package fonts-dejavu
46Summary: DejaVu fonts for TCPDF
39d2e589 47Group: Development/Languages/PHP
02a10897
ER
48Requires: %{name} = %{version}-%{release}
49
50%description fonts-dejavu
51This package allow to use system DejaVu font faces in TCPDF.
52
609c9c2e
ER
53%package fonts-freefont
54Summary: GNU FreeFonts for TCPDF
39d2e589 55Group: Development/Languages/PHP
609c9c2e
ER
56Requires: %{name} = %{version}-%{release}
57
58%description fonts-freefont
59This package allow to use system GNU FreeFont font faces in TCPDF.
60
6c2cbd52
ER
61%package examples
62Summary: TCPDF example programs
63Summary(pl.UTF-8): TCPDF programy przykładowe
39d2e589 64Group: Development/Languages/PHP
6c2cbd52
ER
65Requires: %{name} = %{version}-%{release}
66
67%description examples
68TCPDF example programs.
69
70%description examples -l pl.UTF-8
71TCPDF - przykładowe programy.
72
ba84953d 73%prep
02a10897
ER
74%setup -qc
75mv tcpdf/* .
3995e872 76%undos *.TXT
ba84953d 77
00bed017 78# remove bundled fonts
02a10897 79rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* fonts/ae_fonts_*
00bed017 80
68532b3a 81%build
609c9c2e
ER
82pkgs="fonts-TTF-DejaVu fonts-TTF-freefont"
83install -d build/fonts
84for pkg in $pkgs; do
85 fonts=$(rpm -ql $pkg | grep %{_fontsdir}/TTF | xargs | tr ' ' ',')
86 %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $fonts -o build/fonts
68532b3a
AM
87done
88
ba84953d
ER
89%install
90rm -rf $RPM_BUILD_ROOT
aea9e640
ER
91install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},%{_bindir},%{_examplesdir}/%{name}-%{version}}
92cp -a *.php fonts include $RPM_BUILD_ROOT%{_appdir}
93cp -p config/*.php $RPM_BUILD_ROOT%{_sysconfdir}
609c9c2e 94cp -a build/fonts/* $RPM_BUILD_ROOT%{_appdir}/fonts
00bed017 95install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont
ba84953d
ER
96cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
97
ba84953d
ER
98%clean
99rm -rf $RPM_BUILD_ROOT
100
101%files
102%defattr(644,root,root,755)
103%doc CHANGELOG.TXT README.TXT
aea9e640
ER
104%dir %attr(750,root,http) %{_sysconfdir}
105%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tcpdf_config.php
00bed017 106%attr(755,root,root) %{_bindir}/tcpdf_addfont
02a10897 107%dir %{_appdir}
02a10897
ER
108%{_appdir}/include
109%{_appdir}/tcpdf*.php
110
111%dir %{_appdir}/fonts
112%{_appdir}/fonts/aealarabiya*
113%{_appdir}/fonts/aefurat*
114%{_appdir}/fonts/cid0*
115%{_appdir}/fonts/courier*
02a10897
ER
116%{_appdir}/fonts/helvetica*
117%{_appdir}/fonts/hysmyeongjostdmedium*
118%{_appdir}/fonts/kozgopromedium*
119%{_appdir}/fonts/kozminproregular*
120%{_appdir}/fonts/msungstdlight*
121%{_appdir}/fonts/pdfacourier*
122%{_appdir}/fonts/pdfahelvetica*
123%{_appdir}/fonts/pdfasymbol*
124%{_appdir}/fonts/pdfatimes*
125%{_appdir}/fonts/pdfazapfdingbats*
126%{_appdir}/fonts/stsongstdlight*
127%{_appdir}/fonts/symbol*
128%{_appdir}/fonts/times*
129%{_appdir}/fonts/uni2cid_*
130%{_appdir}/fonts/zapfdingbats*
131
132%files fonts-dejavu
133%defattr(644,root,root,755)
134%{_appdir}/fonts/dejavusans*
135%{_appdir}/fonts/dejavuserif*
6c2cbd52 136
609c9c2e
ER
137%files fonts-freefont
138%defattr(644,root,root,755)
139%{_appdir}/fonts/freemono*
140%{_appdir}/fonts/freesans*
141%{_appdir}/fonts/freeserif*
142
6c2cbd52
ER
143%files examples
144%defattr(644,root,root,755)
ba84953d 145%{_examplesdir}/%{name}-%{version}
This page took 0.05992 seconds and 4 git commands to generate.