%global php_libname fpdf Name: php-fpdf Version: 1.6 Release: 4%{?dist} License: MIT Summary: PHP class to generate PDF Files Group: Development/Libraries URL: http://www.fpdf.org # Upstream uses a troublesome URL for source you can download from: # http://www.fpdf.org/en/dl.php?v=16&f=tgz Source: fpdf16.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: php-gd BuildRequires: dos2unix BuildArch: noarch %description FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs. %package doc Summary: Documentation for php-fpdf Group: Development/Libraries %description doc Documentation for php-fpdf %prep %setup -qn fpdf16 dos2unix doc/* dos2unix *.txt find -type f | xargs chmod -x dos2unix tutorial/* dos2unix fpdf.php pushd tutorial for file in calligra.z 20k_c1.txt; do iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ touch -r $file $file.new && \ mv $file.new $file done popd %build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/php/%{php_libname} cp -a font fpdf.php %{buildroot}%{_datadir}/php/%{php_libname} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_datadir}/php/%{php_libname} %doc license.txt %files doc %defattr(-,root,root,-) %doc FAQ.htm doc histo.htm install.txt license.txt tutorial %changelog * Sun Sep 05 2010 David Nalley 1.6-4 - updated file so license.txt is included in both doc subpackage and main package. * Sun Jan 03 2010 David Nalley 1.6-3 - updated requires to include php-gd * Sat Nov 28 2009 David Nalley 1.6-2 - updated source url to note troublesome link - consolidated things to be a single line for all of the chmods - additional command consolidation based on Thomas Spura's comments - broke documentation out into a separate package * Thu Nov 26 2009 David Nalley 1.6-1 - Initial Packaging