commit eb88e313efdafa77774128a753afd732623e06a7 Author: fbt Date: Mon Jun 8 12:31:15 2015 +0300 init diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..629cbcb --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = watchman-sm-services-git + pkgdesc = Service scripts for watchman + pkgver = r126.578fdab + pkgrel = 1 + url = https://github.com/fbt/watchman-services + arch = any + license = BSD + provides = watchman-sm-services + conflicts = watchman-sm-services + source = watchman-sm-services-git::git+https://git.fleshless.org/watchman-services + md5sums = SKIP + +pkgname = watchman-sm-services-git + backup = + backup = etc/watchman/init.d/* + backup = etc/watchman/conf.d/* + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..7040b2c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Jack Frost +# % Trigger: 1433749545 % + +pkgname='watchman-sm-services-git' +pkgdesc='Service scripts for watchman' +license=( 'BSD' ) +pkgver=r126.578fdab +pkgrel=1 +arch=( 'any' ) +url='https://github.com/fbt/watchman-services' + +provides=( 'watchman-sm-services' ) +conflicts=( 'watchman-sm-services' ) + +source=( "${pkgname}::git+https://git.fleshless.org/watchman-services" ) +md5sums=( 'SKIP' ) + +pkgver() { + cd "$srcdir/$pkgname" + + if git_version=$( git describe --long --tags 2>/dev/null ); then + IFS='-' read last_tag tag_rev commit <<< "$git_version" + printf '%s.r%s.%s' "$last_tag" "$tag_rev" "$commit" + else + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + fi +} + +package() { + cd "${srcdir}/${pkgname}" + + mkdir -pm755 "$pkgdir/etc/watchman/init.d" + cp -a init.d/* "$pkgdir/etc/watchman/init.d/" + + mkdir -pm755 "$pkgdir/etc/watchman/conf.d" + cp -a conf.d/* "$pkgdir/etc/watchman/conf.d/" + + cd "${pkgdir}" + backup+=( etc/watchman/init.d/* ) + backup+=( etc/watchman/conf.d/* ) +}