Blame SPECS/cscope.spec

4ea5ec
Summary: C source code tree search and browse tool
4ea5ec
Name: cscope
4ea5ec
Version: 15.9
a70d0e
Release: 17%{?dist}
565b65
Source0: https://downloads.sourceforge.net/project/%{name}/%{name}/v%{version}/%{name}-%{version}.tar.gz
4ea5ec
URL: http://cscope.sourceforge.net
4ea5ec
License: BSD and GPLv2+
565b65
BuildRequires: pkgconf-pkg-config ncurses-devel gcc flex bison m4
565b65
BuildRequires: autoconf automake make
565b65
Requires: emacs-filesystem coreutils ed
565b65
%if !0%{?rhel} && 0%{?fedora} < 36
4ea5ec
Requires: xemacs-filesystem
4ea5ec
%endif
4ea5ec
565b65
# upstream commits from https://sourceforge.net/p/cscope/cscope/commit_browser
565b65
Patch1: cscope-1-modified-from-patch-81-Fix-reading-include-files-in-.patch
565b65
Patch2: cscope-2-Cull-extraneous-declaration.patch
565b65
Patch3: cscope-3-Avoid-putting-directories-found-during-header-search.patch
565b65
Patch4: cscope-4-Avoid-double-free-via-double-fclose-in-changestring.patch
565b65
Patch5: cscope-5-contrib-ocs-Fix-bashims-Closes-480591.patch
565b65
Patch6: cscope-6-doc-cscope.1-Fix-hyphens.patch
565b65
Patch7: cscope-7-fscanner-swallow-function-as-parameters.patch
565b65
# this patch is not needed - RHEL8 has emacs-26.1
565b65
# Patch8: cscope-8-emacs-plugin-fixup-GNU-Emacs-27.1-removes-function-p.patch
a70d0e
Patch9: cscope-9-fix-access-beyond-end-of-string.patch
a70d0e
Patch10: cscope-a-docs-typo-fixes-in-man-page-and-comments.patch
a70d0e
565b65
# distrubution patches which were not upstreamed
a70d0e
Patch11: dist-1-coverity-fixes.patch
a70d0e
Patch12: dist-2-cscope-indexer-help.patch
a70d0e
Patch13: dist-3-add-selftests.patch
a70d0e
Patch14: dist-4-fix-printf.patch
4ea5ec
4ea5ec
%define cscope_share_path %{_datadir}/cscope
565b65
%if !0%{?rhel} && 0%{?fedora} < 36
4ea5ec
%define xemacs_lisp_path %{_datadir}/xemacs/site-packages/lisp
565b65
%else
565b65
%define xemacs_lisp_path %nil
565b65
%endif
4ea5ec
%define emacs_lisp_path %{_datadir}/emacs/site-lisp
4ea5ec
%define vim_plugin_path %{_datadir}/vim/vimfiles/plugin
4ea5ec
4ea5ec
%description
4ea5ec
cscope is a mature, ncurses based, C source code tree browsing tool.  It
4ea5ec
allows users to search large source code bases for variables, functions,
4ea5ec
macros, etc, as well as perform general regex and plain text searches.
4ea5ec
Results are returned in lists, from which the user can select individual
4ea5ec
matches for use in file editing.
4ea5ec
4ea5ec
%prep
4ea5ec
%autosetup -p1
4ea5ec
4ea5ec
%build
4ea5ec
aclocal
4ea5ec
autoheader
4ea5ec
autoconf
4ea5ec
automake --add-missing
4ea5ec
%configure
4ea5ec
make
4ea5ec
4ea5ec
%install
4ea5ec
rm -rf $RPM_BUILD_ROOT %{name}-%{version}.files
4ea5ec
make DESTDIR=$RPM_BUILD_ROOT install
4ea5ec
mkdir -p $RPM_BUILD_ROOT/var/lib/cs
4ea5ec
mkdir -p $RPM_BUILD_ROOT%{cscope_share_path}
4ea5ec
cp -a contrib/xcscope/xcscope.el $RPM_BUILD_ROOT%{cscope_share_path}
4ea5ec
install -m 755 contrib/xcscope/cscope-indexer $RPM_BUILD_ROOT%{_bindir}
4ea5ec
cp -a contrib/cctree.vim $RPM_BUILD_ROOT%{cscope_share_path}
4ea5ec
for dir in %{xemacs_lisp_path} %{emacs_lisp_path} ; do
4ea5ec
  mkdir -p $RPM_BUILD_ROOT$dir
4ea5ec
  ln -s %{cscope_share_path}/xcscope.el $RPM_BUILD_ROOT$dir
