#%define priority 30

Summary: GNU GLOBAL is a source code tag system
Summary(ja): GNU GLOBAL ソースコードタグシステム
Name: global
Version: 6.2.2
Release: 1%{?_dist_release}

License: GPLv3
Group: Development/Tools
URL: http://www.gnu.org/software/global/

Source0: ftp://ftp.gnu.org/pub/gnu/global/%{name}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: ncurses-devel
Requires: perl
Requires(post,preun): /sbin/install-info

Vendor: Project Vine
Distribution: Vine Linux

%description
GNU GLOBAL is a source code tag system that works the same way across diverse
environments. It supports C, C++, Yacc, Java and PHP4 source code.

%description -l ja
GNU GLOBAL はソースコードに索引付けを行います．
C, C++, Yacc, Java, PHP4 のソースコードをサポートします．

%prep
%setup -q

%build
%configure --disable-static
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

pushd $RPM_BUILD_ROOT%{_datadir}/gtags
rm -f AUTHORS BOKIN_* COPYING ChangeLog DONORS FAQ \
    INSTALL LICENSE NEWS README THANKS
popd

rm -f $RPM_BUILD_ROOT%{_libdir}/gtags/*.la
rm -f $RPM_BUILD_ROOT%{_infodir}/dir

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/install-info %{_infodir}/global.info.* %{_infodir}/dir

%preun
if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/global.info.* %{_infodir}/dir
fi

%files
%defattr(-,root,root)
%doc AUTHORS BOKIN_* COPYING ChangeLog DONORS FAQ INSTALL 
%doc LICENSE NEWS README THANKS
%doc gtags.conf gtags.el gtags.pl gtags.vim
%{_bindir}/*
%{_libdir}/gtags/*.so
%{_mandir}/man?/*
%{_datadir}/gtags
%{_infodir}/global.info*

%changelog
* Tue May 15 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 6.2.2-1
- new upstream release
- added BR: ncurses-devel

* Tue May  4 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.8.2-1
- new upstream release

* Tue May  4 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.8.2-1
- new upstream release

* Thu Dec 31 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.7.7-1
- new upstream release

* Sun May 17 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.7.5-1
- new upstream release
- spec in UTF-8

* Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.7.1-1
- new upstream release

* Fri Jan 18 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.6.2-0vl1
- new upstream release

* Wed Aug  8 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.6-0vl1
- new upstream release

* Tue Oct  3 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.2-0vl1
- new upstream release

* Tue Oct 25 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.8.7-0vl1
- new upstream release
- this version is not necessary to use alternatives

* Wed Aug  6 2003 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 4.6-0vl2
- use alternatives for gctags
- fix typo in URL

* Fri Aug  1 2003 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 4.6-0vl1
- update to 4.6
- rename gctags.1 to gctags.global.1

* Sat Jul 19 2003 Kunio Murasawa <murasawa@fa2.so-net.ne.jp> 4.5.3-0vl1
- update to 4.5.3
- changed URL
- removed gctags.1* (conflict emacs package)

* Mon May  5 2003 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> 4.5.2-0vl1
- Initial build.

