1 |
commit: f43684cbee7dcd0de6307b8f5ff1975bfa029fab |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 13 18:33:21 2017 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 13 18:33:21 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f43684cb |
7 |
|
8 |
app-emacs/emacs-common-gentoo: Migrate to xdg-utils.eclass. |
9 |
|
10 |
Package-Manager: Portage-2.3.13, Repoman-2.3.4 |
11 |
|
12 |
.../emacs-common-gentoo-1.6-r1.ebuild | 113 +++++++++++++++++++++ |
13 |
1 file changed, 113 insertions(+) |
14 |
|
15 |
diff --git a/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.6-r1.ebuild b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.6-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..d9f2fb9b450 |
18 |
--- /dev/null |
19 |
+++ b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.6-r1.ebuild |
20 |
@@ -0,0 +1,113 @@ |
21 |
+# Copyright 1999-2017 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+ |
26 |
+inherit elisp-common eutils xdg-utils gnome2-utils readme.gentoo-r1 user |
27 |
+ |
28 |
+DESCRIPTION="Common files needed by all GNU Emacs versions" |
29 |
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Emacs" |
30 |
+SRC_URI="https://dev.gentoo.org/~ulm/emacs/${P}.tar.xz" |
31 |
+ |
32 |
+LICENSE="GPL-3+" |
33 |
+SLOT="0" |
34 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" |
35 |
+IUSE="games X" |
36 |
+ |
37 |
+PDEPEND="virtual/emacs" |
38 |
+ |
39 |
+pkg_setup() { |
40 |
+ use games && enewgroup gamestat 36 |
41 |
+} |
42 |
+ |
43 |
+src_install() { |
44 |
+ insinto "${SITELISP}" |
45 |
+ doins subdirs.el |
46 |
+ newins site-gentoo.el{,.orig} |
47 |
+ |
48 |
+ keepdir /etc/emacs |
49 |
+ insinto /etc/emacs |
50 |
+ doins site-start.el |
51 |
+ |
52 |
+ if use games; then |
53 |
+ keepdir /var/games/emacs |
54 |
+ fowners 0:gamestat /var/games/emacs |
55 |
+ fperms g+w /var/games/emacs |
56 |
+ fi |
57 |
+ |
58 |
+ if use X; then |
59 |
+ local i |
60 |
+ domenu emacs.desktop emacsclient.desktop || die |
61 |
+ |
62 |
+ pushd icons || die |
63 |
+ newicon sink.png emacs-sink.png |
64 |
+ newicon emacs25_48.png emacs.png |
65 |
+ for i in 16 24 32 48 128; do |
66 |
+ [[ ${i} -le 48 ]] && newicon -s ${i} emacs22_${i}.png emacs22.png |
67 |
+ newicon -s ${i} emacs23_${i}.png emacs23.png |
68 |
+ newicon -s ${i} emacs25_${i}.png emacs.png |
69 |
+ done |
70 |
+ doicon -s scalable emacs23.svg |
71 |
+ newicon -s scalable emacs25.svg emacs.svg |
72 |
+ popd |
73 |
+ |
74 |
+ gnome2_icon_savelist |
75 |
+ fi |
76 |
+ |
77 |
+ DOC_CONTENTS="All site initialisation for Gentoo-installed packages is |
78 |
+ added to ${SITELISP}/site-gentoo.el. In order for this site |
79 |
+ initialisation to be loaded for all users automatically, a default |
80 |
+ site startup file /etc/emacs/site-start.el is installed. You are |
81 |
+ responsible for maintenance of this file. |
82 |
+ \n\nAlternatively, individual users can add the following command: |
83 |
+ \n\n(require 'site-gentoo) |
84 |
+ \n\nto their ~/.emacs initialisation files, or, for greater |
85 |
+ flexibility, users may load single package-specific initialisation |
86 |
+ files from the ${SITELISP}/site-gentoo.d/ directory." |
87 |
+ readme.gentoo_create_doc |
88 |
+} |
89 |
+ |
90 |
+pkg_preinst() { |
91 |
+ # make sure that site-gentoo.el exists since site-start.el requires it |
92 |
+ if [[ ! -f ${ED}${SITELISP}/site-gentoo.el ]]; then #554518 |
93 |
+ mv "${ED}${SITELISP}"/site-gentoo.el{.orig,} || die |
94 |
+ fi |
95 |
+ if [[ -d ${EROOT}${SITELISP} ]]; then |
96 |
+ elisp-site-regen |
97 |
+ cp "${EROOT}${SITELISP}/site-gentoo.el" "${ED}${SITELISP}/" || die |
98 |
+ fi |
99 |
+ |
100 |
+ if use games; then |
101 |
+ local f |
102 |
+ for f in /var/games/emacs/{snake,tetris}-scores; do |
103 |
+ if [[ -e ${EROOT}${f} ]]; then |
104 |
+ cp "${EROOT}${f}" "${ED}${f}" || die |
105 |
+ fi |
106 |
+ touch "${ED}${f}" || die |
107 |
+ chgrp gamestat "${ED}${f}" || die |
108 |
+ chmod g+w "${ED}${f}" || die |
109 |
+ done |
110 |
+ |
111 |
+ if has 1.4-r1 ${REPLACING_VERSIONS} \ |
112 |
+ && [[ -d ${EROOT}/var/games/emacs ]]; then |
113 |
+ elog "Updating owner and permissions of score file directory." |
114 |
+ chown 0:gamestat "${EROOT}"/var/games/emacs || die |
115 |
+ chmod 775 "${EROOT}"/var/games/emacs || die |
116 |
+ fi |
117 |
+ fi |
118 |
+} |
119 |
+ |
120 |
+pkg_postinst() { |
121 |
+ if use X; then |
122 |
+ xdg_desktop_database_update |
123 |
+ gnome2_icon_cache_update |
124 |
+ fi |
125 |
+ readme.gentoo_print_elog |
126 |
+} |
127 |
+ |
128 |
+pkg_postrm() { |
129 |
+ if use X; then |
130 |
+ xdg_desktop_database_update |
131 |
+ gnome2_icon_cache_update |
132 |
+ fi |
133 |
+} |