Skip to content

Commit 64e24cb

Browse files
committed
rpm: install Emacs addon files
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent a802687 commit 64e24cb

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ task:
193193
# another one from EPEL (as dependency for R-core) on recent RockyLinux 8
194194
yum install -y environment-modules
195195
yum install -y epel-release
196-
yum install -y tcsh zsh ksh tcl perl python36 gzip ruby cmake R-core make wget perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel
196+
yum install -y tcsh zsh ksh tcl perl python36 gzip ruby cmake R-core make wget perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel emacs
197197
yum install -y which xorg-x11-server-utils xorg-x11-server-Xvfb
198198
yum install -y fish
199199
configure_script:
@@ -217,7 +217,7 @@ task:
217217
reqinstall_script: |
218218
dnf install -y dnf-plugins-core epel-release
219219
dnf config-manager --set-enabled crb
220-
dnf install -y tcsh zsh ksh fish tcl perl python3 gzip ruby cmake R-core make wget perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel procps-ng
220+
dnf install -y tcsh zsh ksh fish tcl perl python3 gzip ruby cmake R-core make wget perl python3-sphinx git dejagnu man-db rpm-build bzip2 autoconf gcc tcl-devel procps-ng emacs
221221
configure_script:
222222
- ./configure --with-bashcompletiondir=/usr/share/bash-completion/completions --with-fishcompletiondir=/usr/share/fish/vendor_completions.d --with-zshcompletiondir=/usr/share/zsh/site-functions
223223
# also enable a display on this test case to validate x-resource behavior

share/rpm/environment-modules.spec.in

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ Requires: util-linux
4242
Requires: util-linux-core
4343
%endif
4444
Requires: vim-filesystem
45+
%if 0%{?rhel} && 0%{?rhel} <= 9
46+
BuildRequires: emacs
47+
%else
48+
BuildRequires: emacs-nw
49+
%endif
50+
Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
4551
%if 0%{?rhel} && 0%{?rhel} <= 6
4652
Requires: procps
4753
Requires: man
@@ -104,6 +110,7 @@ have access to the module alias.
104110
--libexecdir=%{_datadir}/Modules/libexec \
105111
--mandir=%{_mandir} \
106112
--vimdatadir=%{vimdatadir} \
113+
--emacsdatadir=%{_emacs_sitelispdir}/%{name} \
107114
--nagelfardatadir=%{_datadir}/Modules/nagelfar \
108115
--with-bashcompletiondir=%{bash_completions_dir} \
109116
--with-fishcompletiondir=%{fish_completions_dir} \
@@ -121,6 +128,9 @@ have access to the module alias.
121128
make %{?_smp_mflags}
122129
%endif
123130

131+
# compile Elisp file
132+
%{_emacs_bytecompile} share/emacs/lisp/modulefile-mode.el
133+
124134

125135
%install
126136
%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7
@@ -162,6 +172,9 @@ mv {doc/build/,}changes.txt
162172
# install the rpm config file
163173
install -Dpm 644 share/rpm/macros.%{name} %{buildroot}/%{macrosdir}/macros.%{name}
164174

175+
# install Emacs init file
176+
install -Dpm 644 share/emacs/lisp/%{name}-init.el %{buildroot}/%{_emacs_sitestartdir}/%{name}-init.el
177+
165178

166179
%check
167180
make test QUICKTEST=1
@@ -244,6 +257,9 @@ fi
244257
%{vimdatadir}/ftdetect/modulefile.vim
245258
%{vimdatadir}/ftplugin/modulefile.vim
246259
%{vimdatadir}/syntax/modulefile.vim
260+
%dir %{_emacs_sitelispdir}/%{name}
261+
%{_emacs_sitelispdir}/%{name}/*
262+
%{_emacs_sitestartdir}/%{name}-init.el
247263
%dir %{_datadir}/Modules/nagelfar
248264
%{_datadir}/Modules/nagelfar/*
249265

0 commit comments

Comments
 (0)