diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2015-09-20 13:34:55 -0400 |
---|---|---|
committer | Ian Stakenvicius <axs@gentoo.org> | 2015-09-21 12:59:49 -0400 |
commit | 55fa9dd65d9b67ce91db08adce9810357917c3dc (patch) | |
tree | 54dc266d262124504c7c5612ae3fadca5392f271 /x11-misc/slim | |
parent | 0dd0a3502b745c0e89e00fd148dffaf217b61bfa (diff) | |
download | gentoo-55fa9dd65d9b67ce91db08adce9810357917c3dc.tar.gz gentoo-55fa9dd65d9b67ce91db08adce9810357917c3dc.tar.xz |
x11-misc/slim: add live ebuild
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'x11-misc/slim')
-rw-r--r-- | x11-misc/slim/files/slim-9999-config.diff | 70 | ||||
-rw-r--r-- | x11-misc/slim/slim-9999.ebuild | 125 |
2 files changed, 195 insertions, 0 deletions
diff --git a/x11-misc/slim/files/slim-9999-config.diff b/x11-misc/slim/files/slim-9999-config.diff new file mode 100644 index 00000000000..81f0feea43f --- /dev/null +++ b/x11-misc/slim/files/slim-9999-config.diff @@ -0,0 +1,70 @@ +diff --git a/slim.conf b/slim.conf +index 2c72255..7af4adb 100644 +--- a/slim.conf ++++ b/slim.conf +@@ -2,7 +2,7 @@ + # Note: -xauth $authfile is automatically appended + default_path /bin:/usr/bin:/usr/local/bin + default_xserver /usr/bin/X +-#xserver_arguments -dpi 75 ++xserver_arguments -nolisten tcp -br -deferglyphs 16 vt07 + + # Commands for halt, login, etc. + halt_cmd /sbin/shutdown -h now +@@ -18,7 +18,7 @@ authfile /var/run/slim.auth + + + # Activate numlock when slim starts. Valid values: on|off +-# numlock on ++numlock on + + # Hide the mouse cursor (note: does not work with some WMs). + # Valid values: true|false +@@ -33,19 +33,20 @@ authfile /var/run/slim.auth + # to adjust the command according to your preferred shell, + # i.e. for freebsd use: + # login_cmd exec /bin/sh - ~/.xinitrc %session +-login_cmd exec /bin/bash -login ~/.xinitrc %session ++# login_cmd exec /bin/bash -login ~/.xinitrc %session ++login_cmd exec /bin/bash -login /usr/share/slim/Xsession %session + + # Commands executed when starting and exiting a session. + # They can be used for registering a X11 session with + # sessreg. You can use the %user variable + # +-# sessionstart_cmd some command +-# sessionstop_cmd some command ++sessionstart_cmd /usr/bin/sessreg -a -l :0.0 %user ++sessionstop_cmd /usr/bin/sessreg -d -l :0.0 %user + + # Start in daemon mode. Valid values: yes | no + # Note that this can be overriden by the command line + # options "-d" and "-nodaemon" +-# daemon yes ++daemon yes + + # Available sessions: + # The current chosen session name replaces %session in the login_cmd +@@ -63,7 +64,10 @@ login_cmd exec /bin/bash -login ~/.xinitrc %session + sessiondir /usr/share/xsessions + + # Executed when pressing F11 (requires imagemagick for 'import') +-screenshot_cmd import -window root /slim.png ++# Alternative: media-gfx/scrot. See Gentoo bug 252241 for more info. ++screenshot_cmd import -window root /tmp/slim.png ++#screenshot_cmd scrot /tmp/slim.png ++ + + # welcome message. Available variables: %host, %domain + welcome_msg Welcome to %host +@@ -92,8 +96,8 @@ reboot_msg The system is rebooting... + # randomly choose from + current_theme default + +-# Lock file +-lockfile /var/run/slim.lock ++# Lock file, /etc/init.d/xdm expects slim.pid ++lockfile /run/slim.pid + + # Log file + logfile /var/log/slim.log diff --git a/x11-misc/slim/slim-9999.ebuild b/x11-misc/slim/slim-9999.ebuild new file mode 100644 index 00000000000..86ea64f7c08 --- /dev/null +++ b/x11-misc/slim/slim-9999.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +CMAKE_MIN_VERSION="2.8.8" +inherit cmake-utils pam eutils systemd versionator + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="git://github.com/axs-gentoo/slim-git.git" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="mirror://sourceforge/project/${PN}.berlios/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +fi + +DESCRIPTION="Simple Login Manager" +HOMEPAGE="http://sourceforge.net/projects/slim.berlios/" +LICENSE="GPL-2" +SLOT="0" +IUSE="branding pam consolekit" +REQUIRED_USE="consolekit? ( pam )" + +RDEPEND="x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXpm + x11-libs/libXft + x11-libs/libXrandr + media-libs/libpng:0= + virtual/jpeg:= + x11-apps/sessreg + consolekit? ( sys-auth/consolekit + sys-apps/dbus ) + pam? ( virtual/pam + !x11-misc/slimlock )" +DEPEND="${RDEPEND} + virtual/pkgconfig + x11-proto/xproto" +PDEPEND="branding? ( >=x11-themes/slim-themes-1.2.3a-r3 )" + +src_prepare() { + # Our Gentoo-specific config changes + epatch "${FILESDIR}"/${P}-config.diff + + if use elibc_FreeBSD; then + sed -i -e 's/"-DHAVE_SHADOW"/"-DNEEDS_BASENAME"/' CMakeLists.txt \ + || die + fi + + if use branding; then + sed -i -e '/current_theme/s/default/slim-gentoo-simple/' slim.conf \ + || die + fi +} + +src_configure() { + mycmakeargs=( + $(cmake-utils_use pam USE_PAM) + $(cmake-utils_use consolekit USE_CONSOLEKIT) + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + if use pam ; then + pamd_mimic system-local-login slim auth account session + pamd_mimic system-local-login slimlock auth + fi + + systemd_dounit build_files/slim.service + + insinto /usr/share/slim + newins "${FILESDIR}/Xsession-r3" Xsession + + insinto /etc/logrotate.d + newins "${FILESDIR}/slim.logrotate" slim + + dodoc xinitrc.sample README THEMES +} + +pkg_postinst() { + # note, $REPLACING_VERSIONS will always contain 0 or 1 PV's for slim + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog + elog "The configuration file is located at /etc/slim.conf." + elog + elog "If you wish ${PN} to start automatically, set DISPLAYMANAGER=\"${PN}\" " + elog "in /etc/conf.d/xdm and run \"rc-update add xdm default\"." + fi + if ! version_is_at_least "1.3.6" "${REPLACING_VERSIONS:-1.0}" ; then + elog + elog "By default, ${PN} is set up to provide X session selection based on the" + elog ".desktop entries in /usr/share/xsessions/ that are installed by each" + elog "DE, including ~/.xsession support via the 'Xsession' session. Sessions" + elog "are selected at login by pressing [F1]. As per the Xorg guide, each" + elog "user's default session can be specified by adding the name from" + elog "/etc/X11/Sessions to ~/.xsession." + elog + elog "The XSESSION environment variable is still supported as a default" + elog "if no session has been specified by the user." + elog + elog "If you want to use .xinitrc in the user's home directory for session" + elog "management instead, see README and xinitrc.sample in" + elog "/usr/share/doc/${PF} and change your login_cmd in /etc/slim.conf" + elog "accordingly." + elog + if ! version_is_at_least "1.3.2-r7" "${REPLACING_VERSIONS:-1.4}" ; then + ewarn "Please note that slim supports consolekit directly. Please do not use any " + ewarn "old work-arounds (including calls to 'ck-launch-session' in xinitrc scripts)" + ewarn "and enable USE=\"consolekit\" instead." + ewarn + fi + fi + if ! use pam; then + elog "You have merged ${PN} without USE=\"pam\", this will cause ${PN} to fall back to" + elog "the console when restarting your window manager. If this is not desired, then" + elog "please remerge ${PN} with USE=\"pam\"" + elog + fi +} |