# Maintainer: Luke Shumaker pkgname=dbscripts pkgver=20170527.1 pkgdesc='Server-side programs for Parabola Pacman repositories' url='https://git.parabola.nu/packages/dbscripts.git/' license=('GPL') backup=( etc/$pkgname/config etc/$pkgname/config.testing etc/$pkgname/db-cleanup.conf etc/$pkgname/db-import-archlinux.conf etc/$pkgname/db-import-archlinuxarm.conf ) pkgrel=1 arch=('any') depends=(librelib xbs rsync) checkdepends=(libretools) source=("https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz") md5sums=('60bfcc826b8c6c60e80ba520e041686e') _gitver='commit=54ce226dc304ed13befb747edc329d09467b8cbd' mksource=("$pkgname-$pkgver::git://git.parabola.nu/packages/dbscripts.git/#$_gitver") mkmd5sums=('SKIP') package() { mkdir -p "$pkgdir"/opt cp -a "$srcdir/$pkgname-$pkgver" "$pkgdir/opt/$pkgname" mkdir -p "$pkgdir"/usr/bin find "$pkgdir/opt/$pkgname" -maxdepth 1 -type f -executable -exec ln -sr {} "$pkgdir"/usr/bin \; mkdir -p "$pkgdir"/etc/$pkgname local file for file in "${backup[@]}"; do mv -T "$pkgdir/opt/$pkgname/${file##*/}" "$pkgdir/$file" ln -sr "$pkgdir/$file" "$pkgdir/opt/$pkgname" done mkdir -p "$pkgdir"/usr/share/doc/$pkgname ln -sr "$pkgdir"/opt/$pkgname/README "$pkgdir"/usr/share/doc/$pkgname }