summaryrefslogtreecommitdiff
path: root/libre/dbscripts/PKGBUILD
blob: cb0fa8b76a8988af1a723e575a65f22679d4ac3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

pkgname=dbscripts
pkgver=20160907
_gitver=7cb14da25387cfb3c39e9064d2885e0246d9d183
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-check-nonfree.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=('c426d022cac2d2a31f484a2fb76927a2')

mksource=("$pkgname-$pkgver::git://git.parabola.nu/packages/dbscripts.git/#commit=$_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
}