3.1.编写 Makefile

本节描述了如何快速创建一个新的port。对于这种快速方法不够用的应用程序,在 Slow Porting 中描述了完整的“Slow Porting”过程。

首先,获取原始压缩包并将其放入 DISTDIR ,默认为 /usr/ports/distfiles。

# echo DEVELOPER=yes >> /etc/make.conf

此设置启用了“开发者模式”,显示弃用警告并在调用 make 时激活进一步的质量检查。

3.1. 编写 Makefile

最简单的 Makefile 可能看起来像这样:

PORTNAME=	oneko
DISTVERSION=	1.1b
CATEGORIES=	games
MASTER_SITES=	ftp://ftp.rediris.es/sites/ftp.freebsd.org/pub/FreeBSD/

MAINTAINER=	youremail@example.com
COMMENT=	Cat chasing a mouse all over the screen
WWW=		http://www.daidouji.com/oneko/

.include <bsd.port.mk>

尝试理解。在示例 Makefile 部分中展示了更详细的示例。

最后更新于

FreeBSD 中文社区