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