summaryrefslogtreecommitdiff
path: root/pcr/sddm-elogind
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/sddm-elogind')
-rw-r--r--pcr/sddm-elogind/PKGBUILD25
-rw-r--r--pcr/sddm-elogind/sddm-0.12.0-respect-user-flags.patch26
-rw-r--r--pcr/sddm-elogind/sddm-0.14.0-fix_session_selection.patch87
-rw-r--r--pcr/sddm-elogind/sddm-enable-elogind.patch58
-rw-r--r--pcr/sddm-elogind/sddm-pam.patch (renamed from pcr/sddm-elogind/sddm-elogind-pam.patch)10
5 files changed, 184 insertions, 22 deletions
diff --git a/pcr/sddm-elogind/PKGBUILD b/pcr/sddm-elogind/PKGBUILD
index 2e2d9231e..70c023f10 100644
--- a/pcr/sddm-elogind/PKGBUILD
+++ b/pcr/sddm-elogind/PKGBUILD
@@ -6,32 +6,35 @@ _pkgname=sddm
pkgname=sddm-elogind
pkgver=0.14.0
-pkgrel=1
+pkgrel=4
pkgdesc='QML based X11 display manager'
arch=('i686' 'x86_64' 'armv7h')
url='http://github.com/sddm/sddm'
license=('GPL')
provides=('display-manager' 'sddm')
-depends=('qt5-declarative' 'dbus' 'elogind')
+depends=('qt5-declarative' 'elogind' 'upower' 'eudev-systemd')
makedepends=('extra-cmake-modules' 'python-docutils' 'qt5-tools')
-optdepends=('dbus-openrc: dbus initscript'
- 'displaymanager-openrc: displaymanager initscript')
+optdepends=('displaymanager-openrc: displaymanager initscript')
conflicts=('display-manager' 'sddm' 'sddm-consolekit')
+# replaces=('sddm-consolekit')
install="${_pkgname}.install"
backup=('usr/share/sddm/scripts/Xsetup'
'etc/pam.d/sddm'
'etc/sddm.conf')
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/v${pkgver}.tar.gz"
"sddm-fix-avatars.patch::https://github.com/sddm/sddm/commit/ecb903e4.patch"
- 'sddm-elogind-pam.patch')
+ 'sddm-pam.patch'
+ 'sddm-enable-elogind.patch')
sha256sums=('a551551a6ba324e9c384c89bc63e871de65fea3740eadbea2d63df86045f8205'
'b091f02d6d5b2ddc9d5208b17213a181c6e8deae23e5633d694119e79b66d38b'
- '0cbaf41fc677ec1ef3e120e351a09ebc875ffc6b92b98a7270f58d2fbe7eddf3')
+ '151b9b4a16b919a4f3a6564b2cd794effdc07773c47f2d6b860bbd467c3e4798'
+ 'cff3f483415c95784d6b9977c31b89fac734d0d74facc4ac042ed8de970d5007')
prepare() {
mkdir -p build
cd ${_pkgname}-${pkgver}
- patch -p1 -i ${srcdir}/sddm-elogind-pam.patch
+ patch -p1 -i ${srcdir}/sddm-pam.patch
+ patch -p1 -i ${srcdir}/sddm-enable-elogind.patch
}
build() {
@@ -39,6 +42,9 @@ build() {
cmake ../${_pkgname}-${pkgver} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
+ -DENABLE_PAM=yes \
+ -DNO_SYSTEMD=yes \
+ -DUSE_ELOGIND=yes \
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/sddm \
-DDBUS_CONFIG_FILENAME=org.freedesktop.sddm.conf \
-DBUILD_MAN_PAGES=ON
@@ -48,9 +54,4 @@ build() {
package() {
cd build
make DESTDIR="${pkgdir}" install
-
-# sed -e 's|systemctl reboot|shutdown -r now|' \
-# -e 's|systemctl poweroff|shutdown -h -P|' \
-# -e 's|MinimumVT=1|MinimumVT=7|' \
-# -i ${pkgdir}/etc/sddm.conf
}
diff --git a/pcr/sddm-elogind/sddm-0.12.0-respect-user-flags.patch b/pcr/sddm-elogind/sddm-0.12.0-respect-user-flags.patch
new file mode 100644
index 000000000..fc4501697
--- /dev/null
+++ b/pcr/sddm-elogind/sddm-0.12.0-respect-user-flags.patch
@@ -0,0 +1,26 @@
+diff -u CMakeLists.txt CMakeLists.txt
+--- a/CMakeLists.txt 2015-09-05 22:40:50.000000000 +0200
++++ b/CMakeLists.txt 2015-09-07 12:15:33.419530808 +0200
+@@ -35,22 +35,6 @@
+ # Definitions
+ add_definitions(-Wall -std=c++11 -DQT_NO_CAST_FROM_ASCII)
+
+-# Default build type
+-if(NOT CMAKE_BUILD_TYPE)
+- set(CMAKE_BUILD_TYPE Release)
+-endif()
+-
+-# Handle build type
+-if(CMAKE_BUILD_TYPE MATCHES [Dd]ebug)
+- message(STATUS "Debug build")
+- add_definitions(-DDEBUG)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
+-else()
+- message(STATUS "Release build")
+- add_definitions(-DNDEBUG)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
+-endif()
+-
+ # Default absolute paths
+ if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
+ set(CMAKE_INSTALL_SYSCONFDIR "/etc")
diff --git a/pcr/sddm-elogind/sddm-0.14.0-fix_session_selection.patch b/pcr/sddm-elogind/sddm-0.14.0-fix_session_selection.patch
new file mode 100644
index 000000000..23664d911
--- /dev/null
+++ b/pcr/sddm-elogind/sddm-0.14.0-fix_session_selection.patch
@@ -0,0 +1,87 @@
+diff --git a/data/themes/elarun/Main.qml b/data/themes/elarun/Main.qml
+index 174a3b8..b5831c2 100644
+--- a/data/themes/elarun/Main.qml
++++ b/data/themes/elarun/Main.qml
+@@ -33,6 +33,8 @@ Rectangle {
+ LayoutMirroring.enabled: Qt.locale().textDirection == Qt.RightToLeft
+ LayoutMirroring.childrenInherit: true
+
++ property int sessionIndex: session.index
++
+ TextConstants { id: textConstants }
+
+ Connections {
+@@ -132,7 +134,7 @@ Rectangle {
+
+ Keys.onPressed: {
+ if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
+- sddm.login(user_entry.text, pw_entry.text, menu_session.index)
++ sddm.login(user_entry.text, pw_entry.text, sessionIndex)
+ event.accepted = true
+ }
+ }
+@@ -148,7 +150,7 @@ Rectangle {
+
+ source: "images/login_normal.png"
+
+- onClicked: sddm.login(user_entry.text, pw_entry.text, menu_session.index)
++ onClicked: sddm.login(user_entry.text, pw_entry.text, sessionIndex)
+
+ KeyNavigation.backtab: pw_entry; KeyNavigation.tab: session_button
+ }
+@@ -213,15 +215,6 @@ Rectangle {
+ font.bold: true
+ font.pixelSize: 12
+ }
+-
+- Menu {
+- id: menu_session
+- width: 200; height: 0
+- anchors.top: buttonRow.bottom; anchors.left: buttonRow.left
+-
+- model: sessionModel
+- index: sessionModel.lastIndex
+- }
+ }
+ }
+ }
+diff --git a/data/themes/maldives/Main.qml b/data/themes/maldives/Main.qml
+index 00feea4..49fbe02 100644
+--- a/data/themes/maldives/Main.qml
++++ b/data/themes/maldives/Main.qml
+@@ -33,6 +33,8 @@ Rectangle {
+ LayoutMirroring.enabled: Qt.locale().textDirection == Qt.RightToLeft
+ LayoutMirroring.childrenInherit: true
+
++ property int sessionIndex: session.index
++
+ TextConstants { id: textConstants }
+
+ Connections {
+@@ -121,7 +123,7 @@ Rectangle {
+
+ Keys.onPressed: {
+ if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
+- sddm.login(name.text, password.text, session.index)
++ sddm.login(name.text, password.text, sessionIndex)
+ event.accepted = true
+ }
+ }
+@@ -148,7 +150,7 @@ Rectangle {
+
+ Keys.onPressed: {
+ if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
+- sddm.login(name.text, password.text, session.index)
++ sddm.login(name.text, password.text, sessionIndex)
+ event.accepted = true
+ }
+ }
+@@ -237,7 +239,7 @@ Rectangle {
+ text: textConstants.login
+ width: parent.btnWidth
+
+- onClicked: sddm.login(name.text, password.text, session.index)
++ onClicked: sddm.login(name.text, password.text, sessionIndex)
+
+ KeyNavigation.backtab: layoutBox; KeyNavigation.tab: shutdownButton
+ }
diff --git a/pcr/sddm-elogind/sddm-enable-elogind.patch b/pcr/sddm-elogind/sddm-enable-elogind.patch
new file mode 100644
index 000000000..363a3e4b7
--- /dev/null
+++ b/pcr/sddm-elogind/sddm-enable-elogind.patch
@@ -0,0 +1,58 @@
+--- a/CMakeLists.txt 2016-11-10 09:27:03.866358608 +0100
++++ b/CMakeLists.txt 2016-11-10 10:28:25.384374766 +0100
+@@ -93,7 +93,7 @@
+ endif()
+
+ # systemd
+-if(NOT NO_SYSTEMD)
++if(NOT NO_SYSTEMD AND NOT USE_ELOGIND)
+ pkg_check_modules(SYSTEMD "systemd")
+ endif()
+
+@@ -127,12 +127,34 @@
+ set(REBOOT_COMMAND "/usr/bin/systemctl reboot")
+ else()
+ set(SYSTEMD_FOUND 0)
++endif()
++add_feature_info("systemd" SYSTEMD_FOUND "systemd support")
++add_feature_info("journald" JOURNALD_FOUND "journald support")
++
++# elogind
++if(NO_SYSTEMD AND USE_ELOGIND)
++ pkg_check_modules(ELOGIND "libelogind")
++endif()
++
++if(ELOGIND_FOUND)
++ add_definitions(-DHAVE_ELOGIND)
++ set(CMAKE_AUTOMOC_MOC_OPTIONS -DHAVE_ELOGIND)
++
++ set(MINIMUM_VT 7)
++ set(HALT_COMMAND "/usr/bin/loginctl poweroff")
++ set(REBOOT_COMMAND "/usr/bin/loginctl reboot")
++else()
++ set(ELOGIND_FOUND 0)
++endif()
++add_feature_info("elogind" ELOGIND_FOUND "elogind support")
++
++# Default behaviour if neither systemd nor elogind is used
++if (NOT ELOGIND_FOUND AND NOT SYSTEMD_FOUND)
+ set(MINIMUM_VT 7)
+ set(HALT_COMMAND "/sbin/shutdown -h -P now")
+ set(REBOOT_COMMAND "/sbin/shutdown -r now")
+ endif()
+-add_feature_info("systemd" SYSTEMD_FOUND "systemd support")
+-add_feature_info("journald" JOURNALD_FOUND "journald support")
++
+
+ # Set constants
+ set(DATA_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/sddm" CACHE PATH "System application data install directory")
+diff --git a/services/sddm-greeter.pam b/services/sddm-greeter.pam
+index 44e209e..633a128 100644
+--- a/services/sddm-greeter.pam
++++ b/services/sddm-greeter.pam
+@@ -14,4 +14,4 @@ password required pam_deny.so
+
+ # Setup session
+ session required pam_unix.so
+-session optional pam_systemd.so
++session optional pam_elogind.so
diff --git a/pcr/sddm-elogind/sddm-elogind-pam.patch b/pcr/sddm-elogind/sddm-pam.patch
index fe014e0a3..df41a91c7 100644
--- a/pcr/sddm-elogind/sddm-elogind-pam.patch
+++ b/pcr/sddm-elogind/sddm-pam.patch
@@ -1,13 +1,3 @@
-diff --git a/services/sddm-greeter.pam b/services/sddm-greeter.pam
-index 44e209e..633a128 100644
---- a/services/sddm-greeter.pam
-+++ b/services/sddm-greeter.pam
-@@ -14,4 +14,4 @@ password required pam_deny.so
-
- # Setup session
- session required pam_unix.so
--session optional pam_systemd.so
-+session optional pam_elogind.so
--- a/services/sddm.pam 2015-08-17 18:06:19.000000000 +0200
+++ b/services/sddm.pam 2016-02-21 19:54:08.654091951 +0100
@@ -4,3 +4,8 @@