Blob Blame Raw
Summary:         Analyzes C files charting control flow within the program
Name:            cflow
Version:         1.2
Release:         2%{?dist}
License:         GPLv2+
Group:           Development/Languages
URL:             http://www.gnu.org/software/cflow/
Source0:         http://ftp.gnu.org/gnu/cflow/%{name}-%{version}.tar.gz
BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# to install lisp files
BuildRequires:   emacs
Requires(post):  info
Requires(preun): info

%description
GNU cflow analyzes a collection of C source files and prints a graph,
charting control flow within the program.

GNU cflow is able to produce both direct and inverted flowgraphs for C
sources. Optionally a cross-reference listing can be generated. Two
output formats are implemented: POSIX and GNU (extended).

%prep
%setup -q

%build
export CFLAGS="%{optflags}"
./configure --prefix=%{_prefix}  --libdir=%{_libdir}
%{__make} %{?_smp_flags}

%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} INSTALL='%{__install} -p' install
%find_lang %{name}
%{__rm} -f %{buildroot}/%{_infodir}/dir

%clean
%{__rm} -rf %{buildroot}

%check
%{__make} check

%post
/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || :

%preun
if [ $1 = 0 ] ; then
    /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
fi

%files -f %{name}.lang
%defattr(-, root, root, -)
%doc AUTHORS ChangeLog COPYING NEWS README THANKS TODO
%{_bindir}/%{name}
%{_infodir}/%{name}.info.gz
%{_datadir}/emacs/site-lisp/%{name}-mode.el

%changelog
* Fri May 16 2008 Terje Rosten <terje.rosten@ntnu.no> - 1.2-2
- add emacs to buildreq

* Wed May 14 2008 Terje Rosten <terje.rosten@ntnu.no> - 1.2-1
- initial build