tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ALTERNATIVES framework and multiple package versions question



On Sun, Dec 06, 2020 at 10:44:29AM +0100, Bartek Krawczyk wrote:
> Thx nia, I may have not been clear enough. I am working on packaging
> AdGuard Home which uses Go to build its binary (it compiles nicely on
> 9.1 using pkgsrc-2020Q3, no patching needed). It's not a Go module.
> So AdGuard's Makefile (GNU make) has things like:
> 
> build: client_with_deps
>         go mod download
>         PATH=$(GOPATH)/bin:$(PATH) go generate ./...
>         CGO_ENABLED=0 go build -ldflags="-s -w -X
> main.version=$(VERSION) -X main.channel=$(CHANNEL) -X
> main.goarm=$(GOARM)"
>         PATH=$(GOPATH)/bin:$(PATH) packr clean
> 
> And I am wondering what is the "pkgsrc way" of building it:
> - should it be corrected with SUBST framework?
> - is allowing "go mod download" a good idea during package build? Or
> should pkgsrc Go modules be used?
> 
> Thanks in advance.
> -- 
> Bartek Krawczyk

It still looks like it's a go program, so it should use the pkgsrc way
to build Go programs and probably not this custom thing?

Yeh, packages shouldn't download files during the build process, they
should all be in distfiles.

I think we're moving away from having go modules in pkgsrc itself and
intead using GO_MODULE_FILES.


Home | Main Index | Thread Index | Old Index