ssm-services-git/PKGBUILD
fbt 7c1a5e9f46 git packages should makedep on git
Signed-off-by: fbt <fbt@fleshless.org>
2021-03-06 07:11:02 +03:00

44 lines
1.0 KiB
Bash

# Maintainer: Jack Frost <fbt@fleshless.org>
# % Trigger: 1614896079 %
pkgname='ssm-services-git'
pkgdesc='Service scripts for ssm'
license=( 'BSD' )
pkgver=r179.8e9c371
pkgrel=1
arch=( 'any' )
url='https://code.fleshless.org/Spark/ssm-services'
provides=( 'ssm-services' )
conflicts=( 'ssm-services' )
makedepends=( 'git' )
source=( "${pkgname}::git+https://code.fleshless.org/spark/ssm-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/ssm/services"
mkdir -pm755 "$pkgdir/usr/share/ssm/services"
cp -a services/* "$pkgdir/usr/share/ssm/services"
mkdir -pm755 "$pkgdir/etc/ssm/conf.d"
cp -a conf.d/* "$pkgdir/etc/ssm/conf.d/"
cd "${pkgdir}"
backup+=( etc/ssm/conf.d/* )
}