Add build conditions for modularity
This commit is contained in:
parent
68f2312d98
commit
9b9fd9b6e2
@ -1,3 +1,8 @@
|
||||
# Enable Emacs support
|
||||
%bcond_without autoconf_enables_emacs
|
||||
# Run extended test
|
||||
%bcond_without autoconf_enables_optional_test
|
||||
|
||||
Summary: A GNU tool for automatically configuring source code
|
||||
Name: autoconf
|
||||
Version: 2.69
|
||||
@ -19,8 +24,10 @@ BuildArch: noarch
|
||||
# m4 >= 1.4.6 is required, >= 1.4.14 is recommended:
|
||||
BuildRequires: m4 >= 1.4.14
|
||||
Requires: m4 >= 1.4.14
|
||||
%if %{with autoconf_enables_emacs}
|
||||
Requires: emacs-filesystem
|
||||
BuildRequires: emacs
|
||||
%endif
|
||||
# the filtering macros are currently in /etc/rpm/macros.perl:
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-macros
|
||||
@ -34,12 +41,14 @@ BuildRequires: perl(Text::ParseWords)
|
||||
BuildRequires: help2man
|
||||
|
||||
%if %{with check}
|
||||
%if %{with autoconf_enables_optional_test}
|
||||
# For extended testsuite coverage
|
||||
BuildRequires: gcc-gfortran
|
||||
%if 0%{?fedora} >= 15
|
||||
BuildRequires: erlang
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
@ -69,7 +78,13 @@ their use.
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%configure --with-lispdir=%{_emacs_sitelispdir}/autoconf
|
||||
%if %{with autoconf_enables_emacs}
|
||||
export EMACS=%{_bindir}/emacs
|
||||
%else
|
||||
export EMACS=%{_bindir}/false
|
||||
%endif
|
||||
%configure \
|
||||
%{?with_autoconf_enables_emacs:--with-lispdir=%{_emacs_sitelispdir}/autoconf}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
@ -86,9 +101,11 @@ make install %{?_smp_mflags} DESTDIR=%{buildroot}
|
||||
mkdir -p %{buildroot}/share
|
||||
install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}
|
||||
|
||||
%if %{with autoconf_enables_emacs}
|
||||
# Create file to activate Emacs modes as required
|
||||
mkdir -p %{buildroot}%{_emacs_sitestartdir}
|
||||
install -p -m 0644 %{SOURCE2} %{buildroot}%{_emacs_sitestartdir}
|
||||
%endif
|
||||
|
||||
|
||||
%post
|
||||
@ -110,7 +127,9 @@ fi
|
||||
%exclude %{_infodir}/dir
|
||||
%{_datadir}/autoconf/
|
||||
%config %{_datadir}/config.site
|
||||
%if %{with autoconf_enables_emacs}
|
||||
%{_datadir}/emacs/site-lisp/*
|
||||
%endif
|
||||
%{_mandir}/man1/*
|
||||
%doc AUTHORS ChangeLog NEWS README THANKS TODO
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user