blob: 79579f49e93007e7682ea3e05266dbeeb801a09c (
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
|
# Maintainer: George Hu <integral@archlinux.org>
pkgname=piliplus
_srcname=PiliPlus
pkgver=2.0.9.2
pkgrel=1
pkgdesc="A third-party Bilibili client developed in Flutter"
url="https://github.com/bggRGjQaUbCoE/${_srcname}"
license=('GPL-3.0-or-later')
arch=('x86_64')
depends=('gtk3' 'mpv' 'libayatana-appindicator' 'webkit2gtk-4.1')
makedepends=('git' 'clang' 'cmake' 'ninja' 'fvm' 'patchelf')
source=("git+${url}.git#tag=${pkgver}")
sha256sums=('6d64d65214733c52d47602e4c26c4924c1832542c7e7627ed431f2c51c9af0e5')
prepare() {
cd "${_srcname}/"
fvm install
fvm flutter --disable-analytics
fvm flutter --no-version-check pub get
}
build() (
cd "${_srcname}/"
fvm flutter build linux --no-pub --release \
--dart-define pili.name="${pkgver}" \
--dart-define pili.code="$(git rev-list --count HEAD)" \
--dart-define pili.hash="$(git rev-parse HEAD)" \
--dart-define pili.time="$(date +%s)"
)
package() {
cd "${_srcname}/"
pushd build/linux/x64/release
install -Dm755 "bundle/${pkgname}" -t "${pkgdir}/usr/lib/${pkgname}/"
cmake -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr/lib/${pkgname}" .
cmake -P cmake_install.cmake
popd
# Reset RPATH
patchelf --set-rpath '$ORIGIN' ${pkgdir}/usr/lib/${pkgname}/lib/*.so
# Symlink
install -dm755 "${pkgdir}/usr/bin"
ln -s "/usr/lib/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
cd assets
install -Dm644 images/logo/logo.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${pkgname}.png"
install -Dm644 "linux/com.example.${pkgname}.desktop" -t "${pkgdir}/usr/share/applications/"
}
|