1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

* Use which -s instead of command -v to test for certain programs [1]

* Make sure directory permissions are correctly set when installing from
  package

PR:	45991 [1]
Submitted by:	Joe Kelsey <joek@zircon.staff.flyingcroc.net> [1]
This commit is contained in:
Joe Marcus Clarke 2003-01-19 19:49:31 +00:00
parent 3a50857150
commit cf8fa641fe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=73532
6 changed files with 59 additions and 11 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= gdm2
PORTVERSION= 2.4.0.12
PORTREVISION= 1
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.4
@ -61,12 +62,6 @@ post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif
@${INSTALL_SCRIPT} ${WRKSRC}/gdm.sh.sample ${PREFIX}/etc/rc.d
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
@${CHOWN} -R gdm:gdm ${PREFIX}/share/gnome/gdm ${PREFIX}/etc/gdm
.else
@${CHOWN} -R 92:92 ${PREFIX}/share/gnome/gdm ${PREFIX}/etc/gdm
.endif
@${CHMOD} 0750 ${PREFIX}/share/gnome/gdm
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,10 +1,12 @@
--- config/gnomerc.in.orig Wed Jul 24 15:52:07 2002
+++ config/gnomerc.in Wed Jul 24 15:52:26 2002
@@ -2,6 +2,7 @@
--- config/gnomerc.in.orig Wed Jul 24 15:25:51 2002
+++ config/gnomerc.in Mon Dec 23 23:53:21 2002
@@ -2,7 +2,8 @@
# Do we have gnome-volume-control?
# If so we should run it to load the gnome-volume-control settings
-if command -v gnome-volume-control > /dev/null 2>&1; then
+LC_CTYPE= ; export LC_CTYPE
if command -v gnome-volume-control > /dev/null 2>&1; then
+if /usr/bin/which -s gnome-volume-control > /dev/null 2>&1; then
gnome-volume-control -i
else if [ -x @EXPANDED_BINDIR@/gnome-volume-control > /dev/null 2>&1; then
elif [ -x @EXPANDED_BINDIR@/gnome-volume-control ] ; then
@EXPANDED_BINDIR@/gnome-volume-control -i

View File

@ -0,0 +1,20 @@
--- config/Default.orig Mon Dec 23 23:53:42 2002
+++ config/Default Mon Dec 23 23:54:11 2002
@@ -7,7 +7,7 @@
sysmodmap=/etc/X11/Xmodmap
-if command -v xmodmap > /dev/null 2>&1; then
+if /usr/bin/which -s xmodmap > /dev/null 2>&1; then
if [ -z "$GDM_PARENT_DISPLAY" ]; then
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
@@ -17,7 +17,7 @@
fi
fi
-if command -v setxkbmap > /dev/null 2>&1; then
+if /usr/bin/which -s setxkbmap > /dev/null 2>&1; then
# FIXME: is this all right? Is this completely on crack?
# What this does is move the xkb configuration from the GDM_PARENT_DISPLAY
# FIXME: This should be done in code. Or there must be an easier way ...

View File

@ -0,0 +1,11 @@
--- config/PostSession.orig Wed Dec 4 14:05:13 2002
+++ config/PostSession Wed Dec 4 14:05:34 2002
@@ -2,7 +2,7 @@
PATH=/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH
-if command -v sessreg > /dev/null 2>&1; then
+if /usr/bin/which -s sessreg > /dev/null 2>&1; then
sessreg -d -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER
fi
exit 0

View File

@ -0,0 +1,16 @@
--- config/PreSession.orig Wed Dec 4 14:05:38 2002
+++ config/PreSession Wed Dec 4 14:06:04 2002
@@ -8,11 +8,11 @@
#
PATH=/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH
-if command -v xsetroot > /dev/null 2>&1; then
+if /usr/bin/which -s xsetroot > /dev/null 2>&1; then
xsetroot -cursor_name left_ptr -solid "#363047"
fi
-if command -v sessreg > /dev/null 2>&1; then
+if /usr/bin/which -s sessreg > /dev/null 2>&1; then
# some output for easy debugging
echo "$0: Registering your session with wtmp and utmp"
echo "$0: running: sessreg -a -w /var/log/wtmp -u /var/run/utmp -x \"$X_SERVERS\" -h \"$REMOTE_HOST\" -l $DISPLAY $USER"

View File

@ -10,6 +10,8 @@ if [ "$2" = "POST-INSTALL" ]; then
UID=92
GID=${UID}
PW=/usr/sbin/pw
CHMOD=/bin/chmod
CHOWN=/usr/sbin/chown
if ${PW} group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
@ -34,6 +36,8 @@ if [ "$2" = "POST-INSTALL" ]; then
exit 1
fi
fi
${CHOWN} -R ${USER}:${GROUP} ${PKG_PREFIX}/share/gnome/gdm ${PKG_PREFIX}/etc/gdm
${CHMOD} 0750 ${PKG_PREFIX}/share/gnome/gdm
exit 0
fi