Summary: The GNU line editor.
Summary(ja): GNU ラインエディタ
Name: ed
Version: 1.5
Release: 1%{?_dist_release}

License: GPLv3+
Group: Applications/Text
URL: http://www.gnu.org/software/ed/

Source: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info

%description
Ed is a line-oriented text editor, used to create, display, and modify
text files (both interactively and via shell scripts).  For most
purposes, ed has been replaced in normal usage by full-screen editors
(emacs and vi, for example).

Ed was the original UNIX editor, and may be used by some programs.  In
general, however, you probably don't need to install it and you probably
won't use it.

%description -l ja
ed はラインベースのテキストエディタです．テキストファイルを作成/表示/修正
するのに使われます (インタラクティブにも，シェルスクリプト経由でも使えます)．
多くのケースで，ed の代わりにフルスクリーンエディタ (emacs や vi 等) が
使われる様になってきています．

ed は UNIX オリジナルのエディタで，一部のプログラムが ed を使用している
かもしれません．しかし一般的には ed をインストールする必要はありませんし，
使うこともないでしょう．


%prep
%setup -q
rm -f stamp-h.in

%build
%configure --exec-prefix=/
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" 

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
make install DESTDIR=$RPM_BUILD_ROOT bindir=/bin \
	mandir=%{_mandir}/man1

rm -f $RPM_BUILD_ROOT%{_infodir}/dir*
gzip -9qnf  $RPM_BUILD_ROOT%{_infodir}/*
install -p -m0644 doc/ed.1 $RPM_BUILD_ROOT%{_mandir}/man1

%post
/sbin/install-info %{_infodir}/ed.info.gz %{_infodir}/dir \
    --entry="* ed: (ed).                  The GNU Line Editor." || :

%preun
if [ $1 = 0 ] ; then
  /sbin/install-info --delete %{_infodir}/ed.info.gz %{_infodir}/dir \
    --entry="* ed: (ed).                  The GNU Line Editor." || :
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc ChangeLog NEWS README TODO AUTHORS COPYING
/bin/*
%{_infodir}/ed.info.gz
%{_mandir}/*/*


%changelog
* Sat Apr 16 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.5-1
- new upstream release

* Mon Nov 30 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4-1
- new upstream release

* Sat Nov  8 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1-1
- new upstream release

* Sat Aug 23 2008 Shu KONNO <owa@bg.wakwak.com> 1.0-1
- new upstream release
- spec in utf-8

* Sat Apr 19 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.9-1
- new upstream release

* Sat Oct 20 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.8-0vl1
- new upstream release
- updated URL, License

* Fri Sep 22 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.2-35vl2
- rebuild to add gpg sign

* Sat Apr 10 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 0.2-35vl1
- rename spec file to ed-vl.spec
- added patch2
  * Tue Dec 17 2002 Karsten Hopp <karsten@redhat.de>ト<8D>
  - remove regex, use glibc's regex (#79132)

* Wed Dec 04 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.2-28vl1
- based on 0.2-28 from rawhide and built for Vine Linux
- BuildPreReq: autoconf253, automake15
- added Japanese summary and description

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon May  6 2002 Bernhard Rosenkraenzer <bero@redhat.com> 0.2-26
- Fix build with current toolchain

* Wed Apr 03 2002 Karsten Hopp <karsten@redhat.de>
- don't use gcc -s 

* Fri Feb 22 2002 Karsten Hopp <karsten@redhat.de>
- bump version 

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Oct 15 2001 Karsten Hopp <karsten@redhat.de>
- add home page (#54602)

* Sat Jul 07 2001 Karsten Hopp <karsten@redhat.de>
- Copyright -> License
- fix URL

* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
- Bump release + rebuild.

* Mon Dec 04 2000 Karsten Hopp <karsten@redhat.de>
- back out fixes for compiler warnings

* Wed Nov 29 2000 Karsten Hopp <karsten@redhat.de>
- Security bugfix (mkstemp instead of mktemp) Bugzilla #21470

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Sun Jun 18 2000 Than Ngo <than@redhat.de>
- fix typo

* Sat Jun 17 2000 Than Ngo <than@redhat.de>
- add %%defattr
- clean up specfile

* Sat May 20 2000 Ngo Than <than@redhat.de>
- rebuild for 7.0
- put man pages and infos in right place

* Thu Feb 03 2000 Preston Brown <pbrown@redhat.com>
- rebuild to gzip man pages.

* Tue Mar 23 1999 Jeff Johnson <jbj@redhat.com>
- fix %post syntax error (#1689).

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 11)

* Wed Feb 24 1999 Preston Brown <pbrown@redhat.com>
- Injected new description and group.

* Fri Dec 18 1998 Preston Brown <pbrown@redhat.com>
- bumped spec number for initial rh 6.0 build

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Fri Oct 17 1997 Donnie Barnes <djb@redhat.com>
- added install-info support
- added BuildRoot
- correct URL in Source line

* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
- built against glibc
