summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emacs/systemd-mode')
-rw-r--r--app-emacs/systemd-mode/Manifest1
-rw-r--r--app-emacs/systemd-mode/files/50systemd-mode-gentoo.el2
-rw-r--r--app-emacs/systemd-mode/files/systemd-mode-1.6-directive-txt-files.patch29
-rw-r--r--app-emacs/systemd-mode/metadata.xml14
-rw-r--r--app-emacs/systemd-mode/systemd-mode-1.6.ebuild38
5 files changed, 84 insertions, 0 deletions
diff --git a/app-emacs/systemd-mode/Manifest b/app-emacs/systemd-mode/Manifest
new file mode 100644
index 000000000000..db06291b1510
--- /dev/null
+++ b/app-emacs/systemd-mode/Manifest
@@ -0,0 +1 @@
+DIST systemd-mode-1.6.tar.gz 21986 BLAKE2B 05278d86a6df9b5e95c75c1d1ebee182653f760e12639d4a260cf757fee3236988d5f8de671fe9a4724bc0338e08d6f10c405a1d42691f5d83c0efdc516da178 SHA512 2461e07287c1dbe5990eaae83484e98f4e8f2e89ece4b2f5f53f3c9174fc20a0cdf2e930c356bfb6a84587595d66ac353f4f85b5a96507c5344a615d4516f646
diff --git a/app-emacs/systemd-mode/files/50systemd-mode-gentoo.el b/app-emacs/systemd-mode/files/50systemd-mode-gentoo.el
new file mode 100644
index 000000000000..01b8ef7e6e34
--- /dev/null
+++ b/app-emacs/systemd-mode/files/50systemd-mode-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(load "systemd-mode-autoloads" nil t)
diff --git a/app-emacs/systemd-mode/files/systemd-mode-1.6-directive-txt-files.patch b/app-emacs/systemd-mode/files/systemd-mode-1.6-directive-txt-files.patch
new file mode 100644
index 000000000000..c85d78a10200
--- /dev/null
+++ b/app-emacs/systemd-mode/files/systemd-mode-1.6-directive-txt-files.patch
@@ -0,0 +1,29 @@
+--- a/systemd.el
++++ b/systemd.el
+@@ -89,7 +89,7 @@
+ (insert-file-contents
+ (let ((f "unit-directives.txt"))
+ (if (null load-file-name) f
+- (expand-file-name f (file-name-directory load-file-name)))))
++ (expand-file-name f (file-name-directory "@SITEETC@")))))
+ (split-string (buffer-string))))
+ "Configuration directives for systemd.")
+
+@@ -105,7 +105,7 @@
+ (insert-file-contents
+ (let ((f "network-directives.txt"))
+ (if (null load-file-name) f
+- (expand-file-name f (file-name-directory load-file-name)))))
++ (expand-file-name f (file-name-directory "@SITEETC@")))))
+ (split-string (buffer-string))))
+ "Network configuration directives for systemd.")
+
+@@ -119,7 +119,7 @@
+ (insert-file-contents
+ (let ((f "nspawn-directives.txt"))
+ (if (null load-file-name) f
+- (expand-file-name f (file-name-directory load-file-name)))))
++ (expand-file-name f (file-name-directory "@SITEETC@")))))
+ (split-string (buffer-string))))
+ "Namespace container configuration directives for systemd.")
+
diff --git a/app-emacs/systemd-mode/metadata.xml b/app-emacs/systemd-mode/metadata.xml
new file mode 100644
index 000000000000..eca5f77b895f
--- /dev/null
+++ b/app-emacs/systemd-mode/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="project">
+ <email>gnu-emacs@gentoo.org</email>
+ <name>Gentoo GNU Emacs project</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/holomorph/systemd-mode/issues/</bugs-to>
+ <remote-id type="github">holomorph/systemd-mode</remote-id>
+ </upstream>
+ <stabilize-allarches />
+</pkgmetadata>
diff --git a/app-emacs/systemd-mode/systemd-mode-1.6.ebuild b/app-emacs/systemd-mode/systemd-mode-1.6.ebuild
new file mode 100644
index 000000000000..4606e95d1602
--- /dev/null
+++ b/app-emacs/systemd-mode/systemd-mode-1.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp
+
+DESCRIPTION="Major mode for editing systemd units in GNU Emacs"
+HOMEPAGE="https://github.com/holomorph/systemd-mode/"
+SRC_URI="https://github.com/holomorph/${PN}/archive/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+
+PATCHES=( "${FILESDIR}"/${P}-directive-txt-files.patch )
+
+DOCS=( README )
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ elisp_src_prepare
+
+ sed "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|" -i systemd.el || die
+}
+
+src_compile() {
+ elisp_src_compile
+ elisp-make-autoload-file
+}
+
+src_install() {
+ elisp_src_install
+
+ insinto "${SITEETC}/${PN}"
+ doins "${S}"/*.txt
+}