diff --git a/erlang.spec b/erlang.spec index 93ec2db..b63ab92 100644 --- a/erlang.spec +++ b/erlang.spec @@ -20,6 +20,7 @@ ## %global __with_emacs 1 +%global __with_xemacs 1 %global __with_examples 1 %global __with_java 1 # @@ -60,7 +61,7 @@ Name: erlang Version: 20.3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: General-purpose programming language and runtime environment Group: Development/Languages @@ -802,9 +803,11 @@ Group: Development/Languages %if %{__with_emacs} BuildRequires: emacs BuildRequires: emacs-el +%endif %{__with_emacs} +%if %{__with_xemacs} BuildRequires: xemacs BuildRequires: xemacs-packages-extra-el -%endif %{__with_emacs} +%endif %{__with_xemacs} Requires: %{name}-compiler%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-inets%{?_isa} = %{version}-%{release} @@ -813,12 +816,14 @@ Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} %if %{__with_emacs} Requires: emacs-filesystem -Requires: xemacs-filesystem Obsoletes: emacs-erlang Obsoletes: emacs-erlang-el +%endif %{__with_emacs} +%if %{__with_xemacs} +Requires: xemacs-filesystem Obsoletes: xemacs-erlang Obsoletes: xemacs-erlang-el -%endif %{__with_emacs} +%endif %{__with_xemacs} %description tools @@ -910,7 +915,8 @@ cp lib/tools/emacs/*.el emacs-erlang/ pushd emacs-erlang %{_emacs_bytecompile} *.el popd - +%endif %{__with_emacs} +%if %{__with_xemacs} # XEmacs related stuff cat > xemacs-erlang-init.el << EOF (setq load-path (cons "%{_xemacs_sitelispdir}/erlang" load-path)) @@ -924,7 +930,7 @@ rm -f xemacs-erlang/erlang-flymake.el xemacs-erlang/erlang-test.el xemacs-erlang pushd xemacs-erlang %{_xemacs_bytecompile} *.el popd -%endif %{__with_emacs} +%endif %{__with_xemacs} make @@ -954,7 +960,8 @@ for f in lib/tools/emacs/{README,*.el}; do "$RPM_BUILD_ROOT%{_emacs_sitelispdir}/erlang/" done install -m 0644 emacs-erlang/*.elc "$RPM_BUILD_ROOT%{_emacs_sitelispdir}/erlang/" - +%endif %{__with_emacs} +%if %{__with_xemacs} # XEmacs related stuff install -m 0755 -d "$RPM_BUILD_ROOT%{_xemacs_sitestartdir}" install -m 0755 -d "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang" @@ -966,7 +973,7 @@ for f in lib/tools/emacs/{README,*.el}; do done rm -f "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/erlang-flymake.el" install -m 0644 xemacs-erlang/*.elc "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/" -%endif %{__with_emacs} +%endif %{__with_xemacs} make DESTDIR=$RPM_BUILD_ROOT install @@ -1948,16 +1955,18 @@ useradd -r -g epmd -d /dev/null -s /sbin/nologin \ %endif %if %{__with_emacs} %dir %{_emacs_sitelispdir}/erlang -%dir %{_xemacs_sitelispdir}/erlang %doc %{_emacs_sitelispdir}/erlang/README -%doc %{_xemacs_sitelispdir}/erlang/README %{_emacs_sitelispdir}/erlang/*.el %{_emacs_sitelispdir}/erlang/*.elc %{_emacs_sitestartdir}/erlang-init.el +%endif %{__with_emacs} +%if %{__with_xemacs} +%dir %{_xemacs_sitelispdir}/erlang +%doc %{_xemacs_sitelispdir}/erlang/README %{_xemacs_sitelispdir}/erlang/*.el %{_xemacs_sitelispdir}/erlang/*.elc %{_xemacs_sitestartdir}/erlang-init.el -%endif %{__with_emacs} +%endif %{__with_xemacs} %if %{__with_wxwidgets} %files wx @@ -2214,6 +2223,9 @@ useradd -r -g epmd -d /dev/null -s /sbin/nologin \ %changelog +* Fri May 18 2018 Troy Dawson - 20.3.6-2 +- Make xemacs an optional component + * Tue May 15 2018 Peter Lemenkov - 20.3.6-1 - Ver. 20.3.6