%global debug_package %{nil} Name: itextsharp Version: 4.1.6 Release: 1%{?dist} Summary: Mono library for generating PDF files Group: Development/Libraries # Text on the web page states: # License: GNU Library or Lesser General Public License (LGPL), Mozilla Public License 1.1 (MPL 1.1) # There are many different licenses specified in the actual source files: # - Most source files have (LGPLv2+ or MPLv1.1) copyright header # - System/util/zlib/ contains files with 3-clause BSD license # - various other files are BSD licensed with different wordings # - iTextSharp/text/pdf/codec/TIFFConstants.cs has libtiff license # - iTextSharp/text/pdf/hyphenation/ has Apache License 2.0 with two different wordings License: (LGPLv2+ or MPLv1.1) and BSD and libtiff and ASL 2.0 URL: http://sourceforge.net/projects/itextsharp # Original source http://downloads.sourceforge.net/%{name}/%{name}-%{version}.zip Source0: %{name}-%{version}-nopatents.zip # BouncyCastle source which is bundled with the original itextsharp zip # contains certain patented algorithms we cannot ship. # The following script is used to repack upstream zip with # BouncyCastle sources (and patented algorithms) removed. # Download the upstream zip file and invoke this script: # ./itextsharp-generate-zip.sh %{version} Source1: itextsharp-generate-zip.sh Patch0: itextsharp-assemblyinfo.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: mono-devel BuildRequires: mono-bouncycastle BuildRequires: unzip # Exclude architectures that don't have nant (and thus mono-bouncycastle) ExcludeArch: ppc64 ppc sparc64 %description iText# (iTextSharp) is a port of the iText open source java library for PDF generation, written entirely in C# for the .NET platform. %prep %setup -q -c %patch0 -p1 # Convert .csproj to unix Makefile prj2make itextsharp.csproj # Fix Makefile to build against mono-bouncycastle package. sed -i -e "/\tsrcbc/d" Makefile sed -i -e "s,^\(LIBS=.*\)$,\1 -lib:%{_libdir}/mono/bouncycastle -r:BouncyCastle.Crypto.dll," Makefile %build make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_libdir}/mono/gac/ gacutil -i bin/Debug/itextsharp.dll -f -package %{name} -root $RPM_BUILD_ROOT%{_libdir} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_libdir}/mono/%{name} %{_libdir}/mono/gac/itextsharp/ %changelog * Thu Nov 12 2009 Kalev Lember - 4.1.6-1 - Initial RPM release.