File freeimage.spec of Package freeimage

# norootforbuild

%define prefix /usr

BuildRequires: gcc-c++ 

Name:         freeimage
License:      GPL
Group:        Development/Libraries/C and C++
Summary:      FreeImage - A library project to support popular graphics image formats
Version:      3.10.0
Release:      0
URL:          http://freeimage.sourceforge.net/
Packager:     Matt Williams <matt@milliams.com>
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Source0:      FreeImage3100.tar.bz2
Patch0:       noroot.diff
Patch1:       fPIC.diff
Patch2:       freeimage-3100-x86_64.diff

%description
FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use and fast, multithreading safe.

%package -n lib%{name}3
Group:        Development/Libraries/Other
Summary:      FreeImage - A library project to support popular graphics image formats
#Requires:     xorg-x11
%description -n lib%{name}3
FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use and fast, multithreading safe.

%package -n lib%{name}-devel
Group:        Development/Libraries/Other
Summary:      FreeImage development package
Requires:     lib%{name}3 = %{version}
%description -n lib%{name}-devel
FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use and fast, multithreading safe.

%debug_package

%prep
%setup -n FreeImage
%patch -p1 -P 0
%patch -p1 -P 1
%patch2

%build
make %{?jobs:-j%jobs}
make %{?jobs:-j%jobs} -f Makefile.fip

%install
mkdir -p -m 755 $RPM_BUILD_ROOT%prefix/include
mkdir -p -m 755 $RPM_BUILD_ROOT%prefix/%_lib
make %{?jobs:-j%jobs} INCDIR=$RPM_BUILD_ROOT%prefix/include INSTALLDIR=$RPM_BUILD_ROOT%prefix/%_lib install
make %{?jobs:-j%jobs} -f Makefile.fip INCDIR=$RPM_BUILD_ROOT%prefix/include INSTALLDIR=$RPM_BUILD_ROOT%prefix/%_lib install

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -n lib%{name}3
%defattr(-,root,root)
%_libdir/*.so.*
%_libdir/libfreeimage-%{version}.so
%_libdir/libfreeimageplus-%{version}.so

%files -n lib%{name}-devel
%defattr(-,root,root)
%doc Whatsnew.txt README.linux license-gpl.txt license-fi.txt
%_includedir/FreeImage.h
%_includedir/FreeImagePlus.h
%_libdir/*.a
%_libdir/libfreeimage.so
%_libdir/libfreeimageplus.so
openSUSE Build Service is sponsored by