Creating new port -

Hi all,
this mi first time writing here. I have a problem regarding building custom port which is on private git server. It is a simple go app. But the problem is with fetching tarball from archive, at the end of the MASTER_SITES URL it add a DISTVERSION variable, I am not really sure why is that happening.
I cannot do make fetch and make makesum to generate distinfo file. The point is it must be transfered trough fetch, not manually in the DISTDIR
Here is a Makefile:
Code:
PORTNAME=       postfix-log-parser
DISTVERSION=    g${_GIT_DATE}
CATEGORIES=     sysutils
MASTER_SITES=   ${_GITEA_ARCHIVE}/?token=${GITEA_TOKEN}
_GITEA_SITE=    [URL]https://git.example.com[/URL]
_GITEA_ACCOUNT= user
_GITEA_PROJECT= ${PORTNAME}
#_GITEA_COMMIT= ${_GIT_HASH}
_GITEA_ARCHIVE= ${_GITEA_SITE}/api/v1/repos/${_GITEA_ACCOUNT}/${_GITEA_PROJECT}/archive

MAINTAINER=     [email]contact@example.com[/email]

LICENSE=        MIT
LICENSE_FILE=   ${WRKSRC}/LICENSE.md

USES=           gmake go:modules

PLIST_FILES=    bin/${PORTNAME}

USE_RC_SUBR=    ${PORTNAME}

.include "Makefile.git_rev"

.if defined(DEVELOPER)
_GIT_CLONE_URL=         ${_GITEA_SITE:S|://|://${GITEA_USERNAME}:${GITEA_TOKEN}@|}/${_GITEA_ACCOUNT}/${_GITEA_PROJECT}
_GIT_CHECKOUT_BRANCH=   master
.include "Makefile.developer"
.endif

.include <bsd.port.mk>
 
Compare your Makefile to other Makefiles, and look at how their DISTVERSION is used to what the distfile name it retrieves is. Use grep to search other parts of Makefiles for comparison.

You could also try IRC for FreeBSD's Ports. I don't know if they'll help you with a private port though.

I'm guessing you've looked through the Porter's Handbook. It may take going over sections of it a few times.
 
Back
Top