]>
Commit | Line | Data |
---|---|---|
8a4bc465 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
5 | Summary: Rsync library | |
6 | Summary(pl.UTF-8): Biblioteka rsync | |
4aa83a90 | 7 | Name: librsync |
379af7f1 | 8 | Version: 2.3.4 |
8a4bc465 JB |
9 | Release: 2 |
10 | License: LGPL v2.1+ | |
4aa83a90 | 11 | Group: Libraries |
8a4bc465 JB |
12 | #Source0Download: https://github.com/librsync/librsync/releases |
13 | # TODO use: | |
14 | #Source0: https://github.com/librsync/librsync/archive/v%{version}/%{name}-%{version}.tar.gz | |
71f4f5d3 | 15 | Source0: https://github.com/librsync/librsync/archive/v%{version}.tar.gz |
379af7f1 | 16 | # Source0-md5: 71d227be94f6fbfc7b6d0fce3ce81861 |
8a4bc465 | 17 | URL: https://librsync.sourceforge.net/ |
2baa706d | 18 | BuildRequires: cmake >= 3.6 |
a35dda0b | 19 | BuildRequires: popt-devel |
35d60597 | 20 | BuildRequires: rpmbuild(macros) >= 1.605 |
4aa83a90 | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
24 | librsync implements the "rsync" algorithm, which allows remote | |
25 | differencing of binary files. librsync computes a delta relative to a | |
26 | file's checksum, so the two files need not both be present to generate | |
27 | a delta. | |
28 | ||
29 | This library was previously known as libhsync up to version 0.9.0. | |
30 | ||
31 | The current version of this package does not implement the rsync | |
32 | network protocol and uses a delta format slightly more efficient than | |
33 | and incompatible with rsync 2.4.6. | |
34 | ||
e9170d76 JR |
35 | %description -l pl.UTF-8 |
36 | librsync jest implementacją algorytmu rsync, pozwalającego na zdalne | |
37 | porównywanie plików binarnych. librsync liczy różnice sum kontrolnych | |
38 | plików, więc nie wymaga obecności obu plików do sprawdzenia różnic. | |
f9dff5ca | 39 | |
e9170d76 JR |
40 | Ta biblioteka była wcześniej znana jako libhsync, do wersji 0.9.0 |
41 | włącznie. | |
f9dff5ca | 42 | |
e9170d76 | 43 | Ta wersja nie ma implementacji sieciowego protokołu rsync i używa |
f9dff5ca JB |
44 | formatu delt nieco wydajniejszego i niekompatybilnego z rsyncem w |
45 | wersji 2.4.6. | |
46 | ||
4aa83a90 | 47 | %package devel |
f9dff5ca | 48 | Summary: Headers for librsync |
a468bf01 | 49 | Summary(pl.UTF-8): Pliki nagłówkowe librsync |
4aa83a90 | 50 | Group: Development/Libraries |
a35dda0b | 51 | Requires: %{name} = %{version}-%{release} |
4aa83a90 | 52 | |
53 | %description devel | |
4aa83a90 | 54 | This package contains header files necessary for developing programs |
55 | based on librsync. | |
56 | ||
e9170d76 JR |
57 | %description devel -l pl.UTF-8 |
58 | Ten pakiet zawiera pliki nagłówkowe potrzebne do budowania programów | |
59 | używających librsync. | |
f9dff5ca | 60 | |
8a4bc465 JB |
61 | %package static |
62 | Summary: Static librsync library | |
63 | Summary(pl.UTF-8): Statyczna biblioteka librsync | |
64 | Group: Development/Libraries | |
65 | Requires: %{name}-devel = %{version}-%{release} | |
66 | ||
67 | %description static | |
68 | Static librsync library. | |
69 | ||
70 | %description static -l pl.UTF-8 | |
71 | Statyczna biblioteka librsync. | |
72 | ||
4aa83a90 | 73 | %prep |
74 | %setup -q | |
4aa83a90 | 75 | |
76 | %build | |
8a4bc465 JB |
77 | %if %{with static_libs} |
78 | install -d build-static | |
79 | cd build-static | |
80 | %cmake .. \ | |
81 | -DBUILD_RDIFF=OFF \ | |
82 | -DBUILD_SHARED_LIBS=OFF | |
83 | ||
84 | %{__make} | |
85 | cd .. | |
86 | %endif | |
87 | ||
71f4f5d3 AM |
88 | install -d build |
89 | cd build | |
8a4bc465 | 90 | %cmake .. |
4aa83a90 | 91 | |
0e950cc6 | 92 | %{__make} |
4aa83a90 | 93 | |
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
ad3b194d | 96 | |
8a4bc465 JB |
97 | %if %{with static_libs} |
98 | %{__make} -C build-static install \ | |
99 | DESTDIR=$RPM_BUILD_ROOT | |
100 | %endif | |
101 | ||
71f4f5d3 | 102 | %{__make} -C build install \ |
ad3b194d | 103 | DESTDIR=$RPM_BUILD_ROOT |
104 | ||
4aa83a90 | 105 | %clean |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
ad3b194d | 108 | %post -p /sbin/ldconfig |
4aa83a90 | 109 | %postun -p /sbin/ldconfig |
110 | ||
111 | %files | |
112 | %defattr(644,root,root,755) | |
71f4f5d3 | 113 | %doc AUTHORS CONTRIBUTING.md NEWS.md README.md THANKS TODO.md |
ad3b194d | 114 | %attr(755,root,root) %{_bindir}/rdiff |
9c5441f9 | 115 | %attr(755,root,root) %{_libdir}/librsync.so.*.* |
71f4f5d3 | 116 | %attr(755,root,root) %ghost %{_libdir}/librsync.so.2 |
ad3b194d | 117 | %{_mandir}/man1/rdiff.1* |
4aa83a90 | 118 | |
119 | %files devel | |
120 | %defattr(644,root,root,755) | |
8a4bc465 | 121 | %attr(755,root,root) %{_libdir}/librsync.so |
71f4f5d3 | 122 | %{_includedir}/librsync.h |
64670ee6 | 123 | %{_includedir}/librsync_export.h |
71f4f5d3 | 124 | %{_mandir}/man3/librsync.3* |
8a4bc465 JB |
125 | |
126 | %if %{with static_libs} | |
127 | %files static | |
128 | %defattr(644,root,root,755) | |
129 | %{_libdir}/librsync.a | |
130 | %endif |