Blame SPECS/cscope.spec

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