123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- %define _version 3100
- %define major 3
- Summary: Multi-format image decoder library
- Summary(ja): マルチフォーマット画像デコードライブラリ
- Name: freeimage
- Version: 3.10.0
- Release: 3%{?_dist_release}
- Group: System Environment/Libraries
- # freeimage is dual-licensed, see Whatsnew.txt (search for license) or:
- # http://freeimage.sourceforge.net/license.html
- License: GPL+ or MPLv1.0
- URL: http://freeimage.sourceforge.net/
- Source0: http://downloads.sourceforge.net/%{name}/FreeImage%{_version}.zip
- Patch0: FreeImage-3.10.0-syslibs.patch
- Patch1: FreeImage-3.10.0-doxygen.patch
- Patch2: FreeImage-3.10.0-libpng15.patch
- Patch3: FreeImage-3.10.0-libtiff4.patch
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
- BuildRequires: libjpeg-devel
- BuildRequires: libmng-devel
- BuildRequires: libpng-devel
- BuildRequires: libtiff-devel
- BuildRequires: OpenEXR-devel
- BuildRequires: openjpeg-devel
- BuildRequires: doxygen
- %description
- FreeImage is a library for developers who would like to support popular
- graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by
- today's multimedia applications.
- %package devel
- Summary: Development files for %{name}
- Summary(ja): %{name} の開発用ファイル
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- %description devel
- The %{name}-devel package contains libraries and header files for
- developing applications that use %{name}.
- %prep
- %setup -q -n FreeImage
- %patch0 -p1 -z .syslibs
- %patch1 -p1
- %patch2 -p0
- %patch3 -p1
- touch -r Source/FreeImage.h.syslibs Source/FreeImage.h
- # remove all included libs to make sure these don't get used during compile
- rm -r Source/Lib* Source/ZLib Source/OpenEXR
- # some encoding / line ending cleanups
- iconv -f ISO-8859-1 -t UTF-8 Whatsnew.txt > Whatsnew.txt.tmp
- touch -r Whatsnew.txt Whatsnew.txt.tmp
- mv Whatsnew.txt.tmp Whatsnew.txt
- sed -i 's/\r//g' Whatsnew.txt license-*.txt gensrclist.sh \
- Wrapper/FreeImagePlus/WhatsNew_FIP.txt
- %build
- sh ./gensrclist.sh
- make %{?_smp_mflags} \
- COMPILERFLAGS="$RPM_OPT_FLAGS -fPIC -fvisibility=hidden `pkg-config --cflags OpenEXR` `pkg-config --cflags libopenjpeg`"
- # build libfreeimageplus DIY, as the provided makefile makes libfreeimageplus
- # contain a private copy of libfreeimage <sigh>
- FIP_OBJS=
- for i in Wrapper/FreeImagePlus/src/fip*.cpp; do
- gcc -o $i.o $RPM_OPT_FLAGS -fPIC -fvisibility=hidden \
- -ISource -IWrapper/FreeImagePlus -c $i
- FIP_OBJS="$FIP_OBJS $i.o"
- done
- gcc -shared -LDist -o Dist/lib%{name}plus-%{version}.so \
- -Wl,-soname,lib%{name}plus.so.%{major} $FIP_OBJS -lfreeimage-%{version}
- pushd Wrapper/FreeImagePlus/doc
- doxygen FreeImagePlus.dox
- popd
- %install
- rm -rf $RPM_BUILD_ROOT
- mkdir -p $RPM_BUILD_ROOT%{_libdir}
- mkdir -p $RPM_BUILD_ROOT%{_includedir}
- install -m 755 Dist/lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir}
- ln -s lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.%{major}
- ln -s lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
- install -m 755 Dist/lib%{name}plus-%{version}.so $RPM_BUILD_ROOT%{_libdir}
- ln -s lib%{name}plus-%{version}.so \
- $RPM_BUILD_ROOT%{_libdir}/lib%{name}plus.so.%{major}
- ln -s lib%{name}plus-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}plus.so
- install -p -m 644 Source/FreeImage.h $RPM_BUILD_ROOT%{_includedir}
- install -p -m 644 Wrapper/FreeImagePlus/FreeImagePlus.h \
- $RPM_BUILD_ROOT%{_includedir}
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post -p /sbin/ldconfig
- %postun -p /sbin/ldconfig
- %files
- %defattr(-,root,root,-)
- %doc Whatsnew.txt license-*.txt Wrapper/FreeImagePlus/WhatsNew_FIP.txt
- %{_libdir}/lib%{name}*-%{version}.so
- %{_libdir}/lib%{name}*.so.%{major}
- %files devel
- %defattr(-,root,root,-)
- %doc Wrapper/FreeImagePlus/doc/html
- %{_includedir}/FreeImage*.h
- %{_libdir}/lib%{name}.so
- %{_libdir}/lib%{name}plus.so
- %changelog
- * Thu Apr 14 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.10.0-2
- - rebuilt with libmng 2.0.2, libpng 1.6.12, libtiff 4.0.3, OpenEXR 2.2.0 and openjpeg 1.5.2
- - added Patch2 and Patch3
- * Thu Apr 14 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.10.0-2
- - rebuilt with openjpeg-1.4
- * Thu Jun 11 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.10.0-1
- - initial build for Vine Linux
- * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.0-2
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
- * Tue Mar 18 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 3.10.0-1
- - Initial Fedora package
|