2022-04-11 18:37:00 +00:00
|
|
|
Summary: C source code tree search and browse tool
|
2004-09-13 15:47:43 +00:00
|
|
|
Name: cscope
|
2018-07-24 17:37:21 +00:00
|
|
|
Version: 15.9
|
2024-06-24 15:39:34 +00:00
|
|
|
Release: 24%{?dist}
|
2021-03-16 14:55:50 +00:00
|
|
|
Source0: https://downloads.sourceforge.net/project/%{name}/%{name}/v%{version}/%{name}-%{version}.tar.gz
|
2004-09-13 15:47:43 +00:00
|
|
|
URL: http://cscope.sourceforge.net
|
2024-03-22 19:21:14 +00:00
|
|
|
License: BSD-3-Clause AND GPL-2.0-or-later
|
2022-04-11 18:37:00 +00:00
|
|
|
BuildRequires: pkgconf-pkg-config ncurses-devel gcc flex bison m4
|
|
|
|
BuildRequires: autoconf automake make
|
|
|
|
Requires: emacs-filesystem coreutils ed
|
2021-11-09 23:41:38 +00:00
|
|
|
%if !0%{?rhel} && 0%{?fedora} < 36
|
2018-03-01 19:19:18 +00:00
|
|
|
Requires: xemacs-filesystem
|
|
|
|
%endif
|
2004-09-13 15:47:43 +00:00
|
|
|
|
2022-04-11 18:37:00 +00:00
|
|
|
# upstream commits from https://sourceforge.net/p/cscope/cscope/commit_browser
|
2021-03-16 14:55:50 +00:00
|
|
|
Patch1: cscope-1-modified-from-patch-81-Fix-reading-include-files-in-.patch
|
|
|
|
Patch2: cscope-2-Cull-extraneous-declaration.patch
|
|
|
|
Patch3: cscope-3-Avoid-putting-directories-found-during-header-search.patch
|
|
|
|
Patch4: cscope-4-Avoid-double-free-via-double-fclose-in-changestring.patch
|
|
|
|
Patch5: cscope-5-contrib-ocs-Fix-bashims-Closes-480591.patch
|
|
|
|
Patch6: cscope-6-doc-cscope.1-Fix-hyphens.patch
|
|
|
|
Patch7: cscope-7-fscanner-swallow-function-as-parameters.patch
|
|
|
|
Patch8: cscope-8-emacs-plugin-fixup-GNU-Emacs-27.1-removes-function-p.patch
|
2022-09-27 18:32:04 +00:00
|
|
|
Patch9: cscope-9-fix-access-beyond-end-of-string.patch
|
|
|
|
Patch10: cscope-a-docs-typo-fixes-in-man-page-and-comments.patch
|
|
|
|
|
2022-04-11 18:37:00 +00:00
|
|
|
# distrubution patches which were not upstreamed
|
2022-09-27 18:32:04 +00:00
|
|
|
Patch11: dist-1-coverity-fixes.patch
|
|
|
|
Patch12: dist-2-cscope-indexer-help.patch
|
|
|
|
Patch13: dist-3-add-selftests.patch
|
|
|
|
Patch14: dist-4-fix-printf.patch
|
2019-04-16 14:56:27 +00:00
|
|
|
|
2004-09-13 15:47:43 +00:00
|
|
|
%define cscope_share_path %{_datadir}/cscope
|
2021-11-09 23:41:38 +00:00
|
|
|
%if !0%{?rhel} && 0%{?fedora} < 36
|
2004-09-13 15:47:43 +00:00
|
|
|
%define xemacs_lisp_path %{_datadir}/xemacs/site-packages/lisp
|
2021-11-09 23:41:38 +00:00
|
|
|
%else
|
|
|
|
%define xemacs_lisp_path %nil
|
|
|
|
%endif
|
2004-09-13 15:47:43 +00:00
|
|
|
%define emacs_lisp_path %{_datadir}/emacs/site-lisp
|
2011-06-01 13:20:53 +00:00
|
|
|
%define vim_plugin_path %{_datadir}/vim/vimfiles/plugin
|
2004-09-13 15:47:43 +00:00
|
|
|
|
|
|
|
%description
|
2022-04-11 18:37:00 +00:00
|
|
|
cscope is a mature, ncurses based, C source code tree browsing tool. It
|
2004-09-13 15:47:43 +00:00
|
|
|
allows users to search large source code bases for variables, functions,
|
2022-04-11 18:37:00 +00:00
|
|
|
macros, etc, as well as perform general regex and plain text searches.
|
|
|
|
Results are returned in lists, from which the user can select individual
|
2004-09-13 15:47:43 +00:00
|
|
|
matches for use in file editing.
|
|
|
|
|
|
|
|
%prep
|
2022-04-11 18:37:00 +00:00
|
|
|
%autosetup -p1
|
2004-09-13 15:47:43 +00:00
|
|
|
|
|
|
|
%build
|
2022-04-11 18:37:00 +00:00
|
|
|
aclocal
|
|
|
|
autoheader
|
|
|
|
autoconf
|
|
|
|
automake --add-missing
|
2004-09-13 15:47:43 +00:00
|
|
|
%configure
|
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT %{name}-%{version}.files
|
2022-04-11 18:37:00 +00:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2004-09-13 15:47:43 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/lib/cs
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{cscope_share_path}
|
|
|
|
cp -a contrib/xcscope/xcscope.el $RPM_BUILD_ROOT%{cscope_share_path}
|
2016-11-28 14:27:09 +00:00
|
|
|
install -m 755 contrib/xcscope/cscope-indexer $RPM_BUILD_ROOT%{_bindir}
|
2011-05-26 20:01:23 +00:00
|
|
|
cp -a contrib/cctree.vim $RPM_BUILD_ROOT%{cscope_share_path}
|
2004-09-13 15:47:43 +00:00
|
|
|
for dir in %{xemacs_lisp_path} %{emacs_lisp_path} ; do
|
|
|
|
mkdir -p $RPM_BUILD_ROOT$dir
|
|
|
|
ln -s %{cscope_share_path}/xcscope.el $RPM_BUILD_ROOT$dir
|
|
|
|
touch $RPM_BUILD_ROOT$dir/xcscope.elc
|
|
|
|
echo "%ghost $dir/xcscope.el*" >> %{name}-%{version}.files
|
|
|
|
done
|
|
|
|
|
2022-04-11 18:37:00 +00:00
|
|
|
%check
|
|
|
|
make check
|
2004-09-13 15:47:43 +00:00
|
|
|
|
|
|
|
%files -f %{name}-%{version}.files
|
|
|
|
%{_bindir}/*
|
|
|
|
%dir %{cscope_share_path}
|
2011-05-26 20:01:23 +00:00
|
|
|
%{cscope_share_path}/
|
2004-09-13 15:47:43 +00:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
%dir /var/lib/cs
|
2011-05-26 20:01:23 +00:00
|
|
|
%doc AUTHORS COPYING ChangeLog README TODO contrib/cctree.txt
|
2004-09-13 15:47:43 +00:00
|
|
|
|
2021-11-09 23:41:38 +00:00
|
|
|
%if !0%{?rhel} && 0%{?fedora} < 36
|
2004-09-13 15:47:43 +00:00
|
|
|
%triggerin -- xemacs
|
|
|
|
ln -sf %{cscope_share_path}/xcscope.el %{xemacs_lisp_path}/xcscope.el
|
2018-03-01 19:19:18 +00:00
|
|
|
%endif
|
2004-09-13 15:47:43 +00:00
|
|
|
|
2018-07-24 17:37:21 +00:00
|
|
|
%triggerin -- emacs, emacs-nox, emacs-lucid
|
2004-09-13 15:47:43 +00:00
|
|
|
ln -sf %{cscope_share_path}/xcscope.el %{emacs_lisp_path}/xcscope.el
|
|
|
|
|
2011-05-26 20:01:23 +00:00
|
|
|
%triggerin -- vim-filesystem
|
|
|
|
ln -sf %{cscope_share_path}/cctree.vim %{vim_plugin_path}/cctree.vim
|
|
|
|
|
2021-11-09 23:41:38 +00:00
|
|
|
%if !0%{?rhel} && 0%{?fedora} < 36
|
2004-09-13 15:47:43 +00:00
|
|
|
%triggerun -- xemacs
|
|
|
|
[ $2 -gt 0 ] && exit 0
|
|
|
|
rm -f %{xemacs_lisp_path}/xcscope.el
|
2018-03-01 19:19:18 +00:00
|
|
|
%endif
|
2004-09-13 15:47:43 +00:00
|
|
|
|
2018-07-24 17:37:21 +00:00
|
|
|
%triggerun -- emacs, emacs-nox, emacs-lucid
|
2004-09-13 15:47:43 +00:00
|
|
|
[ $2 -gt 0 ] && exit 0
|
|
|
|
rm -f %{emacs_lisp_path}/xcscope.el
|
|
|
|
|
2011-05-26 20:01:23 +00:00
|
|
|
%triggerun -- vim-filesystem
|
|
|
|
[ $2 -gt 0 ] && exit 0
|
|
|
|
rm -f %{vim_plugin_path}/cctree.vim
|
|
|
|
|
2004-09-13 15:47:43 +00:00
|
|
|
%changelog
|
2024-06-24 15:39:34 +00:00
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 15.9-24
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
2024-03-27 15:49:19 +00:00
|
|
|
* Mon Apr 01 2024 Vladis Dronov <vdronov@redhat.com> - 15.9-23
|
|
|
|
- Add OSCI harness
|
|
|
|
- Add self-tests
|
|
|
|
|
2024-03-22 19:21:14 +00:00
|
|
|
* Thu Feb 01 2024 Vladis Dronov <vdronov@redhat.com> - 15.9-22
|
2024-03-27 14:18:43 +00:00
|
|
|
- Use proper SPDX license identifiers (RHEL-30639)
|
2024-03-22 19:21:14 +00:00
|
|
|
|
2024-03-27 14:18:43 +00:00
|
|
|
* Fri Jan 26 2024 Vladis Dronov <vdronov@redhat.com> - 15.9-21
|
|
|
|
- Initial import from Fedora 40
|