From fedbc308af04e5a7628b8dd17c205b7baf35cf41 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Thu, 13 Nov 2014 15:19:34 -0800 Subject: [PATCH] create an Arch PKGBUILD Summary: Also including a little script that makes it easier to package your local copy of the sources (instead of the default, cloning a new repo to package). Reviewers: sean Reviewed By: sean Differential Revision: https://phabricator.buildinspace.com/D126 --- packaging/arch/PKGBUILD | 27 +++++++++++++++++++++++++++ packaging/arch/makelocal.sh | 17 +++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 packaging/arch/PKGBUILD create mode 100755 packaging/arch/makelocal.sh diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD new file mode 100644 index 0000000..6a7ebb3 --- /dev/null +++ b/packaging/arch/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Jack O'Connor + +pkgname=peru-git +pkgdesc='A tool for fetching code' +url='https://github.com/buildinspace/peru' +license=('MIT') +pkgver=0 +pkgver() { + cd "$srcdir/peru" + echo $(git rev-list --count master).$(git rev-parse --short master) +} +pkgrel=1 +arch=('any') +# Asyncio and pathlib are standard in Python 3.4, so they're not in the +# dependencies list. +depends=(python python-yaml python-docopt git) +optdepends=( + 'mercurial: fetching from hg repos' + 'subversion: fetching from svn repos' +) +source=('git://github.com/buildinspace/peru') +md5sums=('SKIP') + +package() { + cd "$srcdir/peru" + python3 setup.py install --root="$pkgdir" +} diff --git a/packaging/arch/makelocal.sh b/packaging/arch/makelocal.sh new file mode 100755 index 0000000..fa728cb --- /dev/null +++ b/packaging/arch/makelocal.sh @@ -0,0 +1,17 @@ +#! /bin/bash + +# By default, makepkg clones the source repo from github before building. To +# package your local copy of the sources (including any changes you've made), +# use this script. +# +# See `man makepkg` for relevant options, like -d to ignore missing +# dependencies. (The only dependency needed for packaging is python.) + +set -e + +cd $(dirname "$BASH_SOURCE") +rm -rf src +mkdir src +ln -s ../../../.. src/peru + +makepkg -e "$@"