questions about Makefile
Martin Waschbüsch
martin at waschbuesch.de
Sat Aug 13 08:34:34 UTC 2016
Hi all,
I am in the process of creating a port for a module / plugin for net-mgmt/zabbix-agent.
I tried to follow the Porter's Handbook, but still have three items I am uncertain about:
1) The plugin (obviously) relies on the zabbix-agent sources.
I added
BUILD_DEPENDS= ${NONEXISTENT}:net-mgmt/zabbix3-agent:extract
to make sure that the sources will always be extracted. Now, how do I properly reference these sources in my port?
What I have right now (just to make it compile) is this:
CONFIGURE_ARGS= --with-zabbix=${PORTSDIR}/net-mgmt/zabbix3-agent/work/zabbix-3.0.2
Obviously, I'd want to somehow get that path without having to specify the version number as I want to build against the version currently available in ports.
How do I do that? Is there any reference to something like this in the handbook?
2) Imagine this module could be compiled against both, zabbix2-agent and zabbix3-agent. I guess the cleanest way to support this would be having one port per zabbix-version?
If that is the case, should the whole thing perhaps be a slave port belonging to zabbix{2,3}-agent?
3) I found that I cannot (as a normal user) successfully run 'make package'.
I get an error like this:
mkdir: /usr/ports/net-mgmt/foobar/work: Permission denied
Before I add 'NEED_ROOT=yes' to the Makefile, are there requirements for a normal user to build ports? e.g. does said user have to be in a certain group, etc.? I mean, every port will have to create a workdir, and I cannot imagine every port as having 'NEED_ROOT=yes' in their Makefile... ;-)
Any and all help is appreciated!
Martin
More information about the freebsd-ports
mailing list