- Remove NO_STAGE

- Change USE_PYTHON to USES = python:2
- Replace SRC_DIR with SRC_BASE
- Add LICENSE_FILE

Reviewed by: koobs
This commit is contained in:
Craig Rodrigues 2014-09-02 06:18:51 +00:00
parent a6b28cfed1
commit da5ceec1c7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=366974

View file

@ -3,7 +3,7 @@
PORTNAME= zfs
PORTVERSION= 1
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= sysutils python
MASTER_SITES= # none
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -13,13 +13,13 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= Python ZFS library
LICENSE= CDDL
LICENSE_FILE= ${WRKSRC}/OPENSOLARIS.LICENSE
USE_PYTHON= 2
USES= python:2
MAKEFILE= ${FILESDIR}/Makefile.lib
MAKE_ARGS+= PYTHON_INCLUDEDIR="${PYTHON_INCLUDEDIR}" \
PYTHON_LDFLAGS="-L${LOCALBASE}/lib -l${PYTHON_VERSION}"
NO_WRKSUBDIR= yes
SRCDIR?= /usr/src
SUB_FILES+= compile.py
SUB_LIST+= PYTHON_CMD=${PYTHON_CMD}
@ -32,17 +32,19 @@ PYFILES= __init__.py \
userspace.py \
util.py
.if !exists(${SRCDIR}/cddl/contrib/opensolaris/lib/pyzfs) || \
!exists(${SRCDIR}/cddl/contrib/opensolaris/cmd/pyzfs)
IGNORE= requires ZFS v15 or higher sources with pyzfs (in ${SRCDIR})
.include <bsd.port.pre.mk>
.if !exists(${SRC_BASE}/cddl/contrib/opensolaris/lib/pyzfs) || \
!exists(${SRC_BASE}/cddl/contrib/opensolaris/cmd/pyzfs)
IGNORE= requires ZFS v15 or higher sources with pyzfs (in ${SRC_BASE})
.endif
.if !exists(${SRCDIR}/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h)
.if !exists(${SRC_BASE}/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h)
MAKEFILE= ${FILESDIR}/Makefile.lib.v28
.endif
.if exists(${SRCDIR}/cddl/contrib/opensolaris/lib/pyzfs/common/holds.py) && \
exists(${SRCDIR}/cddl/contrib/opensolaris/lib/pyzfs/common/table.py)
.if exists(${SRC_BASE}/cddl/contrib/opensolaris/lib/pyzfs/common/holds.py) && \
exists(${SRC_BASE}/cddl/contrib/opensolaris/lib/pyzfs/common/table.py)
PYFILES+= holds.py \
table.py
PLIST_SUB+= V28=""
@ -52,35 +54,36 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-util.py \
PLIST_SUB+= V28="@comment "
.endif
NO_STAGE= yes
do-extract:
@${MKDIR} ${WRKSRC}
@${CP} ${SRCDIR}/cddl/contrib/opensolaris/cmd/pyzfs/pyzfs.py \
@${CP} ${SRC_BASE}/cddl/contrib/opensolaris/OPENSOLARIS.LICENSE \
${WRKSRC}/OPENSOLARIS.LICENSE
@${CP} ${SRC_BASE}/cddl/contrib/opensolaris/cmd/pyzfs/pyzfs.py \
${WRKSRC}/pyzfs.py
.for PYFILE in ${PYFILES}
@${CP} ${SRCDIR}/cddl/contrib/opensolaris/lib/pyzfs/common/${PYFILE} \
@${CP} ${SRC_BASE}/cddl/contrib/opensolaris/lib/pyzfs/common/${PYFILE} \
${WRKSRC}/${PYFILE}
.endfor
post-patch:
.for PYFILE in pyzfs.py ${PYFILES}
@${REINPLACE_CMD} -e "s|#! /usr/bin/python.*|#! ${PYTHON_CMD}|g" \
${WRKSRC}/${PYFILE}
.endfor
do-install:
${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/zfs
${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/zfs
.for PYFILE in ${PYFILES}
${INSTALL_DATA} ${WRKSRC}/${PYFILE} \
${PYTHONPREFIX_SITELIBDIR}/zfs
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/zfs
.endfor
${INSTALL_DATA} ${WRKSRC}/ioctl.so ${PYTHONPREFIX_SITELIBDIR}/zfs
@${PYTHON_CMD} ${WRKDIR}/compile.py ${PYTHONPREFIX_SITELIBDIR}/zfs
@${PYTHON_CMD} -O ${WRKDIR}/compile.py ${PYTHONPREFIX_SITELIBDIR}/zfs
${MKDIR} /usr/lib/zfs
${INSTALL_SCRIPT} ${WRKSRC}/pyzfs.py /usr/lib/zfs
@${PYTHON_CMD} ${WRKDIR}/compile.py /usr/lib/zfs
@${PYTHON_CMD} -O ${WRKDIR}/compile.py /usr/lib/zfs
${INSTALL_DATA} ${WRKSRC}/ioctl.so ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/zfs
@${PYTHON_CMD} ${WRKDIR}/compile.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/zfs
@${PYTHON_CMD} -O ${WRKDIR}/compile.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/zfs
${MKDIR} ${STAGEDIR}/usr/lib/zfs
${INSTALL_SCRIPT} ${WRKSRC}/pyzfs.py ${STAGEDIR}/usr/lib/zfs
@${PYTHON_CMD} ${WRKDIR}/compile.py ${STAGEDIR}/usr/lib/zfs
@${PYTHON_CMD} -O ${WRKDIR}/compile.py ${STAGEDIR}/usr/lib/zfs
.include <bsd.port.mk>
.include <bsd.port.post.mk>