File xdelta.spec of Package xdelta

#
# spec file for package xdelta
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           xdelta
BuildRequires:  coreutils glib2-devel glibc-devel zlib-devel
License:        GPLv2+
Group:          Productivity/Archiving/Backup
AutoReqProv:    on
Version:        1.1.4
Release:        191
Summary:        Binary delta generator and RCS replacement library
Source:         %{name}-%{version}.tar.bz2
Patch:          %{name}-%{version}.patch
Patch2:         %{name}-%{version}-autoconf.patch
Patch3:         %{name}-%{version}-aliasing.patch
Patch4:         %{name}-%{version}-glib2.patch
Patch5:         %{name}-%{version}-large-files.patch
Source1:        xdeltadir.pl
Source2:        xdeltadir.1.gz
Url:            http://xdelta.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %install_info_prereq

%description
Xdelta is a binary delta generator and RCS replacement library. The
delta algorithm is faster than GNU diff for text files and works on
binary files, too.



Authors:
--------
    Josh MacDonald <josh.macdonald@gmail.com>

%package devel
License:        GPLv2+
Summary:        Binary delta generator and RCS replacement library
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       glib2-devel

%description devel
Xdelta is a binary delta generator and RCS replacement library. The
delta algorithm is faster than GNU diff for text files and works on
binary files, too.



Authors:
--------
    Josh MacDonald <josh.macdonald@gmail.com>

%prep
%setup -q
chmod -x AUTHORS COPYING INSTALL Makefile.am NEWS README *.c *.h *.in xd* */*
%patch
%patch2
%patch3
%patch4
%patch5 -p1

%build
%{?suse_update_config:%{suse_update_config -f}}
libtoolize -f
aclocal
autoconf
automake -a
export CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
%configure --disable-static
make

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
install -m 755 %{S:1} $RPM_BUILD_ROOT%{_bindir}/xdeltadir
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_mandir}/man1/

%clean
rm -rf $RPM_BUILD_ROOT

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
/sbin/ldconfig

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
/sbin/ldconfig

%files
%defattr(-, root, root)
%doc README NEWS COPYING AUTHORS
%{_bindir}/xdelta
%{_bindir}/xdeltadir
%{_mandir}/man1/xdelta.*
%{_mandir}/man1/xdeltadir.*
%{_libdir}/lib*.so.*

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_bindir}/xdelta-config
%{_libdir}/*.so
%{_datadir}/aclocal/xdelta.m4

%changelog
openSUSE Build Service is sponsored by