# TODO:
# - add bindings for java and python
-# - add vim syntax package
Summary: Protocol Buffers - Google's data interchange format
Summary(pl.UTF-8): Protocol Buffers - format wymiany danych Google
Group: Libraries
Source0: http://protobuf.googlecode.com/files/%{name}-%{version}.tar.bz2
# Source0-md5: 79a8072490f863139f32488c3ff84d39
+Source1: ftdetect-proto.vim
URL: http://code.google.com/p/protobuf/
BuildRequires: autoconf
BuildRequires: automake
Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _vimdatadir %{_datadir}/vim
+
%description
Protocol Buffers are a way of encoding structured data in an efficient
yet extensible format. Google uses Protocol Buffers for almost all of
%description static -l pl.UTF-8
Statyczne biblioteki protobuf.
+%package -n vim-syntax-protobuf
+Summary: Vim syntax highlighting for Google Protocol Buffers descriptions
+Group: Development/Libraries
+Requires: vim-rt >= 4:7.2.170
+
+%description -n vim-syntax-protobuf
+This package contains syntax highlighting for Google Protocol Buffers
+descriptions in Vim editor
+
%prep
%setup -q
CPPROG="cp -p" \
DESTDIR=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect}
+cp -p editors/proto.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax/proto.vim
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/proto.vim
+
cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%clean
%{_libdir}/libprotobuf-lite.a
%{_libdir}/libprotobuf.a
%{_libdir}/libprotoc.a
+
+%files -n vim-syntax-protobuf
+%defattr(644,root,root,755)
+%{_datadir}/vim/ftdetect/proto.vim
+%{_datadir}/vim/syntax/proto.vim