summaryrefslogtreecommitdiffstats
path: root/kdm
diff options
context:
space:
mode:
Diffstat (limited to 'kdm')
-rw-r--r--kdm/CMakeLists.txt19
-rw-r--r--kdm/ConfigureChecks.cmake118
-rw-r--r--kdm/backend/CMakeLists.txt39
-rw-r--r--kdm/kfrontend/CMakeLists.txt94
-rw-r--r--kdm/kfrontend/pics/CMakeLists.txt18
-rw-r--r--kdm/kfrontend/sessions/CMakeLists.txt29
-rw-r--r--kdm/kfrontend/sessions/kde.desktop.cmake45
-rw-r--r--kdm/kfrontend/themer/CMakeLists.txt41
-rw-r--r--kdm/kfrontend/themes/CMakeLists.txt13
-rw-r--r--kdm/kfrontend/themes/circles/CMakeLists.txt15
-rw-r--r--kdm/kfrontend/themes/o2_enterprise/CMakeLists.txt16
11 files changed, 447 insertions, 0 deletions
diff --git a/kdm/CMakeLists.txt b/kdm/CMakeLists.txt
new file mode 100644
index 000000000..73bcba446
--- /dev/null
+++ b/kdm/CMakeLists.txt
@@ -0,0 +1,19 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+# FIXME initial work, only PAM
+# FIXME needs more checks (for kerberos, etc)
+# FIXME Xsession need some improvements
+
+include( ConfigureChecks.cmake )
+
+add_subdirectory( backend )
+add_subdirectory( kfrontend )
diff --git a/kdm/ConfigureChecks.cmake b/kdm/ConfigureChecks.cmake
new file mode 100644
index 000000000..2ac6dbd29
--- /dev/null
+++ b/kdm/ConfigureChecks.cmake
@@ -0,0 +1,118 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+find_library( UTIL_LIBRARY util )
+
+check_function_exists( getdomainname HAVE_GETDOMAINNAME )
+check_function_exists( initgroups HAVE_INITGROUPS )
+check_function_exists( mkstemp HAVE_MKSTEMP )
+check_function_exists( setproctitle HAVE_SETPROCTITLE )
+check_function_exists( sysinfo HAVE_SYSINFO )
+check_function_exists( strnlen HAVE_STRNLEN )
+check_function_exists( getifaddrs HAVE_GETIFADDRS )
+
+tde_save( CMAKE_REQUIRED_LIBRARIES )
+set( CMAKE_REQUIRED_LIBRARIES ${UTIL_LIBRARY} )
+check_function_exists( setusercontext HAVE_SETUSERCONTEXT )
+check_function_exists( getusershell HAVE_GETUSERSHELL )
+check_function_exists( login_getclass HAVE_LOGIN_GETCLASS )
+check_function_exists( auth_timeok HAVE_AUTH_TIMEOK )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
+
+check_include_file( lastlog.h HAVE_LASTLOG_H )
+check_include_file( termio.h HAVE_TERMIO_H )
+
+check_struct_has_member( "struct sockaddr_in" "sin_len" "sys/socket.h;netinet/in.h" HAVE_STRUCT_SOCKADDR_IN_SIN_LEN )
+check_struct_has_member( "struct passwd" "pw_expire" "pwd.h" HAVE_STRUCT_PASSWD_PW_EXPIRE )
+check_struct_has_member( "struct utmp" "ut_user" "utmp.h" HAVE_STRUCT_UTMP_UT_USER )
+
+check_c_source_runs( "
+ #include <errno.h>
+ #include <unistd.h>
+ int main()
+ {
+ setlogin(0);
+ return errno == ENOSYS;
+ }
+" HAVE_SETLOGIN )
+
+check_c_source_runs( "
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <errno.h>
+ int main()
+ {
+ int fd, fd2;
+ struct sockaddr_un sa;
+
+ if((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
+ return 2;
+ sa.sun_family = AF_UNIX;
+ strcpy(sa.sun_path, \"testsock\");
+ unlink(sa.sun_path);
+ if(bind(fd, (struct sockaddr *)&sa, sizeof(sa)))
+ return 2;
+ chmod(sa.sun_path, 0);
+ setuid(getuid() + 1000);
+ if((fd2 = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
+ return 2;
+ connect(fd2, (struct sockaddr *)&sa, sizeof(sa));
+ return errno != EACCES;
+ }
+" HONORS_SOCKET_PERMS )
+
+if( CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin OR CMAKE_SYSTEM_NAME MATCHES GNU/FreeBSD )
+ unset( HAVE_UTMPX )
+ unset( HAVE_LASTLOGX )
+else( )
+ check_function_exists( getutxent HAVE_UTMPX )
+ check_function_exists( updlastlogx HAVE_LASTLOGX )
+endif( )
+
+unset( BSD_UTMP )
+if( NOT HAVE_UTMPX )
+ check_function_exists( getutent have_getutent )
+ if( NOT have_getutent )
+ set( BSD_UTMP 1 )
+ endif( )
+endif( )
+
+check_function_exists( arc4random HAVE_ARC4RANDOM )
+if( NOT HAVE_ARC4RANDOM )
+ # assume that /dev/random is non-blocking if /dev/urandom does not exist
+ if( EXISTS /dev/urandom )
+ set( DEV_RANDOM "/dev/urandom" CACHE INTERNAL "" FORCE )
+ elseif( EXISTS /dev/random )
+ set( DEV_RANDOM "/dev/random" CACHE INTERNAL "" FORCE )
+ endif( )
+endif (NOT HAVE_ARC4RANDOM)
+
+# Xau
+pkg_search_module( XAU xau )
+if( NOT XAU_FOUND )
+ tde_message_fatal( "Xau are required, but not found on your system" )
+endif()
+
+
+if( WITH_PAM )
+
+ set( USE_PAM 1 CACHE INTERNAL "" FORCE )
+
+elseif( WITH_SHADOW )
+
+ set( HAVE_SHADOW 1 CACHE INTERNAL "" FORCE )
+ set( USESHADOW 1 CACHE INTERNAL "" FORCE )
+
+endif( )
diff --git a/kdm/backend/CMakeLists.txt b/kdm/backend/CMakeLists.txt
new file mode 100644
index 000000000..ef3d4f709
--- /dev/null
+++ b/kdm/backend/CMakeLists.txt
@@ -0,0 +1,39 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+# FIXME this is far from complete!!!
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${DBUS_INCLUDE_DIRS}
+)
+
+
+##### kdm (executable) ##########################
+
+add_custom_command( OUTPUT config.ci
+ COMMAND perl -w ${CMAKE_SOURCE_DIR}/kdm/confproc.pl ${CMAKE_SOURCE_DIR}/kdm/config.def config.ci
+ DEPENDS ${CMAKE_SOURCE_DIR}/kdm/confproc.pl ${CMAKE_SOURCE_DIR}/kdm/config.def )
+
+set_property( SOURCE auth.c APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/config.ci )
+
+tde_add_executable( kdm
+ SOURCES
+ access.c auth.c bootman.c choose.c client.c consolekit.c
+ ctrl.c daemon.c dm.c dpylist.c error.c genauth.c
+ inifile.c krb5auth.c mitauth.c netaddr.c policy.c
+ process.c protodpy.c reset.c resource.c rpcauth.c
+ server.c session.c sessreg.c socket.c streams.c
+ util.c xdmauth.c xdmcp.c
+ LINK X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${PAM_LIBRARY}
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/kdm/kfrontend/CMakeLists.txt b/kdm/kfrontend/CMakeLists.txt
new file mode 100644
index 000000000..122f8c84e
--- /dev/null
+++ b/kdm/kfrontend/CMakeLists.txt
@@ -0,0 +1,94 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( themer )
+add_subdirectory( themes )
+add_subdirectory( pics )
+add_subdirectory( sessions )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/kdm/backend
+ ${CMAKE_SOURCE_DIR}/kdmlib
+ ${CMAKE_SOURCE_DIR}/kcontrol/background
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( CODE "execute_process( COMMAND ${CMAKE_CURRENT_BINARY_DIR}/genkdmconf --in \$ENV{DESTDIR}${CONFIG_INSTALL_DIR}/kdm --no-in-notice --face-src ${CMAKE_CURRENT_SOURCE_DIR}/pics ${GENKDMCONF_FLAGS} )" )
+
+
+##### config.ci (generated) #####################
+
+add_custom_command( OUTPUT config.ci
+ COMMAND perl -w ${CMAKE_SOURCE_DIR}/kdm/confproc.pl ${CMAKE_SOURCE_DIR}/kdm/config.def config.ci
+ DEPENDS ${CMAKE_SOURCE_DIR}/kdm/confproc.pl ${CMAKE_SOURCE_DIR}/kdm/config.def )
+
+
+##### kdm_config (executable) ###################
+
+set_property( SOURCE kdm_config.c APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/config.ci )
+
+tde_add_executable( kdm_config
+ SOURCES kdm_config.c
+ LINK
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### kdm_greet (executable) ####################
+
+tde_add_executable( kdm_greet AUTOMOC
+ SOURCES
+ kdm_greet.c kdmconfig.cpp kdmclock.cpp kconsole.cpp
+ kfdialog.cpp kgdialog.cpp kchooser.cpp kgverify.cpp
+ kdmshutdown.cpp kdmadmindialog.cpp kgreeter.cpp
+ kgapp.cpp
+ LINK kdmthemer-static kdeui-shared Xtst
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### krootimage (executable) ###################
+
+tde_add_executable( krootimage AUTOMOC
+ SOURCES krootimage.cpp
+ LINK bgnd-static kio-shared
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### genkdmconf (executable) ###################
+
+set_property( SOURCE genkdmconf.c APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/config.ci )
+
+tde_add_executable( genkdmconf AUTOMOC
+ SOURCES genkdmconf.c
+ LINK X11
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### kdmctl (executable) #######################
+
+tde_add_executable( kdmctl
+ SOURCES kdmctl.c
+ LINK
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/kdm/kfrontend/pics/CMakeLists.txt b/kdm/kfrontend/pics/CMakeLists.txt
new file mode 100644
index 000000000..790dc06ce
--- /dev/null
+++ b/kdm/kfrontend/pics/CMakeLists.txt
@@ -0,0 +1,18 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ kdelogo.png kdelogo-crystal.png shutdown.jpg
+ DESTINATION ${DATA_INSTALL_DIR}/kdm/pics )
+
+install( FILES
+ default1.png default2.png default3.png root1.png
+ DESTINATION ${DATA_INSTALL_DIR}/kdm/pics/users )
diff --git a/kdm/kfrontend/sessions/CMakeLists.txt b/kdm/kfrontend/sessions/CMakeLists.txt
new file mode 100644
index 000000000..e5ccb9fb0
--- /dev/null
+++ b/kdm/kfrontend/sessions/CMakeLists.txt
@@ -0,0 +1,29 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+configure_file( kde.desktop.cmake kde.desktop @ONLY )
+
+install( FILES
+ admin.desktop ${CMAKE_CURRENT_BINARY_DIR}/kde.desktop
+ gnome.desktop 9wm.desktop aewm++.desktop aewm.desktop
+ afterstep.desktop amaterus.desktop amiwm.desktop
+ asclassic.desktop blackbox.desktop cde.desktop
+ ctwm.desktop cwwm.desktop enlightenment.desktop
+ evilwm.desktop fluxbox.desktop flwm.desktop fvwm.desktop
+ fvwm95.desktop golem.desktop icewm.desktop ion.desktop
+ larswm.desktop lwm.desktop matchbox.desktop metacity.desktop
+ mwm.desktop olvwm.desktop olwm.desktop openbox.desktop
+ oroborus.desktop phluid.desktop pwm.desktop qvwm.desktop
+ ratpoison.desktop sapphire.desktop sawfish.desktop
+ twm.desktop ude.desktop vtwm.desktop w9wm.desktop
+ waimea.desktop wm2.desktop wmaker.desktop xfce.desktop
+ xfce4.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/kdm/sessions )
diff --git a/kdm/kfrontend/sessions/kde.desktop.cmake b/kdm/kfrontend/sessions/kde.desktop.cmake
new file mode 100644
index 000000000..fa56e73a9
--- /dev/null
+++ b/kdm/kfrontend/sessions/kde.desktop.cmake
@@ -0,0 +1,45 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=XSession
+Exec=@TDE_BIN_DIR@/startkde
+TryExec=@TDE_BIN_DIR@/startkde
+Name=KDE3
+Name[hi]=केडीई
+Name[mn]=КДЭ
+Name[ta]=Kஏற்றக் காவலன்
+Name[xh]=iKDE
+Name[xx]=xxKDExx
+Comment=The K Desktop Environment. A powerful Open Source graphical desktop environment
+Comment[bs]=K Desktop Environment. Moćan grafički desktop otvorenog izvornog koda
+Comment[ca]=L'entorn d'escriptori K. Un poderós entorn d'escriptori gràfic de Codi Font Obert
+Comment[cy]=Yr Amgylchedd Penbwrdd K. Amgylchedd penbwrdd graffegol pwerus, sy'n gôd-agored.
+Comment[da]=K Skrivebordsmiljøet. Et kraftigt, åbent, grafisk skrivebordsmiljø
+Comment[de]=Das K Desktop Environment. Eine mächtige, graphische Arbeitsumgebung und Open Source / Freie Software
+Comment[el]=Το K Desktop Environment. Ένα πανίσχυρο ελεύθερης προέλευσης γραφικό περιβάλλον επιφάνειας εργασίας
+Comment[es]=El Entorno de Escritorio K, un potente entorno de escritorio gráfico realizado de código abierto
+Comment[et]=K töölaua keskkond on võimas vaba tarkvara graafiline töölaua keskkond
+Comment[fi]=KDE-työpöytäympäristö (K Desktop Environment) on tehokas avoimen lähdekoodin graafinen työpöytäympäristö
+Comment[fr]=The K Desktop Environment. Un environnement de bureau graphique, puissant et Open Source
+Comment[he]=The K Desktop Environment. סביבת עבודה גרפית, בעלת-עוצמה בקוד פתוח
+Comment[hi]=के डेस्कटॉप वातावरण. एक शक्तिशाली, ओपन सोर्स चित्रमय डेस्कटॉप वातावरण
+Comment[hu]=A KDE grafikus munkakörnyezet, egy szabad forráskódú grafikus ablakkezelő környezet
+Comment[it]=L'ambiente desktop KDE. Un potente ambiente desktop grafico Open Source
+Comment[mn]=The K Desktop Environment. Хүчирхэг нээлттэй эх код бүхий график дэлгэцийн орчин
+Comment[nb]=K Desktop Environment. Et kraftig grafisk skrivebordsmiljø med åpen kildekode.
+Comment[nl]=De K Desktop Environment, een krachtige open source grafische desktop environment
+Comment[nn]=K Desktop Environment. Eit kraftig grafisk skrivebordsmiljø med open kjeldekode.
+Comment[pl]=Środowisko KDE. Potężne środowisko graficzne Wolnego Oprogramowania.
+Comment[pt]=O K Desktop Environment. Um ambiente gráfico open source poderoso
+Comment[pt_BR]=Acrônimo para K Desktop Environment (ou Ambiente de Trabalho K). Um poderoso ambiente de trabalho gráfico de código aberto
+Comment[ro]=K Desktop Environment. Un mediu grafic cu surse deschise, foarte puternic
+Comment[sk]=The K Desktop Environment. Výkonné, voľne šíriteľné grafické pracovné prostredie
+Comment[sl]=Namizno okolje K. Zmogljivo grafično namizno okolje odprte kode
+Comment[sr]=K Desktop Environment (KDE). Моћно графичко радно окружење отвореног кода
+Comment[sv]=K-skrivbordsmiljön. En kraftfull grafisk skrivbordsmiljö med öppen källkod
+Comment[ta]= Kமேல்மேசை சூழல். சக்திவாய்ந்த திறந்த ஆணைமூல சித்திர வகை மேல்மேசை சூழல்
+Comment[tr]=KDE Masaüstü Yöneticisi. Güçlü bir grafiksel masaüstü ortamı
+Comment[uk]=The K Desktop Environment. Потужне графічне середовище з відкритими текстами
+Comment[uz]=KDE (K Desktop Environment) - кучли Open Source график иш столи муҳити
+Comment[vi]=môi trường desktop K, môi trường desktop đồ hoạ mã nguồn mở rất mạnh
+Comment[xx]=xxThe K Desktop Environment. A powerful Open Source graphical desktop environmentxx
+Comment[zh_CN]=K 桌面环境。强大的开放源代码图形桌面环境
diff --git a/kdm/kfrontend/themer/CMakeLists.txt b/kdm/kfrontend/themer/CMakeLists.txt
new file mode 100644
index 000000000..ff65734af
--- /dev/null
+++ b/kdm/kfrontend/themer/CMakeLists.txt
@@ -0,0 +1,41 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/kdm/kfrontend
+ ${CMAKE_SOURCE_DIR}/kdmlib
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+# FIXME this must be optimized
+##### config.ci (generated) #####################
+
+add_custom_command( OUTPUT config.ci
+ COMMAND perl -w ${CMAKE_SOURCE_DIR}/kdm/confproc.pl ${CMAKE_SOURCE_DIR}/kdm/config.def config.ci
+ DEPENDS ${CMAKE_SOURCE_DIR}/kdm/confproc.pl ${CMAKE_SOURCE_DIR}/kdm/config.def )
+set_property( SOURCE kdmthemer.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/config.ci )
+
+
+##### kdmthemer (static) ########################
+
+tde_add_library( kdmthemer STATIC_PIC AUTOMOC
+ SOURCES
+ kdmthemer.cpp kdmitem.cpp kdmpixmap.cpp
+ kdmrect.cpp kdmlabel.cpp kdmlayout.cpp
+)
diff --git a/kdm/kfrontend/themes/CMakeLists.txt b/kdm/kfrontend/themes/CMakeLists.txt
new file mode 100644
index 000000000..f1dd26e15
--- /dev/null
+++ b/kdm/kfrontend/themes/CMakeLists.txt
@@ -0,0 +1,13 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( circles )
+add_subdirectory( o2_enterprise )
diff --git a/kdm/kfrontend/themes/circles/CMakeLists.txt b/kdm/kfrontend/themes/circles/CMakeLists.txt
new file mode 100644
index 000000000..91396000b
--- /dev/null
+++ b/kdm/kfrontend/themes/circles/CMakeLists.txt
@@ -0,0 +1,15 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ GdmGreeterTheme.desktop circles.xml background.svg
+ flower.png help.png options.png screenshot.png
+ DESTINATION ${DATA_INSTALL_DIR}/kdm/themes/circles )
diff --git a/kdm/kfrontend/themes/o2_enterprise/CMakeLists.txt b/kdm/kfrontend/themes/o2_enterprise/CMakeLists.txt
new file mode 100644
index 000000000..81b5fe7de
--- /dev/null
+++ b/kdm/kfrontend/themes/o2_enterprise/CMakeLists.txt
@@ -0,0 +1,16 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ Dialog.png enter_normal.png enter_over.png enter_pressed.png
+ enterprise.xml GdmGreeterTheme.desktop preview.png
+ system_normal.png system_over.png system_pressed.png
+ DESTINATION ${DATA_INSTALL_DIR}/kdm/themes/o2_enterprise )