summaryrefslogtreecommitdiff
path: root/libxdiff.spec
blob: 805216f2324901ccd5f3a7616f0f2ea3f42bfec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Summary:	Create diffs/patches for text/binary files
Summary(pl):	Tworzenie diffów/patchy dla plików tekstowych/binarnych
Name:		libxdiff
Version:	0.5
Release:	0.1
License:	LGPL
Group:		Libraries
Source0:	http://www.xmailserver.org/%{name}-%{version}.tar.gz
# Source0-md5:	d848a5569d499b1228d3d3c98489ae58
URL:		http://www.xmailserver.org/xdiff-lib.html
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
The LibXDiff library implements basic and yet complete functionalities
to create file differences/patches to both binary and text files. It
uses memory files as file abstraction to achieve both performance and
portability. For binary files, it implements (with some modification)
the algorithm described in "File System Support for Delta Compression"
by Joshua P. MacDonald. For text files, it follows directives described
in "An O(ND) Difference Algorithm and Its Variations" by Eugene W.
Myers. Memory files used by the library are basically a collection of
buffers that store the file content.


%description -l pl
Biblioteka LibXDiff ma zaimplementowaną podastwową i prawie kompletną
funkcjonalność do tworzenia plików różnicowych/łatek zarówno dla plików
binarnych jak i tekstowych. Wykorzystuje pliki pamięciowe w celu
uzyskania zarówno wydajności, jak i przenośności. Dla plików binarnych
wykorzystuje (z drobnymi modyfikacjami) algorytm opisany w książce
"Wsparcie Systemu Plików dla Kompresji Delta" autorstwa Joshua P.
Macdonald'a. Dla plików tekstowych postępuje zgodnie z zaleceniami
opisanymi w "Algorytm różnicowy O(ND) i jego wariacje" autorstwa Eugene
W. Myers. Pliki pamięcioweo użyte w bibliotece są w zaszie kolekcją
buforów przechowujących zawartość pliku.

%package devel
Summary:	Header files for libxdiff library
Summary(pl):	Pliki nagłówkowe biblioteki libxdiff
Group:		Development/Libraries
Requires:	%{name} = %{version}

%description devel
Header files for libxdiff library.

%description devel -l pl
Pliki nagłówkowe biblioteki libxdiff.

%package static
Summary:	Static libxdiff library
Summary(pl):	Statyczna biblioteka libxdiff
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}

%description static
Static libxdiff library.

%description static -l pl
Statyczna biblioteka libxdiff.

%prep
%setup -q

%build
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__autoheader}
%{__automake}
%configure
%{__make}

cd xdiff
%{__cc} -o %{name}.so -shared *.o

%install
rm -rf $RPM_BUILD_ROOT

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install xdiff/libxdiff.so $RPM_BUILD_ROOT%{_libdir}

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun	-p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*.so
%{_mandir}/man3/xdiff.3*

%files devel
%defattr(644,root,root,755)
%{_includedir}/xdiff.h

%files static
%defattr(644,root,root,755)
%{_libdir}/lib*.a