-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
54 lines (45 loc) · 1.54 KB
/
PKGBUILD
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
# Maintainer: Gaël PORTAY <gael.portay@gmail.com>
pkgname=(docker-scripts docker-archive docker-clean)
pkgbase=docker-scripts
_pkgver=master
pkgver="$_pkgver"
pkgrel=1
pkgdesc='Docker scripts'
arch=('any')
url="https://github.com/gportay/${pkgname[0]}"
license=('MIT')
depends=('docker')
makedepends=('asciidoctor')
checkdepends=('shellcheck')
source=("https://github.com/gportay/$pkgbase/archive/$_pkgver.tar.gz")
pkgver() {
cd "$pkgbase-$_pkgver"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$pkgbase-$_pkgver"
make doc
}
check() {
cd "$pkgbase-$_pkgver"
make -k check
}
package_docker-scripts() {
depends=("${pkgname[@]:1}")
}
package_docker-archive() {
pkgdesc="$pkgdesc - show archive content"
cd "$pkgbase-$_pkgver"
install -D -m 755 docker-archive "$pkgdir/usr/bin/docker-archive"
install -D -m 644 docker-archive.1.gz "$pkgdir/usr/share/man/man1/docker-archive.1.gz"
install -D -m 644 bash-completion/docker-archive "$pkgdir/usr/share/bash-completion/completions/docker-archive"
install -D -m 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_docker-clean() {
pkgdesc="$pkgdesc - remove unused containers and images"
cd "$pkgbase-$_pkgver"
install -D -m 755 docker-clean "$pkgdir/usr/bin/docker-clean"
install -D -m 644 docker-clean.1.gz "$pkgdir/usr/share/man/man1/docker-clean.1.gz"
install -D -m 644 bash-completion/docker-clean "$pkgdir/usr/share/bash-completion/completions/docker-clean"
install -D -m 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}