commit:     526b95772d809300f3c6775d908aadb970907355
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  9 18:09:29 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sat Sep  9 18:14:00 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=526b9577

app-emacs/lice-el: new package; add 0.3

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 app-emacs/lice-el/Manifest                        |  1 +
 app-emacs/lice-el/files/50lice-el-gentoo.el       |  3 ++
 app-emacs/lice-el/files/lice-el-0.3-siteetc.patch | 12 +++++++
 app-emacs/lice-el/lice-el-0.3.ebuild              | 39 +++++++++++++++++++++++
 app-emacs/lice-el/metadata.xml                    | 13 ++++++++
 5 files changed, 68 insertions(+)

diff --git a/app-emacs/lice-el/Manifest b/app-emacs/lice-el/Manifest
new file mode 100644
index 000000000000..cab62d351372
--- /dev/null
+++ b/app-emacs/lice-el/Manifest
@@ -0,0 +1 @@
+DIST lice-el-0.3.tar.gz 18587 BLAKE2B 
5bf04f3aab3a1cc6f2729978f6d4b95af9fece7df0d44ae49e61a98277552b26ab2fca567faf8daa6e38eb44d7b446b60c4b02cf178ef6d9f8b5e744c783ecd8
 SHA512 
a00b68b1c54848588c432f5120f8b45edf3ef9933fc8d2e38d798222adf1fbc34dc7fe34216b12c8b42815dcb68865dafb75efbd07ec7a69f23c235c8648d634

diff --git a/app-emacs/lice-el/files/50lice-el-gentoo.el 
b/app-emacs/lice-el/files/50lice-el-gentoo.el
new file mode 100644
index 000000000000..c249663fc2fa
--- /dev/null
+++ b/app-emacs/lice-el/files/50lice-el-gentoo.el
@@ -0,0 +1,3 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'lice "lice"
+  "Insert license and headers." t)

diff --git a/app-emacs/lice-el/files/lice-el-0.3-siteetc.patch 
b/app-emacs/lice-el/files/lice-el-0.3-siteetc.patch
new file mode 100644
index 000000000000..264bb1828100
--- /dev/null
+++ b/app-emacs/lice-el/files/lice-el-0.3-siteetc.patch
@@ -0,0 +1,12 @@
+--- a/lice.el
++++ b/lice.el
+@@ -57,8 +57,7 @@
+ 
+ (defconst lice:system-template-directory
+   (expand-file-name "template"
+-                    (or (and load-file-name (file-name-directory 
load-file-name))
+-                        default-directory)))
++                    "@SITEETC@"))
+ 
+ (defvar lice:custom-template-directory
+   (expand-file-name "lice" user-emacs-directory))

diff --git a/app-emacs/lice-el/lice-el-0.3.ebuild 
b/app-emacs/lice-el/lice-el-0.3.ebuild
new file mode 100644
index 000000000000..6cbd1e127c7f
--- /dev/null
+++ b/app-emacs/lice-el/lice-el-0.3.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp
+
+DESCRIPTION="License and header template for GNU Emacs"
+HOMEPAGE="https://github.com/buzztaiki/lice-el/";
+
+if [[ ${PV} == *9999* ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/buzztaiki/${PN}.git";
+else
+       SRC_URI="https://github.com/buzztaiki/${PN}/archive/v${PV}.tar.gz
+               -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+
+PATCHES=( "${FILESDIR}/${PN}-0.3-siteetc.patch" )
+
+DOCS=( README.md )
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+       default
+
+       sed -i "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|" lice.el || die
+}
+
+src_install() {
+       elisp_src_install
+
+       insinto "${SITEETC}/${PN}"
+       doins -r template
+}

diff --git a/app-emacs/lice-el/metadata.xml b/app-emacs/lice-el/metadata.xml
new file mode 100644
index 000000000000..049a47d44e2d
--- /dev/null
+++ b/app-emacs/lice-el/metadata.xml
@@ -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>[email protected]</email>
+    <name>Gentoo GNU Emacs project</name>
+  </maintainer>
+  <upstream>
+    <bugs-to>https://github.com/buzztaiki/lice-el/issues/</bugs-to>
+    <remote-id type="github">buzztaiki/lice-el</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to