File indent.spec of Package indent

#
# spec file for package indent (Version 2.2.10)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           indent
License:        GPL v3 or later
Group:          Development/Languages/C and C++
AutoReqProv:    on
Version:        2.2.10
Release:        1
Source:         %{name}-%{version}.tar.bz2
Patch0:         %{name}-%{version}-nothing_is_void.diff
Patch1:         %{name}-%{version}-warnings.diff
Patch2:         %{name}-%{version}-lcall.diff
Patch3:         %{name}-%{version}-cdw.diff
Patch4:         %{name}-%{version}-man.diff
Url:            ftp://ftp.gnu.org/pub/gnu/indent/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Indent Formats C Source Code
PreReq:         %install_info_prereq

%description
indent can be used to make code easier to read. It can also convert
from one style of writing C code to another. indent understands a
substantial amount of C syntax, but it also tries to cope with
incomplete and malformed syntax.



%prep
%setup -q
%patch0 -p1
%patch1
%patch2
%patch3 -p1
%patch4

%build
%configure --with-pic
# Parallel make doesn't work
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
# indent.html is installed with %doc below
rm -f $RPM_BUILD_ROOT/usr/doc/indent/indent.html $RPM_BUILD_ROOT%{_bindir}/texinfo2man $RPM_BUILD_ROOT/%{_infodir}/dir
mv $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW.Big5 $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW
%find_lang %{name}

%check
echo =============== TEST BEGIN ===============
make -C regression
echo =============== TEST  END  ===============

%clean
rm -rf $RPM_BUILD_ROOT

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/*
%doc doc/indent.html
%{_infodir}/indent.info*.gz
%{_mandir}/man1/indent.1.gz

%changelog
* Tue Aug 05 2008 prusnak@suse.cz
- updated to 2.2.10
  * added --indent-label and --linux-style options to control
  indentation of goto labels and supply a canned set of settings
  that closely matches the preferred style for the linux kernel
  * GPLv3 is used now
- removed obsoleted patches:
  * overflow.patch (included in update)
* Sun Feb 24 2008 crrodriguez@suse.de
- use find_lang macro
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Dec 14 2004 sndirsch@suse.de
- moved chinese mo file to correct directory (Bug #47262)
* Wed Sep 15 2004 aj@suse.de
- Fix compiler warnings.
* Wed Jun 30 2004 tcrhak@suse.cz
- removed texinfo2man from the file list (bug #42247)
* Fri Apr 16 2004 mmj@suse.de
- Functions that are void should be declared as such
* Thu Mar 04 2004 tcrhak@suse.cz
- security fix for overflow (bug #33790)
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Wed May 14 2003 mmj@suse.de
- Remove unwanted files
* Thu Apr 24 2003 ro@suse.de
- fix install_info --delete call and move from preun to postun
* Thu Feb 13 2003 mmj@suse.de
- Add %%install_info macro [#23428]
* Mon Jan 06 2003 tcrhak@suse.cz
- update to version 2.2.9
* Sat Jul 13 2002 tcrhak@suse.cz
- update to version 2.2.8a
* Thu Oct 04 2001 schwab@suse.de
- Don't run automake/autoconf.
* Sun Dec 03 2000 smid@suse.cz
- New version 2.2.6
* Thu Feb 10 2000 kukuk@suse.de
- Update to 2.2.5
- Move /usr/{info,man} -> /usr/share/{info,man}
* Sun Oct 10 1999 kukuk@suse.de
- Update to version 2.2.3
- Use BuildRoot
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Tue Sep 07 1999 kukuk@suse.de
- Add make to build section
* Thu Aug 26 1999 kukuk@suse.de
- Update to version 2.2.0
* Tue Feb 23 1999 ro@suse.de
- dont redefine memcpy for glibc-2.1
* Thu Jan 21 1999 ro@suse.de
- no m486 on alpha
- include <string.h> in indent.c