[521] | 1 | %define _version 3100 |
---|
| 2 | %define major 3 |
---|
| 3 | |
---|
| 4 | Summary: Multi-format image decoder library |
---|
| 5 | Summary(ja): マルチフォーマット画像デコードライブラリ |
---|
| 6 | Name: freeimage |
---|
| 7 | Version: 3.10.0 |
---|
[3474] | 8 | Release: 2%{?_dist_release} |
---|
| 9 | |
---|
[521] | 10 | Group: System Environment/Libraries |
---|
| 11 | # freeimage is dual-licensed, see Whatsnew.txt (search for license) or: |
---|
| 12 | # http://freeimage.sourceforge.net/license.html |
---|
| 13 | License: GPL+ or MPLv1.0 |
---|
| 14 | URL: http://freeimage.sourceforge.net/ |
---|
[3474] | 15 | |
---|
[521] | 16 | Source0: http://downloads.sourceforge.net/%{name}/FreeImage%{_version}.zip |
---|
| 17 | Patch0: FreeImage-3.10.0-syslibs.patch |
---|
| 18 | Patch1: FreeImage-3.10.0-doxygen.patch |
---|
[3474] | 19 | |
---|
[521] | 20 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
[3474] | 21 | BuildRequires: libjpeg-devel libpng-devel libtiff-devel OpenEXR-devel |
---|
| 22 | BuildRequires: libmng-devel openjpeg-devel doxygen |
---|
[521] | 23 | |
---|
| 24 | %description |
---|
| 25 | FreeImage is a library for developers who would like to support popular |
---|
| 26 | graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by |
---|
| 27 | today's multimedia applications. |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | %package devel |
---|
| 31 | Summary: Development files for %{name} |
---|
| 32 | Summary(ja): Development files for %{name} |
---|
| 33 | Group: Development/Libraries |
---|
| 34 | Requires: %{name} = %{version}-%{release} |
---|
| 35 | |
---|
| 36 | %description devel |
---|
| 37 | The %{name}-devel package contains libraries and header files for |
---|
| 38 | developing applications that use %{name}. |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | %prep |
---|
| 42 | %setup -q -n FreeImage |
---|
| 43 | %patch0 -p1 -z .syslibs |
---|
| 44 | %patch1 -p1 |
---|
| 45 | touch -r Source/FreeImage.h.syslibs Source/FreeImage.h |
---|
| 46 | |
---|
| 47 | # remove all included libs to make sure these don't get used during compile |
---|
| 48 | rm -r Source/Lib* Source/ZLib Source/OpenEXR |
---|
| 49 | |
---|
| 50 | # some encoding / line ending cleanups |
---|
| 51 | iconv -f ISO-8859-1 -t UTF-8 Whatsnew.txt > Whatsnew.txt.tmp |
---|
| 52 | touch -r Whatsnew.txt Whatsnew.txt.tmp |
---|
| 53 | mv Whatsnew.txt.tmp Whatsnew.txt |
---|
| 54 | sed -i 's/\r//g' Whatsnew.txt license-*.txt gensrclist.sh \ |
---|
| 55 | Wrapper/FreeImagePlus/WhatsNew_FIP.txt |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | %build |
---|
| 59 | sh ./gensrclist.sh |
---|
| 60 | make %{?_smp_mflags} \ |
---|
| 61 | COMPILERFLAGS="$RPM_OPT_FLAGS -fPIC -fvisibility=hidden `pkg-config --cflags OpenEXR`" |
---|
| 62 | |
---|
| 63 | # build libfreeimageplus DIY, as the provided makefile makes libfreeimageplus |
---|
| 64 | # contain a private copy of libfreeimage <sigh> |
---|
| 65 | FIP_OBJS= |
---|
| 66 | for i in Wrapper/FreeImagePlus/src/fip*.cpp; do |
---|
| 67 | gcc -o $i.o $RPM_OPT_FLAGS -fPIC -fvisibility=hidden \ |
---|
| 68 | -ISource -IWrapper/FreeImagePlus -c $i |
---|
| 69 | FIP_OBJS="$FIP_OBJS $i.o" |
---|
| 70 | done |
---|
| 71 | gcc -shared -LDist -o Dist/lib%{name}plus-%{version}.so \ |
---|
| 72 | -Wl,-soname,lib%{name}plus.so.%{major} $FIP_OBJS -lfreeimage-%{version} |
---|
| 73 | |
---|
| 74 | pushd Wrapper/FreeImagePlus/doc |
---|
| 75 | doxygen FreeImagePlus.dox |
---|
| 76 | popd |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | %install |
---|
| 80 | rm -rf $RPM_BUILD_ROOT |
---|
| 81 | mkdir -p $RPM_BUILD_ROOT%{_libdir} |
---|
| 82 | mkdir -p $RPM_BUILD_ROOT%{_includedir} |
---|
| 83 | |
---|
| 84 | install -m 755 Dist/lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir} |
---|
| 85 | ln -s lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.%{major} |
---|
| 86 | ln -s lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so |
---|
| 87 | |
---|
| 88 | install -m 755 Dist/lib%{name}plus-%{version}.so $RPM_BUILD_ROOT%{_libdir} |
---|
| 89 | ln -s lib%{name}plus-%{version}.so \ |
---|
| 90 | $RPM_BUILD_ROOT%{_libdir}/lib%{name}plus.so.%{major} |
---|
| 91 | ln -s lib%{name}plus-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}plus.so |
---|
| 92 | |
---|
| 93 | install -p -m 644 Source/FreeImage.h $RPM_BUILD_ROOT%{_includedir} |
---|
| 94 | install -p -m 644 Wrapper/FreeImagePlus/FreeImagePlus.h \ |
---|
| 95 | $RPM_BUILD_ROOT%{_includedir} |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | %clean |
---|
| 99 | rm -rf $RPM_BUILD_ROOT |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | %post -p /sbin/ldconfig |
---|
| 103 | |
---|
| 104 | %postun -p /sbin/ldconfig |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | %files |
---|
| 108 | %defattr(-,root,root,-) |
---|
| 109 | %doc Whatsnew.txt license-*.txt Wrapper/FreeImagePlus/WhatsNew_FIP.txt |
---|
| 110 | %{_libdir}/lib%{name}*-%{version}.so |
---|
| 111 | %{_libdir}/lib%{name}*.so.%{major} |
---|
| 112 | |
---|
| 113 | %files devel |
---|
| 114 | %defattr(-,root,root,-) |
---|
| 115 | %doc Wrapper/FreeImagePlus/doc/html |
---|
| 116 | %{_includedir}/FreeImage*.h |
---|
| 117 | %{_libdir}/lib%{name}.so |
---|
| 118 | %{_libdir}/lib%{name}plus.so |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | %changelog |
---|
[3474] | 122 | * Thu Apr 14 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.10.0-2 |
---|
| 123 | - rebuilt with openjpeg-1.4 |
---|
| 124 | |
---|
[521] | 125 | * Thu Jun 11 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.10.0-1 |
---|
| 126 | - initial build for Vine Linux |
---|
| 127 | |
---|
| 128 | * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.0-2 |
---|
| 129 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
| 130 | |
---|
| 131 | * Tue Mar 18 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 3.10.0-1 |
---|
| 132 | - Initial Fedora package |
---|