aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2011-07-09 19:03:10 +0800
committercrees <crees@FreeBSD.org>2011-07-09 19:03:10 +0800
commit424cb5fa6da2275430bf47da1720ab42acaf8c40 (patch)
tree646f9248d8d78950e749632bb7f9444bbec880bd /japanese
parent177b395e8f9cc5431233fb4a07bec97f7b15c60a (diff)
downloadfreebsd-ports-gnome-424cb5fa6da2275430bf47da1720ab42acaf8c40.tar.gz
freebsd-ports-gnome-424cb5fa6da2275430bf47da1720ab42acaf8c40.tar.zst
freebsd-ports-gnome-424cb5fa6da2275430bf47da1720ab42acaf8c40.zip
- Use USERS and GROUPS
- Use pre-su-install to create directories under PREFIX PR: ports/157542 Submitted by: crees (me) Approved by: rene (mentor, implicit)
Diffstat (limited to 'japanese')
-rw-r--r--japanese/Wnn6/Makefile4
-rw-r--r--japanese/Wnn6/pkg-install69
2 files changed, 3 insertions, 70 deletions
diff --git a/japanese/Wnn6/Makefile b/japanese/Wnn6/Makefile
index c44ee37f7bbc..425d0ba413f8 100644
--- a/japanese/Wnn6/Makefile
+++ b/japanese/Wnn6/Makefile
@@ -21,6 +21,8 @@ DISTDIR= ${MOUNT_PT}/fbsd
MOUNT_PT?= /cdrom
MOUNT_DEV?= /dev/acd0c
+USERS= wnn
+
RESTRICTED= "You should buy from Omron Software Co., Ltd."
NO_BUILD= yes
IS_INTERACTIVE= yes
@@ -81,7 +83,7 @@ pre-extract::
post-extract:
@/sbin/umount ${MOUNT_PT}
-pre-install:
+pre-su-install:
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
diff --git a/japanese/Wnn6/pkg-install b/japanese/Wnn6/pkg-install
index 2305c33b387d..e0edcdb43dce 100644
--- a/japanese/Wnn6/pkg-install
+++ b/japanese/Wnn6/pkg-install
@@ -81,75 +81,6 @@ PRE-INSTALL)
fi
fi
- ## Hack /etc/master.passwd ##
- # check
- id_69=`id -u 69 2> /dev/null`
- id_wnn=`id -u wnn 2> /dev/null`
- if [ X"$id_wnn" = X69 ];then
- exit 0
- elif [ X"$id_69" != X ]; then
-cat <<EOF
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-This system already has an account whose name is not 'wnn' and ID
-number is 69.
-
- '`id 69`'
-
-For Wnn6 in this port or package, ID number of 'wnn' has to be 69.
-Please try again after you delete the account.
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-EOF
- exit 1
- elif [ X"$id_wnn" != X ]; then
- cat <<EOF
-
-This system has an 'wnn' account whose ID number is $id_wnn. It seems
-that Wnn4.2 has been already installed. For Wnn6 in this ports or
-package, ID number of 'wnn' has to be 69. So we do the following two
-things:
-
-1) You should delete the account.
-
-2) It seems that all of files or directories for Wnn4.2 are in
- ${PKG_PREFIX}/lib/wnn and ${PKG_PREFIX}/bin. You should change these ID
- number from '$id_wnn' to '69'.
-
- Notice: After doing 1) and 2), we will create a new 'wnn' account
- whose ID number is '69'.
-
-EOF
- if yesno "Would you like to do the above things automatically" y; then
- # We need a command 'pw(8)'
- check_pw
- pw userdel wnn
- if [ $? != 0 ]; then
- echo ""
- echo "Cannot delete it. Please do it, and try again."
- exit 1
- fi
- find ${PKG_PREFIX}/lib/wnn ${PKG_PREFIX}/bin \
- -user $id_wnn -exec chown 69 {} \;
- else
- echo "Please do those, and try again."
- exit 1
- fi
- fi
-
- # add an account 'wnn' to this system
- echo ""
- echo "You need an account 'wnn' whose ID number is 69"
- if yesno "Would you like to create it automatically?" y; then
- # We need a command 'pw(8)'
- check_pw
- pw useradd wnn -u 69 -g 7 -h - -d /nonexistent \
- -s /nonexistent -c Wnn6 || exit
- else
- echo "Please create it, and try again."
- exit 1
- fi
- ;;
-
POST-INSTALL)
mkdir -p /usr/local/bin