Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Aug 2016 10:34:27 +0200
From:      =?utf-8?Q?Martin_Waschb=C3=BCsch?= <martin@waschbuesch.de>
To:        freebsd-ports@freebsd.org
Subject:   questions about Makefile
Message-ID:  <0506A35B-3E3C-47D9-898F-2C61C89F4898@waschbuesch.de>

next in thread | raw e-mail | index | archive | help
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=3D	${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=3D	=
--with-zabbix=3D${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=3Dyes' 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=3Dyes' in their =
Makefile... ;-)


Any and all help is appreciated!


Martin=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0506A35B-3E3C-47D9-898F-2C61C89F4898>