2015-03-17 09:36:40 +01:00
|
|
|
%global _hardened_build 1
|
|
|
|
|
2021-07-31 07:55:21 +02:00
|
|
|
%global commit 13a9a5e836cbe6e64aadaba40fe1f7eb83320d08
|
2021-07-31 07:54:02 +02:00
|
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
|
%global commit_date 20210717
|
|
|
|
%global gitrel .%{commit_date}.git%{shortcommit}
|
|
|
|
|
2004-09-09 06:35:28 +02:00
|
|
|
# This file is encoded in UTF-8. -*- coding: utf-8 -*-
|
2015-04-07 10:49:47 +02:00
|
|
|
Summary: GNU Emacs text editor
|
|
|
|
Name: emacs
|
|
|
|
Epoch: 1
|
2021-07-31 07:54:02 +02:00
|
|
|
Version: 28.0.50
|
|
|
|
Release: 1%{gitrel}%{?dist}
|
2015-04-07 10:49:47 +02:00
|
|
|
License: GPLv3+ and CC0-1.0
|
|
|
|
URL: http://www.gnu.org/software/emacs/
|
2021-07-31 07:54:02 +02:00
|
|
|
Source0: https://github.com/emacs-mirror/emacs/archive/%{commit}.tar.gz
|
|
|
|
#Source0: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz
|
|
|
|
#Source1: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz.sig
|
2020-04-16 21:59:20 +02:00
|
|
|
# generate the keyring via:
|
|
|
|
# wget https://ftp.gnu.org/gnu/gnu-keyring.gpg
|
2021-03-25 19:09:26 +01:00
|
|
|
# gpg2 --keyring ./gnu-keyring.gpg --armor --export E6C9029C363AD41D787A8EBB91C1262F01EB8D39 > gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg
|
|
|
|
Source2: gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg
|
2020-04-16 21:59:20 +02:00
|
|
|
Source4: dotemacs.el
|
|
|
|
Source5: site-start.el
|
|
|
|
Source6: default.el
|
2010-08-03 16:55:47 +02:00
|
|
|
# Emacs Terminal Mode, #551949, #617355
|
2020-04-16 21:59:20 +02:00
|
|
|
Source7: emacs-terminal.desktop
|
|
|
|
Source8: emacs-terminal.sh
|
|
|
|
Source10: %{name}.appdata.xml
|
2011-11-16 11:16:12 +01:00
|
|
|
# rhbz#713600
|
2015-04-07 10:49:47 +02:00
|
|
|
Patch1: emacs-spellchecker.patch
|
2018-05-30 13:25:32 +02:00
|
|
|
Patch2: emacs-system-crypto-policies.patch
|
2021-03-27 05:10:16 +01:00
|
|
|
Patch3: emacs-glibc-2.34.patch
|
2020-02-05 18:18:46 +01:00
|
|
|
Patch4: emacs-libdir-vs-systemd.patch
|
2021-04-26 15:12:23 +02:00
|
|
|
Patch5: https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-04/txt0tY7uKvJKS.txt#./emacs-modula2.patch
|
2021-07-11 20:11:37 +02:00
|
|
|
# cherry picked from 216c65b135c2b0be7e048cdc6683873b03b99b9a
|
|
|
|
Patch6: Use-a-64KB-page-size-for-pdump.patch
|
2015-03-17 09:36:40 +01:00
|
|
|
|
2020-04-16 22:00:38 +02:00
|
|
|
BuildRequires: gcc
|
2015-03-17 09:36:40 +01:00
|
|
|
BuildRequires: atk-devel
|
|
|
|
BuildRequires: cairo-devel
|
|
|
|
BuildRequires: freetype-devel
|
|
|
|
BuildRequires: fontconfig-devel
|
|
|
|
BuildRequires: dbus-devel
|
|
|
|
BuildRequires: giflib-devel
|
|
|
|
BuildRequires: glibc-devel
|
2021-07-31 07:54:02 +02:00
|
|
|
BuildRequires: libgccjit-devel
|
2015-03-17 09:36:40 +01:00
|
|
|
BuildRequires: libpng-devel
|
|
|
|
BuildRequires: libjpeg-turbo-devel
|
|
|
|
BuildRequires: libjpeg-turbo
|
|
|
|
BuildRequires: libtiff-devel
|
|
|
|
BuildRequires: libX11-devel
|
|
|
|
BuildRequires: libXau-devel
|
|
|
|
BuildRequires: libXdmcp-devel
|
|
|
|
BuildRequires: libXrender-devel
|
|
|
|
BuildRequires: libXt-devel
|
|
|
|
BuildRequires: libXpm-devel
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: xorg-x11-proto-devel
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
BuildRequires: gnutls-devel
|
|
|
|
BuildRequires: librsvg2-devel
|
|
|
|
BuildRequires: m17n-lib-devel
|
|
|
|
BuildRequires: libotf-devel
|
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: alsa-lib-devel
|
|
|
|
BuildRequires: gpm-devel
|
|
|
|
BuildRequires: liblockfile-devel
|
|
|
|
BuildRequires: libxml2-devel
|
2020-04-16 22:03:55 +02:00
|
|
|
BuildRequires: autoconf
|
2015-03-17 09:36:40 +01:00
|
|
|
BuildRequires: bzip2
|
|
|
|
BuildRequires: cairo
|
|
|
|
BuildRequires: texinfo
|
|
|
|
BuildRequires: gzip
|
|
|
|
BuildRequires: desktop-file-utils
|
2021-06-05 15:32:30 +02:00
|
|
|
BuildRequires: libappstream-glib
|
2015-04-22 11:31:54 +02:00
|
|
|
BuildRequires: libacl-devel
|
2020-07-11 08:03:24 +02:00
|
|
|
BuildRequires: harfbuzz-devel
|
|
|
|
BuildRequires: jansson-devel
|
|
|
|
BuildRequires: systemd-devel
|
2013-04-08 12:18:06 +02:00
|
|
|
|
2015-03-17 09:36:40 +01:00
|
|
|
BuildRequires: gtk3-devel
|
2018-01-12 15:12:01 +01:00
|
|
|
BuildRequires: webkit2gtk3-devel
|
2013-04-08 12:18:06 +02:00
|
|
|
|
2020-04-16 21:59:20 +02:00
|
|
|
BuildRequires: gnupg2
|
|
|
|
|
2017-07-14 22:18:20 +02:00
|
|
|
# For lucid
|
|
|
|
BuildRequires: Xaw3d-devel
|
|
|
|
|
2016-07-22 10:54:37 +02:00
|
|
|
%ifarch %{ix86}
|
2011-03-10 14:21:22 +01:00
|
|
|
BuildRequires: util-linux
|
2011-01-07 18:30:22 +01:00
|
|
|
%endif
|
2021-01-04 23:13:21 +01:00
|
|
|
BuildRequires: make
|
2012-09-13 12:27:17 +02:00
|
|
|
|
2019-04-18 10:57:33 +02:00
|
|
|
|
2012-10-22 12:22:52 +02:00
|
|
|
# Emacs doesn't run without dejavu-sans-mono-fonts, rhbz#732422
|
2015-04-07 10:49:47 +02:00
|
|
|
Requires: desktop-file-utils
|
|
|
|
Requires: dejavu-sans-mono-fonts
|
2011-03-15 18:45:17 +01:00
|
|
|
Requires(preun): %{_sbindir}/alternatives
|
|
|
|
Requires(posttrans): %{_sbindir}/alternatives
|
2015-04-07 10:49:47 +02:00
|
|
|
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
|
|
|
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
2010-03-19 16:30:57 +01:00
|
|
|
|
2007-09-11 19:56:57 +02:00
|
|
|
%define site_lisp %{_datadir}/emacs/site-lisp
|
2009-01-18 17:22:07 +01:00
|
|
|
%define site_start_d %{site_lisp}/site-start.d
|
|
|
|
%define bytecompargs -batch --no-init-file --no-site-file -f batch-byte-compile
|
2007-09-11 19:56:57 +02:00
|
|
|
%define pkgconfig %{_datadir}/pkgconfig
|
2011-01-07 18:30:22 +01:00
|
|
|
%define emacs_libexecdir %{_libexecdir}/emacs/%{version}/%{_host}
|
2007-09-11 19:56:57 +02:00
|
|
|
|
2004-09-09 06:31:22 +02:00
|
|
|
%description
|
|
|
|
Emacs is a powerful, customizable, self-documenting, modeless text
|
|
|
|
editor. Emacs contains special code editing features, a scripting
|
2004-09-09 06:32:41 +02:00
|
|
|
language (elisp), and the capability to read mail, news, and more
|
|
|
|
without leaving the editor.
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2004-09-09 06:36:23 +02:00
|
|
|
This package provides an emacs binary with support for X windows.
|
|
|
|
|
2017-07-14 22:18:20 +02:00
|
|
|
%package lucid
|
|
|
|
Summary: GNU Emacs text editor with LUCID toolkit X support
|
|
|
|
Requires(preun): %{_sbindir}/alternatives
|
|
|
|
Requires(posttrans): %{_sbindir}/alternatives
|
|
|
|
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
|
|
|
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
%description lucid
|
|
|
|
Emacs is a powerful, customizable, self-documenting, modeless text
|
|
|
|
editor. Emacs contains special code editing features, a scripting
|
|
|
|
language (elisp), and the capability to read mail, news, and more
|
|
|
|
without leaving the editor.
|
|
|
|
|
|
|
|
This package provides an emacs binary with support for X windows
|
|
|
|
using LUCID toolkit.
|
|
|
|
|
2004-09-09 06:36:23 +02:00
|
|
|
%package nox
|
2015-04-07 10:49:47 +02:00
|
|
|
Summary: GNU Emacs text editor without X support
|
2011-03-15 18:45:17 +01:00
|
|
|
Requires(preun): %{_sbindir}/alternatives
|
|
|
|
Requires(posttrans): %{_sbindir}/alternatives
|
2015-04-07 10:49:47 +02:00
|
|
|
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
|
|
|
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
2004-09-09 06:36:23 +02:00
|
|
|
|
|
|
|
%description nox
|
|
|
|
Emacs is a powerful, customizable, self-documenting, modeless text
|
|
|
|
editor. Emacs contains special code editing features, a scripting
|
|
|
|
language (elisp), and the capability to read mail, news, and more
|
|
|
|
without leaving the editor.
|
|
|
|
|
|
|
|
This package provides an emacs binary with no X windows support for running
|
|
|
|
on a terminal.
|
|
|
|
|
|
|
|
%package common
|
2015-04-07 10:49:47 +02:00
|
|
|
Summary: Emacs common files
|
2012-09-20 18:52:34 +02:00
|
|
|
# The entire source code is GPLv3+ except lib-src/etags.c which is
|
|
|
|
# also BSD. Manual (info) is GFDL.
|
2015-04-07 10:49:47 +02:00
|
|
|
License: GPLv3+ and GFDL and BSD
|
2011-03-15 18:45:17 +01:00
|
|
|
Requires(preun): %{_sbindir}/alternatives
|
|
|
|
Requires(posttrans): %{_sbindir}/alternatives
|
2015-04-07 10:49:47 +02:00
|
|
|
Requires: %{name}-filesystem = %{epoch}:%{version}-%{release}
|
2021-02-05 20:56:18 +01:00
|
|
|
Recommends: enchant2
|
2015-04-07 10:49:47 +02:00
|
|
|
Provides: %{name}-el = %{epoch}:%{version}-%{release}
|
|
|
|
Obsoletes: emacs-el < 1:24.3-29
|
2004-09-09 06:36:23 +02:00
|
|
|
|
|
|
|
%description common
|
|
|
|
Emacs is a powerful, customizable, self-documenting, modeless text
|
|
|
|
editor. Emacs contains special code editing features, a scripting
|
|
|
|
language (elisp), and the capability to read mail, news, and more
|
|
|
|
without leaving the editor.
|
|
|
|
|
2017-07-14 22:18:20 +02:00
|
|
|
This package contains all the common files needed by emacs, emacs-lucid
|
|
|
|
or emacs-nox.
|
2004-09-09 06:36:23 +02:00
|
|
|
|
2010-08-03 16:55:47 +02:00
|
|
|
%package terminal
|
2015-04-07 10:49:47 +02:00
|
|
|
Summary: A desktop menu item for GNU Emacs terminal.
|
|
|
|
Requires: emacs = %{epoch}:%{version}-%{release}
|
|
|
|
BuildArch: noarch
|
2010-08-03 16:55:47 +02:00
|
|
|
|
|
|
|
%description terminal
|
|
|
|
Contains a desktop menu item running GNU Emacs terminal. Install
|
|
|
|
emacs-terminal if you need a terminal with Malayalam support.
|
|
|
|
|
|
|
|
Please note that emacs-terminal is a temporary package and it will be
|
2012-07-11 17:34:15 +02:00
|
|
|
removed when another terminal becomes capable of handling Malayalam.
|
2010-08-03 16:55:47 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
%package filesystem
|
2015-04-07 10:49:47 +02:00
|
|
|
Summary: Emacs filesystem layout
|
|
|
|
BuildArch: noarch
|
2011-01-11 10:06:06 +01:00
|
|
|
|
|
|
|
%description filesystem
|
|
|
|
This package provides some directories which are required by other
|
|
|
|
packages that add functionality to Emacs.
|
|
|
|
|
2019-04-18 10:57:33 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development header files for Emacs
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Development header files for Emacs.
|
|
|
|
|
2004-09-09 06:31:22 +02:00
|
|
|
%prep
|
2020-04-16 21:59:20 +02:00
|
|
|
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
2007-01-23 22:40:31 +01:00
|
|
|
%setup -q
|
2010-03-31 01:33:07 +02:00
|
|
|
|
2014-10-24 14:50:15 +02:00
|
|
|
%patch1 -p1 -b .spellchecker
|
2018-05-30 13:25:32 +02:00
|
|
|
%patch2 -p1 -b .system-crypto-policies
|
2021-03-27 05:10:16 +01:00
|
|
|
%patch3 -p1 -b .glibc2.34
|
2020-02-05 18:18:46 +01:00
|
|
|
%patch4 -p1 -b .libdir-vs-systemd
|
2021-04-26 15:12:23 +02:00
|
|
|
%patch5 -p1
|
2021-07-11 20:11:37 +02:00
|
|
|
%patch6 -p1
|
2017-09-06 17:50:04 +02:00
|
|
|
autoconf
|
2013-01-21 19:17:39 +01:00
|
|
|
|
2009-05-18 13:02:30 +02:00
|
|
|
grep -v "tetris.elc" lisp/Makefile.in > lisp/Makefile.in.new \
|
|
|
|
&& mv lisp/Makefile.in.new lisp/Makefile.in
|
2015-06-17 09:54:12 +02:00
|
|
|
grep -v "pong.elc" lisp/Makefile.in > lisp/Makefile.in.new \
|
|
|
|
&& mv lisp/Makefile.in.new lisp/Makefile.in
|
2009-05-18 13:02:30 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Avoid trademark issues
|
2008-04-18 21:38:06 +02:00
|
|
|
rm -f lisp/play/tetris.el lisp/play/tetris.elc
|
2015-06-17 09:54:12 +02:00
|
|
|
rm -f lisp/play/pong.el lisp/play/pong.el
|
2007-08-13 21:20:38 +02:00
|
|
|
|
2016-07-14 16:30:58 +02:00
|
|
|
# Sorted list of info files
|
|
|
|
%define info_files ada-mode auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq-w32 efaq eieio eintr elisp emacs-gnutls emacs-mime emacs epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido info mairix-el message mh-e newsticker nxml-mode octave-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp url vhdl-mode vip viper widget wisent woman
|
|
|
|
|
|
|
|
# Since the list of info files has to be maintained, check if all info files
|
|
|
|
# from the upstream tarball are actually present in %%info_files.
|
|
|
|
cd info
|
|
|
|
fs=( $(ls *.info) )
|
|
|
|
is=( %info_files )
|
|
|
|
files=$(echo ${fs[*]} | sed 's/\.info//'g | sort | tr -d '\n')
|
|
|
|
for i in $(seq 0 $(( ${#fs[*]} - 1 ))); do
|
|
|
|
if test "${fs[$i]}" != "${is[$i]}.info"; then
|
|
|
|
echo Please update %%info_files: ${fs[$i]} != ${is[$i]}.info >&2
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
cd ..
|
|
|
|
|
2008-05-02 03:48:26 +02:00
|
|
|
%ifarch %{ix86}
|
|
|
|
%define setarch setarch %{_arch} -R
|
|
|
|
%else
|
|
|
|
%define setarch %{nil}
|
|
|
|
%endif
|
|
|
|
|
2011-09-27 12:02:08 +02:00
|
|
|
# Avoid duplicating doc files in the common subpackage
|
|
|
|
ln -s ../../%{name}/%{version}/etc/COPYING doc
|
|
|
|
ln -s ../../%{name}/%{version}/etc/NEWS doc
|
|
|
|
|
2017-08-26 00:45:01 +02:00
|
|
|
|
2004-09-09 06:31:22 +02:00
|
|
|
%build
|
2020-04-16 22:00:38 +02:00
|
|
|
export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}"
|
|
|
|
%set_build_flags
|
2005-12-14 09:23:54 +01:00
|
|
|
|
2012-09-13 12:27:17 +02:00
|
|
|
# Build GTK+ binary
|
2010-03-30 02:01:45 +02:00
|
|
|
mkdir build-gtk && cd build-gtk
|
|
|
|
ln -s ../configure .
|
2010-07-08 18:29:49 +02:00
|
|
|
|
2015-03-17 09:36:40 +01:00
|
|
|
LDFLAGS=-Wl,-z,relro; export LDFLAGS;
|
|
|
|
|
2011-01-07 18:30:22 +01:00
|
|
|
%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
|
2021-07-31 07:54:02 +02:00
|
|
|
--with-tiff --with-xft --with-xpm --with-gpm=no \
|
|
|
|
--with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json \
|
|
|
|
--with-pgtk --with-native-compilation --enable-link-time-optimization
|
|
|
|
|
2016-07-22 10:54:37 +02:00
|
|
|
make bootstrap
|
2020-04-16 22:00:38 +02:00
|
|
|
%{setarch} %make_build
|
2010-03-30 02:01:45 +02:00
|
|
|
cd ..
|
2007-06-26 19:00:50 +02:00
|
|
|
|
2017-07-14 22:18:20 +02:00
|
|
|
# Build Lucid binary
|
|
|
|
mkdir build-lucid && cd build-lucid
|
|
|
|
ln -s ../configure .
|
|
|
|
|
|
|
|
LDFLAGS=-Wl,-z,relro; export LDFLAGS;
|
|
|
|
|
|
|
|
%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
|
|
|
|
--with-tiff --with-xft --with-xpm --with-x-toolkit=lucid --with-gpm=no \
|
2020-07-11 08:03:24 +02:00
|
|
|
--with-modules --with-harfbuzz --with-cairo --with-json
|
2017-07-14 22:18:20 +02:00
|
|
|
make bootstrap
|
2020-04-16 22:00:38 +02:00
|
|
|
%{setarch} %make_build
|
2017-07-14 22:18:20 +02:00
|
|
|
cd ..
|
|
|
|
|
2010-03-30 02:01:45 +02:00
|
|
|
# Build binary without X support
|
|
|
|
mkdir build-nox && cd build-nox
|
|
|
|
ln -s ../configure .
|
2020-07-11 08:03:24 +02:00
|
|
|
%configure --with-x=no --with-modules --with-json
|
2020-04-16 22:00:38 +02:00
|
|
|
%{setarch} %make_build
|
2010-03-30 02:01:45 +02:00
|
|
|
cd ..
|
2007-06-26 19:00:50 +02:00
|
|
|
|
2010-03-30 02:01:45 +02:00
|
|
|
# Remove versioned file so that we end up with .1 suffix and only one DOC file
|
2017-07-14 22:18:20 +02:00
|
|
|
rm build-{gtk,lucid,nox}/src/emacs-%{version}.*
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2007-09-11 19:56:57 +02:00
|
|
|
# Create pkgconfig file
|
2007-08-13 21:20:38 +02:00
|
|
|
cat > emacs.pc << EOF
|
|
|
|
sitepkglispdir=%{site_lisp}
|
2009-10-14 01:22:45 +02:00
|
|
|
sitestartdir=%{site_start_d}
|
2007-08-13 21:20:38 +02:00
|
|
|
|
|
|
|
Name: emacs
|
|
|
|
Description: GNU Emacs text editor
|
2008-05-02 03:48:26 +02:00
|
|
|
Version: %{epoch}:%{version}
|
2007-08-13 21:20:38 +02:00
|
|
|
EOF
|
|
|
|
|
2009-01-18 17:22:07 +01:00
|
|
|
# Create macros.emacs RPM macro file
|
|
|
|
cat > macros.emacs << EOF
|
|
|
|
%%_emacs_version %{version}
|
2009-10-14 01:22:45 +02:00
|
|
|
%%_emacs_ev %{?epoch:%{epoch}:}%{version}
|
|
|
|
%%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release}
|
2009-01-18 17:22:07 +01:00
|
|
|
%%_emacs_sitelispdir %{site_lisp}
|
|
|
|
%%_emacs_sitestartdir %{site_start_d}
|
2010-03-15 13:08:23 +01:00
|
|
|
%%_emacs_bytecompile /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile
|
2009-01-18 17:22:07 +01:00
|
|
|
EOF
|
|
|
|
|
2004-09-09 06:31:22 +02:00
|
|
|
%install
|
2010-03-30 02:01:45 +02:00
|
|
|
cd build-gtk
|
2020-08-18 12:15:32 +02:00
|
|
|
%make_install
|
2010-03-30 02:01:45 +02:00
|
|
|
cd ..
|
2005-02-28 09:09:28 +01:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Let alternatives manage the symlink
|
2007-09-11 19:56:57 +02:00
|
|
|
rm %{buildroot}%{_bindir}/emacs
|
2010-08-19 16:29:36 +02:00
|
|
|
touch %{buildroot}%{_bindir}/emacs
|
2007-06-26 19:00:50 +02:00
|
|
|
|
2020-07-11 08:03:24 +02:00
|
|
|
# Remove emacs.pdmp from common
|
|
|
|
rm %{buildroot}%{emacs_libexecdir}/emacs.pdmp
|
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Do not compress the files which implement compression itself (#484830)
|
2009-10-14 14:18:40 +02:00
|
|
|
gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-compr.el.gz
|
|
|
|
gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-cmpr-hook.el.gz
|
|
|
|
|
2020-07-11 08:03:24 +02:00
|
|
|
# Install emacs.pdmp of the emacs with GTK+
|
|
|
|
install -p -m 0644 build-gtk/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}.pdmp
|
|
|
|
|
2017-07-14 22:18:20 +02:00
|
|
|
# Install the emacs with LUCID toolkit
|
|
|
|
install -p -m 0755 build-lucid/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-lucid
|
2020-07-11 08:03:24 +02:00
|
|
|
install -p -m 0644 build-lucid/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}-lucid.pdmp
|
2017-07-14 22:18:20 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Install the emacs without X
|
2010-03-30 02:01:45 +02:00
|
|
|
install -p -m 0755 build-nox/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-nox
|
2020-07-11 08:03:24 +02:00
|
|
|
install -p -m 0644 build-nox/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}-nox.pdmp
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Make sure movemail isn't setgid
|
2007-09-11 19:56:57 +02:00
|
|
|
chmod 755 %{buildroot}%{emacs_libexecdir}/movemail
|
2007-06-26 19:00:50 +02:00
|
|
|
|
2007-09-11 19:56:57 +02:00
|
|
|
mkdir -p %{buildroot}%{site_lisp}
|
2020-04-16 21:59:20 +02:00
|
|
|
install -p -m 0644 %SOURCE5 %{buildroot}%{site_lisp}/site-start.el
|
|
|
|
install -p -m 0644 %SOURCE6 %{buildroot}%{site_lisp}
|
2007-06-26 19:00:50 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# This solves bz#474958, "update-directory-autoloads" now finally
|
|
|
|
# works the path is different each version, so we'll generate it here
|
2009-10-19 11:02:05 +02:00
|
|
|
echo "(setq source-directory \"%{_datadir}/emacs/%{version}/\")" \
|
|
|
|
>> %{buildroot}%{site_lisp}/site-start.el
|
|
|
|
|
2007-09-11 19:56:57 +02:00
|
|
|
mv %{buildroot}%{_bindir}/{etags,etags.emacs}
|
2012-01-20 16:35:22 +01:00
|
|
|
mv %{buildroot}%{_mandir}/man1/{ctags.1.gz,gctags.1.gz}
|
|
|
|
mv %{buildroot}%{_mandir}/man1/{etags.1.gz,etags.emacs.1.gz}
|
2007-09-11 19:56:57 +02:00
|
|
|
mv %{buildroot}%{_bindir}/{ctags,gctags}
|
2013-04-03 17:20:36 +02:00
|
|
|
# BZ 927996
|
|
|
|
mv %{buildroot}%{_infodir}/{info.info.gz,info.gz}
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2007-09-11 19:56:57 +02:00
|
|
|
mkdir -p %{buildroot}%{site_lisp}/site-start.d
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Default initialization file
|
2007-09-11 19:56:57 +02:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/skel
|
2020-04-16 21:59:20 +02:00
|
|
|
install -p -m 0644 %SOURCE4 %{buildroot}%{_sysconfdir}/skel/.emacs
|
2006-02-27 14:47:17 +01:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Install pkgconfig file
|
2007-09-11 19:56:57 +02:00
|
|
|
mkdir -p %{buildroot}/%{pkgconfig}
|
2009-05-18 13:02:30 +02:00
|
|
|
install -p -m 0644 emacs.pc %{buildroot}/%{pkgconfig}
|
2007-08-13 21:20:38 +02:00
|
|
|
|
2016-01-05 10:33:03 +01:00
|
|
|
# Install app data
|
2014-11-18 14:49:13 +01:00
|
|
|
mkdir -p %{buildroot}/%{_datadir}/appdata
|
2020-04-16 21:59:20 +02:00
|
|
|
cp -a %SOURCE10 %{buildroot}/%{_datadir}/appdata
|
2019-04-18 10:57:33 +02:00
|
|
|
# Upstream ships its own appdata file, but it's quite terse.
|
2021-06-05 15:32:30 +02:00
|
|
|
rm %{buildroot}/%{_metainfodir}/emacs.appdata.xml
|
2011-01-11 10:06:06 +01:00
|
|
|
|
|
|
|
# Install rpm macro definition file
|
2014-02-03 11:31:33 +01:00
|
|
|
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
|
|
|
|
install -p -m 0644 macros.emacs %{buildroot}%{_rpmconfigdir}/macros.d/
|
2009-01-18 17:22:07 +01:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Installing emacs-terminal binary
|
2020-04-16 21:59:20 +02:00
|
|
|
install -p -m 755 %SOURCE8 %{buildroot}%{_bindir}/emacs-terminal
|
2010-05-20 14:43:35 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# After everything is installed, remove info dir
|
2007-09-11 19:56:57 +02:00
|
|
|
rm -f %{buildroot}%{_infodir}/dir
|
2005-06-23 17:39:11 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Install desktop files
|
2010-05-20 14:43:35 +02:00
|
|
|
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
|
2020-04-16 21:59:20 +02:00
|
|
|
%SOURCE7
|
2008-04-23 16:48:36 +02:00
|
|
|
|
2021-05-25 17:51:17 +02:00
|
|
|
# Remove duplicate desktop-related files
|
|
|
|
rm %{buildroot}%{_datadir}/%{name}/%{version}/etc/%{name}.{desktop,service}
|
|
|
|
|
2004-09-09 06:31:22 +02:00
|
|
|
#
|
2011-01-11 10:06:06 +01:00
|
|
|
# Create file lists
|
2004-09-09 06:31:22 +02:00
|
|
|
#
|
2005-06-23 17:39:11 +02:00
|
|
|
rm -f *-filelist {common,el}-*-files
|
|
|
|
|
2004-09-09 06:36:23 +02:00
|
|
|
( TOPDIR=${PWD}
|
2007-09-11 19:56:57 +02:00
|
|
|
cd %{buildroot}
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2005-06-23 17:39:11 +02:00
|
|
|
find .%{_datadir}/emacs/%{version}/lisp \
|
2014-10-24 14:50:15 +02:00
|
|
|
.%{_datadir}/emacs/%{version}/lisp/leim \
|
2007-06-26 19:00:50 +02:00
|
|
|
.%{_datadir}/emacs/site-lisp \( -type f -name '*.elc' -fprint $TOPDIR/common-lisp-none-elc-files \) -o \( -type d -fprintf $TOPDIR/common-lisp-dir-files "%%%%dir %%p\n" \) -o \( -name '*.el.gz' -fprint $TOPDIR/el-bytecomped-files -o -fprint $TOPDIR/common-not-comped-files \)
|
|
|
|
|
|
|
|
)
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
# Put the lists together after filtering ./usr to /usr
|
2005-02-18 06:59:24 +01:00
|
|
|
sed -i -e "s|\.%{_prefix}|%{_prefix}|" *-files
|
2004-09-09 06:36:23 +02:00
|
|
|
cat common-*-files > common-filelist
|
2005-02-25 14:20:13 +01:00
|
|
|
cat el-*-files common-lisp-dir-files > el-filelist
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2016-03-04 13:44:47 +01:00
|
|
|
# Remove old icon
|
|
|
|
rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg
|
|
|
|
|
2021-06-05 15:24:21 +02:00
|
|
|
%check
|
2021-06-05 15:32:30 +02:00
|
|
|
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml
|
2021-06-05 15:24:21 +02:00
|
|
|
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
|
|
|
|
|
2011-03-15 18:45:17 +01:00
|
|
|
%preun
|
2021-06-13 19:34:51 +02:00
|
|
|
%{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version} || :
|
2009-03-04 18:33:41 +01:00
|
|
|
|
2011-03-15 18:45:17 +01:00
|
|
|
%posttrans
|
2021-06-13 19:34:51 +02:00
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 80 || :
|
2007-05-22 16:32:18 +02:00
|
|
|
|
2017-07-14 22:18:20 +02:00
|
|
|
%preun lucid
|
2021-06-13 19:34:51 +02:00
|
|
|
%{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version}-lucid || :
|
|
|
|
%{_sbindir}/alternatives --remove emacs-lucid %{_bindir}/emacs-%{version}-lucid || :
|
2017-07-14 22:18:20 +02:00
|
|
|
|
|
|
|
%posttrans lucid
|
2021-06-13 19:34:51 +02:00
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version}-lucid 70 || :
|
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/emacs-lucid emacs-lucid %{_bindir}/emacs-%{version}-lucid 60 || :
|
2017-07-14 22:18:20 +02:00
|
|
|
|
2011-03-15 18:45:17 +01:00
|
|
|
%preun nox
|
2021-06-13 19:34:51 +02:00
|
|
|
%{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version}-nox || :
|
|
|
|
%{_sbindir}/alternatives --remove emacs-nox %{_bindir}/emacs-%{version}-nox || :
|
2011-03-15 18:45:17 +01:00
|
|
|
|
|
|
|
%posttrans nox
|
2021-06-13 19:34:51 +02:00
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version}-nox 70 || :
|
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/emacs-nox emacs-nox %{_bindir}/emacs-%{version}-nox 60 || :
|
2007-06-26 19:00:50 +02:00
|
|
|
|
2004-09-09 06:36:23 +02:00
|
|
|
%preun common
|
2021-06-13 19:34:51 +02:00
|
|
|
%{_sbindir}/alternatives --remove emacs.etags %{_bindir}/etags.emacs || :
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2007-11-19 20:47:05 +01:00
|
|
|
%posttrans common
|
2011-03-15 18:45:17 +01:00
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
|
2021-06-13 19:34:51 +02:00
|
|
|
--slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || :
|
2007-11-19 20:47:05 +01:00
|
|
|
|
2004-09-09 06:36:23 +02:00
|
|
|
%files
|
|
|
|
%{_bindir}/emacs-%{version}
|
2020-07-11 08:03:24 +02:00
|
|
|
%{_bindir}/emacs-%{version}.pdmp
|
2010-08-19 16:29:36 +02:00
|
|
|
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
2008-04-18 21:38:06 +02:00
|
|
|
%{_datadir}/applications/emacs.desktop
|
2014-11-18 14:49:13 +01:00
|
|
|
%{_datadir}/appdata/%{name}.appdata.xml
|
2008-04-23 16:48:36 +02:00
|
|
|
%{_datadir}/icons/hicolor/*/apps/emacs.png
|
2009-05-18 13:02:30 +02:00
|
|
|
%{_datadir}/icons/hicolor/scalable/apps/emacs.svg
|
2020-07-11 08:03:24 +02:00
|
|
|
%{_datadir}/icons/hicolor/scalable/apps/emacs.ico
|
2009-05-18 13:02:30 +02:00
|
|
|
%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg
|
|
|
|
|
2017-07-14 22:18:20 +02:00
|
|
|
%files lucid
|
|
|
|
%{_bindir}/emacs-%{version}-lucid
|
2020-07-11 08:03:24 +02:00
|
|
|
%{_bindir}/emacs-%{version}-lucid.pdmp
|
2017-07-14 22:18:20 +02:00
|
|
|
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
|
|
|
%attr(0755,-,-) %ghost %{_bindir}/emacs-lucid
|
|
|
|
|
2004-09-09 06:36:23 +02:00
|
|
|
%files nox
|
- update to 21.4 movemail vulnerability release
- no longer need movemail-CAN-2005-0100.patch
- replace %{_bindir}/emacs alternatives with a wrapper script (Warren
Togami) to prevent it from disappearing when upgrading (Michal
Jaegermann, 154326)
- suffix the X emacs binaries with -x and the no X binaries with -nox
- the wrapper script %{_bindir}/emacs-%%version runs emacs-x if installed
or otherwise emacs-nox. %{_bindir}/emacs is a symlink to the wrapper
- make emacs and emacs-nox own the subdirs in %{_libexecdir}
- add a bunch of fixes from debian's emacs21_21.4a-1 patch:
battery-acpi-support.dpatch, bzero-and-have-stdlib.dpatch,
coding-region-leak.dpatch, detect-coding-iso2022.dpatch,
fix-batch-mode-signal-handling.dpatch, pcl-cvs-format.dpatch,
python-completion-ignored-extensions.dpatch,
remote-files-permissions.dpatch, save-buffer.dpatch,
scroll-margin.dpatch, xfree86-4.3-modifiers.dpatch
- add fix-x-vs-no-x-diffs.dpatch
- define emacs_libexecdir
- build both emacs and emacs-nox as %%{version}.1 and move common DOC file
to emacs-common
- suffix version in fns-%%{version}.1.el with -x and -nox respectively
- add 100 to elisp patches
2005-04-10 09:22:59 +02:00
|
|
|
%{_bindir}/emacs-%{version}-nox
|
2020-07-11 08:03:24 +02:00
|
|
|
%{_bindir}/emacs-%{version}-nox.pdmp
|
2014-08-18 11:00:54 +02:00
|
|
|
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
2014-08-04 10:07:40 +02:00
|
|
|
%attr(0755,-,-) %ghost %{_bindir}/emacs-nox
|
2004-09-09 06:36:23 +02:00
|
|
|
|
2014-10-24 10:14:21 +02:00
|
|
|
%files common -f common-filelist -f el-filelist
|
2004-09-09 06:35:28 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/skel/.emacs
|
2014-02-03 11:31:33 +01:00
|
|
|
%{_rpmconfigdir}/macros.d/macros.emacs
|
2017-02-02 01:52:37 +01:00
|
|
|
%license etc/COPYING
|
|
|
|
%doc doc/NEWS BUGS README
|
2011-05-26 14:49:54 +02:00
|
|
|
%{_bindir}/ebrowse
|
|
|
|
%{_bindir}/emacsclient
|
|
|
|
%{_bindir}/etags.emacs
|
|
|
|
%{_bindir}/gctags
|
2004-09-09 06:31:22 +02:00
|
|
|
%{_mandir}/*/*
|
|
|
|
%{_infodir}/*
|
2004-09-09 06:35:28 +02:00
|
|
|
%dir %{_datadir}/emacs/%{version}
|
|
|
|
%{_datadir}/emacs/%{version}/etc
|
|
|
|
%{_datadir}/emacs/%{version}/site-lisp
|
|
|
|
%{_libexecdir}/emacs
|
2014-08-13 09:24:03 +02:00
|
|
|
%{_userunitdir}/emacs.service
|
2009-02-25 13:30:53 +01:00
|
|
|
%attr(0644,root,root) %config(noreplace) %{_datadir}/emacs/site-lisp/default.el
|
2004-09-09 06:35:28 +02:00
|
|
|
%attr(0644,root,root) %config %{_datadir}/emacs/site-lisp/site-start.el
|
2007-09-11 19:56:57 +02:00
|
|
|
%{pkgconfig}/emacs.pc
|
2004-09-09 06:31:22 +02:00
|
|
|
|
2010-08-03 16:55:47 +02:00
|
|
|
%files terminal
|
|
|
|
%{_bindir}/emacs-terminal
|
|
|
|
%{_datadir}/applications/emacs-terminal.desktop
|
|
|
|
|
2011-01-11 10:06:06 +01:00
|
|
|
%files filesystem
|
|
|
|
%dir %{_datadir}/emacs
|
|
|
|
%dir %{_datadir}/emacs/site-lisp
|
|
|
|
%dir %{_datadir}/emacs/site-lisp/site-start.d
|
|
|
|
|
2019-04-18 10:57:33 +02:00
|
|
|
%files devel
|
|
|
|
%{_includedir}/emacs-module.h
|