ctags/ctags.spec

83 lines
2.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package ctags
#
# Copyright (c) 2016 SUSE LINUX 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/
#
Name: ctags
Version: 5.8
Release: 0
Summary: A Program to Generate Tag Files for Use with vi and Other Editors
License: GPL-2.0+
Group: Development/Tools/Navigators
Url: http://ctags.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
Patch1: ctags-5.7.diff
# No resources to make this patch work with ctags-5.8 (applied to ctags-5.7)
# Anyone is welcome to make it work again.
Source2: ctags-ycp-parser.diff
Patch3: ctags-date-time.patch
Patch4: go-tags.patch
Patch5: CVE-2014-7204.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: update-alternatives
PreReq: update-alternatives
Requires(post): coreutils
%description
CTags (from Darren Hiebert) generates tag files from source code in C,
C++, Eiffel, Fortran, and Java to be used with vi and its derivatives,
Emacs, and several other editors.
%prep
%setup -q
%patch1
#%#patch2
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
./configure CFLAGS="%{optflags} -Wall" \
--prefix=/usr --mandir=%{_mandir} --disable-etags
make %{?_smp_mflags}
%install
make install prefix=%{buildroot}/usr mandir=%{buildroot}%{_mandir}
mv %{buildroot}%{_bindir}/ctags{,-exuberant}
mv %{buildroot}%{_mandir}/man1/ctags{,-exuberant}.1
touch %{buildroot}%{_bindir}/ctags %{buildroot}%{_mandir}/man1/ctags.1.gz
%post
test -L %{_bindir}/ctags || rm -f %{_bindir}/ctags
update-alternatives --install %{_bindir}/ctags ctags %{_bindir}/ctags-exuberant 20 \
--slave %{_mandir}/man1/ctags.1.gz ctags.1 %{_mandir}/man1/ctags-exuberant.1.gz
update-alternatives --auto ctags
%preun
if [ $1 -eq 0 ]; then
update-alternatives --remove ctags %{_bindir}/ctags-exuberant
fi
%files
%defattr(-,root,root)
%doc COPYING EXTENDING.html FAQ README
%{_bindir}/ctags-exuberant
%{_mandir}/man1/ctags-exuberant.1.gz
%ghost %attr(755,root,root) %{_bindir}/ctags
%ghost %{_mandir}/man1/ctags.1.gz
%changelog