blob: d89fc42cc0d7fe2465af353bb6fa6372dec09243 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Maintainer: Luke Shumaker <lukeshu@parabola.nu>
pkgname=dbscripts
pkgver=20180622
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.local
etc/$pkgname/config.local.archlinux32
etc/$pkgname/config.local.archlinuxarm
etc/$pkgname/config.local.community
etc/$pkgname/config.local.packages
etc/$pkgname/config.local.parabola
etc/$pkgname/db-cleanup.conf
etc/$pkgname/db-import-packages.conf
etc/$pkgname/db-import-community.conf
etc/$pkgname/db-import-archlinux32.conf
etc/$pkgname/db-import-archlinuxarm.conf
)
pkgrel=1
arch=('any')
depends=('librelib>=20180428' 'xbs>=20180326' rsync)
checkdepends=(libretools)
source=("https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig})
sha256sums=('3e2576ce723297c30099438d607894809b923c63070a93bf0e57a754b6b757c9'
'SKIP')
validpgpkeys=('99195DD3BB6FE10A2F36ED8445698744D4FFBFC9') # Luke Shumaker
_gitver='commit=11509e41dcddc8459b088d41dacf47f2d556007c'
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 -not -name 'config-*' -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/lib/systemd/system
mv -t "$pkgdir"/usr/lib/systemd/system "$pkgdir/opt/$pkgname/systemd"/*.{service,timer}
local src dst
for src in "$pkgdir/opt/$pkgname/systemd"/*.d_*.conf; do
dst="${src##*/}"
dst="$pkgdir/usr/lib/systemd/system/${dst/.d_/.d/}"
mkdir -p "${dst%/*}"
mv -T "$src" "$dst"
done
rmdir "$pkgdir/opt/$pkgname/systemd"
mkdir -p "$pkgdir"/usr/share/doc/$pkgname
ln -sr "$pkgdir"/opt/$pkgname/README.md "$pkgdir"/usr/share/doc/$pkgname
}
|