3 ms·
Hi Chris! So yeh, it's not quite as simple as Homebrew, which is definitely optimised for that use-case, but it's still relatively straight-forward. Taking th
by jperkin 13y ago
Hi Chris!
So yeh, it's not quite as simple as Homebrew, which is definitely optimised for that use-case, but it's still relatively straight-forward.
Taking the 'tmux' package as an example:
https://github.com/jsonn/pkgsrc/tree/trunk/misc/tmux https://github.com/jsonn/pkgsrc/tree/trunk/misc/tmux
The main guts are in Makefile. DESCR is a few lines of description about the package, and is used by package managers. distinfo contains SHA1 and sizes of the source tarballs and patches. PLIST is a list of files the package will install. And finally, the patches/ directory contains per-file patches which will be applied to the source prior to building.
Due to the cross-platform support, there is a huge range of functionality available for Makefiles, and so some of them can look pretty complicated.
However, it's pretty straight-forward to get started, and there are various tools (e.g. pkgtools/url2pkg) which can make things pretty simple to get started.
I'm planning an introductory blog post on this at some point which should hopefully cover all of the basics.
- cmsj 13y agoThanks, that sounds great! Out of interest, if someone has site-specific software they need to package, but is of no interest to the wider world, how easy is it to host their own repository with that software? (is it like apt where it offers the user a union of an arbitrary number of software repositories?) Would it be vastly easier in that case to revert to being source based, or is it relatively easy to build binaries and shove them into a repo?
- jperkin 13y agoI already have a blog post on that ;) http://www.perkin.org.uk/posts/creating-local-smartos-packages.html http://www.perkin.org.uk/posts/creating-local-smartos-packag... You'll just need to tweak paths from /opt/local (SmartOS) to /usr/pkg (OSX). The one caveat is that multiple repository support in pkgin is not great right now. It should be ok as long as your site-specific packages are separate from the rest, and have unique names etc. This is something we hope will be fixed during this year's GSOC.