View | Details | Raw Unified | Return to bug 78445
Collapse All | Expand All

(-)phpmyadmin/Makefile (-23 / +18 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	phpMyAdmin
8
PORTNAME=	phpMyAdmin
9
PORTVERSION=	2.6.1.2
9
PORTVERSION=	2.6.1.3
10
#DISTVERSION=	2.6.1-pl2
10
#DISTVERSION=	2.6.1-pl3
11
CATEGORIES=	databases www
11
CATEGORIES=	databases www
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	phpmyadmin
13
MASTER_SITE_SUBDIR=	phpmyadmin
Lines 20-25 Link Here
20
NO_BUILD=	yes
20
NO_BUILD=	yes
21
USE_PHP=	mysql pcre
21
USE_PHP=	mysql pcre
22
22
23
SUB_LIST+=	"MYADMDIR=${MYADMDIR}" \
24
		"PKGNAME=${PKGNAME}"
25
SUB_FILES=	pkg-message
26
23
# Unfortunately can't make WITH_SUPHP part of the OPTIONS selection,
27
# Unfortunately can't make WITH_SUPHP part of the OPTIONS selection,
24
# since it has to be processed before just about anything else.
28
# since it has to be processed before just about anything else.
25
29
Lines 35-44 Link Here
35
39
36
MYADMUSR?=	phpmyadm
40
MYADMUSR?=	phpmyadm
37
41
38
SED_SCRIPT=	-e 's,%%PREFIX%%,${PREFIX},g'     \
42
SUB_LIST+=	"MYADMUSR=${MYADMUSR}" \
39
		-e 's,%%MYADMDIR%%,${MYADMDIR},g' \
43
		"MYADMGRP=${MYADMGRP}"
40
		-e 's,%%MYADMUSR%%,${MYADMUSR},g' \
44
SUB_FILES+=	pkg-install pkg-deinstall
41
		-e 's,%%MYADMGRP%%,${MYADMGRP},g'
42
45
43
.else
46
.else
44
47
Lines 49-60 Link Here
49
# Copy the way lang/php{4,5}-extensions deals with its OPTIONS -- avoids
52
# Copy the way lang/php{4,5}-extensions deals with its OPTIONS -- avoids
50
# problems with include of bsd.port.pre.mk
53
# problems with include of bsd.port.pre.mk
51
54
52
OPTIONS=	BZ2	"bzip2 library support" on \
55
OPTIONS=	BZ2	 "bzip2 library support" on \
53
		GD	"GD library support" on \
56
		GD	 "GD library support" on \
54
		MYSQLI	"Improved MySQL support (PHP5, MySQL 4.1 only)" off \
57
		MYSQLI	 "Improved MySQL support (PHP5, MySQL 4.1 only)" off \
55
		OPENSSL	"OpenSSL support" on \
58
		OPENSSL	 "OpenSSL support" on \
56
		PDF	"PDFlib support (implies GD)" on \
59
		PDF	 "PDFlib support (implies GD)" on \
57
		ZLIB	"ZLIB support" on
60
		ZLIB	 "ZLIB support" on \
61
		MCRYPT   "MCrypt library support" on \
62
		MBSTRING "Multi-byte character-set string support" on
58
63
59
PORT_DBDIR?=	/var/db/ports
64
PORT_DBDIR?=	/var/db/ports
60
LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
65
LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
Lines 65-71 Link Here
65
.endif
70
.endif
66
71
67
# Options that default to on:
72
# Options that default to on:
68
.for opt in BZ2 GD OPENSSL PDF ZLIB
73
.for opt in BZ2 GD OPENSSL PDF ZLIB MCRYPT MBSTRING
69
.    if !defined(WITHOUT_${opt}) || defined(WITH_${opt})
74
.    if !defined(WITHOUT_${opt}) || defined(WITH_${opt})
70
USE_PHP+=	${opt:L}
75
USE_PHP+=	${opt:L}
71
.    endif
76
.    endif
Lines 78-86 Link Here
78
.    endif
83
.    endif
79
.endfor
84
.endfor
80
85
81
MSG_SKEL=	${PKGDIR}/pkg-message
82
PKGMESSAGE=	${WRKDIR}/pkg-message
83
84
# MYADMUSR is only used WITH_SUPHP
86
# MYADMUSR is only used WITH_SUPHP
85
MYADMDIR?=	www/phpMyAdmin
87
MYADMDIR?=	www/phpMyAdmin
86
MYADMGRP?=	${WWWGRP}
88
MYADMGRP?=	${WWWGRP}
Lines 111-123 Link Here
111
	${FIND} . -type d | ${SORT} -r | ${SED} \
113
	${FIND} . -type d | ${SORT} -r | ${SED} \
112
	     -e "s,^\.$$,@unexec rmdir %D/%%MYADMDIR%% 2>/dev/null || true," \
114
	     -e "s,^\.$$,@unexec rmdir %D/%%MYADMDIR%% 2>/dev/null || true," \
113
	     -e "s,^\.,@dirrm %%MYADMDIR%%,"         >>${PLIST}
115
	     -e "s,^\.,@dirrm %%MYADMDIR%%,"         >>${PLIST}
114
	${SED} -e 's,%%MYADMDIR%%,${MYADMDIR},g' \
115
	       -e 's,%%PREFIX%%,${PREFIX},g'     \
116
	       -e 's,%%PKGNAME%%,${PKGNAME},g' ${MSG_SKEL} > ${PKGMESSAGE}
117
.if defined(WITH_SUPHP)
118
	${SED} ${SED_SCRIPT} ${PKGINST_SKEL}   > ${PKGINSTALL}
119
	${SED} ${SED_SCRIPT} ${PKGDEINST_SKEL} > ${PKGDEINSTALL}
120
.endif
121
116
122
pre-install:
117
pre-install:
123
.if defined(WITH_SUPHP)
118
.if defined(WITH_SUPHP)
(-)phpmyadmin/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (phpMyAdmin-2.6.1-pl2.tar.bz2) = 787feeebe16ef7ab43e75e4046550da2
1
MD5 (phpMyAdmin-2.6.1-pl3.tar.bz2) = 77b97c6212ee9322db0aea6ba00e305c
2
SIZE (phpMyAdmin-2.6.1-pl2.tar.bz2) = 1541665
2
SIZE (phpMyAdmin-2.6.1-pl3.tar.bz2) = 1543219
(-)phpmyadmin/files/pkg-deinstall.in (+26 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/databases/phpmyadmin/pkg-deinstall-suphp,v 1.1 2004/05/20 16:29:49 thierry Exp $
4
#
5
6
case $2 in
7
    POST-DEINSTALL)
8
    cat <<EOMSG
9
The phpMyAdmin-suphp port has been deleted.
10
If you are not upgrading and don't intend to use
11
phpMyAdmin any more then you may wish to delete
12
the %%MYADMUSR%% account, which can be done with
13
the following command:
14
15
    # pw userdel %%MYADMUSR%%
16
EOMSG
17
    if [ -d %%PREFIX%%/%%MYADMDIR%% ] ; then
18
	echo "    # rm -rf %%PREFIX%%/%%MYADMDIR%%/"
19
    fi
20
    echo
21
    ;;
22
esac
23
24
#
25
# That's All Folks!
26
#
(-)phpmyadmin/files/pkg-install.in (+98 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/databases/phpmyadmin/pkg-install-suphp,v 1.1 2004/05/20 16:29:49 thierry Exp $
4
#
5
6
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
7
8
myadmdir=%%PREFIX%%/%%MYADMDIR%%
9
myadmusr=%%MYADMUSR%%
10
myadmgrp=%%MYADMGRP%%
11
12
myadmgcos="phpMyAdmin Owner"
13
myadmhome=/nonexistent
14
myadmshell=/sbin/nologin
15
16
create_group() {
17
    local user group gcos home shell
18
19
    user=$1
20
    group=$2
21
    gcos=$3
22
    home=$4
23
    shell=$5
24
25
    if pw groupadd -n $group ; then
26
	echo "===> Group $group created"
27
    else
28
	cat <<-EOERRORMSG
29
	*** Failed to create the $group group.
30
31
	Please add the $user user and $group group
32
	manually with the commands:
33
34
	    pw groupadd -n $group
35
	    pw useradd -n $user -g $group -c "$gcos" \\
36
	        -d $home -s $shell -h -
37
	    
38
	and retry installing this package.
39
	EOERRORMSG
40
	exit 1
41
    fi
42
}
43
44
45
create_user() {
46
    local user group gcos home shell
47
48
    user=$1
49
    group=$2
50
    gcos=$3
51
    home=$4
52
    shell=$5
53
54
    if pw useradd -n $user -g $group -c "$gcos" -d $home -s $shell -h - ; then
55
	echo "===> Created $user user"
56
    else
57
	cat <<-EOERRORMSG
58
	*** Failed to create the $user user.
59
60
	Please add the $user user manually with the command:
61
62
	    pw useradd -n $user -g $group -c "$gcos" \\
63
		        -d $home -s $shell -h -
64
65
	and retry installing this package.
66
	EOERRORMSG
67
	exit 1
68
    fi
69
}
70
71
72
case $2 in
73
    PRE-INSTALL)
74
75
        # Create the myadm user and group if they do not already exist
76
77
        if pw user show -n $myadmusr >/dev/null 2>&1 ; then
78
	    echo "===> Using pre-existing user $myadmusr"
79
	else
80
	    if ! pw group show -n $myadmgrp >/dev/null 2>&1 ; then
81
		create_group $myadmusr $myadmgrp "$myadmgcos" $myadmhome \
82
		    $myadmshell
83
	    fi
84
	    create_user $myadmusr $myadmgrp "$myadmgcos" $myadmhome $myadmshell
85
	fi
86
	;;
87
    POST-INSTALL)
