summaryrefslogtreecommitdiff
path: root/community/dsme/APKBUILD
blob: c2f1e1b3c43beed9e74c9405ab56229df625051f (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=dsme
pkgver=0.84.2
pkgrel=0
_commit_dbusglib="d42176ae4763e5288ef37ea314fe58387faf2005"
pkgdesc="Device State Management Entity"
url="https://github.com/sailfishos/dsme"
arch="all"
license="LGPL-2.1-only"
depends_dev="
	cryptsetup-dev
	libiphb-dev
	libngf-dev
	"
makedepends="$depends_dev
	autoconf
	automake
	libtool
	"
subpackages="$pkgname-dev $pkgname-openrc"
source="https://github.com/sailfishos/dsme/archive/$pkgver/dsme-$pkgver.tar.gz
	https://github.com/sailfishos-mirror/dbus-glib/archive/$_commit_dbusglib/dbus-glib-$_commit_dbusglib.tar.gz
	0001-correct-paths.patch
	0002-disable-werror.patch
	dsme.initd
	dsme.confd
	"
options="!check" # Only test comes from dbus-glib and fails

prepare() {
	default_prepare

	rmdir dbus-gmain
	mv "$srcdir/dbus-glib-$_commit_dbusglib" dbus-gmain
}

build() {
	./autogen.sh
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--exec_prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static \
		--disable-poweron-timer \
		--disable-systemd \
		--disable-upstart \
		--disable-validatorlistener \
		--enable-pwrkeymonitor \
		--enable-abootsettings \
		--enable-usewheel
	make
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 reboot-via-dsme.sh -t "$pkgdir"/etc/profile.d/

	install -Dm755 "$srcdir"/dsme.initd "$pkgdir"/etc/init.d/dsme
	install -Dm644 "$srcdir"/dsme.confd "$pkgdir"/etc/conf.d/dsme

	# Remove installed tests
	rm -r "$pkgdir"/opt

	mkdir -p "$pkgdir"/usr/share/dbus-1/system.d/
	mv "$pkgdir"/etc/dbus-1/system.d/* "$pkgdir"/usr/share/dbus-1/system.d/
}

sha512sums="
38d4994a8840372f90b967b898d33cae1c062e3156586f9c0262d07aa7b92f73b89c4bfe4959fa53916855bf810ce89ad27fd0852b69ece50e6e78d25c39b587  dsme-0.84.2.tar.gz
665cd6395ee0ea14086ba30188c62a72697b3f63484681e18fc7f54109c9aca162f2e33aa2fa4d45287c6c0b590e81ca310c143dac0232cd5887692cdaf51256  dbus-glib-d42176ae4763e5288ef37ea314fe58387faf2005.tar.gz
063ce9f2bd13fb2bd05ab9cd11544265eb5378562ee1fbed1cfa65d2345d092cfcff69f57589d3914005c31a00a58f3993cc13b59615ebe0f48458ba478d8772  0001-correct-paths.patch
2b18c6affaefa786358c07480968fd744370c48452c05e969cc8b26cba5307279ce51f782f42778fbd597bf29ec3d90b7b1ee4d182e8ab41675d1070be2f1954  0002-disable-werror.patch
786971b4a8f9cff0b66db658d9b8a2c4ceaaf1c5baa4b62346b9e0a2ab6f46ff3225a60678cb7ddd78e4e9e70fbe41432581e32ebccfa4174375dc79fea49a84  dsme.initd
b841282b96110ec59a7aa539db0737327b09549d55c78dc4b2c3b28b4a6ad1facf015b3175cb6d3a38f13e47aa6314ef3dc1514a4e60dd653a97409ec54ba706  dsme.confd
"