Up to 6.4.2
[packages/php-tcpdf.git] / php-tcpdf.spec
CommitLineData
aea9e640
ER
1# NOTE:
2# - *.z are just gzcompress-ed .ttf files
87c494a8
ER
3%define pkgname tcpdf
4%define php_min_version 5.2.7
ba84953d 5Summary: TCPDF - PHP class for PDF
00bed017 6Name: php-%{pkgname}
9ffd85d0 7Version: 6.4.2
0d419cbe 8Release: 1
ba84953d
ER
9License: LGPL v2.1
10Group: Development/Languages/PHP
c3f58965 11Source0: https://github.com/tecnickcom/TCPDF/archive/refs/tags/%{version}.tar.gz
9ffd85d0 12# Source0-md5: 9f595ca6649db615695baec65c6bc019
c3f58965 13Patch0: shebang.patch
a13238bd 14URL: http://www.tcpdf.org/
c6973e2d 15BuildRequires: %{php_name}-cli
2126fae2 16BuildRequires: %{php_name}-devel
c6973e2d 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)
df5b2e01 34Suggests: php-tcpdf-fonts-dejavu
ba84953d
ER
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
00bed017 38%define _appdir %{php_data_dir}/%{pkgname}
aea9e640 39%define _sysconfdir /etc/%{pkgname}
ba84953d
ER
40
41%description
42Generic TCPDF screenshot TCPDF is a PHP class for generating PDF
43documents without requiring external extensions. TCPDF Supports UTF-8,
44Unicode, RTL languages and HTML.
45
02a10897
ER
46%package fonts-dejavu
47Summary: DejaVu fonts for TCPDF
39d2e589 48Group: Development/Languages/PHP
02a10897
ER
49Requires: %{name} = %{version}-%{release}
50
51%description fonts-dejavu
52This package allow to use system DejaVu font faces in TCPDF.
53
609c9c2e
ER
54%package fonts-freefont
55Summary: GNU FreeFonts for TCPDF
39d2e589 56Group: Development/Languages/PHP
609c9c2e
ER
57Requires: %{name} = %{version}-%{release}
58
59%description fonts-freefont
60This package allow to use system GNU FreeFont font faces in TCPDF.
61
6c2cbd52
ER
62%package examples
63Summary: TCPDF example programs
64Summary(pl.UTF-8): TCPDF programy przykładowe
39d2e589 65Group: Development/Languages/PHP
6c2cbd52
ER
66Requires: %{name} = %{version}-%{release}
67
68%description examples
69TCPDF example programs.
70
71%description examples -l pl.UTF-8
72TCPDF - przykładowe programy.
73
ba84953d 74%prep
c3f58965 75%setup -q -n TCPDF-%{version}
3995e872 76%undos *.TXT
c3f58965 77%patch0 -p1
ba84953d 78
00bed017 79# remove bundled fonts
02a10897 80rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* fonts/ae_fonts_*
00bed017 81
68532b3a 82%build
609c9c2e
ER
83pkgs="fonts-TTF-DejaVu fonts-TTF-freefont"
84install -d build/fonts
85for pkg in $pkgs; do
86 fonts=$(rpm -ql $pkg | grep %{_fontsdir}/TTF | xargs | tr ' ' ',')
87 %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $fonts -o build/fonts
68532b3a
AM
88done
89
ba84953d
ER
90%install
91rm -rf $RPM_BUILD_ROOT
aea9e640
ER
92install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},%{_bindir},%{_examplesdir}/%{name}-%{version}}
93cp -a *.php fonts include $RPM_BUILD_ROOT%{_appdir}
94cp -p config/*.php $RPM_BUILD_ROOT%{_sysconfdir}
609c9c2e 95cp -a build/fonts/* $RPM_BUILD_ROOT%{_appdir}/fonts
00bed017 96install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont
ba84953d
ER
97cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
98
ba84953d
ER
99%clean
100rm -rf $RPM_BUILD_ROOT
101
102%files
103%defattr(644,root,root,755)
0d419cbe 104%doc CHANGELOG.TXT README.md
aea9e640
ER
105%dir %attr(750,root,http) %{_sysconfdir}
106%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tcpdf_config.php
00bed017 107%attr(755,root,root) %{_bindir}/tcpdf_addfont
02a10897 108%dir %{_appdir}
02a10897
ER
109%{_appdir}/include
110%{_appdir}/tcpdf*.php
111
112%dir %{_appdir}/fonts
113%{_appdir}/fonts/aealarabiya*
114%{_appdir}/fonts/aefurat*
115%{_appdir}/fonts/cid0*
116%{_appdir}/fonts/courier*
cdd5fc2d 117%{_appdir}/fonts/dejavumathtexgyre*
02a10897
ER
118%{_appdir}/fonts/helvetica*
119%{_appdir}/fonts/hysmyeongjostdmedium*
120%{_appdir}/fonts/kozgopromedium*
121%{_appdir}/fonts/kozminproregular*
122%{_appdir}/fonts/msungstdlight*
123%{_appdir}/fonts/pdfacourier*
124%{_appdir}/fonts/pdfahelvetica*
125%{_appdir}/fonts/pdfasymbol*
126%{_appdir}/fonts/pdfatimes*
127%{_appdir}/fonts/pdfazapfdingbats*
128%{_appdir}/fonts/stsongstdlight*
129%{_appdir}/fonts/symbol*
130%{_appdir}/fonts/times*
131%{_appdir}/fonts/uni2cid_*
132%{_appdir}/fonts/zapfdingbats*
133
134%files fonts-dejavu
135%defattr(644,root,root,755)
136%{_appdir}/fonts/dejavusans*
137%{_appdir}/fonts/dejavuserif*
6c2cbd52 138
609c9c2e
ER
139%files fonts-freefont
140%defattr(644,root,root,755)
141%{_appdir}/fonts/freemono*
142%{_appdir}/fonts/freesans*
143%{_appdir}/fonts/freeserif*
144
6c2cbd52
ER
145%files examples
146%defattr(644,root,root,755)
ba84953d 147%{_examplesdir}/%{name}-%{version}
This page took 0.064811 seconds and 5 git commands to generate.