summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a1034c6dad5f2225556e2e89e39f12879d11c932 (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
# Maintainer: Rui Shi <1229408499@qq.com>
pkgname=linglong-git
pkgver=1.3.16.r4.g146909b
pkgrel=1
epoch=0
pkgdesc='Container application toolkit of deepin'
arch=('x86_64')
url='https://github.com/linuxdeepin/linglong'
license=('LGPL3')
depends=(
	'qt5-base'
	'glib2'
	'bash'
	'gcc-libs'
	'yaml-cpp'
	'glibc'
	'ostree'
	'curl'
	'fuse-overlayfs'
	'shared-mime-info'
	'erofs-utils'
	'desktop-file-utils'
	'linglong-box'
)
makedepends=(
	'cmake'
	'gtest'
	'git'
	'pkg-config'
	'systemd'
	'docopt'
	'qt5-websockets'
)
provides=('linglong')
conflicts=('linglong')
install=$pkgname.install
source=("linglong::git+https://github.com/linuxdeepin/linglong.git#branch=release/1.3" "add_sanitize.patch")
md5sums=('SKIP' 'SKIP')

pkgver() {
	cd linglong
	git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd linglong
	mkdir -vp build
	patch --forward --strip=1 --input="${srcdir}/add_sanitize.patch"
}

build() {
	cd linglong/build
	cmake -DCMAKE_INSTALL_PREFIX=/usr ..
	cmake --build . -j$(nproc)
}

package() {
	cd linglong/build
	env DESTDIR="$pkgdir/" cmake --install .
	mv "$pkgdir/lib/systemd/system" "$pkgdir/usr/lib/systemd/"
	mv "$pkgdir/usr/etc/linglong" "$pkgdir/etc/"
	rm -rf "$pkgdir/lib"
	rm -rf "$pkgdir/usr/etc/"
}