--- a/PKGBUILD +++ b/PKGBUILD @@ -16,13 +16,34 @@ # don't strip binaries! A sha1 is used to check binary consistency. options=('!strip') install=$pkgname.install -source=("git+https://github.com/docker/docker.git#tag=v$pkgver") -md5sums=('SKIP') +source=("git+https://github.com/docker/docker.git#tag=v$pkgver" + # for man pages + "git+https://github.com/cpuguy83/go-md2man.git" + "git+https://github.com/russross/blackfriday.git" + "git+https://github.com/shurcooL/sanitized_anchor_name.git") +md5sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + +prepare() { + # for man page generation + for d in cpuguy83/go-md2man russross/blackfriday shurcooL/sanitized_anchor_name; do + mkdir -p "go/src/github.com/${d%%/*}" + ln -s "$srcdir/${d##*/}" "go/src/github.com/$d" + done +} build() { cd docker export AUTO_GOPATH=1 ./hack/make.sh dynbinary + + # build helper for man page generation + GOPATH="$srcdir/go" go install -v github.com/cpuguy83/go-md2man + + # generate man pages + PATH="$srcdir/go/bin:$PATH" docs/man/md2man-all.sh } #check() { @@ -49,6 +70,9 @@ "$pkgdir/usr/share/vim/vimfiles/syntax/dockerfile.vim" install -Dm644 'contrib/syntax/vim/ftdetect/dockerfile.vim' \ "$pkgdir/usr/share/vim/vimfiles/ftdetect/dockerfile.vim" + # man pages + install -dm755 "$pkgdir/usr/share/man" + mv docs/man/man{1,5} "$pkgdir/usr/share/man" } # vim:set ts=2 sw=2 et: