How to create a port only for specific FreeBSD releases

Matthew Seaman matthew at FreeBSD.org
Mon Feb 27 14:55:02 UTC 2017


On 2017/02/27 14:37, Andrew Hotlab wrote:
> Hi to all, I'm trying to make a port which installs only a couple of
> simple scripts (thus NO_BUILD, NO_ARCH, and void MASTER_SITES and
> DISTFILES...).
> 
> Since these scripts are designed to run on FreeBSD 10.0 and newer,
> I'd like to know if there is a way to prevent the port from installing on
> older FreeBSD releases. In the Porter's Handbook I found this paragraph,
> but it seems regarding only ported app's source code:
> 
> https://www.freebsd.org/doc/en/books/porters-handbook/porting-versions.html

Well, given that the earliest supported version in ports is now
10.3-RELEASE, this problem appears to have fixed itself for your purposes.

In general, you can test against ${OSVERSION} in your port's Makefile to
detect what OS version the port is being built on, and mark the port as
broken where the OS version is not suitable.

Note however that binary packages are built on the oldest supported
version of the major branch, so by marking the port broken for the OSV,
you will prevent binary packages being available for that entire major
branch.  It's best to apply this sort of brokenness determination at the
level of the major version number, rather than anything finer grained.

	Cheers,

	Matthew



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 972 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170227/9ef6e021/attachment.sig>


More information about the freebsd-ports mailing list