Summary: The GNU macro processor.
Summary(ja): GNU マクロプロセッサ
Name: m4
Version: 1.4.18
Release: 1%{?_dist_release}
License: GPLv3+
Group: Development/Tools
URL: https://www.gnu.org/software/m4/
Vendor: Project Vine
Distribution: Vine Linux

Source: https://ftp.gnu.org/gnu/m4//m4-%{version}.tar.xz
# Patch0: update to glibc libio.h removal, rhbz#1573342
Patch0: m4-1.4.18-glibc-change-work-around.patch

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: libsigsegv-devel
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info


%description
A GNU implementation of the traditional UNIX macro processor.  M4 is
useful for writing text files which can be logically parsed, and is used
by many programs as part of their build process.  M4 has built-in
functions for including files, running shell commands, doing arithmetic,
etc.  The autoconf program needs m4 for generating configure scripts, but
not for running configure scripts.

Install m4 if you need a macro processor.

%description -l ja
m4 は UNIX で使われるマクロプロセッサの GNU 版です．
m4 を使うと，論理的に解析可能なテキストファイルを書く際に便利ですし，
また多くのプログラムのビルド過程で m4 が使われています．
m4 にはファイルのインクルード，シェルコマンドの実行，計算等の
組み込み関数が備わっています．autoconf は configure スクリプトの
生成に m4 を必要とします (が configure スクリプト実行には必要
ありません)．

マクロプロセッサが必要なら m4 をインストールして下さい．

%prep
%setup -q
%patch0 -p1 -b .glibc-change-work-around
chmod 644 COPYING

%build
%configure 
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall INSTALL_DATA="install -c -m644"

# ensure /usr/share/info.dir is not included into the package
rm -fv %{buildroot}%{_infodir}/dir


%post
/sbin/install-info %{_infodir}/m4.info.gz %{_infodir}/dir

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

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%license COPYING
%doc AUTHORS ChangeLog NEWS THANKS README
%{_bindir}/m4
%{_infodir}/*
%{_mandir}/man1/*

%changelog
* Thu Sep 05 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.4.18-1
- new upstream release.
- imported Patch0 for gcc8 from rawhide.

* Sun Dec 01 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.4.17-1
- new upstream release

* Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> - 1.4.14-2
- rebuilt with rpm-4.8.1-3

* Sat Mar  6 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.4.14-1
- new upstream release
- built with new toolchain, libsigsegv-2.8

* Sun Apr  5 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.4.13-2
- ensure /usr/share/info/dir is not included in the package

* Sun Apr  5 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.13-1
- new upstream release

* Sat Oct 18 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.12-1
- new upstream release
- added BuildRequires: libsigsegv-devel

* Thu Oct 09 2008 Shu KONNO <owa@bg.wakwak.com> 1.4.11-2vl5
- spec in utf-8

* Thu Apr  3 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.11-1vl5
- new upstream release

* Tue Mar 27 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.9-0vl1
- new upstream

* Sat Nov 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.8-0vl1
- new upstream
- changed URL

* Sat Nov 12 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.4-0vl1
- new upstream
- s/Copyright/License/
- added some documents

* Tue Aug  2 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.3-1vl1
- updated to 1.4.3 based on Fedora development

* Fri Feb 20 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.4.1-12vl2
- rebuild

* Thu Dec 05 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.4.1-12vl1
- based on 1.4.1-12 from Rawhide and built for Vine Linux
- added Japanese summary and description

* Mon Nov 11 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- add french translation file

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

* Wed Jun 19 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- do not strip apps

* Fri Jun 14 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- rebuild

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

* Thu Mar 07 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- use _infodir on popular request #47465

* Sat Jan 05 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- add URL tag
- improved spec file
- add hack to update config.guess config.sub
- fix to build with newer autoconf versions

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

* Tue Feb 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- signal patch is not necessary anymore
- fix printf buffer overflow problem

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

* Sat Jun 17 2000 Matt Wilson <msw@redhat.com>
- added defattr

* Mon Jun  5 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- FHS compliance
- 1.4.1
- some fixes to spec file

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

* Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
- build against glibc 2.1

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

* Fri Apr 10 1998 Cristian Gafton <gafton@redhat.com>
- Manhattan build

* Tue Oct 21 1997 Cristian Gafton <gafton@redhat.com>
- added info file handling and BuildRoot

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

