Changeset View
Changeset View
Standalone View
Standalone View
security/softether/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= softether | PORTNAME= softether | ||||
PORTVERSION= 4.25.9656 | PORTVERSION= 4.25.9656 | ||||
PORTREVISION= 1 | |||||
CATEGORIES= security | CATEGORIES= security | ||||
MASTER_SITES= https://www.softether-download.com/files/softether/v4.25-9656-rtm-2018.01.15-tree/Source_Code/ | MASTER_SITES= https://www.softether-download.com/files/softether/v4.25-9656-rtm-2018.01.15-tree/Source_Code/ | ||||
DISTNAME= ${PORTNAME}-src-v4.25-9656-rtm | DISTNAME= ${PORTNAME}-src-v4.25-9656-rtm | ||||
MAINTAINER= meta@FreeBSD.org | MAINTAINER= meta@FreeBSD.org | ||||
COMMENT= Softether VPN solution | COMMENT= Softether VPN solution | ||||
LICENSE= GPLv2 | LICENSE= GPLv2 | ||||
LICENSE_FILE= ${WRKSRC}/LICENSE | |||||
CONFLICTS_INSTALL= softether-devel | ONLY_FOR_ARCHS= amd64 i386 | ||||
ONLY_FOR_ARCHS_REASON= Upstream only supports amd64 and i386: https://www.softether.org/3-spec | |||||
CPPFLAGS+= -I${LOCALBASE}/include | USES= dos2unix gmake iconv:wchar_t localbase:ldflags ncurses \ | ||||
LDFLAGS+= -L${LOCALBASE}/lib | readline ssl | ||||
USE_RC_SUBR= softether_bridge softether_client softether_server | |||||
PORTDOCS= AUTHORS.TXT ChangeLog LICENSE README THIRD_PARTY.TXT WARNING.TXT | DOS2UNIX_FILES= ChangeLog LICENSE README *.TXT \ | ||||
DOS2UNIX_FILES= AUTHORS.TXT ChangeLog LICENSE README THIRD_PARTY.TXT \ | src/Cedar/*.* src/Mayaqua/*.* | ||||
WARNING.TXT \ | SUB_FILES= vpncmd | ||||
src/Cedar/Cedar.h \ | |||||
src/Cedar/Cedar.h \ | |||||
src/Cedar/Client.h \ | |||||
src/Cedar/Nat.h \ | |||||
src/Cedar/Server.c \ | |||||
src/Cedar/Server.h \ | |||||
src/Cedar/Virtual.h \ | |||||
src/Mayaqua/Cfg.c \ | |||||
src/Mayaqua/Cfg.h \ | |||||
src/Mayaqua/Kernel.c \ | |||||
src/Mayaqua/Mayaqua.c \ | |||||
src/Mayaqua/Network.c \ | |||||
src/Mayaqua/Network.h \ | |||||
src/Mayaqua/Table.h \ | |||||
src/Mayaqua/Unix.c | |||||
OPTIONS_DEFINE= DOCS UNLOCK | OPTIONS_DEFINE= DOCS UNLOCK | ||||
# Use of some functions in Japan and China is restricted. | # Use of some functions in Japan and China is restricted. | ||||
# This option Unlocks regional lockout following functions: | # This option Unlocks regional lockout following functions: | ||||
# - RADIUS / NT Domain user authentication function | # - RADIUS / NT Domain user authentication function | ||||
# - RSA certificate user authentication function | # - RSA certificate user authentication function | ||||
# - Deep-inspect packet logging function | # - Deep-inspect packet logging function | ||||
# - Source IP address control list function | # - Source IP address control list function | ||||
# - syslog transfer function | # - syslog transfer function | ||||
UNLOCK_DESC= Unlock regional lockout (JP and CN) | UNLOCK_DESC= Unlock regional lockout (JP and CN) | ||||
UNLOCK_EXTRA_PATCHES= ${FILESDIR}/extra-patch-unrestrict-enterprise-functions | UNLOCK_EXTRA_PATCHES= ${FILESDIR}/extra-patch-unrestrict-enterprise-functions | ||||
mat: All this appears too early. See [[ https://www.freebsd.org/doc/en/books/porters… | |||||
ONLY_FOR_ARCHS= i386 amd64 | CONFLICTS_INSTALL= softether-devel | ||||
PORTDOCS= AUTHORS.TXT ChangeLog LICENSE README THIRD_PARTY.TXT WARNING.TXT | |||||
USES= dos2unix gmake iconv:wchar_t localbase:ldflags ncurses \ | |||||
readline ssl | |||||
USE_RC_SUBR= softether_bridge softether_client softether_server | |||||
SUB_FILES= vpncmd | |||||
MAKE_JOBS_UNSAFE= yes | |||||
LOGDIR?= /var/log/softether | LOGDIR?= /var/log/softether | ||||
PLIST_SUB+= LOGDIR="${LOGDIR}" | PLIST_SUB= LOGDIR="${LOGDIR}" | ||||
Done Inline ActionsWhy +=? mat: Why `+=`?
| |||||
Not Done Inline Actionsseems unnecessary, removed. meta: seems unnecessary, removed. | |||||
SUB_LIST= LOGDIR="${LOGDIR}" | SUB_LIST= LOGDIR="${LOGDIR}" | ||||
CPPFLAGS+= -I${LOCALBASE}/includec | |||||
LDFLAGS+= -L${LOCALBASE}/lib | |||||
# a pity the source directory has such a naming scheme, but well | # a pity the source directory has such a naming scheme, but well | ||||
WRKSRC= ${WRKDIR}/v4.25-9656 | WRKSRC= ${WRKDIR}/v4.25-9656 | ||||
ALL_TARGET= build | ALL_TARGET= build | ||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
post-patch: | |||||
# skip configure at all and copy the corresponding Makefile in place | # skip configure at all and copy the corresponding Makefile in place | ||||
post-extract: | |||||
.if ${ARCH} != "amd64" | .if ${ARCH} != "amd64" | ||||
Not Done Inline ActionsThis, and the next change are wrong, they replace make(1) comments with sh(1) comments, which should not be done. mat: This, and the next change are wrong, they replace make(1) comments with sh(1) comments, which… | |||||
Done Inline ActionsI cannot get you. You didn't say that in a review of -devel port I created before. meta: I cannot get you. You didn't say that in a review of -devel port I created before.
Can you show… | |||||
@${CP} ${WRKSRC}/src/makefiles/freebsd_32bit.mak ${WRKSRC}/Makefile | @${CP} ${WRKSRC}/src/makefiles/freebsd_32bit.mak ${WRKSRC}/Makefile | ||||
.else | .else | ||||
@${CP} ${WRKSRC}/src/makefiles/freebsd_64bit.mak ${WRKSRC}/Makefile | @${CP} ${WRKSRC}/src/makefiles/freebsd_64bit.mak ${WRKSRC}/Makefile | ||||
.endif | .endif | ||||
# pull in user specific CFLAGS and LDFLAGS | # pull in user specific CFLAGS and LDFLAGS | ||||
@${REINPLACE_CMD} -e "s|OPTIONS_COMPILE_RELEASE=|OPTIONS_COMPILE_RELEASE=${CFLAGS} |g" ${WRKSRC}/Makefile | @${REINPLACE_CMD} -e "s|OPTIONS_COMPILE_RELEASE=|OPTIONS_COMPILE_RELEASE=${CFLAGS} |g" ${WRKSRC}/Makefile | ||||
@${REINPLACE_CMD} -e "s|OPTIONS_LINK_RELEASE=|OPTIONS_LINK_RELEASE=${LDFLAGS} |g" ${WRKSRC}/Makefile | @${REINPLACE_CMD} -e "s|OPTIONS_LINK_RELEASE=|OPTIONS_LINK_RELEASE=${LDFLAGS} |g" ${WRKSRC}/Makefile | ||||
# manually install to ${PREFIX}/libexec/softether, then the final install will copy scripts | # manually install to ${PREFIX}/libexec/softether, then the final install will copy scripts | ||||
# into ${PREFIX}/sbin | # into ${PREFIX}/sbin | ||||
do-install: | do-install: | ||||
${MKDIR} ${STAGEDIR}/${PREFIX}/libexec/softether | ${MKDIR} ${STAGEDIR}/${PREFIX}/libexec/softether | ||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnbridge/vpnbridge ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnbridge | ${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnbridge/vpnbridge ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnbridge | ||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnclient/vpnclient ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnclient | ${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnclient/vpnclient ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnclient | ||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/vpncmd/vpncmd ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpncmd | ${INSTALL_SCRIPT} ${WRKSRC}/bin/vpncmd/vpncmd ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpncmd | ||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnserver/vpnserver ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnserver | ${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnserver/vpnserver ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnserver | ||||
${INSTALL_DATA} ${WRKSRC}/bin/vpnserver/hamcore.se2 ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/hamcore.se2 | ${INSTALL_DATA} ${WRKSRC}/bin/vpnserver/hamcore.se2 ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/hamcore.se2 | ||||
${INSTALL_SCRIPT} ${WRKDIR}/vpncmd ${STAGEDIR}/${PREFIX}/sbin/vpncmd | ${INSTALL_SCRIPT} ${WRKDIR}/vpncmd ${STAGEDIR}/${PREFIX}/sbin/vpncmd | ||||
post-install: | |||||
.for i in vpnbridge vpnclient vpncmd vpnserver | .for i in vpnbridge vpnclient vpncmd vpnserver | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/${i} | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/${i} | ||||
.endfor | .endfor | ||||
@${MKDIR} ${STAGEDIR}${DOCSDIR} | @${MKDIR} ${STAGEDIR}${DOCSDIR} | ||||
@${MKDIR} ${STAGEDIR}${LOGDIR} | @${MKDIR} ${STAGEDIR}${LOGDIR} | ||||
.for doc in ${PORTDOCS} | .for doc in ${PORTDOCS} | ||||
${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR} | ${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR} | ||||
.endfor | .endfor | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
All this appears too early. See Chapter 15. Order of Variables in Port Makefiles.