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

Revision 521, 4.0 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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