Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > by-pkgid > a7b1a3b1f07fc9b028c3819f522857d3 > files > 5

jbigkit-1.6-1mdv2008.0.src.rpm

%define	major 0
%define libname %mklibname jbig %{major}
%define develname %mklibname jbig -d

Summary:	The JBIG-KIT
Name:		jbigkit
Version:	1.6
Release:	%mkrel 1
License:	GPL
Group:		Graphics
URL:		http://www.cl.cam.ac.uk/~mgk25
Source0:	http://www.cl.cam.ac.uk/~mgk25/download/%{name}-%{version}.tar.gz
Patch0:		jbigkit-1.6-build.patch
Patch1:		jbigkit-1.6-respect-make.patch
Patch2:		jbigkit-shared.diff
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
JBIG-KIT implements a highly effective data compression algorithm for bi-level
high-resolution images such as fax pages or scanned documents.

%package -n	%{libname}
Summary:	The Shared library for The JBIG-KIT
Group:          System/Libraries

%description -n	%{libname}
JBIG-KIT implements a highly effective data compression algorithm for bi-level
high-resolution images such as fax pages or scanned documents.

This package provides the shared JBIG-KIT library.

%package -n	%{develname}
Summary:	Static library and header files for development with JBIG-KIT
Group:		Development/C
Requires:	%{libname} = %{version}
%if "%{_lib}" == "lib64"
Provides:	libjbig-devel = %{version}-%{release}
Obsoletes:	libjbig-devel
%endif
Provides:	jbig-devel = %{version}-%{release}
Obsoletes:	jbig-devel
Provides:	%{name}-devel = %{version}-%{release}
Obsoletes:	%{name}-devel

%description -n	%{develname}
JBIG-KIT implements a highly effective data compression algorithm for bi-level
high-resolution images such as fax pages or scanned documents.

This package is only needed if you plan to develop or compile applications
which requires the libjbig library.

%prep

%setup -q -n %{name}

# fix strange perms
find . -type d -perm 0700 -exec chmod 755 {} \;
find . -type f -perm 0555 -exec chmod 755 {} \;
find . -type f -perm 0444 -exec chmod 644 {} \;

%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
make CFLAGS="%{optflags} -fPIC -DPIC -I../libjbig"

make test

mv -f libjbig/jbig.doc libjbig/jbig.txt

%install
rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_includedir}
install -d %{buildroot}%{_libdir}
install -d %{buildroot}%{_mandir}/man1
install -d %{buildroot}%{_mandir}/man5

install -m0755 pbmtools/jbgtopbm %{buildroot}%{_bindir}/
install -m0755 pbmtools/pbmtojbg %{buildroot}%{_bindir}/

install -m0644 pbmtools/*.1 %{buildroot}%{_mandir}/man1/
install -m0644 pbmtools/*.5 %{buildroot}%{_mandir}/man5/

install -m0755 libjbig/libjbig.so.0.0 %{buildroot}%{_libdir}/libjbig.so.0.0
ln -snf libjbig.so.0.0 %{buildroot}%{_libdir}/libjbig.so.0
ln -snf libjbig.so.0.0 %{buildroot}%{_libdir}/libjbig.so

install -m0644 libjbig/libjbig.a %{buildroot}%{_libdir}
install -m0644 libjbig/jbig.h %{buildroot}%{_includedir}

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/*
%attr(0644,root,root) %{_mandir}/man1/*
%attr(0644,root,root) %{_mandir}/man5/*

%files -n %{libname}
%defattr(-,root,root)
%doc ANNOUNCE CHANGES COPYING
%attr(0755,root,root) %{_libdir}/*.so.*

%files -n %{develname}
%defattr(-,root,root)
%doc  INSTALL TODO libjbig/jbig.txt
%attr(0644,root,root) %{_includedir}/*.h
%attr(0644,root,root) %{_libdir}/*.so
%attr(0644,root,root) %{_libdir}/*.a


%changelog
* Sun Aug 12 2007 Oden Eriksson <oeriksson@mandriva.com> 1.6-1mdv2008.0
+ Revision: 62241
- 1.6
- added P1,P2,P3 from gentoo but adapted P3 a bit


* Sun Feb 18 2007 Giuseppe Ghibò <ghibo@mandriva.com> 1.5-5mdv2007.0
+ Revision: 122424
- bunzip2 patches.
- Import jbigkit

* Sat Dec 31 2005 Mandriva Linux Team <http://www.mandrivaexpert.com/> 1.5-4mdk
- Rebuild

* Sat Mar 19 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.5-3mdk
- Backported patches from 1.6 to fix these bugs:
  - various small changes to reduce the risk of 32-bit unsigned
    integer overflows when dealing with extremely large images
  - robuster treatment of L0 = 0xffffffff.
  - minor API modification in jbg_enc_options(): parameter l0 changed
    from type long to unsigned long; previous value now remains
    unchanged when l0 == 0 (was: l0 < 0).