File cscope.spec of Package cscope

#
# spec file for package cscope (Version 15.7a)
#
# Copyright (c) 2009 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:           cscope
BuildRequires:  ncurses-devel
BuildRequires:  flex
BuildRequires:  bison
License:        BSD 3-Clause
Group:          Development/Tools/Navigators
AutoReqProv:    on
Version:        15.7a
Release:        1
Summary:        Interactive Tool for Browsing C Source Code
Source:         %{name}-%{version}.tar.bz2
Patch1:         %{name}-null.patch
Patch2:         %{name}-15.7-gcc-warnings.patch
Patch3:         %{name}-15.7-vpath.patch
Patch5:         %{name}-cleanup_on_sigterm.patch
Url:            http://cscope.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Cscope is an interactive, screen-oriented tool that allows the user to
browse through C source code files for specified elements of code.



Authors:
--------
    Petr Sorfa <petr@users.sourceforge.net>
    Mike Hopkirk <hops@sco.com>
    Darrylo Okahata <darrylo@users.sourceforge.net>
    Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
    Joshua Uziel <uzi@suse.com>

%prep
%setup -q
%patch1 -p1
%patch2
%patch3
%patch5

%build
%{?suse_update_config:%{suse_update_config}}
%configure
make

%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 755 src/cscope $RPM_BUILD_ROOT%{_bindir}/cscope
install -m 644 doc/cscope.1 $RPM_BUILD_ROOT%{_mandir}/man1/cscope.1
pushd contrib
%makeinstall
popd

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc TODO COPYING ChangeLog AUTHORS README NEWS INSTALL
%doc %{_mandir}/man1/cscope.1.gz
%{_bindir}/cscope
%{_bindir}/ocs

%changelog
* Mon May 04 2009 puzel@suse.cz
- updated to 15.7a
  - replace all calls of sprintf by snprintf to avoid
  possible buffer overflows
  remove cscope-15.7-sprintf.patch (obsolete)
* Sat Feb 14 2009 puzel@suse.cz
- update to 15.7
  - bugfix release
  - see /usr/share/doc/packages/cscope/ChangeLog for details
- added flex and bison to BR
- install ocsc helper script to bindir
* Wed Jun 18 2008 anosek@suse.cz
- fixed cscope segfaults when detaching from screen (bnc#398268)
  - applied attached patch (sigwinch-linemode.patch)
* Mon Dec 10 2007 pth@suse.de
- Cleanup on receiving SIGTERM (#339807) and actually include
  the patch.
- Don't remove buildroot in install section
* Fri Mar 30 2007 ro@suse.de
- added ncurses-devel to buildreq
* Fri Nov 10 2006 ro@suse.de
- fix manpage permissions
* Wed Oct 18 2006 anosek@suse.cz
- updated to version 15.6
  * fixed various security issues
- dropped obsolete CVE-2006-4262.patch, tmpfile.patch
* Wed Aug 30 2006 anosek@suse.cz
- fixed previous change
* Tue Aug 29 2006 anosek@suse.de
- fixed multiple buffer overflows [#200534] (CVE-2006-4262.pach)
* Mon May 29 2006 mmarek@suse.cz
- replace sprintf() with snprintf() (patch taken from debian
  package) to avoid buffer overflows such as CVE-2004-2541
  [#177568] (sprintf.patch)
* Mon Feb 27 2006 mmarek@suse.cz
- fix handling of empty VPATH components
  [#152643] (vpath.patch)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Sep 19 2005 mmarek@suse.cz
- fix "control reaches end of non-void function" warning in exec.c
* Sat Jan 29 2005 meissner@suse.de
- use NULL as execlp arglist terminator.
* Mon Nov 29 2004 ltinkl@suse.cz
- fix insecure temp file handling vulnerability (#48541)
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Tue Sep 30 2003 ltinkl@suse.cz
- updated to 15.5
- dropped obsolete patch
* Mon Jan 20 2003 vbobek@suse.cz
- updated to version 15.4 (bugfixes only)
- used $RPM_OPT_FLAGS
* Tue Dec 17 2002 sf@suse.de
- added suse_update_config (bug #22296)
* Thu Nov 07 2002 tcrhak@suse.cz
- fixed egrep.y for bison 1.75:
  use `{ action }' instead of `={ action }'
* Tue Sep 17 2002 ro@suse.de
- removed bogus self-provides
* Fri Aug 10 2001 pmladek@suse.cz
- updated to version 15.3
- bzipped sources
* Thu Mar 22 2001 pblaha@suse.cz
- add URL
* Fri Dec 01 2000 uzi@suse.com
- Initial package based on version 15.1