summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeajan <ozy@netpower.fr>2018-02-26 19:09:13 +0100
committerdeajan <ozy@netpower.fr>2018-02-26 19:09:13 +0100
commit222713ee22be7ccd5da6febfef0fec02d313cb06 (patch)
treee174f5ec9bbd1ba9807cf27f826f6f8f79c1d0f0
parent6fc8572d89a3ae64bba54c8bf859e3110f89ef0f (diff)
downloadlibrsync-222713ee22be7ccd5da6febfef0fec02d313cb06.tar.gz
Updated RPM spec file for 2.0.2
-rw-r--r--librsync.spec61
1 files changed, 33 insertions, 28 deletions
diff --git a/librsync.spec b/librsync.spec
index 125f729..9679694 100644
--- a/librsync.spec
+++ b/librsync.spec
@@ -1,15 +1,19 @@
+# This RPM supposes that you download the master.zip from github to SOURCES directory as librsync-master.zip
+
+%define name librsync
+%define version master
+%define gitsource https://github.com/librsync/%{name}/archive/master.zip
+
Summary: Rsync libraries
-Name: librsync
-Version: 0.9.7
-Release: 1
+Name: %{name}
+Version: %{version}
+Release: 1%{?dist}
License: LGPL
Group: System Environment/Libraries
-Source: http://prdownloads.sourceforge.net/librsync/librsync-%{version}.tar.gz
-URL: http://www.sourceforge.net/projects/librsync
+Source0: %{name}-master.zip
+URL: http://librsync.sourcefrog.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: libtool
-BuildRequires: autoconf
-BuildRequires: automake
+BuildRequires: libtool perl zlib cmake popt-devel bzip2-devel doxygen
%description
librsync implements the "rsync" algorithm, which allows remote
@@ -17,12 +21,6 @@ differencing of binary files. librsync computes a delta relative to a
file's checksum, so the two files need not both be present to generate
a delta.
-This library was previously known as libhsync up to version 0.9.0.
-
-The current version of this package does not implement the rsync
-network protocol and uses a delta format slightly more efficient than
-and incompatible with rsync 2.4.6.
-
%package devel
Summary: Headers and development libraries for librsync
Group: Development/Libraries
@@ -34,28 +32,31 @@ differencing of binary files. librsync computes a delta relative to a
file's checksum, so the two files need not both be present to generate
a delta.
-This library was previously known as libhsync up to version 0.9.0.
-
-The current version of this package does not implement the rsync
-network protocol and uses a delta format slightly more efficient than
-and incompatible with rsync 2.4.6.
-
This package contains header files necessary for developing programs
based on librsync.
%prep
+#wget --no-check-certificate --timeout=5 -O %{_sourcedir}/%{name}-master.zip %{gitsource}
%setup
# The next line is only needed if there are any non-upstream patches. In
# this distribution there are none.
#%patch
%build
-./autogen.sh
-./configure --prefix=/usr --mandir=/usr/share/man/
+
+# By default, cmake installs to /usr/local, need to tweak here
+cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=Release .
make CFLAGS="$RPM_OPT_FLAGS"
+make doc
%install
rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT install
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# Missing man ugly fix
+mkdir --parents $RPM_BUILD_ROOT/usr/share/man/man3
+mkdir --parents $RPM_BUILD_ROOT/usr/share/man/man1
+cp %{_builddir}/librsync-%{version}/doc/rdiff.1 $RPM_BUILD_ROOT/usr/share/man/man1/rdiff.1
+cp %{_builddir}/librsync-%{version}/doc/librsync.3 $RPM_BUILD_ROOT/usr/share/man/man3/librsync.3
%clean
rm -rf $RPM_BUILD_ROOT
@@ -66,15 +67,19 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
-%doc AUTHORS COPYING COPYING NEWS README
+%doc AUTHORS COPYING NEWS.md README.md
%{_bindir}/rdiff
-%{_mandir}/man3/librsync.3.gz
%{_mandir}/man1/rdiff.1.gz
+%{_libdir}/%{name}*
+%{_mandir}/man3/librsync.3.gz
%files devel
%defattr(-,root,root)
-%{_prefix}/include/*
-%{_libdir}/librsync.a
-%{_libdir}/librsync.la
+%{_includedir}/%{name}*
%changelog
+* Mon Feb 26 2018 Orsiris de Jong <ozy@netpower>
+- Updated SPEC file for librsync 2.0.2
+- Fixed cmake paths for RHEL 7 64 bits
+- Fix bogus man page paths
+- Added automatic source download using wget (for tests)