mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-10 07:04:03 +00:00
ed1c866570
www is a static web server, useful for sharing and testing the contents of a directory via HTTP. www will start a web server listening on port 8000 and use as document root the directory where the command was called. Different document root may be specified as also the port and use of SSL, more info using the -h option. WWW: https://github.com/nbari/www PR: 214820 Submitted by: Nicolas de Bari Embriz Garcia Rojas
41 lines
936 B
Makefile
41 lines
936 B
Makefile
# Created by: Nicolas de Bari Embriz Garcia Rojas <nbari@tequila.io>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= www
|
|
PORTVERSION= 0.3.1
|
|
CATEGORIES= www
|
|
PKGNAMEPREFIX= go-
|
|
|
|
MAINTAINER= nbari@tequila.io
|
|
COMMENT= Web server for static content
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
USES= go
|
|
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= nbari:DEFAULT,violetear
|
|
GH_PROJECT= violetear:violetear
|
|
GH_TAGNAME= 2.2.0:violetear
|
|
|
|
GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT}
|
|
|
|
STRIP= # stripping can break go binaries
|
|
|
|
PLIST_FILES= bin/www
|
|
|
|
post-patch:
|
|
@${LN} -sf ${WRKDIR}/${GH_PROJECT_violetear}-${GH_TAGNAME_violetear} \
|
|
${GO_WRKDIR_SRC}/github.com/${GH_ACCOUNT_violetear}/${GH_PROJECT_violetear}
|
|
|
|
do-build:
|
|
@(cd ${GO_WRKSRC} && \
|
|
${SETENV} ${BUILD_ENV} GOPATH=${WRKDIR} go build -ldflags \
|
|
"-X main.version=${PORTVERSION}" -o www cmd/www/main.go)
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${GO_WRKSRC}/www ${STAGEDIR}${PREFIX}/bin/www
|
|
|
|
.include <bsd.port.mk>
|