1 |
#note this package is not prefixable |
2 |
|
3 |
Summary: Generates an index (or "tag") file for objects found in source files |
4 |
Name: ctags |
5 |
Version: 5.8 |
6 |
%define subrel 1 |
7 |
Release: %mkrel 15 |
8 |
URL: http://ctags.sourceforge.net/ |
9 |
Source0: http://prdownloads.sourceforge.net/ctags/%{name}-%{version}.tar.bz2 |
10 |
Patch0: ctags-5.7-fix-str-fmt.patch |
11 |
Patch1: ctags-CVE-2014-7204.patch |
12 |
Patch2: CVE-2022-4515.patch |
13 |
License: GPLv2+ and LGPLv2+ and Public Domain |
14 |
Group: Development/Tools |
15 |
Requires(pre): update-alternatives |
16 |
|
17 |
%description |
18 |
The ctags program generate an index (or "tag") file for a variety of |
19 |
language objects found in files. This tag file allows these items to |
20 |
be quickly and easily located by a text editor or other utility. A |
21 |
"tag" signifies a language object for which an index entry is |
22 |
available (or, alternatively, the index entry created for that object). |
23 |
|
24 |
Alternatively, ctags can generate a cross reference file which lists, in |
25 |
human readable form, information about the various source objects found in |
26 |
a set of language files. |
27 |
|
28 |
%prep |
29 |
%setup -q |
30 |
%patch0 -p0 |
31 |
%patch1 -p1 -b .CVE-2014-7204 |
32 |
%patch2 -p1 -b .CVE-2022-4515 |
33 |
# fix permission for %doc |
34 |
chmod a+r ctags.html |
35 |
|
36 |
%build |
37 |
%configure --disable-etags --enable-tmpdir=/tmp |
38 |
%make |
39 |
|
40 |
%install |
41 |
%makeinstall |
42 |
|
43 |
mv %{buildroot}/%{_bindir}/ctags %{buildroot}/%{_bindir}/exuberant-ctags |
44 |
mv %{buildroot}/%{_mandir}/man1/ctags.1 %{buildroot}/%{_mandir}/man1/exuberant-ctags.1 |
45 |
|
46 |
%post |
47 |
update-alternatives --install %{_bindir}/ctags ctags %{_bindir}/exuberant-ctags 10 \ |
48 |
--slave %{_mandir}/man1/ctags.1%{_extension} ctags.1%{_extension} %{_mandir}/man1/exuberant-ctags.1%{_extension} |
49 |
|
50 |
%postun |
51 |
[ $1 = 0 ] || exit 0 |
52 |
update-alternatives --remove ctags %{_bindir}/exuberant-ctags |
53 |
|
54 |
%files |
55 |
%{_bindir}/exuberant-ctags |
56 |
%{_mandir}/man1/exuberant-ctags.1* |
57 |
%doc EXTENDING.html FAQ NEWS README ctags.html |