3b3970d
Summary:         Analyzes C files charting control flow within the program
3b3970d
Name:            cflow
3b3970d
Version:         1.2
3b3970d
Release:         2%{?dist}
3b3970d
License:         GPLv2+
3b3970d
Group:           Development/Languages
3b3970d
URL:             http://www.gnu.org/software/cflow/
3b3970d
Source0:         http://ftp.gnu.org/gnu/cflow/%{name}-%{version}.tar.gz
3b3970d
BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
3b3970d
# to install lisp files
3b3970d
BuildRequires:   emacs
3b3970d
Requires(post):  info
3b3970d
Requires(preun): info
3b3970d
3b3970d
%description
3b3970d
GNU cflow analyzes a collection of C source files and prints a graph,
3b3970d
charting control flow within the program.
3b3970d
3b3970d
GNU cflow is able to produce both direct and inverted flowgraphs for C
3b3970d
sources. Optionally a cross-reference listing can be generated. Two
3b3970d
output formats are implemented: POSIX and GNU (extended).
3b3970d
3b3970d
%prep
3b3970d
%setup -q
3b3970d
3b3970d
%build
3b3970d
export CFLAGS="%{optflags}"
3b3970d
./configure --prefix=%{_prefix}  --libdir=%{_libdir}
3b3970d
%{__make} %{?_smp_flags}
3b3970d
3b3970d
%install
3b3970d
%{__rm} -rf %{buildroot}
3b3970d
%{__make} DESTDIR=%{buildroot} INSTALL='%{__install} -p' install
3b3970d
%find_lang %{name}
3b3970d
%{__rm} -f %{buildroot}/%{_infodir}/dir
3b3970d
3b3970d
%clean
3b3970d
%{__rm} -rf %{buildroot}
3b3970d
3b3970d
%check
3b3970d
%{__make} check
3b3970d
3b3970d
%post
3b3970d
/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
3b3970d
3b3970d
%preun
3b3970d
if [ $1 = 0 ] ; then
3b3970d
    /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
3b3970d
fi
3b3970d
3b3970d
%files -f %{name}.lang
3b3970d
%defattr(-, root, root, -)
3b3970d
%doc AUTHORS ChangeLog COPYING NEWS README THANKS TODO
3b3970d
%{_bindir}/%{name}
3b3970d
%{_infodir}/%{name}.info.gz
3b3970d
%{_datadir}/emacs/site-lisp/%{name}-mode.el
3b3970d
3b3970d
%changelog
3b3970d
* Fri May 16 2008 Terje Rosten <terje.rosten@ntnu.no> - 1.2-2
3b3970d
- add emacs to buildreq
3b3970d
3b3970d
* Wed May 14 2008 Terje Rosten <terje.rosten@ntnu.no> - 1.2-1
3b3970d
- initial build
3b3970d