8b4093cba5
The only reason to use post-stage is because the port needs to do "things" at a later time, like some plist manipulation. While there, fold post-install in do-install targets when they are defined. PR: 214780 Submitted by: mat Exp-run by: antoine Sponsored by: Absolight
51 lines
1.6 KiB
Makefile
51 lines
1.6 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= btsync
|
|
PORTVERSION= 2.3.8
|
|
CATEGORIES= net-p2p
|
|
MASTER_SITES= https://download-cdn.getsync.com/${PORTVERSION}/FreeBSD-${CONFIG_ARCH}/ \
|
|
http://download-cdn.getsync.com/${PORTVERSION}/FreeBSD-${CONFIG_ARCH}/
|
|
DISTNAME= BitTorrent-Sync_freebsd_${CONFIG_ARCH}
|
|
|
|
MAINTAINER= joshruehlig@gmail.com
|
|
COMMENT= Distributed peer-to-peer file syncing application
|
|
|
|
LICENSE= EULA
|
|
LICENSE_NAME= BitTorrent Sync
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
|
|
LICENSE_PERMS= auto-accept
|
|
|
|
NO_WRKSUBDIR= yes
|
|
NO_BUILD= yes
|
|
ONLY_FOR_ARCHS= amd64 i386
|
|
ONLY_FOR_ARCHS_REASON= It is a binary-only program. Source code not available.
|
|
|
|
PLIST_SUB= PORTNAME=${PORTNAME} USER=${USERS} GROUP=${GROUPS}
|
|
SUB_LIST= PORTNAME=${PORTNAME} USER=${USERS} GROUP=${GROUPS}
|
|
SUB_FILES= pkg-message
|
|
USE_RC_SUBR= ${PORTNAME}
|
|
|
|
USERS= ${PORTNAME}
|
|
GROUPS= ${USERS}
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${ARCH} == "amd64"
|
|
CONFIG_ARCH= x64
|
|
.else
|
|
CONFIG_ARCH= ${ARCH}
|
|
.endif
|
|
|
|
post-extract:
|
|
${MKDIR} ${WRKSRC}/temp
|
|
${MV} ${WRKSRC}/${PORTNAME} ${WRKSRC}/temp
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/temp/btsync ${STAGEDIR}${PREFIX}/bin
|
|
${WRKSRC}/temp/btsync --dump-sample-config > ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
|
${REINPLACE_CMD} -e 's;^//\([[:space:]]*"storage_path"[[:space:]]*:[[:space:]]*\)"/.*",$$;\1"/var/db/${PORTNAME}",;' ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
|
${REINPLACE_CMD} -e 's;^//\([[:space:]]*"pid_file"[[:space:]]*:[[:space:]]*"/var/run/${PORTNAME}/${PORTNAME}.pid",\)$$;\1;' ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
|
|
|
|
${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
|
|
|
|
.include <bsd.port.post.mk>
|