Summary:     A GNU tool which simplifies the build process for users.
Summary(ja): ユーザのビルド手続きを平易にする GNU ツール
Name: make
Epoch: 1
Version: 3.81
Release: 7%{?_dist_release}
License: GPL
Group: Development/Tools
URL: http://www.gnu.org/software/make/
Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.bz2
Source1: make-3.81-ja.po

Patch: make-3.80-noclock_gettime.patch
Patch2: make-3.80-siglist.patch
Patch3: make-3.80-cvs.patch
Patch4: make-3.80-j8k.patch
Patch5: make-3.80-getcwd.patch
Patch6: make-3.81-err-reporting.patch
Patch7: make-3.81-memory.patch
Patch8: make-3.81-rlimit.patch
Patch9: make-3.81-newlines.patch

Buildroot: %{_tmppath}/%{name}-%{version}-root
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRequires: automake >= 1.7.3
BuildRequires: perl

%description
A GNU tool for controlling the generation of executables and other
non-source files of a program from the program's source files.  Make
allows users to build and install packages without any significant
knowledge about the details of the build process.  The details about
how the program should be built are provided for make in the program's
makefile.

The GNU make tool should be installed on your system because it is
commonly used to simplify the process of installing programs.


%description -l ja
プログラムのソースファイルから実行ファイル及びその他のファイルを
生成する GNU ツールです．Make を使うことでユーザは build 時の
細かいプロセスを気にせず build しインストールすることが出来ます．
プログラムがどの様に build されるのかは，プログラムの Makefile に
書かれています．

GNU make ツールは，プログラムのインストールを容易にするのに
非常によく使われますので，このパッケージは是非インストールして下さい．


%prep
%setup -q
%patch -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
cp %{SOURCE1} po/ja.po

%build
config/missing --run aclocal -I config
config/missing --run automake --gnu Makefile
config/missing --run autoconf
%configure
make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall

pushd $RPM_BUILD_ROOT
  ln -sf make .%{_bindir}/gmake
#  gzip -9nf .%{_infodir}/make.info*
  rm -f .%{_infodir}/dir
popd

%find_lang %name


%check
echo ============TESTING===============
/usr/bin/env LANG=C make check
echo ============END TESTING===========


%clean
rm -rf ${RPM_BUILD_ROOT}

%post
/sbin/install-info %{_infodir}/make.info.gz %{_infodir}/dir --entry="* Make: (make).                 The GNU make utility." || :

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


%files -f %{name}.lang
%defattr(-,root,root)
%doc NEWS README
%{_bindir}/*
%{_mandir}/man*/*
%{_infodir}/*.info*
#%{_datadir}/locale/*/LC_MESSAGES/make*

%changelog
* Mon Jun  9 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.81-7
- applied new versioning policy
- added BuildRequires: perl (for %%check)
- spec in UTF-8

* Tue Dec 13 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.81-6vl1
- updated to 3.81 based on Fedora packages
  * Fri Mar 16 2007 Petr Machata <pmachata@redhat.com> - 1:3.81-6
  - Always run testsuite with C locale.
  - Resolves: #232607
  * Thu Feb 22 2007 Petr Machata <pmachata@redhat.com> - 1:3.81-5
  - Fix newline handling for quoted SHELL.
  - Resolves: #219409
  * Tue May 23 2006 Petr Machata <pmachata@redhat.com> - 1:3.81-1
  - Upstream 3.81:
    - Contains several backwards incompatible changes.  See NEWS inside
      the source package to find out more.
  - memory patch and error reporting patch were ported to this version.
- updated ja.po

* Tue Dec 13 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.80-0vl4
- added URL
- s/Copyright/License/
- added some patches from fedora development 3.80-8 
  * Mon Aug 22 2005 Jakub Jelinek <jakub@redhat.com> 3.80-8
  - make sure errno for error reporting is not lost accross _() calls
  - report EOF on read pipe differently from read returning < 0 reporting
  * Mon Dec 13 2004 Jakub Jelinek <jakub@redhat.com> 3.80-6
  - refuse -jN where N is bigger than PIPE_BUF (#142691, #17374)
  * Tue Dec 02 2003 Florian La Roche <Florian.LaRoche@redhat.de>
  - add important bug-fixes from make home-page

* Wed Apr 09 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.80-0vl3
- some patches was included from 3.79.1-17

* Wed Nov 13 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.80-0vl2
- update ja.po

* Wed Nov 13 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.80-0vl1
- new upstream release

* Fri Dec 22 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 3.79.1-5vl1
- based on 3.79.1-5 from Rawhide
- rebuilt for Vine Linux
- added Japanese summary and description

* Mon Aug  7 2000 Tim Waugh <twaugh@redhat.com>
- change info-dir entry so that 'info make' works (#15029).

* Tue Aug  1 2000 Jakub Jelinek <jakub@redhat.com>
- assume we don't have clock_gettime in configure, so that
  make is not linked against -lpthread (and thus does not
  limit stack to 2MB).

* Sat Jul 22 2000 Jeff Johnson <jbj@redhat.com>
- add locale files (#14362).

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

* Sat Jun 24 2000 Preston Brown <pbrown@redhat.com>
- 3.79.1 bugfix release

* Mon Jun  5 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging.

* Sun May  7 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- Fix build for some odd situations, such as
  - previously installed make != GNU make
  - /bin/sh != bash

* Mon Apr 17 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- update to 3.79

* Thu Feb 24 2000 Cristian Gafton <gafton@redhat.com>
- add patch from Andreas Jaeger to fix dtype lookups (for glibc 2.1.3
  builds)

* Mon Feb  7 2000 Jeff Johnson <jbj@redhat.com>
- compress man page.

* Fri Jan 21 2000 Cristian Gafton <gafton@redhat.com>
- apply patch to fix a /tmp race condition from Thomas Biege
- simplify %install

* Sat Nov 27 1999 Jeff Johnson <jbj@redhat.com>
- update to 3.78.1.

* Thu Apr 15 1999 Bill Nottingham <notting@redhat.com>
- added a serial tag so it upgrades right

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

* Wed Sep 16 1998 Cristian Gafton <gafton@redhat.com>
- added a patch for large file support in glob
 
* Tue Aug 18 1998 Jeff Johnson <jbj@redhat.com>
- update to 3.77

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

* Thu Oct 16 1997 Donnie Barnes <djb@redhat.com>
- udpated from 3.75 to 3.76
- various spec file cleanups
- added install-info support

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