mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
Make PKGNAMEPREFIX and DIST_SUBDIR definable in ports
Simplify pkg-deinstall
This commit is contained in:
parent
0831ad3433
commit
9259f4c7d8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=277222
2 changed files with 6 additions and 13 deletions
|
@ -5,13 +5,12 @@
|
|||
MASTER_SITES?= http://pear.php.net/get/ \
|
||||
http://us.pear.php.net/get/ \
|
||||
http://de.pear.php.net/get/
|
||||
PKGNAMEPREFIX= pear-
|
||||
.if defined(PEAR_DIST_SUFX)
|
||||
EXTRACT_SUFX= ${PEAR_DIST_SUFX}
|
||||
.else
|
||||
EXTRACT_SUFX= .tgz
|
||||
.endif
|
||||
DIST_SUBDIR= PEAR
|
||||
DIST_SUBDIR?= PEAR
|
||||
|
||||
RUN_DEPENDS+= pear:${PORTSDIR}/devel/pear
|
||||
|
||||
|
@ -26,9 +25,10 @@ NO_BUILD= yes
|
|||
.endif
|
||||
|
||||
.if defined(PEAR_CHANNEL) && ${PEAR_CHANNEL} != ""
|
||||
PKGNAMEPREFIX= pear-${PEAR_CHANNEL}-
|
||||
PKGNAMEPREFIX?= pear-${PEAR_CHANNEL}-
|
||||
PEARPKGREF= ${PEAR_CHANNEL}/${PORTNAME}
|
||||
.else
|
||||
PKGNAMEPREFIX?= pear-
|
||||
PEARPKGREF= ${PORTNAME}
|
||||
.endif
|
||||
|
||||
|
@ -61,7 +61,7 @@ LINSTDIR= ${LPEARDIR}
|
|||
.endif
|
||||
INSTDIR= ${PHP_BASE}/${LINSTDIR}
|
||||
|
||||
SUB_LIST+= PEAR_CHANNEL=${PEAR_CHANNEL}
|
||||
SUB_LIST+= PKG_NAME=${PEARPKGREF}
|
||||
|
||||
.if !defined(USE_PHPIZE) && !exists(${.CURDIR}/pkg-plist)
|
||||
PLIST= ${WRKDIR}/PLIST
|
||||
|
|
|
@ -8,14 +8,7 @@ if [ x$2 != xDEINSTALL ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
PKG_NAME=${1%%-[0-9._]*}
|
||||
CHANNEL=%%PEAR_CHANNEL%%
|
||||
PACKAGE=%%PKG_NAME%%
|
||||
PEAR=${PKG_PREFIX}/bin/pear
|
||||
|
||||
if [ -z "$CHANNEL" ]; then
|
||||
PACKAGE=$(echo $PKG_NAME | sed "s/pear-//")
|
||||
${PEAR} uninstall -r -n ${PACKAGE} || true
|
||||
else
|
||||
PACKAGE=$(echo $PKG_NAME | sed "s/pear-${CHANNEL}-//")
|
||||
${PEAR} uninstall -r -n ${CHANNEL}/${PACKAGE} || true
|
||||
fi
|
||||
${PEAR} uninstall -r -n ${PACKAGE} || true
|
||||
|
|
Loading…
Add table
Reference in a new issue