4ea5ec
  touch $RPM_BUILD_ROOT$dir/xcscope.elc
4ea5ec
  echo "%ghost $dir/xcscope.el*" >> %{name}-%{version}.files
4ea5ec
done
4ea5ec
565b65
%check
565b65
make check
565b65
4ea5ec
%files -f %{name}-%{version}.files
4ea5ec
%{_bindir}/*
4ea5ec
%dir %{cscope_share_path}
4ea5ec
%{cscope_share_path}/
4ea5ec
%{_mandir}/man1/*
4ea5ec
%dir /var/lib/cs
4ea5ec
%doc AUTHORS COPYING ChangeLog README TODO contrib/cctree.txt
4ea5ec
565b65
%if !0%{?rhel} && 0%{?fedora} < 36
4ea5ec
%triggerin -- xemacs
4ea5ec
ln -sf %{cscope_share_path}/xcscope.el %{xemacs_lisp_path}/xcscope.el
4ea5ec
%endif
4ea5ec
4ea5ec
%triggerin -- emacs, emacs-nox, emacs-lucid
4ea5ec
ln -sf %{cscope_share_path}/xcscope.el %{emacs_lisp_path}/xcscope.el
4ea5ec
4ea5ec
%triggerin -- vim-filesystem
4ea5ec
ln -sf %{cscope_share_path}/cctree.vim %{vim_plugin_path}/cctree.vim
4ea5ec
565b65
%if !0%{?rhel} && 0%{?fedora} < 36
4ea5ec
%triggerun -- xemacs
4ea5ec
[ $2 -gt 0 ] && exit 0
4ea5ec
rm -f %{xemacs_lisp_path}/xcscope.el
4ea5ec
%endif
4ea5ec
4ea5ec
%triggerun -- emacs, emacs-nox, emacs-lucid
4ea5ec
[ $2 -gt 0 ] && exit 0
4ea5ec
rm -f %{emacs_lisp_path}/xcscope.el
4ea5ec
4ea5ec
%triggerun -- vim-filesystem
4ea5ec
[ $2 -gt 0 ] && exit 0
4ea5ec
rm -f %{vim_plugin_path}/cctree.vim
4ea5ec
4ea5ec
%changelog
a70d0e
* Thu Sep 29 2022 Vladis Dronov <vdronov@redhat.com> - 15.9-17
a70d0e
- Update to the upstream git @ 7f2369ac (bz 2129887)
a70d0e
565b65
* Fri Apr 22 2022 Vladis Dronov <vdronov@redhat.com> - 15.9-11
565b65
- Add another small distrubution patch (bz 2074437)
565b65
565b65
* Mon Apr 11 2022 Vladis Dronov <vdronov@redhat.com> - 15.9-10
565b65
- Add missing upstream patches (bz 2074437)
565b65
4ea5ec
* Wed Oct 21 2020 Vladis Dronov <vdronov@redhat.com> - 15.9-9
4ea5ec
- Remove another fclose() to please covscan (bz1886165)
4ea5ec
4ea5ec
* Wed Oct 07 2020 Vladis Dronov <vdronov@redhat.com> - 15.9-8
4ea5ec
- Fix a double-free in changestring() (bz1886165)
4ea5ec
- Update Requires to include coreutils and ed
4ea5ec
- Adjust cscope-coverity-fixes.patch removing the fclose(script) chunk
4ea5ec
- Adjust BuildRequires and remove trailing spaces
4ea5ec
- Remove older source version from .gitignore
4ea5ec
- Rename cscope-invindex-sizing.patch as it is for the older upstream version
4ea5ec
4ea5ec
* Tue Jun 25 2019 Neil Horman <nhorman@redhat.com> - 15.9-6
4ea5ec
- Fix covscan warning (bz 1722404)
4ea5ec
4ea5ec
* Mon Jun 24 2019 Neil Horman <nhorman@redhat.com> - 15.9-5
4ea5ec
- update help for cscope-indexer (bz 1722404)
4ea5ec
4ea5ec
* Mon Jun 03 2019 Neil Horman <nhorman@redhat.com> - 15.9-4
4ea5ec
- Fix cscope version (bz 1685920)
4ea5ec
4ea5ec
* Thu Feb 28 2019 Neil Horman <nhorman@redhat.com> - 15.9-3
4ea5ec
- Add CI test harness (bz 1682353)
4ea5ec
4ea5ec
* Fri Oct 12 2018 Neil Horman <nhorman@redhat.com> - 15.9-2
4ea5ec
- Fix up some coverity scan issues (bz 1602468)
4ea5ec
4ea5ec
* Tue Jul 24 2018 Neil Horman <nhorman@redhat.com> - 15.9-1
4ea5ec
- Update to latest upstream with coverity fixes (bz 1602468)
4ea5ec
4ea5ec
* Thu Mar 01 2018 Josh Boyer <jwboyer@fedoraproject.org> - 15.8b-8
4ea5ec
- Conditionalize xemacs
4ea5ec
4ea5ec
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-7
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4ea5ec
4ea5ec
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-6
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
4ea5ec
4ea5ec
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-5
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4ea5ec
4ea5ec
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-4
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4ea5ec
4ea5ec
* Mon Nov 28 2016 Neil Horman <nhorman@redhat.com> - 15.8b-3
4ea5ec
- Changed permissions on cscope-indexer (bz 1399108)
4ea5ec
4ea5ec
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-2
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4ea5ec
4ea5ec
* Wed Aug 05 2015 Neil Horman <nhorman@redhat.com> - 15.8b-1
4ea5ec
- Update to latest upstream
4ea5ec
565b65
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-12
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4ea5ec
4ea5ec
* Tue Sep 30 2014 Neil Horman <nhorman@redhat.com> - 15.8-11
4ea5ec
- Added triggerin support for emacs-nox (bz 961709)
4ea5ec
4ea5ec
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-10
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
4ea5ec
4ea5ec
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-9
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4ea5ec
4ea5ec
* Tue Apr 15 2014 Neil Horman <nhorman@redhat.com> - 15.8-8
4ea5ec
- Fixed formatting issue with empty function array (bz 1087940)
4ea5ec
4ea5ec
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-7
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4ea5ec
4ea5ec
* Mon Mar 25 2013 Neil Horman <nhorman@redhat.com> - 15.8-6
4ea5ec
- Fixed build break
4ea5ec
4ea5ec
* Mon Mar 25 2013 Neil Horman <nhorman@redhat.com> - 15.8-5
4ea5ec
- Updated to run autoreconf for impending aarch64 introduction (bz 925201)
4ea5ec
4ea5ec
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-4
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4ea5ec
4ea5ec
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-3
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4ea5ec
4ea5ec
* Tue Jul 10 2012 Neil Horman <nhorman@redhat.com> - 15.8-2
4ea5ec
- Fix inverted index sizing
4ea5ec
4ea5ec
* Mon Jun 18 2012 Neil Horman <nhorman@redhat.com> - 15.8
4ea5ec
- Update to latest upstream
4ea5ec
4ea5ec
* Mon Mar 12 2012 Neil Horman <nhorman@redhat.com> -15.7a-10
4ea5ec
- Fixed a segfault in invlib construction ( bz 786523)
4ea5ec
4ea5ec
* Mon Mar 05 2012 Neil Horman <nhorman@redhat.com> 15.7a-9
4ea5ec
- Fixed a segfault in the symbol assignment search (bz 799643)
4ea5ec
4ea5ec
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.7a-8
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4ea5ec
4ea5ec
* Thu Jun 30 2011 Neil Horman <nhorman@redhat.com> - 15.7a-7
4ea5ec
- Added LEXERR token to catch bad parsing before we crash (bz717545)
4ea5ec
4ea5ec
* Fri Jun 24 2011 Neil Horman <nhorman@redhat.com> - 15.7a-6
4ea5ec
- Fixed licensing for xcscope.el (bz 715898)
4ea5ec
- Fixed xemacs pkg. dependency (bz 719523)
4ea5ec
4ea5ec
* Wed Jun 01 2011 Neil Horman <nhorman@redhat.com> - 15.7a-5
4ea5ec
- Fix scriptles macro expansion (bz 708499)
4ea5ec
4ea5ec
* Thu May 26 2011 Neil Horman <nhorman@redhat.com> - 15.7a-4
4ea5ec
- Added cctree.vim vi plugin
4ea5ec
4ea5ec
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.7a-3
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4ea5ec
4ea5ec
* Thu Sep 30 2010 Neil Horman 
4ea5ec
- Ignore SIGPIPE in line mode (bz 638756)
4ea5ec
4ea5ec
* Mon Mar 1 2010 Neil Horman <nhorman@redhat.com> - 15.7a-1
4ea5ec
- Update to latest upstream release (bz 569043)
4ea5ec
4ea5ec
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.6-5
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
4ea5ec
4ea5ec
* Fri Jun 12 2009 Neil Horman <nhorman@redhat.com>
4ea5ec
- Fix some buffer overflows (bz 505605)
4ea5ec
4ea5ec
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.6-3
4ea5ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
4ea5ec
4ea5ec
* Tue Jul 08 2008 Neil Horman <nhorman@redhat.com> -15.6-2.dist
4ea5ec
- Grab upstream patch for -q rebuld (bz 436648)
4ea5ec
4ea5ec
* Tue Mar 27 2007 Neil Horman <nhorman@redhat.com> -15.6-1.dist
4ea5ec
- Rebase to version 15.6
4ea5ec
4ea5ec
* Mon Mar 05 2007 Neil Horman <nhorman@redhat.com> -15.5-15.4.dist
4ea5ec
- Make sigwinch handler only register for curses mode (bz 230862)
4ea5ec
4ea5ec
* Mon Feb 05 2007 Neil Horman <nhorman@redhat.com> -15.5-15.3.dist
4ea5ec
- Fixing dist label in release tag.
4ea5ec
4ea5ec
* Thu Feb 01 2007 Neil Horman <nhorman@redhat.com> -15.5-15.2.dist
4ea5ec
- Fixing changelog to not have macro in release
4ea5ec
4ea5ec
* Wed Aug 23 2006 Neil Horman <nhorman@redhat.com> -15.5-15.1
4ea5ec
- fixed overflows per bz 203651
4ea5ec
- start using {dist} tag to make release numbering easier
4ea5ec
4ea5ec
* Mon Jul 17 2006 Jesse Keating <jkeating@redhat.com> - 15.5-14
4ea5ec
- rebuild
4ea5ec
4ea5ec
* Fri Jun 23 2006 Neil Horman <nhorman@redhat.com>
4ea5ec
- Fix putstring overflow (bz 189666)
4ea5ec
4ea5ec
* Fri Jun 23 2006 Neil Horman <nhorman@redhat.com>
4ea5ec
- Fix putstring overflow (bz 189666)
4ea5ec
4ea5ec
* Fri May 5  2006 Neil Horman <nhorman@redhat.com>
4ea5ec
- Adding fix to put SYSDIR in right location (bz190580)
4ea5ec
4ea5ec
* Fri Apr 21 2006 Neil Horman <nhorman@redhat.com> - 15.5-13.4
4ea5ec
- adding inverted index overflow patch
4ea5ec
4ea5ec
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 15.5-13.2
4ea5ec
- bump again for double-long bug on ppc(64)
4ea5ec
4ea5ec
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 15.5-13.1
4ea5ec
- rebuilt for new gcc4.1 snapshot and glibc changes
4ea5ec
4ea5ec
* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
4ea5ec
- rebuild on new gcc
4ea5ec
4ea5ec
* Tue Nov 30 2004 Neil Horman <nhorman@redhat.com>
4ea5ec
- added tempsec patch to fix bz140764/140765
4ea5ec
4ea5ec
* Mon Nov 29 2004 Neil Horman <nhorman@redhat.com>
4ea5ec
- updated cscope resize patch to do less work in
4ea5ec
  signal handler and synced version nr. on dist.
4ea5ec
4ea5ec
* Mon Nov 22 2004 Neil Horman <nhorman@redhat.com>
4ea5ec
- added cscope-1.5.-resize patch to allow terminal
4ea5ec
  resizing while cscope is running
4ea5ec
4ea5ec
* Tue Oct 5  2004 Neil Horman <nhorman@redhat.com>
4ea5ec
- modified cscope-15.5.-inverted patch to be upstream
4ea5ec
  friendly
4ea5ec
4ea5ec
* Tue Sep 28 2004 Neil Horman <nhorman@redhat.com>
4ea5ec
- fixed inverted index bug (bz 133942)
4ea5ec
4ea5ec
* Mon Sep 13 2004 Frank Ch. Eigler <fche@redhat.com>
4ea5ec
- bumped release number to a plain "1"
4ea5ec
4ea5ec
* Fri Jul 16 2004 Neil Horman <nhorman@redhat.com>
4ea5ec
- Added cscope-indexer helper and xcscope lisp addon
4ea5ec
- Added man page for xcscope
4ea5ec
- Added triggers to add xcscope.el pkg to (x)emacs
4ea5ec
- Thanks to Ville, Michael and Jens for thier help :)
4ea5ec
4ea5ec
* Fri Jul 2 2004 Neil Horman <nhorman@redhat.com>
4ea5ec
- Added upstream ocs fix
4ea5ec
- Added feature to find symbol assignments
4ea5ec
- Changed default SYSDIR directory to /var/lib/cs
4ea5ec
- Incoproated M. Schwendt's fix for ocs -s
4ea5ec
4ea5ec
* Fri Jun 18 2004 Neil Horman <nhorman@redhat.com>
4ea5ec
- built the package