Patch Makefile to install emacs.service into desired location.
This commit is contained in:
parent
b9da2a30d8
commit
6cb8c47e98
31
emacs-libdir-vs-systemd.patch
Normal file
31
emacs-libdir-vs-systemd.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From a56539c1d7ef7aa56e575685bdfe1406aebb518d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Oliver <git@mavit.org.uk>
|
||||||
|
Date: Wed, 5 Feb 2020 12:42:04 +0000
|
||||||
|
Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20assemble=20systemdunitdir=20fro?=
|
||||||
|
=?UTF-8?q?m=20`libdir`?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
On 64 bit Fedora, `libdir` is `/usr/lib64`, whereas systemd services
|
||||||
|
live under `/usr/lib/systemd`.
|
||||||
|
---
|
||||||
|
Makefile.in | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile.in b/Makefile.in
|
||||||
|
index 2c82c49fba..b2468eb824 100644
|
||||||
|
--- a/Makefile.in
|
||||||
|
+++ b/Makefile.in
|
||||||
|
@@ -208,7 +208,7 @@ appdatadir=
|
||||||
|
# Other options include ~/.config/systemd/user/,
|
||||||
|
# $XDG_RUNTIME_DIR/systemd/user/
|
||||||
|
# It seems the user may end up having to make a manual link...
|
||||||
|
-systemdunitdir=$(libdir)/systemd/user
|
||||||
|
+systemdunitdir=$(shell pkg-config --variable=systemduserunitdir systemd)
|
||||||
|
|
||||||
|
# Where the etc/images/icons/hicolor directory is to be installed.
|
||||||
|
icondir=$(datarootdir)/icons
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
10
emacs.spec
10
emacs.spec
@ -26,6 +26,7 @@ Source10: %{name}.appdata.xml
|
|||||||
Patch1: emacs-spellchecker.patch
|
Patch1: emacs-spellchecker.patch
|
||||||
Patch2: emacs-system-crypto-policies.patch
|
Patch2: emacs-system-crypto-policies.patch
|
||||||
Patch3: emacs-glibc-2.34.patch
|
Patch3: emacs-glibc-2.34.patch
|
||||||
|
Patch4: emacs-libdir-vs-systemd.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: atk-devel
|
BuildRequires: atk-devel
|
||||||
@ -190,6 +191,7 @@ Development header files for Emacs.
|
|||||||
%patch1 -p1 -b .spellchecker
|
%patch1 -p1 -b .spellchecker
|
||||||
%patch2 -p1 -b .system-crypto-policies
|
%patch2 -p1 -b .system-crypto-policies
|
||||||
%patch3 -p1 -b .glibc2.34
|
%patch3 -p1 -b .glibc2.34
|
||||||
|
%patch4 -p1 -b .libdir-vs-systemd
|
||||||
autoconf
|
autoconf
|
||||||
|
|
||||||
# We prefer our emacs.desktop file
|
# We prefer our emacs.desktop file
|
||||||
@ -364,12 +366,8 @@ install -p -m 755 %SOURCE8 %{buildroot}%{_bindir}/emacs-terminal
|
|||||||
# After everything is installed, remove info dir
|
# After everything is installed, remove info dir
|
||||||
rm -f %{buildroot}%{_infodir}/dir
|
rm -f %{buildroot}%{_infodir}/dir
|
||||||
|
|
||||||
# Installing service file
|
# Remove duplicate emacs.service file
|
||||||
# Emacs 26.1 installs the upstream unit file to /usr/lib64 on 64bit archs, we don't want that
|
rm %{buildroot}%{_datadir}/%{name}/%{version}/etc/%{name}.service
|
||||||
if [[ -f %{buildroot}/usr/lib64/systemd/user/emacs.service ]]; then
|
|
||||||
mkdir -p %{buildroot}%{_userunitdir}
|
|
||||||
mv %{buildroot}/usr/lib64/systemd/user/emacs.service %{buildroot}%{_userunitdir}/emacs.service
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install desktop files
|
# Install desktop files
|
||||||
mkdir -p %{buildroot}%{_datadir}/applications
|
mkdir -p %{buildroot}%{_datadir}/applications
|
||||||
|
Loading…
Reference in New Issue
Block a user