Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > db859b49192c280fbf3cd474274ec737 > files > 4

ripole-0.1.4-5mdk.src.rpm

%define	name	ripole
%define version 0.1.4
%define release 5mdk

%define	major 0
%define	minor 1
%define	micro 4
%define libname	%mklibname %{name} %{major}

Summary:	Extracts attachments out of mailpack format emails
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	BSD
Group:		Networking/Mail
URL:		http://www.pldaniels.com/ripole/
Source0:	http://www.pldaniels.com/ripole/%{name}-%{version}.tar.bz2
Patch0:		ripole-0.1.4-shared.diff.bz2
Patch1:		ripole-0.1.4-ripmime-1.4.0.5.diff.bz2
BuildConflicts:	ripole-devel
BuildConflicts:	%{libname}
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
ripOLE is a small program/library designed to pull out attachments
from OLE2 data files (ie, MS Office documents).  ripOLE is BSD
licenced meaning that commercial projects can also use the code
without worry of licence costs or legal liabilities. 

%package -n	%{libname}
Summary:	Shared %{name} library
Group:          System/Libraries

%description -n	%{libname}
ripOLE is a small program/library designed to pull out attachments
from OLE2 data files (ie, MS Office documents).  ripOLE is BSD
licenced meaning that commercial projects can also use the code
without worry of licence costs or legal liabilities. 

%package -n	%{libname}-devel
Summary:	Development files for the %{name} library
Group:		Development/C
Provides:	%{name}-devel
Provides:	lib%{name}-devel
Requires:	%{libname} = %{version}-%{release}

%description -n	%{libname}-devel
ripOLE is a small program/library designed to pull out attachments
from OLE2 data files (ie, MS Office documents).  ripOLE is BSD
licenced meaning that commercial projects can also use the code
without worry of licence costs or legal liabilities. 

%prep

%setup -q
%patch0 -p0
%patch1 -p1

%build

make \
    CFLAGS="%{optflags} -fPIC -D_REENTRANT -I." \
    MAJOR="%{major}" \
    MINOR="%{minor}" \
    MICRO="%{micro}" \
    shared static ripole

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_libdir}
install -d %{buildroot}%{_includedir}/%{name}

# install binaries
install -m755 %{name} %{buildroot}%{_bindir}/

# install the shared library
install -m755 lib%{name}.so.%{major}.%{minor}.%{micro} %{buildroot}%{_libdir}/
ln -snf lib%{name}.so.%{major}.%{minor}.%{micro} %{buildroot}%{_libdir}/lib%{name}.so
ln -snf lib%{name}.so.%{major}.%{minor}.%{micro} %{buildroot}%{_libdir}/lib%{name}.so.%{major}

# install the static library
install -m755 lib%{name}.a %{buildroot}%{_libdir}/

# install headers
install -m0644 *.h %{buildroot}%{_includedir}/%{name}/

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

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

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc CHANGELOG CONTRIBUTORS INSTALL LICENSE README
%{_bindir}/*

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%doc TODO
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/*.a

%changelog
* Sun Jun 12 2005 Oden Eriksson <oeriksson@mandriva.com> 0.1.4-5mdk
- added P1 from ripmime-1.4.0.5

* Fri Dec 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.1.4-4mdk
- revert latest "lib64 fixes"
- added another lib64 fix

* Tue Dec 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.1.4-3mdk
- lib64 fixes

* Sat Nov 27 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.1.4-2mdk
- make it rpmbuildupdate aware

* Sat Nov 27 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.1.4-1mdk
- initial mandrake package