File vim-indent-finder.spec of Package vim-indent-finder

%define modname indent-finder
%define vimdir  %{_datadir}/vim/%(readlink %{_datadir}/vim/current)
Name:           vim-%{modname}
URL:            http://www.vim.org/scripts/script.php?script_id=513
Summary:        Automatically determines indent style
Version:        1.1
Release:        4
Source:         %{modname}-%{version}.tar.bz2
Source1:        indent_finder.vim
Source2:        indent_finder
License:        BSD
Group:          Productivity/Editors/Vi
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
%{py_requires}
BuildRequires:  python-devel vim
%if %suse_version > 1020
BuildRequires:  vim-base
%endif

%description
Indent Finder is a python script that reads a file and tells you what
indentation is used inside the file. It is not tied to any particular language.
It was tested successfully with C, C++, python and Java code.

Authors:
--------
    Philippe Fremy <pfremy@freehackers.org>

%prep
%setup -q -n %{modname}

%build
export CFLAGS="$RPM_OPT_FLAGS"
python setup.py build

%install
rm -rf %{buildroot}
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
install -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{vimdir}/plugin/indent_finder.vim
install -D -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/usr/bin/indent_finder

%clean
rm -rf %{buildroot}

%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc README.txt LICENSE.txt homepage.html
%{vimdir}/plugin/indent_finder.vim
/usr/bin/indent_finder

%changelog

* Wed Sep 19 2007 - James Oakley <jfunk@funktronics.ca> - 1.1-4
- Fix globbing
- Make standalone script

* Thu Jun 22 2006 - James Oakley <jfunk@funktronics.ca> - 1.1-3
- Build under buildservice

* Sat Nov 12 2005 - James Oakley <jfunk@funktronics.ca> - 1.1-ft.1
- Update
- Build for SL10

* Fri Jun 24 2005 - James Oakley <jfunk@funktronics.ca> - 1.0-ft.1
- Build for SL93

* Wed Mar 30 2005 - James Oakley <jfunk@funktronics.ca> - 1.0-2
- Fix plugin directory

* Wed Mar 30 2005 - James Oakley <jfunk@funktronics.ca> - 1.0-1
- Initial package
openSUSE Build Service is sponsored by