update groups
[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/
c6973e2d
ER
14BuildRequires: %{php_name}-cli
15BuildRequires: %{php_name}-pcre
00bed017 16BuildRequires: %{php_name}-zlib
853004dc 17BuildRequires: fonts-TTF-DejaVu
609c9c2e 18BuildRequires: fonts-TTF-freefont
ba84953d 19BuildRequires: rpmbuild(macros) >= 1.268
ec0c9764 20BuildRequires: unzip
c0a0b18e 21Requires: php(core) >= 5.0
ba84953d
ER
22BuildArch: noarch
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
00bed017 25%define _appdir %{php_data_dir}/%{pkgname}
ba84953d
ER
26
27%description
28Generic TCPDF screenshot TCPDF is a PHP class for generating PDF
29documents without requiring external extensions. TCPDF Supports UTF-8,
30Unicode, RTL languages and HTML.
31
02a10897
ER
32%package fonts-dejavu
33Summary: DejaVu fonts for TCPDF
39d2e589 34Group: Development/Languages/PHP
02a10897
ER
35Requires: %{name} = %{version}-%{release}
36
37%description fonts-dejavu
38This package allow to use system DejaVu font faces in TCPDF.
39
609c9c2e
ER
40%package fonts-freefont
41Summary: GNU FreeFonts for TCPDF
39d2e589 42Group: Development/Languages/PHP
609c9c2e
ER
43Requires: %{name} = %{version}-%{release}
44
45%description fonts-freefont
46This package allow to use system GNU FreeFont font faces in TCPDF.
47
6c2cbd52
ER
48%package examples
49Summary: TCPDF example programs
50Summary(pl.UTF-8): TCPDF programy przykładowe
39d2e589 51Group: Development/Languages/PHP
6c2cbd52
ER
52Requires: %{name} = %{version}-%{release}
53
54%description examples
55TCPDF example programs.
56
57%description examples -l pl.UTF-8
58TCPDF - przykładowe programy.
59
ba84953d 60%prep
02a10897
ER
61%setup -qc
62mv tcpdf/* .
3995e872 63%undos *.TXT
ba84953d 64
00bed017 65# remove bundled fonts
02a10897 66rm -r fonts/dejavu-fonts-ttf-* fonts/freefont-* fonts/ae_fonts_*
00bed017 67
68532b3a 68%build
609c9c2e
ER
69pkgs="fonts-TTF-DejaVu fonts-TTF-freefont"
70install -d build/fonts
71for pkg in $pkgs; do
72 fonts=$(rpm -ql $pkg | grep %{_fontsdir}/TTF | xargs | tr ' ' ',')
73 %{__php} tools/tcpdf_addfont.php -t TrueTypeUnicode -i $fonts -o build/fonts
68532b3a
AM
74done
75
ba84953d
ER
76%install
77rm -rf $RPM_BUILD_ROOT
00bed017 78install -d $RPM_BUILD_ROOT{%{_appdir},%{_bindir},%{_examplesdir}/%{name}-%{version}}
ba84953d 79
11626367 80cp -a *.php config fonts include $RPM_BUILD_ROOT%{_appdir}
609c9c2e 81cp -a build/fonts/* $RPM_BUILD_ROOT%{_appdir}/fonts
00bed017 82install -p tools/tcpdf_addfont.php $RPM_BUILD_ROOT%{_bindir}/tcpdf_addfont
ba84953d
ER
83cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
84
ba84953d
ER
85%clean
86rm -rf $RPM_BUILD_ROOT
87
88%files
89%defattr(644,root,root,755)
90%doc CHANGELOG.TXT README.TXT
00bed017 91%attr(755,root,root) %{_bindir}/tcpdf_addfont
02a10897
ER
92%dir %{_appdir}
93%{_appdir}/config
94%{_appdir}/include
95%{_appdir}/tcpdf*.php
96
97%dir %{_appdir}/fonts
98%{_appdir}/fonts/aealarabiya*
99%{_appdir}/fonts/aefurat*
100%{_appdir}/fonts/cid0*
101%{_appdir}/fonts/courier*
02a10897
ER
102%{_appdir}/fonts/helvetica*
103%{_appdir}/fonts/hysmyeongjostdmedium*
104%{_appdir}/fonts/kozgopromedium*
105%{_appdir}/fonts/kozminproregular*
106%{_appdir}/fonts/msungstdlight*
107%{_appdir}/fonts/pdfacourier*
108%{_appdir}/fonts/pdfahelvetica*
109%{_appdir}/fonts/pdfasymbol*
110%{_appdir}/fonts/pdfatimes*
111%{_appdir}/fonts/pdfazapfdingbats*
112%{_appdir}/fonts/stsongstdlight*
113%{_appdir}/fonts/symbol*
114%{_appdir}/fonts/times*
115%{_appdir}/fonts/uni2cid_*
116%{_appdir}/fonts/zapfdingbats*
117
118%files fonts-dejavu
119%defattr(644,root,root,755)
120%{_appdir}/fonts/dejavusans*
121%{_appdir}/fonts/dejavuserif*
6c2cbd52 122
609c9c2e
ER
123%files fonts-freefont
124%defattr(644,root,root,755)
125%{_appdir}/fonts/freemono*
126%{_appdir}/fonts/freesans*
127%{_appdir}/fonts/freeserif*
128
6c2cbd52
ER
129%files examples
130%defattr(644,root,root,755)
ba84953d 131%{_examplesdir}/%{name}-%{version}
This page took 0.208467 seconds and 4 git commands to generate.