1 |
ulm 14/05/05 07:03:22 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-common-gentoo-1.4-r1.ebuild |
5 |
Log: |
6 |
Install shared game score files in /var/games/emacs, compliant with the FHS. |
7 |
|
8 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.98 app-emacs/emacs-common-gentoo/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog?rev=1.98&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog?rev=1.98&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog?r1=1.97&r2=1.98 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog,v |
20 |
retrieving revision 1.97 |
21 |
retrieving revision 1.98 |
22 |
diff -u -r1.97 -r1.98 |
23 |
--- ChangeLog 18 Jan 2014 20:13:30 -0000 1.97 |
24 |
+++ ChangeLog 5 May 2014 07:03:22 -0000 1.98 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for app-emacs/emacs-common-gentoo |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog,v 1.97 2014/01/18 20:13:30 ulm Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog,v 1.98 2014/05/05 07:03:22 ulm Exp $ |
30 |
+ |
31 |
+*emacs-common-gentoo-1.4-r1 (05 May 2014) |
32 |
+ |
33 |
+ 05 May 2014; Ulrich Müller <ulm@g.o> |
34 |
+ +emacs-common-gentoo-1.4-r1.ebuild: |
35 |
+ Install shared game score files in /var/games/emacs, compliant with the FHS. |
36 |
|
37 |
18 Jan 2014; Ulrich Müller <ulm@g.o> |
38 |
-emacs-common-gentoo-1.3-r3.ebuild, -emacs-common-gentoo-1.3-r4.ebuild: |
39 |
|
40 |
|
41 |
|
42 |
1.1 app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.4-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.4-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.4-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: emacs-common-gentoo-1.4-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2014 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.4-r1.ebuild,v 1.1 2014/05/05 07:03:21 ulm Exp $ |
52 |
|
53 |
EAPI=5 |
54 |
|
55 |
inherit elisp-common eutils fdo-mime gnome2-utils readme.gentoo user |
56 |
|
57 |
DESCRIPTION="Common files needed by all GNU Emacs versions" |
58 |
HOMEPAGE="http://wiki.gentoo.org/wiki/Project:Emacs" |
59 |
SRC_URI="http://dev.gentoo.org/~ulm/emacs/${P}.tar.xz" |
60 |
|
61 |
LICENSE="GPL-3+" |
62 |
SLOT="0" |
63 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" |
64 |
IUSE="games X" |
65 |
|
66 |
PDEPEND="virtual/emacs" |
67 |
|
68 |
pkg_setup() { |
69 |
if use games && [[ -z $(egetent passwd "${GAMES_USER_DED:-games}") ]] |
70 |
then |
71 |
enewgroup "${GAMES_GROUP:-games}" 35 |
72 |
enewuser "${GAMES_USER_DED:-games}" 36 /bin/bash \ |
73 |
"${GAMES_PREFIX:-/usr/games}" "${GAMES_GROUP:-games}" |
74 |
fi |
75 |
} |
76 |
|
77 |
src_install() { |
78 |
insinto "${SITELISP}" |
79 |
doins subdirs.el |
80 |
newins site-gentoo.el{,.orig} |
81 |
|
82 |
keepdir /etc/emacs |
83 |
insinto /etc/emacs |
84 |
doins site-start.el |
85 |
|
86 |
if use games; then |
87 |
keepdir /var/games/emacs |
88 |
fowners "${GAMES_USER_DED:-games}" /var/games/emacs |
89 |
fi |
90 |
|
91 |
if use X; then |
92 |
local i |
93 |
domenu emacs.desktop emacsclient.desktop || die |
94 |
|
95 |
pushd icons |
96 |
newicon sink.png emacs-sink.png || die |
97 |
newicon emacs_48.png emacs.png || die |
98 |
newicon emacs22_48.png emacs22.png || die |
99 |
for i in 16 24 32 48 128; do |
100 |
insinto /usr/share/icons/hicolor/${i}x${i}/apps |
101 |
newins emacs_${i}.png emacs.png |
102 |
[[ ${i} -ne 128 ]] && newins emacs22_${i}.png emacs22.png |
103 |
done |
104 |
insinto /usr/share/icons/hicolor/scalable/apps |
105 |
doins emacs.svg |
106 |
popd |
107 |
|
108 |
gnome2_icon_savelist |
109 |
fi |
110 |
|
111 |
DOC_CONTENTS="All site initialisation for Gentoo-installed packages is |
112 |
added to ${SITELISP}/site-gentoo.el. In order for this site |
113 |
initialisation to be loaded for all users automatically, a default |
114 |
site startup file /etc/emacs/site-start.el is installed. You are |
115 |
responsible for maintenance of this file. |
116 |
\n\nAlternatively, individual users can add the following command: |
117 |
\n\n(require 'site-gentoo) |
118 |
\n\nto their ~/.emacs initialisation files, or, for greater |
119 |
flexibility, users may load single package-specific initialisation |
120 |
files from the ${SITELISP}/site-gentoo.d/ directory." |
121 |
readme.gentoo_create_doc |
122 |
} |
123 |
|
124 |
site-start-modified-p() { |
125 |
case $(cksum <"${EROOT}${SITELISP}/site-start.el") in |
126 |
# checksums of auto-generated site-start.el files |
127 |
"2098727038 349") return 1 ;; # elisp-common.eclass |
128 |
"3626264063 355") return 1 ;; # emacs-common-gentoo-1.0 (cvs rev 1.1) |
129 |
"3738455534 394") return 1 ;; # emacs-common-gentoo-1.0 (cvs rev 1.6) |
130 |
"4199862847 394") return 1 ;; # emacs-common-gentoo-1.1 |
131 |
"2547348044 394") return 1 ;; # emacs-common-gentoo-1.2 |
132 |
"2214952934 397") return 1 ;; # emacs-common-gentoo-1.2-r1 |
133 |
"3917799317 397") return 1 ;; # emacs-common-gentoo-1.2-r2 |
134 |
*) return 0 ;; |
135 |
esac |
136 |
} |
137 |
|
138 |
pkg_preinst() { |
139 |
# make sure that site-gentoo.el exists since site-start.el requires it |
140 |
if [[ ! -d ${EROOT}${SITELISP} ]]; then |
141 |
mv "${ED}${SITELISP}"/site-gentoo.el{.orig,} || die |
142 |
else |
143 |
elisp-site-regen |
144 |
rm "${ED}${SITELISP}/site-gentoo.el.orig" || die |
145 |
cp "${EROOT}${SITELISP}/site-gentoo.el" "${ED}${SITELISP}/" || die |
146 |
fi |
147 |
|
148 |
if use games; then |
149 |
local f |
150 |
for f in /var/games/emacs/{snake,tetris}-scores; do |
151 |
if [[ -e ${EROOT}${f} ]]; then |
152 |
cp "${EROOT}${f}" "${ED}${f}" || die |
153 |
elif [[ -e ${EROOT}/var/lib${f#/var} ]]; then |
154 |
# backwards compatibility |
155 |
cp "${EROOT}/var/lib${f#/var}" "${ED}${f}" || die |
156 |
fi |
157 |
touch "${ED}${f}" || die |
158 |
chown "${GAMES_USER_DED:-games}" "${ED}${f}" || die |
159 |
done |
160 |
fi |
161 |
|
162 |
if [[ -e ${EROOT}${SITELISP}/site-start.el ]]; then |
163 |
ewarn "The location of the site startup file for Emacs has changed to" |
164 |
ewarn "/etc/emacs/site-start.el." |
165 |
if site-start-modified-p; then |
166 |
eerror "Locally modified ${SITELISP}/site-start.el file found." |
167 |
eerror "If this file contains your own customisation, you should" |
168 |
eerror "move it to /etc/emacs/. In any case, you must remove the" |
169 |
eerror "file from the old location." |
170 |
die "Cannot continue unless ${SITELISP}/site-start.el is removed." |
171 |
else |
172 |
ewarn "Removing the old ${SITELISP}/site-start.el file." |
173 |
rm -f "${EROOT}${SITELISP}/site-start.el" |
174 |
fi |
175 |
fi |
176 |
} |
177 |
|
178 |
pkg_postinst() { |
179 |
if use X; then |
180 |
fdo-mime_desktop_database_update |
181 |
gnome2_icon_cache_update |
182 |
fi |
183 |
|
184 |
readme.gentoo_print_elog |
185 |
} |
186 |
|
187 |
pkg_postrm() { |
188 |
if use X; then |
189 |
fdo-mime_desktop_database_update |
190 |
gnome2_icon_cache_update |
191 |
fi |
192 |
} |