aboutsummaryrefslogtreecommitdiffstats
path: root/main/aports-build/APKBUILD
blob: 57be7fbb9d6d41ef9122fbff15c8b93def49ef63 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=aports-build
pkgver=1.1
pkgrel=3
pkgdesc="MQTT based build-on-git-push scripts for Alpine Linux"
url="http://alpinelinux.org"
arch="noarch"
license="GPL2"
depends="abuild>2.20.0 mosquitto-clients alpine-sdk mqtt-exec rsync lua-aports
	lua5.2-cjson lua5.2-mqtt-publish"
depends_dev=""
makedepends="$depends_dev mosquitto-dev"
install="$pkgname.pre-install"
subpackages=""

source="aports-build
	aports-build.initd
	mqtt-exec.aports-build.confd
	report-build-errors.lua
	"

builddir="$srcdir"
prepare() {
	local i
	cd "$builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$builddir"
}

package() {
	cd "$builddir"
	install -Dm755 "$srcdir"/aports-build \
		"$pkgdir"/usr/bin/aports-build || return 1
	install -d "$pkgdir"/etc/init.d || return 1

	ln -s mqtt-exec "$pkgdir"/etc/init.d/mqtt-exec.aports-build || return 1
	install -Dm644 "$srcdir"/mqtt-exec.aports-build.confd \
		"$pkgdir"/etc/conf.d/mqtt-exec.aports-build || return 1

	install -Dm644 "$srcdir"/report-build-errors.lua \
		"$pkgdir"/etc/buildrepo/plugins.d/report-build-errors.lua \
		|| return 1
}

sha512sums="62d12aa79e8d864e2e5a2a742bcd501de1339f9e00e425055fd3e9538f88492cdba406fb5fcb2621e46501cff2412ee91c90c52ad51098925000dae20c7a87ae  aports-build
821035bda47152c341ec94bf960fa67e3377051826712ceb74f39103e6e422777b6e082231bfb87865653d2b93b7d3154cfc24abf65a52e3e66da69412dd7e41  aports-build.initd
93d26e2055dbb02e863bf76b64a549c100decec3fda612ce96ca1464e6d61befa9f57f202553a25cf323e67e266f532d19c7423ff070943a59b3973946d949fe  mqtt-exec.aports-build.confd
ded99f4c9474e4dc91605de71919deebbeb8e2e3ebcc9d61890f327bb6220d891a9f2a6c615929cc53bd8007b1a1dbd827bc55cd5cbdd1a6661fcdafa4912950  report-build-errors.lua"