- Update to 2.0.0.a7;

- make it PREFIX, X11BASE and LOCALBASE clean;
- adjust default font, so login.app should work OOB;
- new MASTER_SITE and WWW;
- make GNUstep theme default theme instead of Linux one (it's nasty to see
  big `LINUX' letters on FreeBSD login screen ;);
- adjust scripts, so `Restart' and `Power-off' buttons work just OOB.

Update prompted by:	Thomas Spreng <spreng@iamexwi.unibe.ch>
This commit is contained in:
Maxim Sobolev 2000-12-14 09:01:23 +00:00
parent 8d61bf6afb
commit 072be54a75
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=35968
19 changed files with 220 additions and 131 deletions

View file

@ -6,10 +6,10 @@
#
PORTNAME= login.app
PORTVERSION= 2.0.0.a4
PORTVERSION= 2.0.0.a7
CATEGORIES= x11 windowmaker
MASTER_SITES= http://www.fukt.hk-r.se/~per/login/
DISTNAME= Login.app-2.0.0-Alpha-4
MASTER_SITES= http://wm.current.nu/files/Login.app/
DISTNAME= Login.app-${PORTVERSION:S/.a/-Alpha-/}
MAINTAINER= sobomax@FreeBSD.org
@ -18,7 +18,14 @@ LIB_DEPENDS= wraster.3:${PORTSDIR}/x11-wm/windowmaker \
USE_X_PREFIX= yes
USE_XPM= yes
MAKE_ENV= MKDIR="${MKDIR}"
ALL_TARGET= Login
post-configure:
@cd ${WRKSRC} && ${PERL} -pi -e 's|%%X11BASE%%|${X11BASE}|g ; \
s|%%LOCALBASE%%|${LOCALBASE}|g' preferences.h Scripts/Login.user \
Scripts/Login.root Scripts/Logout.root Scripts/Startup \
Preferences config.h
.include <bsd.port.mk>

View file

@ -1 +1 @@
MD5 (Login.app-2.0.0-Alpha-4.tar.gz) = d47d5b5a5a041b51c2f2c7bb70b20786
MD5 (Login.app-2.0.0-Alpha-7.tar.gz) = 97101446a0fe23e7b528160290126b9e

View file

@ -1,49 +1,49 @@
--- Makefile.orig Fri Oct 29 18:55:32 1999
+++ Makefile Mon Jan 17 18:23:36 2000
@@ -2,12 +2,12 @@
# Login.app Makefile
--- Makefile.orig Sun Nov 12 06:54:45 2000
+++ Makefile Thu Dec 14 10:50:15 2000
@@ -3,7 +3,7 @@
#
# Directory where Login.app will be installed
-INSTALL_DIR = /usr/local/GNUstep/Apps/Login.app
+INSTALL_DIR = ${X11BASE}/GNUstep/Apps/Login.app
+INSTALL_DIR = ${PREFIX}/GNUstep/Apps/Login.app
-INSTALL = /usr/bin/install
+INSTALL = /usr/bin/install -c
# Use shadow passwords, comment out to disable
SHADOW = -DSHADOW_PASSWD
@@ -13,8 +13,10 @@
INSTALL = /usr/bin/install -c
CC = cc
-CFLAGS += -g -Wall -pedantic -D_GNU_SOURCE `get-wraster-flags --cflags`
-CFLAGS += -Wall -pedantic -D_GNU_SOURCE `get-wraster-flags --cflags` $(SHADOW)
-LDFLAGS += `get-wraster-flags --ldflags` `get-wraster-flags --libs` -lXmu -lPropList -lcrypt
+CFLAGS += -g -Wall -pedantic -D_GNU_SOURCE `${X11BASE}/bin/get-wraster-flags --cflags`
+LDFLAGS += `${X11BASE}/bin/get-wraster-flags --ldflags` `${X11BASE}/bin/get-wraster-flags --libs` -lXmu -lPropList -lcrypt
+WRASTER_CFLAGS != ${X11BASE}/bin/get-wraster-flags --cflags
+WRASTER_LDFLAGS != ${X11BASE}/bin/get-wraster-flags --ldflags --libs
+CFLAGS += -Wall -pedantic -D_GNU_SOURCE $(WRASTER_CFLAGS) $(SHADOW)
+LDFLAGS += $(WRASTER_LDFLAGS) -lXmu -lPropList -lcrypt
TARGET = Login
@@ -19,8 +19,16 @@
graphics.o \
util.o
+SCRIPTS = Login.root \
+ Login.user \
+ Logout.root \
+ Restart \
+ Suspend \
+ PowerOff \
+ Startup
+
$(TARGET): $(OBJS)
- $(CC) -o $(TARGET) $^ $(LDFLAGS)
+ $(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)
clean:
@@ -61,16 +63,14 @@
rm -rf $(TARGET) $(OBJS) core `find -name \*~`
@@ -31,9 +39,9 @@
$(INSTALL) -d $(INSTALL_DIR)/Themes
$(INSTALL) -d $(INSTALL_DIR)/Themes/Linux
$(INSTALL) -d $(INSTALL_DIR)/Themes/GNUstep
- $(INSTALL) $(TARGET) $(INSTALL_DIR)
+ $(INSTALL) -s $(TARGET) $(INSTALL_DIR)
$(INSTALL) -m 644 Preferences $(INSTALL_DIR)/Preferences
- $(INSTALL) Scripts/* $(INSTALL_DIR)/Scripts/
+ cd Scripts && $(INSTALL) $(SCRIPTS) $(INSTALL_DIR)/Scripts/
$(INSTALL) -m 644 Themes/Linux/* $(INSTALL_DIR)/Themes/Linux/
$(INSTALL) -m 644 Themes/GNUstep/* $(INSTALL_DIR)/Themes/GNUstep/
install: $(TARGET)
- $(INSTALL) -d $(INSTALL_DIR)
- $(INSTALL) -d $(INSTALL_DIR)/Scripts
- $(INSTALL) -d $(INSTALL_DIR)/Themes
- $(INSTALL) -d $(INSTALL_DIR)/Themes/Linux
- $(INSTALL) -d $(INSTALL_DIR)/Themes/GNUstep
- $(INSTALL) -s $(TARGET) $(INSTALL_DIR)
- $(INSTALL) -m 644 Preferences $(INSTALL_DIR)/Preferences
- $(INSTALL) $(SCRIPTS) $(INSTALL_DIR)/Scripts/
- $(INSTALL) -m 644 $(THEME_LINUX) $(INSTALL_DIR)/Themes/Linux/
- $(INSTALL) -m 644 $(THEME_GNUSTEP) $(INSTALL_DIR)/Themes/GNUstep/
+ $(MKDIR) $(INSTALL_DIR)/Scripts
+ $(MKDIR) $(INSTALL_DIR)/Themes/Linux
+ $(MKDIR) $(INSTALL_DIR)/Themes/GNUstep
+ $(BSD_INSTALL_PROGRAM) $(TARGET) $(INSTALL_DIR)
+ $(BSD_INSTALL_DATA) Preferences $(INSTALL_DIR)/Preferences
+ $(BSD_INSTALL_SCRIPT) $(SCRIPTS) $(INSTALL_DIR)/Scripts/
+ $(BSD_INSTALL_DATA) $(THEME_LINUX) $(INSTALL_DIR)/Themes/Linux/
+ $(BSD_INSTALL_DATA) $(THEME_GNUSTEP) $(INSTALL_DIR)/Themes/GNUstep/
uninstall:
rm -rf $(INSTALL_DIR)

View file

@ -1,11 +0,0 @@
--- config.h.orig Mon Jan 17 16:35:19 2000
+++ config.h Mon Jan 17 16:38:24 2000
@@ -23,7 +23,7 @@
#define CONFIG_H
/* Enable shadow passwords, comment out to disable */
-#define SHADOW_PASSWD
+/*#define SHADOW_PASSWD*/
/* xinit */
#define XINIT "/usr/X11R6/bin/xinit"

View file

@ -1,19 +1,25 @@
--- switchuser.c.orig Mon Jan 17 16:23:02 2000
+++ switchuser.c Mon Jan 17 16:38:50 2000
@@ -25,10 +25,16 @@
#include <grp.h>
#include <paths.h>
#include <sys/types.h>
+#ifndef __FreeBSD__
#include <shadow.h>
+#endif
#include <proplist.h>
#include "util.h"
#include "config.h"
+
+#ifdef __FreeBSD__
+extern char **environ;
+#endif
--- switchuser.c 2000/12/13 19:53:23 1.1
+++ switchuser.c 2000/12/13 20:23:40
@@ -77,7 +77,7 @@
char* correct;
struct passwd *pw;
#ifdef SHADOW_PASSWD
- struct spwd* sp;
+ struct passwd* sp;
#endif
static char* baseName(const char* name) {
const char *base;
pw = getpwnam(username);
@@ -87,10 +87,10 @@
}
#ifdef SHADOW_PASSWD
- sp = getspnam(pw->pw_name);
- endspent();
+ sp = getpwnam(pw->pw_name);
+ endpwent();
if(sp) {
- correct = sp->sp_pwdp;
+ correct = sp->pw_passwd;
}
else
#endif

View file

@ -1,12 +0,0 @@
--- util.c.orig Mon Jan 17 16:37:49 2000
+++ util.c Mon Jan 17 16:38:11 2000
@@ -28,6 +28,9 @@
#include <stdarg.h>
#include <string.h>
+#ifdef __FreeBSD__
+extern char **environ;
+#endif
void printError(const char *msg, ...) {
va_list args;

View file

@ -1,13 +1,33 @@
--- Scripts/Login.user.orig Sun Aug 1 01:37:50 1999
+++ Scripts/Login.user Mon Jan 17 18:10:27 2000
@@ -15,18 +15,18 @@
--- Scripts/Login.user.orig Sat Nov 11 09:24:21 2000
+++ Scripts/Login.user Thu Dec 14 10:43:08 2000
@@ -1,32 +1,32 @@
#!/bin/sh
-PATH="/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
+PATH="/bin:/usr/bin:%%LOCALBASE%%/bin:%%X11BASE%%/bin"
#
# Try to find the user's init script for X.
# 1) Look for ~/.xinitrc
# 2) Look for ~/.xsession
# 3) Look for ~/.Xclients
-# 4) Look for /etc/X11/xinit/xinitrc
-# 5) Look for /usr/X11R6/bin/twm
-# 6) Look for /usr/X11R6/bin/xterm
+# 4) Look for %%X11BASE%%/lib/X11/xinit/xinitrc
+# 5) Look for %%X11BASE%%/bin/twm
+# 6) Look for %%X11BASE%%/bin/xterm
#
xinitrc=$HOME/.xinitrc
xsession=$HOME/.xsession
xclients=$HOME/.Xclients
-systemxinitrc=/etc/X11/xinit/xinitrc
+systemxinitrc=/usr/X11R6/lib/X11/xinit/xinitrc
twm=/usr/X11R6/bin/twm
xterm=/usr/X11R6/bin/xterm
-twm=/usr/X11R6/bin/twm
-xterm=/usr/X11R6/bin/xterm
+systemxinitrc=%%X11BASE%%/lib/X11/xinit/xinitrc
+twm=%%X11BASE%%/bin/twm
+xterm=%%X11BASE%%/bin/xterm
if [ -r $xinitrc ]; then
- exec sh -login $xinitrc

View file

@ -1,9 +1,18 @@
--- Preferences.orig Mon Jan 17 16:51:19 2000
+++ Preferences Mon Jan 17 16:51:33 2000
@@ -1,5 +1,5 @@
--- Preferences.orig Sat Nov 11 11:07:58 2000
+++ Preferences Thu Dec 14 00:49:48 2000
@@ -1,12 +1,12 @@
{
- WelcomeMessage = "Welcome to LINUX";
+ WelcomeMessage = "Welcome to FreeBSD";
RestartMessage = "System is rebooting...";
PowerOffMessage = "System is shutting down...";
ConfirmRestartMessage = "Do you really want to restart the computer?";
ConfirmRestartMessage = "Do you really want to restart the computer (y/n)?";
ConfirmPowerOffMessage = "Do you really want to turn off the computer (y/n)?";
- XServer = "/usr/X11R6/bin/X -nolisten tcp";
- Theme = "Linux";
+ XServer = "%%X11BASE%%/bin/X -nolisten tcp";
+ Theme = "GNUstep";
DisableWelcomeMessage = Yes;
DisableUserShutdown = No;

View file

@ -1,28 +0,0 @@
--- resources.c.orig Sun Jul 25 11:09:29 1999
+++ resources.c Mon Jan 17 19:08:45 2000
@@ -80,10 +80,22 @@
}
/* Load fonts */
- resources->messageFont = XLoadQueryFont(dpy, preferences->messageFont);
- resources->inputFont = XLoadQueryFont(dpy, preferences->inputFont);
+ if ((resources->messageFont = XLoadQueryFont(dpy, preferences->messageFont)) == NULL) {
+ printError("could not load message font: %s\n%s%s%s%s%s", preferences->messageFont, \
+ "Try to edit your configuration file: ", appPath, "Themes/", preferences->theme, "/Settings");
+ return 0;
+ }
+ if ((resources->inputFont = XLoadQueryFont(dpy, preferences->inputFont)) == NULL) {
+ printError("could not load input font: %s\n%s%s%s%s%s", preferences->inputFont, \
+ "Try to edit your configuration file: ", appPath, "Themes/", preferences->theme, "/Settings");
+ return 0;
+ }
if (preferences->disableHostname == NO) {
- resources->hostnameFont = XLoadQueryFont(dpy, preferences->hostnameFont);
+ if ((resources->hostnameFont = XLoadQueryFont(dpy, preferences->hostnameFont)) == NULL) {
+ printError("could not load hostname font: %s\n%s%s%s%s%s", preferences->hostnameFont, \
+ "Try to edit your configuration file: ", appPath, "Themes/", preferences->theme, "/Settings");
+ return 0;
+ }
}
/* Get hostname */

View file

@ -1,6 +1,11 @@
--- Scripts/Login.root.orig Mon Jan 17 18:12:33 2000
+++ Scripts/Login.root Mon Jan 17 18:13:18 2000
@@ -5,11 +5,11 @@
--- Scripts/Login.root.orig Sat Nov 11 10:49:02 2000
+++ Scripts/Login.root Thu Dec 14 10:38:58 2000
@@ -1,15 +1,15 @@
#!/bin/sh
-PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
+PATH="/sbin:/usr/sbin:/bin:/usr/bin:%%LOCALBASE%%/bin:%%X11BASE%%/bin"
#
# Make user the owner of /dev/console.
#
@ -11,6 +16,6 @@
# Add user to utmp/wtmp.
#
-sessreg -a $USER
+/usr/X11R6/bin/sessreg -a $USER
+%%X11BASE%%/bin/sessreg -a $USER
# End of file

View file

@ -1,17 +1,24 @@
--- Scripts/Logout.root.orig Mon Jan 17 18:35:09 2000
+++ Scripts/Logout.root Mon Jan 17 18:35:44 2000
@@ -7,17 +7,17 @@
--- Scripts/Logout.root.orig Sat Nov 11 10:49:57 2000
+++ Scripts/Logout.root Thu Dec 14 10:38:58 2000
@@ -1,23 +1,23 @@
#!/bin/sh
-PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
+PATH="/sbin:/usr/sbin:/bin:/usr/bin:%%LOCALBASE%%/bin:%%X11BASE%%/bin"
#
# Remove the _MOTIF_DRAG_WINDOW property from the root
# window. This will prevent some Motif applications from
# crashing the next time they are started.
#
-xprop -root -remove _MOTIF_DRAG_WINDOW
+/usr/X11R6/bin/xprop -root -remove _MOTIF_DRAG_WINDOW
+%%X11BASE%%/bin/xprop -root -remove _MOTIF_DRAG_WINDOW
#
# Remove user from utmp/wtmp.
#
-sessreg -d $USER
+/usr/X11R6/bin/sessreg -d $USER
+%%X11BASE%%/bin/sessreg -d $USER
#
# Make root the owner of /dev/console.

View file

@ -0,0 +1,11 @@
--- preferences.h 2000/12/13 20:54:07 1.1
+++ preferences.h 2000/12/13 20:54:43
@@ -39,7 +39,7 @@
#define DEFAULT_WELCOMEMESSAGE "Welcome to LINUX"
#define DEFAULT_POWEROFFMESSAGE "System is shutting down..."
#define DEFAULT_RESTARTMESSAGE "System is rebooting..."
-#define DEFAULT_XSERVER "/usr/X11R6/bin/X"
+#define DEFAULT_XSERVER "%%X11BASE%%/bin/X"
#define DEFAULT_THEME "Linux"
#define DEFAULT_DISABLEWELCOMEMESSAGE NO
#define DEFAULT_DISABLEUSERSHUTDOWN NO

View file

@ -0,0 +1,10 @@
--- Scripts/Startup.orig Sat Nov 11 09:24:57 2000
+++ Scripts/Startup Thu Dec 14 10:38:58 2000
@@ -1,6 +1,6 @@
#!/bin/sh
-PATH="/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
+PATH="/bin:/usr/bin:%%LOCALBASE%%/bin:%%X11BASE%%/bin"
#
# Set cursor for the root window.

View file

@ -0,0 +1,11 @@
--- config.h 2000/12/13 21:04:54 1.1
+++ config.h 2000/12/13 21:05:08
@@ -23,7 +23,7 @@
#define CONFIG_H
/* xinit */
-#define XINIT "/usr/X11R6/bin/xinit"
+#define XINIT "%%X11BASE%%/bin/xinit"
/* Theme directory */
#define THEME_DIR "Themes"

View file

@ -0,0 +1,17 @@
--- Themes/Linux/Settings 2000/12/13 21:12:32 1.1
+++ Themes/Linux/Settings 2000/12/13 21:12:53
@@ -15,12 +15,12 @@
MessagePosition = "231, 130";
MessageJustification = Center;
- MessageFont = "-*-utopia-regular-*-*-*-18-*-*-*-*-*-*-*";
+ MessageFont = "-*-utopia-regular-*-*-*-19-*-*-*-*-*-*-*";
MessageColor = "grey20";
HostnamePosition = "450, 80";
HostnameJustification = Right;
- HostnameFont = "-*-utopia-regular-*-*-*-18-*-*-*-*-*-*-*";
+ HostnameFont = "-*-utopia-regular-*-*-*-19-*-*-*-*-*-*-*";
HostnameColor = "grey30";
InputFont = "-*-helvetica-medium-r-*-*-18-*-*-*-*-*-*-*";

View file

@ -0,0 +1,10 @@
--- Scripts/PowerOff.orig Tue Jul 4 01:03:30 2000
+++ Scripts/PowerOff Thu Dec 14 00:28:50 2000
@@ -3,6 +3,6 @@
#
# Take the system down for halt.
#
-#/sbin/shutdown -h now
+/sbin/shutdown -p now
# End of file

View file

@ -0,0 +1,10 @@
--- Scripts/Restart 2000/12/13 22:24:55 1.1
+++ Scripts/Restart 2000/12/13 22:25:01
@@ -3,6 +3,6 @@
#
# Take the system down for reboot.
#
-#/sbin/shutdown -r now
+/sbin/shutdown -r now
# End of file

View file

@ -0,0 +1,17 @@
--- Themes/GNUstep/Settings 2000/12/13 22:45:18 1.1
+++ Themes/GNUstep/Settings 2000/12/13 22:45:39
@@ -15,12 +15,12 @@
MessagePosition = "231, 130";
MessageJustification = Center;
- MessageFont = "-*-utopia-regular-*-*-*-18-*-*-*-*-*-*-*";
+ MessageFont = "-*-utopia-regular-*-*-*-19-*-*-*-*-*-*-*";
MessageColor = "grey20";
HostnamePosition = "450, 80";
HostnameJustification = Right;
- HostnameFont = "-*-utopia-regular-*-*-*-18-*-*-*-*-*-*-*";
+ HostnameFont = "-*-utopia-regular-*-*-*-19-*-*-*-*-*-*-*";
HostnameColor = "grey30";
InputFont = "-*-helvetica-medium-r-*-*-18-*-*-*-*-*-*-*";

View file

@ -10,4 +10,4 @@ Also, it does have some nice features to halt, reboot and suspend you system.
It will serve the needs of most users that just want a nice looking login
interface on their FreeBSD workstation.
WWW: http://www.fukt.hk-r.se/~per/login/
WWW: http://wm.current.nu/Login.app/