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

Revision 3474, 4.1 KB checked in by inagaki, 13 years ago (diff)

update: freeimage, koffice, mtpaint, openjpeg, poppler

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: 2%{?_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
19
20BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21BuildRequires: libjpeg-devel libpng-devel libtiff-devel OpenEXR-devel
22BuildRequires: libmng-devel openjpeg-devel doxygen
23
24%description
25FreeImage is a library for developers who would like to support popular
26graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by
27today's multimedia applications.
28
29
30%package        devel
31Summary:        Development files for %{name}
32Summary(ja):        Development files for %{name}
33Group:          Development/Libraries
34Requires:       %{name} = %{version}-%{release}
35
36%description    devel
37The %{name}-devel package contains libraries and header files for
38developing applications that use %{name}.
39
40
41%prep
42%setup -q -n FreeImage
43%patch0 -p1 -z .syslibs
44%patch1 -p1
45touch -r Source/FreeImage.h.syslibs Source/FreeImage.h
46
47# remove all included libs to make sure these don't get used during compile
48rm -r Source/Lib* Source/ZLib Source/OpenEXR
49
50# some encoding / line ending cleanups
51iconv -f ISO-8859-1 -t UTF-8 Whatsnew.txt > Whatsnew.txt.tmp
52touch -r Whatsnew.txt Whatsnew.txt.tmp
53mv Whatsnew.txt.tmp Whatsnew.txt
54sed -i 's/\r//g' Whatsnew.txt license-*.txt gensrclist.sh \
55  Wrapper/FreeImagePlus/WhatsNew_FIP.txt
56
57
58%build
59sh ./gensrclist.sh
60make %{?_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>
65FIP_OBJS=
66for 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"
70done
71gcc -shared -LDist -o Dist/lib%{name}plus-%{version}.so \
72  -Wl,-soname,lib%{name}plus.so.%{major} $FIP_OBJS -lfreeimage-%{version}
73
74pushd Wrapper/FreeImagePlus/doc
75doxygen FreeImagePlus.dox
76popd
77
78
79%install
80rm -rf $RPM_BUILD_ROOT
81mkdir -p $RPM_BUILD_ROOT%{_libdir}
82mkdir -p $RPM_BUILD_ROOT%{_includedir}
83
84install -m 755 Dist/lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir}
85ln -s lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.%{major}
86ln -s lib%{name}-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
87
88install -m 755 Dist/lib%{name}plus-%{version}.so $RPM_BUILD_ROOT%{_libdir}
89ln -s lib%{name}plus-%{version}.so \
90  $RPM_BUILD_ROOT%{_libdir}/lib%{name}plus.so.%{major}
91ln -s lib%{name}plus-%{version}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}plus.so
92
93install -p -m 644 Source/FreeImage.h $RPM_BUILD_ROOT%{_includedir}
94install -p -m 644 Wrapper/FreeImagePlus/FreeImagePlus.h \
95  $RPM_BUILD_ROOT%{_includedir}
96
97
98%clean
99rm -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
122* Thu Apr 14 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.10.0-2
123- rebuilt with openjpeg-1.4
124
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
Note: See TracBrowser for help on using the repository browser.