Summary: Generates function prototypes and variable declarations from C code.
Summary(ja): C コードから関数プロトタイプと変数宣言を生成するツール
Name: cproto
Version: 4.7c
Release: 6%{?_dist_release}
License: Public Domain
Group: Development/Tools
Source: ftp://invisible-island.net/cproto/cproto-4_7c.tgz
Patch1: cproto-4.6.1-patch
Patch2: cproto-4.6-varargs.patch
Patch3: cproto-4.6-bison.patch
Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-root


%description
Cproto generates function prototypes and variable declarations from C
source code. Cproto can also convert function definitions between the
old style and the ANSI C style. This conversion will overwrite the
original files, however, so be sure to make a backup copy of your
original files in case something goes wrong. Cproto uses a Yacc
generated parser, so it should not be confused by complex function
definitions as much as other prototype generators.

%description -l ja
cproto は C のソースコードから関数プロトタイプと変数宣言を生成します．
cproto は古い形式と ANSI C 形式の関数定義の相互変換も行うことが出来ます．
この変換を行うとオリジナルのファイルを上書きしてしまいますので，もしもの
時の為にオリジナルファイルのバックアップは必ず取っておいて下さい．
cproto は yacc により生成された解析器を使用しますので，他のプロトタイプ
生成プログラムとは異なり，複雑な関数定義も難なく処理出来ます．

cproto は C プログラマにとっては便利なプログラムですので，
C でプログラムをする際には cproto をインストールして下さい．


%prep
%setup -q -n cproto-4_7c

%build
export CPP="/lib/cpp"
export CPPFLAGS="-DOPT_LINTLIBRARY $RPM_OPT_FLAGS"
export CFLAGS="-DOPT_LINTLIBRARY $RPM_OPT_FLAGS"
%configure --exec-prefix=%{_prefix}
make


%install
rm -rf $RPM_BUILD_ROOT

%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%doc CHANGES README
%{_prefix}/bin/cproto
%{_mandir}/man1/cproto.*


%changelog
* Sun Sep 21 2008 Shu KONNO <owa@bg.wakwak.com> 4.7c-6vl5
- applied new versioning policy, spec in utf-8

* Sun Apr 17 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7c-5vl1
- based on 4.7c-5 from Fedora development
  * Wed Feb  9 2005 Jindrich Novy <jnovy@redhat.com> 4.7c-4
  - add RPM_OPT_FLAGS to CFLAGS
  - convert Copyright to License
  - rebuild with -D_FORTIFY_SOURCE=2
  * Thu Oct 14 2004 Jindrich Novy <jnovy@redhat.com> 4.7c-3
  - define OPT_LINTLIBRARY to enable type definitions output
    and other cproto features disabled otherwise
- s/Copyright/License/
- updated URL

* Wed Dec 04 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.6-13vl1
- based on 4.6-13 from Rawhide and built for Vine Linux
- added Japanese summary and description

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Jun 17 2002 Bill Nottingham <notting@redhat.com> 4.6-12
- don't strip it

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Aug 13 2001 Bill Nottingham <notting@redhat.com>
- predefine __builtin_va_list (#46246, original patch from <urban@teststation.com>)

* Tue Jun 12 2001 Bill Nottingham <notting@redhat.com>
- actually *apply* the 4.6.1 patch. Fixes #35654, at least.

* Fri Dec 01 2000 Bill Nottingham <notting@redhat.com>
- rebuild because of broken fileutils

* Mon Oct 13 2000 Bill Nottingham <notting@redhat.com>
- use /lib/cpp, not gcc -E, again (#20535)

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Tue Jun  6 2000 Bill Nottingham <notting@redhat.com>
- rebuild against glibc-2.2, FHS stuff

* Tue Feb  1 2000 Bill Nottingham <notting@redhat.com>
- use /lib/cpp, not gcc -E (#8612)

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 2)

* Mon Mar 15 1999 Jeff Johnson <jbj@redhat.com>
- update to 4.6.1 (#1516).
- use %configure

* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com>
- build for 6.0

* Sat Aug 15 1998 Jeff Johnson <jbj@redhat.com>
- build root

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Jul 10 1997 Erik Troan <ewt@redhat.com>
- built against glibc
