0

I'm on mac, and I'm trying to create a new package for pkgsrc. Every time I run url2pkg I get the message:

/opt/pkg/bin/url2pkg must be run from a package directory (.../pkgsrc/category/package). at /opt/pkg/bin/url2pkg line 517.

where do I need to run this from? It's not super clear to me. Do I need to make a pkgsrc directory?

I've tried creating new directories in root and also from /opt/pkg and I get this error in both places.

4

2 回答 2

1

要在 pkgsrc 中创建一个包,你通常这样做:

cd /usr/pkgsrc   # or wherever your installation of pkgsrc is
cd $some_category

mkdir mynewpackage
cd mynewpackage

url2pkg https://example.org/releases/mynewpackage-1.27.tar.gz

url2pkg 需要在这个目录下运行的原因是它无法提前知道包的类别。它也不假定 URL 中的基本名称是要创建的包。而且,由于无论如何您都将编辑 Makefile,因此只有在从头开始在该目录中工作时才方便。

于 2016-06-10T21:28:31.990 回答
1

这需要从 pkgsrc/category/package 运行。pkgsrc 需要完整。

对于 OS X,建议的做法似乎是从 joyent/pkgsrc git 存储库中克隆 pkgsrc。

$ git clone git://github.com/joyent/pkgsrc.git

或者,您可以从 NetBSD获取 pkgsrc上游。

  1. 使用 cvs 版本控制:

$ cvs -q -z2 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -r pkgsrc-2016Q1 -P pkgsrc

  1. 或作为压缩包

注意。由于声誉低,我无法包含更多链接,例如指向 tarball 的链接。

于 2016-06-10T07:01:48.667 回答