]> git.pld-linux.org Git - packages/php-tcpdf.git/blob - php-tcpdf.spec
692ecb44eba29da61abdb69eb8aaaac8c9155075
[packages/php-tcpdf.git] / php-tcpdf.spec
1 # NOTE:
2 # - *.z are just gzcompress-ed .ttf files
3 %define         ver     %(echo %{version} | tr . _)
4 %define         pkgname tcpdf
5 %define         php_min_version 5.2.7
6 %include        /usr/lib/rpm/macros.php
7 Summary:        TCPDF - PHP class for PDF
8 Name:           php-%{pkgname}
9 Version:        6.2.6
10 Release:        1
11 License:        LGPL v2.1
12 Group:          Development/Languages/PHP
13 Source0:        http://downloads.sourceforge.net/tcpdf/tcpdf_%{ver}.zip
14 # Source0-md5:  9185f0ca4ecc65fb8a1dc115ab96b52b
15 URL:            http://www.tcpdf.org/
16 BuildRequires:  %{php_name}-cli
17 BuildRequires:  %{php_name}-pcre
18 BuildRequires:  %{php_name}-zlib
19 BuildRequires:  fonts-TTF-DejaVu
20 BuildRequires:  fonts-TTF-freefont
21 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
22 BuildRequires:  rpmbuild(macros) >= 1.268
23 BuildRequires:  unzip
24 Requires:       php(bcmath)
25 Requires:       php(core) >= %{php_min_version}
26 Requires:       php(date)
27 Requires:       php(gd)
28 Requires:       php(hash)
29 Requires:       php(json)
30 Requires:       php(mbstring)
31 Requires:       php(openssl)
32 Requires:       php(pcre)
33 Requires:       php(xml)
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _appdir         %{php_data_dir}/%{pkgname}
38 %define         _sysconfdir     /etc/%{pkgname}
39
40 %description
41 Generic TCPDF screenshot TCPDF is a PHP class for generating PDF
42 documents without requiring external extensions. TCPDF Supports UTF-8,
43 Unicode, RTL languages and HTML.
44
45 %package fonts-dejavu
46 Summary:        DejaVu fonts for TCPDF
47 Group:          Development/Languages/PHP
48 Requires:       %{name} = %{version}-%{release}
49
50 %description fonts-dejavu
51 This package allow to use system DejaVu font faces in TCPDF.
52
53 %package fonts-freefont
54 Summary:        GNU FreeFonts for TCPDF
55 Group:          Development/Languages/PHP
56 Requires:       %{name} = %{version}-%{release}
57
58 %description fonts-freefont
59 This package allow to use system GNU FreeFont font faces in TCPDF.
60
61 %package examples
62 Summary:        TCPDF example programs
63 Summary(pl.UTF-8):      TCPDF programy przykładowe
64 Group:          Development/Languages/PHP
65 Requires:       %{name} = %{version}-%{release}
66
67 %description examples
68 TCPDF example programs.
69
70 %description examples -l pl.UTF-8
71 TCPDF - przykładowe programy.
72
73 %prep
74 %setup -qc
75 mv tcpdf/* .
76 %undos *.TXT
77
78 # remove bundled fonts
79 rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* fonts/ae_fonts_*
80
81 %build
82 pkgs="fonts-TTF-DejaVu fonts-TTF-freefont"
83 install -d build/fonts
84 for 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
87 done
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},%{_bindir},%{_examplesdir}/%{name}-%{version}}
92 cp -a *.php fonts include $RPM_BUILD_ROOT%{_appdir}
93 cp -p config/*.php $RPM_BUILD_ROOT%{_sysconfdir}
94 cp -a build/fonts/* $RPM_BUILD_ROOT%{_appdir}/fonts
95 install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont
96 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %files
102 %defattr(644,root,root,755)
103 %doc CHANGELOG.TXT README.TXT
104 %dir %attr(750,root,http) %{_sysconfdir}
105 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tcpdf_config.php
106 %attr(755,root,root) %{_bindir}/tcpdf_addfont
107 %dir %{_appdir}
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*
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*
136
137 %files fonts-freefont
138 %defattr(644,root,root,755)
139 %{_appdir}/fonts/freemono*
140 %{_appdir}/fonts/freesans*
141 %{_appdir}/fonts/freeserif*
142
143 %files examples
144 %defattr(644,root,root,755)
145 %{_examplesdir}/%{name}-%{version}
This page took 0.061058 seconds and 2 git commands to generate.