diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2021-09-22 19:47:24 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-02 16:50:34 +0700 |
commit | 4e168a9f4dce52b835780927792adc6b69fa76d4 (patch) | |
tree | 68fc3d23b0307fd3b817ee769f5cf62470cd39ac /system/slim | |
parent | b5b7a79881d0e022ba802f180208db01e13ae5d1 (diff) |
system/slim: Add PAM support, fix for gcc >= 11.x, cleanups.
Thanks gentoo and archlinux for most of the stuff
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/slim')
-rw-r--r-- | system/slim/CMakeLists.txt.patch | 14 | ||||
-rw-r--r-- | system/slim/README | 2 | ||||
-rw-r--r-- | system/slim/files/Xsession | 158 | ||||
-rw-r--r-- | system/slim/files/slim.logrotate (renamed from system/slim/slim.logrotate) | 0 | ||||
-rw-r--r-- | system/slim/files/slim.pam | 7 | ||||
-rw-r--r-- | system/slim/files/slimlock.pam | 3 | ||||
-rw-r--r-- | system/slim/patches/slim-1.3.6-config.diff | 60 | ||||
-rw-r--r-- | system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch | 15 | ||||
-rw-r--r-- | system/slim/patches/slim-1.3.6-gcc11.patch | 12 | ||||
-rw-r--r-- | system/slim/patches/slim-1.3.6-honour-cflags.patch | 14 | ||||
-rw-r--r-- | system/slim/patches/slim-1.3.6-libslim-cmake-fixes.patch | 33 | ||||
-rw-r--r-- | system/slim/patches/slim-1.3.6-session-chooser.patch | 115 | ||||
-rw-r--r-- | system/slim/patches/slim-1.3.6_freetype-2.5.1.diff (renamed from system/slim/slim-1.3.6_freetype-2.5.1.diff) | 0 | ||||
-rw-r--r-- | system/slim/slim.SlackBuild | 37 | ||||
-rw-r--r-- | system/slim/slim.conf.patch | 11 |
15 files changed, 442 insertions, 39 deletions
diff --git a/system/slim/CMakeLists.txt.patch b/system/slim/CMakeLists.txt.patch deleted file mode 100644 index 9a29e6c2d751e..0000000000000 --- a/system/slim/CMakeLists.txt.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- CMakeLists.txt.orig 2014-08-08 07:24:01.864876514 -0700 -+++ CMakeLists.txt 2014-08-08 07:24:51.980873088 -0700 -@@ -221,7 +221,10 @@ - ####### install - # slim - install(TARGETS slim RUNTIME DESTINATION bin) --install(TARGETS slimlock RUNTIME DESTINATION bin) -+## we have to comment this out or else -+## build will fail on slackware as pam -+## is required for slimlock -+#install(TARGETS slimlock RUNTIME DESTINATION bin) - - if (BUILD_SHARED_LIBS) - set_target_properties(libslim PROPERTIES diff --git a/system/slim/README b/system/slim/README index 6400e2ed27e2f..5f189bcabb6e9 100644 --- a/system/slim/README +++ b/system/slim/README @@ -6,3 +6,5 @@ Included is a custom Slackware theme that goes nicely with the lilo boot theme. Regardless of whether you would like to use the custom theme, you should see README.SLACKWARE for configuration hints (this file is also installed into the package's documentation directory). + +When at the login screen, select the login session cycling with F1. diff --git a/system/slim/files/Xsession b/system/slim/files/Xsession new file mode 100644 index 0000000000000..237fb36306612 --- /dev/null +++ b/system/slim/files/Xsession @@ -0,0 +1,158 @@ +#!/bin/sh +# +# Slim login manager Xsession script +# + +command="$@" + +# this will go into slim.log along with all other echo's +# good for debugging where things go wrong +echo "$0: Beginning session setup..." + +# First read /etc/profile and .profile +test -f /etc/profile && . /etc/profile +test -f "$HOME/.profile" && . "$HOME/.profile" +# Second read /etc/xprofile and .xprofile for X specific setup +test -f /etc/xprofile && . /etc/xprofile +test -f "$HOME/.xprofile" && . "$HOME/.xprofile" + +# wrap possible arguments to determine whether to treat special or not +if [ "x$command" = "xcustom" ] || [ "x$command" = "xCustom" ] || [ "x$command" = "xdefault" ] || [ "x$command" = "xDefault" ]; then + command="Xsession" +fi +if [ "x$command" = "x" ]; then + # no default specified, check if Xsession will complete + # and if not then assign XSESSION to command + if [ -x "$HOME/.xsession" ] || [ -x "$HOME/.Xclients" ] || [ -x /etc/X11/xinit/Xclients ] || [ -x /etc/X11/Xclients ]; then + command="Xsession" + else + command=$XSESSION + fi +fi + +# most of this is from /etc/X11/chooser.sh +sessionscript="" +if [ -n "${command}" ]; then + # find a match for $command in /etc/X11/Sessions + for x in /etc/X11/Sessions/* ; do + if [ "`echo ${x##*/} | awk '{ print toupper($1) }'`" = "`echo ${command} | awk '{ print toupper($1) }'`" ]; then + sessionscript=${x} + break + fi + done + if [ -n "${sessionscript}" ]; then + if [ -x "${sessionscript}" ]; then + command="${sessionscript}" + else + command="/bin/sh ${sessionscript}" + fi + else + + # find an executable for $command + x="" + y="" + + for x in "${command}" "`echo ${command} | awk '{ print toupper($1) }'`" "`echo ${command} | awk '{ print tolower($1) }'`" + do + # Fall through ... + if [ -x "`which ${x} 2>/dev/null`" ]; then + y="`which ${x} 2>/dev/null`" + break + fi + done + # note , if the command could not be found then $command will be empty + command="$y" + unset x + unset y + fi +fi + +# call xrdb and xmodmap and such, since $command is not a session script +if [ -z "${sessionscript}" ]; then + userresources="$HOME/.Xresources" + usermodmap="$HOME/.Xmodmap" + userxkbmap="$HOME/.Xkbmap" + + sysresources=/etc/X11/Xresources + sysmodmap=/etc/X11/Xmodmap + sysxkbmap=/etc/X11/Xkbmap + + rh6sysresources=/etc/X11/xinit/Xresources + rh6sysmodmap=/etc/X11/xinit/Xmodmap + + # merge in defaults + if [ -f "$rh6sysresources" ]; then + xrdb -merge "$rh6sysresources" + fi + + if [ -f "$sysresources" ]; then + xrdb -merge "$sysresources" + fi + + if [ -f "$userresources" ]; then + xrdb -merge "$userresources" + fi + + # merge in keymaps + if [ -f "$sysxkbmap" ]; then + setxkbmap `cat "$sysxkbmap"` + XKB_IN_USE=yes + fi + + if [ -f "$userxkbmap" ]; then + setxkbmap `cat "$userxkbmap"` + XKB_IN_USE=yes + fi + + # + # Eeek, this seems like too much magic here + # + if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then + if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then + xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config` + if [ -n "$xkbsymbols" ]; then + setxkbmap -symbols "$xkbsymbols" + XKB_IN_USE=yes + fi + fi + fi + + # xkb and xmodmap don't play nice together + if [ -z "$XKB_IN_USE" ]; then + if [ -f "$rh6sysmodmap" ]; then + xmodmap "$rh6sysmodmap" + fi + + if [ -f "$sysmodmap" ]; then + xmodmap "$sysmodmap" + fi + + if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" + fi + fi + + unset XKB_IN_USE +fi +unset sessionscript + +# start failsafe session +if [ -z "${command}" ]; then + echo "$0: Failed to find a command to start the session, so starting a failsafe xterm." + exec xterm -geometry 80x24+0+0 +fi + +# run all system xinitrc shell scripts which will update command +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for i in /etc/X11/xinit/xinitrc.d/* ; do + if [ -x "$i" ]; then + . "$i" + fi + done + unset i +fi + +echo "$0: Setup done, will execute: $command" +exec $command + +# vim:ts=4 diff --git a/system/slim/slim.logrotate b/system/slim/files/slim.logrotate index 3d237a2d14447..3d237a2d14447 100644 --- a/system/slim/slim.logrotate +++ b/system/slim/files/slim.logrotate diff --git a/system/slim/files/slim.pam b/system/slim/files/slim.pam new file mode 100644 index 0000000000000..1ab7fb0911fa2 --- /dev/null +++ b/system/slim/files/slim.pam @@ -0,0 +1,7 @@ +#%PAM-1.0 + +auth include system-local-login +-auth optional pam_gnome_keyring.so +account include system-local-login +session include system-local-login +-session optional pam_gnome_keyring.so auto_start diff --git a/system/slim/files/slimlock.pam b/system/slim/files/slimlock.pam new file mode 100644 index 0000000000000..660b510bc3938 --- /dev/null +++ b/system/slim/files/slimlock.pam @@ -0,0 +1,3 @@ +#%PAM-1.0 + +auth include system-local-login diff --git a/system/slim/patches/slim-1.3.6-config.diff b/system/slim/patches/slim-1.3.6-config.diff new file mode 100644 index 0000000000000..466590ccdcd9b --- /dev/null +++ b/system/slim/patches/slim-1.3.6-config.diff @@ -0,0 +1,60 @@ +diff -Naur slim-1.3.6.orig/slim.conf slim-1.3.6/slim.conf +--- slim-1.3.6.orig/slim.conf 2013-10-02 00:38:05.000000000 +0200 ++++ slim-1.3.6/slim.conf 2021-09-22 19:23:30.484086604 +0200 +@@ -9,6 +9,8 @@ + reboot_cmd /sbin/shutdown -r now + console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login" + #suspend_cmd /usr/sbin/suspend ++## slackware suspend command ++suspend_cmd /usr/sbin/pm-suspend + + # Full path to the xauth binary + xauth_path /usr/bin/xauth +@@ -33,7 +35,8 @@ + # 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 +@@ -41,17 +44,25 @@ + # + # 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 + +-# Available sessions (first one is the default). +-# The current chosen session name is replaced in the login_cmd ++# Available sessions: ++# The current chosen session name replaces %session in the login_cmd + # above, so your login command can handle different sessions. ++# If no session is chosen (via F1), %session will be an empty string. + # see the xinitrc.sample file shipped with slim sources +-sessions xfce4,icewm-session,wmaker,blackbox ++#sessions xfce4,icewm-session,wmaker,blackbox ++# Alternatively, read available sessions from a directory of scripts: ++#sessiondir /etc/X11/Sessions ++# Or, read available sessions from the xsessions desktop files -- ++# note that this may provide a full path to the session executable! ++sessiondir /usr/share/xsessions + + # Executed when pressing F11 (requires imagemagick) + screenshot_cmd import -window root /slim.png +@@ -84,7 +95,7 @@ + current_theme default + + # Lock file +-lockfile /var/run/slim.lock ++lockfile /run/slim.lock + + # Log file + logfile /var/log/slim.log diff --git a/system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch b/system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch new file mode 100644 index 0000000000000..b3787dd58459c --- /dev/null +++ b/system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch @@ -0,0 +1,15 @@ +--- a/app.cpp 2015-09-14 12:00:00.460481656 -0400 ++++ b/app.cpp 2015-09-14 14:41:10.970536588 -0400 +@@ -606,9 +606,9 @@ + + n++; + +- child_env = static_cast<char**>(malloc(sizeof(char*)*n)); +- memcpy(child_env, old_env, sizeof(char*)*n+1); +- child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); ++ child_env = static_cast<char**>(malloc(sizeof(char*)*(n+1))); ++ memcpy(child_env, old_env, sizeof(char*)*n); ++ child_env[n-1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie()); + child_env[n] = NULL; + } + # endif /* USE_CONSOLEKIT */ diff --git a/system/slim/patches/slim-1.3.6-gcc11.patch b/system/slim/patches/slim-1.3.6-gcc11.patch new file mode 100644 index 0000000000000..a6b07c637780a --- /dev/null +++ b/system/slim/patches/slim-1.3.6-gcc11.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/786498 +--- a/panel.cpp ++++ b/panel.cpp +@@ -48,7 +48,7 @@ + gcm = GCGraphicsExposures; + gcv.graphics_exposures = False; + WinGC = XCreateGC(Dpy, Win, gcm, &gcv); +- if (WinGC < 0) { ++ if (WinGC == 0) { + cerr << APPNAME + << ": failed to create pixmap\n."; + exit(ERR_EXIT); diff --git a/system/slim/patches/slim-1.3.6-honour-cflags.patch b/system/slim/patches/slim-1.3.6-honour-cflags.patch new file mode 100644 index 0000000000000..2a43be75fb025 --- /dev/null +++ b/system/slim/patches/slim-1.3.6-honour-cflags.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt 2013-10-01 18:38:05.000000000 -0400 ++++ b/CMakeLists.txt.new 2013-10-15 11:33:18.975741094 -0400 +@@ -42,11 +42,6 @@ + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPKGDATADIR=\"${PKGDATADIR}\"") + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"${SYSCONFDIR}\"") + +-# Flags +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O2") +-set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -Wall -g -O2") +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -O2") +- + # source + set(slim_srcs + main.cpp diff --git a/system/slim/patches/slim-1.3.6-libslim-cmake-fixes.patch b/system/slim/patches/slim-1.3.6-libslim-cmake-fixes.patch new file mode 100644 index 0000000000000..ecd40390c821a --- /dev/null +++ b/system/slim/patches/slim-1.3.6-libslim-cmake-fixes.patch @@ -0,0 +1,33 @@ +--- a/CMakeLists.txt 2013-10-15 11:35:16.688739802 -0400 ++++ b/CMakeLists.txt 2013-10-15 11:53:46.185727620 -0400 +@@ -115,6 +115,7 @@ + message("\tPAM Found") + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DUSE_PAM") + target_link_libraries(${PROJECT_NAME} ${PAM_LIBRARY}) ++ target_link_libraries(libslim ${PAM_LIBRARY}) + target_link_libraries(slimlock ${PAM_LIBRARY}) + include_directories(${PAM_INCLUDE_DIR}) + else(PAM_FOUND) +@@ -173,7 +174,10 @@ + ) + + target_link_libraries(libslim +- ${JPEG_LIBRARIES} ++ ${RT_LIB} ++ ${X11_Xft_LIB} ++ ${X11_Xrandr_LIB} ++ ${JPEG_LIBRARIES} + ${PNG_LIBRARIES} + ) + +@@ -228,8 +228,8 @@ + SOVERSION ${SLIM_VERSION}) + + install(TARGETS libslim +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) + endif (BUILD_SHARED_LIBS) + diff --git a/system/slim/patches/slim-1.3.6-session-chooser.patch b/system/slim/patches/slim-1.3.6-session-chooser.patch new file mode 100644 index 0000000000000..b43c9a3076056 --- /dev/null +++ b/system/slim/patches/slim-1.3.6-session-chooser.patch @@ -0,0 +1,115 @@ +--- a/cfg.cpp 2013-10-01 18:38:05.000000000 -0400 ++++ b/cfg.cpp 2013-10-24 12:12:20.584103253 -0400 +@@ -274,14 +274,14 @@ + while (true) { + string::const_iterator begin = s; + while (*s != c && s != str.end()) { ++s; } +- tmp = string(begin, s); +- if (useEmpty || tmp.size() > 0) ++ tmp = string(begin, s); ++ if (useEmpty || tmp.size() > 0) + v.push_back(tmp); + if (s == str.end()) { + break; + } + if (++s == str.end()) { +- if (useEmpty) ++ if (useEmpty) + v.push_back(""); + break; + } +@@ -289,6 +289,7 @@ + } + + void Cfg::fillSessionList(){ ++ string strSessionList = getOption("sessions"); + string strSessionDir = getOption("sessiondir"); + + sessions.clear(); +@@ -307,29 +308,29 @@ + struct stat oFileStat; + + if (stat(strFile.c_str(), &oFileStat) == 0) { +- if (S_ISREG(oFileStat.st_mode) && +- access(strFile.c_str(), R_OK) == 0){ +- ifstream desktop_file( strFile.c_str() ); +- if (desktop_file){ +- string line, session_name = "", session_exec = ""; +- while (getline( desktop_file, line )) { +- if (line.substr(0, 5) == "Name=") { +- session_name = line.substr(5); +- if (!session_exec.empty()) +- break; +- } else +- if (line.substr(0, 5) == "Exec=") { +- session_exec = line.substr(5); +- if (!session_name.empty()) +- break; +- } +- } +- desktop_file.close(); +- pair<string,string> session(session_name,session_exec); +- sessions.push_back(session); +- cout << session_exec << " - " << session_name << endl; +- } +- ++ if (S_ISREG(oFileStat.st_mode) && ++ access(strFile.c_str(), R_OK) == 0){ ++ ifstream desktop_file( strFile.c_str() ); ++ if (desktop_file){ ++ string line, session_name = "", session_exec = ""; ++ while (getline( desktop_file, line )) { ++ if (line.substr(0, 5) == "Name=") { ++ session_name = line.substr(5); ++ if (!session_exec.empty()) break; ++ } else if (line.substr(0, 5) == "Exec=") { ++ session_exec = line.substr(5); ++ if (!session_name.empty()) break; ++ } ++ } ++ desktop_file.close(); ++ if (!session_name.empty() && !session_exec.empty()) { ++ pair<string,string> session(session_name,session_exec); ++ sessions.push_back(session); ++ } else if (access(strFile.c_str(), X_OK) == 0) { ++ pair<string,string> session(string(pDirent->d_name),strFile); ++ sessions.push_back(session); ++ } ++ } + } + } + } +@@ -338,8 +339,18 @@ + } + + if (sessions.empty()){ +- pair<string,string> session("",""); +- sessions.push_back(session); ++ if (strSessionList.empty()) { ++ pair<string,string> session("",""); ++ sessions.push_back(session); ++ } else { ++ // iterate through the split of the session list ++ vector<string> sessit; ++ split(sessit,strSessionList,',',false); ++ for (vector<string>::iterator it = sessit.begin(); it != sessit.end(); ++it) { ++ pair<string,string> session(*it,*it); ++ sessions.push_back(session); ++ } ++ } + } + } + +--- a/app.cpp 2013-10-24 12:16:59.870111072 -0400 ++++ b/app.cpp 2013-10-24 12:29:59.899132910 -0400 +@@ -377,10 +377,6 @@ + LoginPanel->SetName(cfg->getOption("default_user") ); + } + +- if (firstloop) { +- LoginPanel->SwitchSession(); +- } +- + if (!AuthenticateUser(focuspass && firstloop)){ + panelclosed = 0; + firstloop = false; diff --git a/system/slim/slim-1.3.6_freetype-2.5.1.diff b/system/slim/patches/slim-1.3.6_freetype-2.5.1.diff index 7f4f48a9f9cda..7f4f48a9f9cda 100644 --- a/system/slim/slim-1.3.6_freetype-2.5.1.diff +++ b/system/slim/patches/slim-1.3.6_freetype-2.5.1.diff diff --git a/system/slim/slim.SlackBuild b/system/slim/slim.SlackBuild index c1ad667a81034..b05bd1afa872e 100644 --- a/system/slim/slim.SlackBuild +++ b/system/slim/slim.SlackBuild @@ -31,13 +31,13 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=slim VERSION=${VERSION:-1.3.6} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -55,8 +55,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -84,16 +84,21 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Correct the path used for suspend: -patch -p0 < $CWD/slim.conf.patch -# disable slimlock build -patch -p0 < $CWD/CMakeLists.txt.patch +# Correct the path used for suspend and a few things about sessions +patch -p1 < $CWD/patches/slim-1.3.6-config.diff # Fix for freetype-2.5.5 headers -patch -p1 < $CWD/slim-1.3.6_freetype-2.5.1.diff +patch -p1 < $CWD/patches/slim-1.3.6_freetype-2.5.1.diff +# Fixes for slim libraries +patch -p1 < $CWD/patches/slim-1.3.6-libslim-cmake-fixes.patch +# Honour our FLAGS +patch -p1 < $CWD/patches/slim-1.3.6-honour-cflags.patch +# Fix for the latest gcc +patch -p1 < $CWD/patches/slim-1.3.6-gcc11.patch +# Fix a bug +patch -p1 < $CWD/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch # Fix location of man-pages sed "s/share\/man/man/" -i CMakeLists.txt -sed -i "s/DESTINATION lib/DESTINATION lib${LIBDIRSUFFIX}/" CMakeLists.txt mkdir -p build cd build @@ -101,6 +106,8 @@ cd build -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=$LIBDIRSUFFIX \ + -DUSE_PAM=yes \ -DUSE_CONSOLEKIT=no \ -DCMAKE_BUILD_TYPE=Release .. make @@ -115,7 +122,7 @@ tar xvf $CWD/slackware-black.tar.bz2 -C $PKG/usr/share/slim/themes # Add a logrotate file mkdir -p $PKG/etc/logrotate.d -cat $CWD/slim.logrotate > $PKG/etc/logrotate.d/slim.new +cat $CWD/files/slim.logrotate > $PKG/etc/logrotate.d/slim.new # Kill the incorrectly-placed (and useless anyway) systemd stuff rm -rf $PKG/usr/usr @@ -123,15 +130,17 @@ rm -rf $PKG/usr/usr # Kill systemd stuff rm -rf $PKG/lib +install -m 0644 -D $CWD/files/Xsession $PKG/usr/share/slim/Xsession +install -m 0644 -D $CWD/files/slim.pam $PKG/etc/pam.d/slim/slim.pam +install -m 0644 -D $CWD/files/slimlock.pam $PKG/etc/pam.d/slimlock/slimlock.pam +install -m 0644 -D slimlock.conf $PKG/etc/slimlock.conf + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# Remove slimlock as we don't build it -rm $PKG/usr/man/man1/slimlock.1.gz - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a ChangeLog COPYING INSTALL README THEMES TODO xinitrc.sample $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/system/slim/slim.conf.patch b/system/slim/slim.conf.patch deleted file mode 100644 index 88d47513c196d..0000000000000 --- a/system/slim/slim.conf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- slim.conf.orig 2014-08-07 21:04:23.591900466 -0700 -+++ slim.conf 2014-08-07 21:05:44.455894937 -0700 -@@ -9,6 +9,8 @@ - reboot_cmd /sbin/shutdown -r now - console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login" - #suspend_cmd /usr/sbin/suspend -+## slackware suspend command -+suspend_cmd /usr/sbin/pm-suspend - - # Full path to the xauth binary - xauth_path /usr/bin/xauth |