source: projects/specs/trunk/f/freeimage/freeimage-vl.spec @ 10580

Revision 10580, 4.6 KB checked in by Takemikaduchi, 8 years ago (diff)

Xaw3d: new upstream release
others: rebuild with gcc-5.4.0

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