88
89
    	# Change ownership of the phpMyAdm directory
90
91
        echo "===> Adjusting file ownership in $myadmdir"
92
        chown -R $myadmusr:$myadmgrp $myadmdir || exit 1
93
	;;
94
esac
95
96
#
97
# That's All Folks!
98
#
(-)phpmyadmin/files/pkg-message.in (+12 lines)
Line 0 Link Here
1
2
%%PKGNAME%% has been installed into:
3
4
    %%PREFIX%%/%%MYADMDIR%%
5
6
Please edit config.inc.php to suit your needs.
7
8
To make phpMyAdmin available through your web site, I suggest
9
that you add the following to httpd.conf:
10
11
    Alias /phpmyadmin/ "%%PREFIX%%/%%MYADMDIR%%/"
12
(-)phpmyadmin/pkg-deinstall-suphp (-26 lines)
Lines 1-26 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/databases/phpmyadmin/pkg-deinstall-suphp,v 1.1 2004/05/20 16:29:49 thierry Exp $
4
#
5
6
case $2 in
7
    POST-DEINSTALL)
8
    cat <<EOMSG
9
The phpMyAdmin-suphp port has been deleted.
10
If you are not upgrading and don't intend to use
11
phpMyAdmin any more then you may wish to delete
12
the %%MYADMUSR%% account, which can be done with
13
the following command:
14
15
    # pw userdel %%MYADMUSR%%
