ssm-services-git/PKGBUILD

42 lines
986 B
Bash
Raw Normal View History

2015-06-08 09:31:15 +00:00
# Maintainer: Jack Frost <fbt@fleshless.org>
# % Trigger: 1510753623 %
2015-06-08 09:31:15 +00:00
pkgname='ssm-services-git'
pkgdesc='Service scripts for ssm'
2015-06-08 09:31:15 +00:00
license=( 'BSD' )
2015-12-17 09:50:30 +00:00
pkgver=1.2.r59.gd259153
2015-06-08 09:31:15 +00:00
pkgrel=1
arch=( 'any' )
url='https://git.fleshless.org/ssm-services/about'
2015-06-08 09:31:15 +00:00
provides=( 'ssm-services' )
conflicts=( 'ssm-services' )
2015-06-08 09:31:15 +00:00
source=( "${pkgname}::git+https://git.fleshless.org/ssm-services" )
2015-06-08 09:31:15 +00:00
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/ssm/init.d"
cp -a init.d/* "$pkgdir/etc/ssm/init.d/"
2015-06-08 09:31:15 +00:00
mkdir -pm755 "$pkgdir/etc/ssm/conf.d"
cp -a conf.d/* "$pkgdir/etc/ssm/conf.d/"
2015-06-08 09:31:15 +00:00
cd "${pkgdir}"
backup+=( etc/ssm/init.d/* )
backup+=( etc/ssm/conf.d/* )
2015-06-08 09:31:15 +00:00
}