ctags/ctags.spec

98 lines
3.0 KiB
RPMSpec

#
# spec file for package ctags (Version 2009.8.26)
#
# Copyright (c) 2009 SUSE LINUX Products 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
License: GPL v2 or later
Group: Development/Tools/Navigators
AutoReqProv: on
%define ctags_ver 5.7
%define etags_ver 17.38.1.4
Version: 2009.8.26
Release: 1
Summary: A Program to Generate Tag Files for Use with vi and Other Editors
Url: http://ctags.sourceforge.net/
Source0: ftp://ftp.sourceforge.net/pub/sourceforge/c/ct/ctags/ctags-%{ctags_ver}.tar.bz2
Source1: etags-%{etags_ver}.tar.gz
Source2: README.SuSE
Patch0: ctags-%{ctags_ver}.diff
Patch1: ctags-ycp-parser.diff
Patch2: etags-%{etags_ver}.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
ETags (from GNU Emacs sources) generates tag files from source code in
Pascal, Cobol, Ada, Perl, LaTeX, Scheme, Emacs Lisp/Common Lisp,
Postscript, Erlang, Python, Prolog, and most assembler-like syntaxes.
Authors:
--------
Darren Hiebert <darren@hiebert.com>
Ken Arnold
Francesco Potortì <pot@gnu.org>
%prep
%setup -q -n ctags-%{ctags_ver} -b 1
%patch0
%patch1
cd ../etags-%{etags_ver}
%patch2
%build
CC=gcc
CFLAGS="$RPM_OPT_FLAGS -Wall"
export CFLAGS CC
./configure --prefix=/usr --mandir=%{_mandir} --disable-etags
make
cd ../etags-%{etags_ver}
CFLAGS="$CFLAGS -DSTDC_HEADERS -DHAVE_UNISTD_H -DHAVE_GETCWD"
$CC $CFLAGS -o etags etags.c
$CC $CFLAGS -DCTAGS -o gnuctags etags.c
%install
make install prefix=$RPM_BUILD_ROOT/usr mandir=$RPM_BUILD_ROOT%{_mandir}
mkdir -p $RPM_BUILD_ROOT%{_docdir}/ctags/Exuberant_Ctags
install -m 644 COPYING EXTENDING.html FAQ README $RPM_BUILD_ROOT%{_docdir}/ctags/Exuberant_Ctags
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_docdir}/ctags
cd ../etags-%{etags_ver}
install -m 755 etags gnuctags $RPM_BUILD_ROOT/usr/bin
install -m 644 etags.1 $RPM_BUILD_ROOT%{_mandir}/man1
ln -sf etags.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/gnuctags.1.gz
install -m 644 ETAGS.README $RPM_BUILD_ROOT%{_docdir}/ctags
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/usr/bin/ctags
/usr/bin/gnuctags
/usr/bin/etags
%{_mandir}/man1/ctags.1.gz
%{_mandir}/man1/gnuctags.1.gz
%{_mandir}/man1/etags.1.gz
%{_docdir}/ctags
%changelog