blob: 92aa1eaab5c237a3f194c0d919a5cdccdcdc19e7 (
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
|
# Maintainer: Integral <integral@member.fsf.org>
pkgname=c001apk-flutter-git
_pkgname=${pkgname%-git}
pkgver=r48.72f4cf2
pkgrel=1
pkgdesc="A third-party CoolApk client written in Flutter | 使用 Flutter 开发的第三方酷安客户端"
arch=('x86_64' 'aarch64')
url="https://github.com/bggRGjQaUbCoE/${_pkgname}"
license=('AGPL-3.0-or-later')
depends=('gtk3')
makedepends=('git' 'flutter-tool' 'flutter-target-linux' 'cmake')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=(
"git+${url}.git"
"${_pkgname}.desktop"
)
sha256sums=('SKIP'
'9d527cc7aaa8a4c4bc2ac80b88fb358aec2256eb503580e352c88671fa8653eb')
pkgver() {
cd "${_pkgname}/"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
prepare() {
cd "${_pkgname}/"
flutter pub get --enforce-lockfile || flutter pub get
}
build() {
cd "${_pkgname}/"
flutter build linux --no-pub --release
}
package() {
install -Dm644 "${_pkgname}.desktop" -t "${pkgdir}/usr/share/applications/"
cd "${_pkgname}/"
install -Dm644 assets/icon/icon.png "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/${_pkgname}.png"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}/"
case "${CARCH}" in
"x86_64")
local _dartarch="x64"
;;
"aarch64")
local _dartarch="arm64"
;;
esac
cd "build/linux/${_dartarch}/release/"
cmake -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr/lib/${_pkgname}" .
cmake -P cmake_install.cmake
install -dm755 "${pkgdir}/usr/bin/"
ln -s "/usr/lib/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}
|