source: projects/specs/branches/6/f/freeimage/freeimage-vl.spec @ 10679

Revision 10679, 4.3 KB checked in by tomop, 8 years ago (diff)

freeimage-3.10.0-3

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