Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/slim/files/, x11-misc/slim/
Date: Mon, 21 Sep 2015 17:01:05
Message-Id: 1442854789.55fa9dd65d9b67ce91db08adce9810357917c3dc.axs@gentoo
1 commit: 55fa9dd65d9b67ce91db08adce9810357917c3dc
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 20 17:34:55 2015 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 21 16:59:49 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55fa9dd6
7
8 x11-misc/slim: add live ebuild
9
10 Package-Manager: portage-2.2.20.1
11
12 x11-misc/slim/files/slim-9999-config.diff | 70 +++++++++++++++++
13 x11-misc/slim/slim-9999.ebuild | 125 ++++++++++++++++++++++++++++++
14 2 files changed, 195 insertions(+)
15
16 diff --git a/x11-misc/slim/files/slim-9999-config.diff b/x11-misc/slim/files/slim-9999-config.diff
17 new file mode 100644
18 index 0000000..81f0fee
19 --- /dev/null
20 +++ b/x11-misc/slim/files/slim-9999-config.diff
21 @@ -0,0 +1,70 @@
22 +diff --git a/slim.conf b/slim.conf
23 +index 2c72255..7af4adb 100644
24 +--- a/slim.conf
25 ++++ b/slim.conf
26 +@@ -2,7 +2,7 @@
27 + # Note: -xauth $authfile is automatically appended
28 + default_path /bin:/usr/bin:/usr/local/bin
29 + default_xserver /usr/bin/X
30 +-#xserver_arguments -dpi 75
31 ++xserver_arguments -nolisten tcp -br -deferglyphs 16 vt07
32 +
33 + # Commands for halt, login, etc.
34 + halt_cmd /sbin/shutdown -h now
35 +@@ -18,7 +18,7 @@ authfile /var/run/slim.auth
36 +
37 +
38 + # Activate numlock when slim starts. Valid values: on|off
39 +-# numlock on
40 ++numlock on
41 +
42 + # Hide the mouse cursor (note: does not work with some WMs).
43 + # Valid values: true|false
44 +@@ -33,19 +33,20 @@ authfile /var/run/slim.auth
45 + # to adjust the command according to your preferred shell,
46 + # i.e. for freebsd use:
47 + # login_cmd exec /bin/sh - ~/.xinitrc %session
48 +-login_cmd exec /bin/bash -login ~/.xinitrc %session
49 ++# login_cmd exec /bin/bash -login ~/.xinitrc %session
50 ++login_cmd exec /bin/bash -login /usr/share/slim/Xsession %session
51 +
52 + # Commands executed when starting and exiting a session.
53 + # They can be used for registering a X11 session with
54 + # sessreg. You can use the %user variable
55 + #
56 +-# sessionstart_cmd some command
57 +-# sessionstop_cmd some command
58 ++sessionstart_cmd /usr/bin/sessreg -a -l :0.0 %user
59 ++sessionstop_cmd /usr/bin/sessreg -d -l :0.0 %user
60 +
61 + # Start in daemon mode. Valid values: yes | no
62 + # Note that this can be overriden by the command line
63 + # options "-d" and "-nodaemon"
64 +-# daemon yes
65 ++daemon yes
66 +
67 + # Available sessions:
68 + # The current chosen session name replaces %session in the login_cmd
69 +@@ -63,7 +64,10 @@ login_cmd exec /bin/bash -login ~/.xinitrc %session
70 + sessiondir /usr/share/xsessions
71 +
72 + # Executed when pressing F11 (requires imagemagick for 'import')
73 +-screenshot_cmd import -window root /slim.png
74 ++# Alternative: media-gfx/scrot. See Gentoo bug 252241 for more info.
75 ++screenshot_cmd import -window root /tmp/slim.png
76 ++#screenshot_cmd scrot /tmp/slim.png
77 ++
78 +
79 + # welcome message. Available variables: %host, %domain
80 + welcome_msg Welcome to %host
81 +@@ -92,8 +96,8 @@ reboot_msg The system is rebooting...
82 + # randomly choose from
83 + current_theme default
84 +
85 +-# Lock file
86 +-lockfile /var/run/slim.lock
87 ++# Lock file, /etc/init.d/xdm expects slim.pid
88 ++lockfile /run/slim.pid
89 +
90 + # Log file
91 + logfile /var/log/slim.log
92
93 diff --git a/x11-misc/slim/slim-9999.ebuild b/x11-misc/slim/slim-9999.ebuild
94 new file mode 100644
95 index 0000000..86ea64f
96 --- /dev/null
97 +++ b/x11-misc/slim/slim-9999.ebuild
98 @@ -0,0 +1,125 @@
99 +# Copyright 1999-2015 Gentoo Foundation
100 +# Distributed under the terms of the GNU General Public License v2
101 +# $Id$
102 +
103 +EAPI=5
104 +
105 +CMAKE_MIN_VERSION="2.8.8"
106 +inherit cmake-utils pam eutils systemd versionator
107 +
108 +if [[ ${PV} = 9999* ]]; then
109 + EGIT_REPO_URI="git://github.com/axs-gentoo/slim-git.git"
110 + inherit git-r3
111 + KEYWORDS=""
112 +else
113 + SRC_URI="mirror://sourceforge/project/${PN}.berlios/${P}.tar.gz"
114 + KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
115 +fi
116 +
117 +DESCRIPTION="Simple Login Manager"
118 +HOMEPAGE="http://sourceforge.net/projects/slim.berlios/"
119 +LICENSE="GPL-2"
120 +SLOT="0"
121 +IUSE="branding pam consolekit"
122 +REQUIRED_USE="consolekit? ( pam )"
123 +
124 +RDEPEND="x11-libs/libXmu
125 + x11-libs/libX11
126 + x11-libs/libXpm
127 + x11-libs/libXft
128 + x11-libs/libXrandr
129 + media-libs/libpng:0=
130 + virtual/jpeg:=
131 + x11-apps/sessreg
132 + consolekit? ( sys-auth/consolekit
133 + sys-apps/dbus )
134 + pam? ( virtual/pam
135 + !x11-misc/slimlock )"
136 +DEPEND="${RDEPEND}
137 + virtual/pkgconfig
138 + x11-proto/xproto"
139 +PDEPEND="branding? ( >=x11-themes/slim-themes-1.2.3a-r3 )"
140 +
141 +src_prepare() {
142 + # Our Gentoo-specific config changes
143 + epatch "${FILESDIR}"/${P}-config.diff
144 +
145 + if use elibc_FreeBSD; then
146 + sed -i -e 's/"-DHAVE_SHADOW"/"-DNEEDS_BASENAME"/' CMakeLists.txt \
147 + || die
148 + fi
149 +
150 + if use branding; then
151 + sed -i -e '/current_theme/s/default/slim-gentoo-simple/' slim.conf \
152 + || die
153 + fi
154 +}
155 +
156 +src_configure() {
157 + mycmakeargs=(
158 + $(cmake-utils_use pam USE_PAM)
159 + $(cmake-utils_use consolekit USE_CONSOLEKIT)
160 + )
161 +
162 + cmake-utils_src_configure
163 +}
164 +
165 +src_install() {
166 + cmake-utils_src_install
167 +
168 + if use pam ; then
169 + pamd_mimic system-local-login slim auth account session
170 + pamd_mimic system-local-login slimlock auth
171 + fi
172 +
173 + systemd_dounit build_files/slim.service
174 +
175 + insinto /usr/share/slim
176 + newins "${FILESDIR}/Xsession-r3" Xsession
177 +
178 + insinto /etc/logrotate.d
179 + newins "${FILESDIR}/slim.logrotate" slim
180 +
181 + dodoc xinitrc.sample README THEMES
182 +}
183 +
184 +pkg_postinst() {
185 + # note, $REPLACING_VERSIONS will always contain 0 or 1 PV's for slim
186 + if [[ -z ${REPLACING_VERSIONS} ]]; then
187 + elog
188 + elog "The configuration file is located at /etc/slim.conf."
189 + elog
190 + elog "If you wish ${PN} to start automatically, set DISPLAYMANAGER=\"${PN}\" "
191 + elog "in /etc/conf.d/xdm and run \"rc-update add xdm default\"."
192 + fi
193 + if ! version_is_at_least "1.3.6" "${REPLACING_VERSIONS:-1.0}" ; then
194 + elog
195 + elog "By default, ${PN} is set up to provide X session selection based on the"
196 + elog ".desktop entries in /usr/share/xsessions/ that are installed by each"
197 + elog "DE, including ~/.xsession support via the 'Xsession' session. Sessions"
198 + elog "are selected at login by pressing [F1]. As per the Xorg guide, each"
199 + elog "user's default session can be specified by adding the name from"
200 + elog "/etc/X11/Sessions to ~/.xsession."
201 + elog
202 + elog "The XSESSION environment variable is still supported as a default"
203 + elog "if no session has been specified by the user."
204 + elog
205 + elog "If you want to use .xinitrc in the user's home directory for session"
206 + elog "management instead, see README and xinitrc.sample in"
207 + elog "/usr/share/doc/${PF} and change your login_cmd in /etc/slim.conf"
208 + elog "accordingly."
209 + elog
210 + if ! version_is_at_least "1.3.2-r7" "${REPLACING_VERSIONS:-1.4}" ; then
211 + ewarn "Please note that slim supports consolekit directly. Please do not use any "
212 + ewarn "old work-arounds (including calls to 'ck-launch-session' in xinitrc scripts)"
213 + ewarn "and enable USE=\"consolekit\" instead."
214 + ewarn
215 + fi
216 + fi
217 + if ! use pam; then
218 + elog "You have merged ${PN} without USE=\"pam\", this will cause ${PN} to fall back to"
219 + elog "the console when restarting your window manager. If this is not desired, then"
220 + elog "please remerge ${PN} with USE=\"pam\""
221 + elog
222 + fi
223 +}