Skip to content

Commit

Permalink
Use a cleaner filesystem hierarchy, clean up install script.
Browse files Browse the repository at this point in the history
  • Loading branch information
aavci1 committed Feb 11, 2013
1 parent 53e57c7 commit fc474e9
Show file tree
Hide file tree
Showing 35 changed files with 33 additions and 34 deletions.
52 changes: 29 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ set(CMAKE_AUTOMOC ON)
add_definitions(-Wall -march=native -std=c++11)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Release)
endif()

if(CMAKE_BUILD_TYPE MATCHES [Dd]ebug)
message(STATUS "Debug build")
add_definitions(-DDEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
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")
message(STATUS "Release build")
add_definitions(-DNDEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
endif()

set(SOURCES
Expand Down Expand Up @@ -62,25 +62,31 @@ else()
set(THEME Circles)
endif(USE_QT5)

configure_file(${CMAKE_SOURCE_DIR}/scripts/sddm.conf.sample sddm.conf)
# set paths
set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
set(DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/apps/sddm)

# replace variables in the config file
configure_file(${CMAKE_SOURCE_DIR}/sddm.conf.cmake sddm.conf)

# TODO: fix hardcoded paths
# install binary
install(TARGETS sddm DESTINATION /usr/bin)
install(TARGETS sddm DESTINATION ${BIN_INSTALL_DIR})

# install config file
install(FILES ${CMAKE_BINARY_DIR}/sddm.conf DESTINATION /etc)
install(FILES scripts/sddm.conf.sample DESTINATION /etc)
# install pam service
install(FILES scripts/sddm.pam DESTINATION /etc/pam.d RENAME sddm)
#install session script
install(FILES scripts/Xsession
DESTINATION /usr/share/config/sddm
install(FILES ${CMAKE_BINARY_DIR}/sddm.conf DESTINATION /etc RENAME sddm.conf.sample)

# install service files
install(FILES ${CMAKE_SOURCE_DIR}/services/sddm.pam DESTINATION /etc/pam.d RENAME sddm)
install(FILES ${CMAKE_SOURCE_DIR}/services/sddm.systemd DESTINATION /usr/lib/systemd/system RENAME sddm.service)

# install data files
install(DIRECTORY ${CMAKE_SOURCE_DIR}/data/faces DESTINATION ${DATA_INSTALL_DIR})
install(DIRECTORY ${CMAKE_SOURCE_DIR}/data/themes DESTINATION ${DATA_INSTALL_DIR})

# install scripts
install(FILES ${CMAKE_SOURCE_DIR}/data/scripts/Xsession
DESTINATION ${DATA_INSTALL_DIR}/scripts
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
# install themes
install(DIRECTORY themes DESTINATION /usr/share/apps/sddm)
# install faces
install(DIRECTORY faces DESTINATION /usr/share/apps/sddm)
# install systemd service file
install(FILES scripts/sddm.service DESTINATION /usr/lib/systemd/system)
3 changes: 0 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
0.1
===
* Initial release.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
8 changes: 3 additions & 5 deletions scripts/sddm.conf.sample → sddm.conf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ DefaultPath=/bin:/usr/bin:/usr/local/bin

# Name of the cursor theme to be set before starting
# the display server
# Default is ""
CursorTheme=""

# Path of the X server
Expand Down Expand Up @@ -36,15 +35,14 @@ SessionsDir=/usr/share/xsessions
LastSession=

# Path of script to execute when starting the desktop session
SessionCommand=/usr/share/config/sddm/Xsession
SessionCommand=${DATA_INSTALL_DIR}/scripts/Xsession

# Path of the directory containing face files
# Face files should be in username.face.icon format
# Default is "/usr/share/apps/sddm/faces"
FacesDir=/usr/share/apps/sddm/faces
FacesDir=${DATA_INSTALL_DIR}/faces

# Path of the directory containing theme files
ThemesDir=/usr/share/apps/sddm/themes
ThemesDir=${DATA_INSTALL_DIR}/themes

# Name of the current theme
CurrentTheme=${THEME}
Expand Down
4 changes: 1 addition & 3 deletions scripts/sddm.pam → services/sddm.pam
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#%PAM-1.0
auth include system-login

auth include system-login
account include system-login

password include system-login

session include system-login
File renamed without changes.

0 comments on commit fc474e9

Please sign in to comment.