16
EOMSG
17
    if [ -d %%PREFIX%%/%%MYADMDIR%% ] ; then
18
	echo "    # rm -rf %%PREFIX%%/%%MYADMDIR%%/"
19
    fi
20
    echo
21
    ;;
22
esac
23
24
#
25
# That's All Folks!
26
#
(-)phpmyadmin/pkg-install-suphp (-98 lines)
Lines 1-98 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/databases/phpmyadmin/pkg-install-suphp,v 1.1 2004/05/20 16:29:49 thierry Exp $
4
#
5
6
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
7
8
myadmdir=%%PREFIX%%/%%MYADMDIR%%
9
myadmusr=%%MYADMUSR%%
10
myadmgrp=%%MYADMGRP%%
11
12
myadmgcos="phpMyAdmin Owner"
13
myadmhome=/nonexistent
14
myadmshell=/sbin/nologin
15
16
create_group() {
17
    local user group gcos home shell
18
19
    user=$1
20
    group=$2
21
    gcos=$3
22
    home=$4
23
    shell=$5
24
25
    if pw groupadd -n $group ; then
26
	echo "===> Group $group created"
27
    else
28
	cat <<-EOERRORMSG
29
	*** Failed to create the $group group.
30
31
	Please add the $user user and $group group
32
	manually with the commands:
33
34
	    pw groupadd -n $group
35
	    pw useradd -n $user -g $group -c "$gcos" \\
36
	        -d $home -s $shell -h -
37
	    
38
	and retry installing this package.
39
	EOERRORMSG
40
	exit 1
41
    fi
42
}
43
44
45
create_user() {
46
    local user group gcos home shell
47
48
    user=$1
49
    group=$2
50
    gcos=$3
51
    home=$4
52
    shell=$5
53
54
    if pw useradd -n $user -g $group -c "$gcos" -d $home -s $shell -h - ; then
55
	echo "===> Created $user user"
56
    else
57
	cat <<-EOERRORMSG
58
	*** Failed to create the $user user.
59
60
	Please add the $user user manually with the command:
61
62
	    pw useradd -n $user -g $group -c "$gcos" \\
63
		        -d $home -s $shell -h -
64
65
	and retry installing this package.
66
	EOERRORMSG
67
	exit 1
68
    fi
69
}
70
71
72
case $2 in
73
    PRE-INSTALL)
74
75
        # Create the myadm user and group if they do not already exist
76
77
        if pw user show -n $myadmusr >/dev/null 2>&1 ; then
78
	    echo "===> Using pre-existing user $myadmusr"
79
	else
80
	    if ! pw group show -n $myadmgrp >/dev/null 2>&1 ; then
81
		create_group $myadmusr $myadmgrp "$myadmgcos" $myadmhome \
82
		    $myadmshell
83
	    fi
84
	    create_user $myadmusr $myadmgrp "$myadmgcos" $myadmhome $myadmshell
85
	fi
86
	;;
87
    POST-INSTALL)
88
89
    	# Change ownership of the phpMyAdm directory
90
91
        echo "===> Adjusting file ownership in $myadmdir"
92
        chown -R $myadmusr:$myadmgrp $myadmdir || exit 1
93
	;;
94
esac
95
96
#
97
# That's All Folks!
98
#
(-)phpmyadmin/pkg-message (-12 lines)
Lines 1-12 Link Here
1
2
%%PKGNAME%% has been installed into:
3
4
    %%PREFIX%%/%%MYADMDIR%%
5
6
Please edit config.inc.php to suit your needs.
7
8
To make phpMyAdmin available through your web site, I suggest
9
that you add the following to httpd.conf:
10
11
    Alias /phpmyadmin/ "%%PREFIX%%/%%MYADMDIR%%/"
12

Return to bug 78445