Binary pkgsrc packages for Mac OS X Maverics (Darwin 13.1.0)

As I already wrote, I build pkgsrc packages for Mac OS X. Some time ago I update to Darwin 13.1.0.

To use the new repository, you need to change the path in /usr/pkg/etc/pkgin/repositories.conf to

If you want to install everything from scratch run the following:

curl | bzip2 -dc | sudo tar -C /usr -xf -

Again, you need to add /usr/pkg/sbin and /usr/pkg/bin to your path. That can be done by putting these paths to /etc/paths.d/90-pkgsrc-current or by adding the line PATH=$PATH:/usr/pkg/sbin:/usr/pkg/bin to .profile in your home directory.

To those who want to know more about pkgin, look at the pkgin official web page.

If you have any questions, ask here or send me an email.

P. S. If you want to try pkgin but afraid that it will be difficult to remove it, please notice that I configured it so that everything can be removed with just this one command: rm -rf /usr/pkg /usr/pkg-current

Binary pkgsrc packages for Mac OS X Maverics (Darwin 13.0.0)

Pkgsrc is a great packaging framework, originally developed for NetBSD.

It's too much hassle to build binary packages from sources everywhere you install pkgsrc. There is pkgin that solves the problem. But unfortunately pkgsrc team doesn't build binaries for Mac, so there is no official repository. Some people, like  Jonathan Perkin, build the packages and publish them.

The Jonathan's binaries are built for old Mac OS (which is good) but they are built for i386. Sometimes you need a library that you want to use for development, in that case you need a 64-bit ABI support.

Recently I built a few packages for current pkgsrc with 64-bit ABI and decided to publish them too. Here it is.

To install pkgin utility (that is very much like apt-get on debian based linux distros) all you need to do is run:

curl | gzip -dc | sudo tar -C /usr -xf -

What this does is it fetches pkg.tar.gz tarball and unpacks it's content to /usr. That is one directory pkg-current and a symlink pkg that points to pkg-current.

After you extracted the tarball, you need to add /usr/pkg/sbin and /usr/pkg/bin to your path. That can be done by putting this paths to /etc/paths.d/90-pkgsrc-current or by adding PATH=$PATH:/usr/pkg/sbin:/usr/pkg/bin to .profile in your home directory.

I build everything on Maverics (OS X 10.9), so you need to upgrade if you're still using an older version (Maverics is free by the way).

Try it and tell me if anything is wrong. For now there is not much in the repo. There will be more as they're built.

Almost forgot! Here are some pkgin basics:

pkgin update # (re)fetch packages index

pkgin search zsh # look for something zsh-alike in repository

pkgin install mercurial # install mercurial control version system

How to remove everthing that pkgin installed? I configured pkgsrc so that it installs everything under /usr/pkg-current even packages' meta info and pkgin db. So 

sudo rm -rf /usr/pkg-current /usr/pkg

is enough to kill the whole thing.