app-emacs/systemd-mode: new package; add 1.6

Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Maciej Barć
2022-10-25 03:05:54 +02:00
parent f0815763de
commit 8b85c29a41
5 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST systemd-mode-1.6.tar.gz 21986 BLAKE2B 05278d86a6df9b5e95c75c1d1ebee182653f760e12639d4a260cf757fee3236988d5f8de671fe9a4724bc0338e08d6f10c405a1d42691f5d83c0efdc516da178 SHA512 2461e07287c1dbe5990eaae83484e98f4e8f2e89ece4b2f5f53f3c9174fc20a0cdf2e930c356bfb6a84587595d66ac353f4f85b5a96507c5344a615d4516f646

View File

@@ -0,0 +1,2 @@
(add-to-list 'load-path "@SITELISP@")
(load "systemd-mode-autoloads" nil t)

View File

@@ -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.")

View File

@@ -0,0 +1,13 @@
<?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>
</pkgmetadata>

View File

@@ -0,0 +1,40 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
NEED_EMACS=24.4
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
}