blob: 074028c7e35a8e198f72f504ac92c4dad2bfa865 (
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
|
pkgname=passy-git
_pkgshortname=passy
pkgver=1.5.2.r0.g942a32f
pkgrel=1
pkgdesc='Offline password manager with cross-platform synchronization'
arch=('x86_64')
url='https://github.com/GlitterWare/Passy'
license=(GPL)
provides=('passy')
depends=('gtk3' 'git' 'glu' 'java-environment' 'libglvnd' 'unzip' 'cmake' 'ninja')
source=('git+https://github.com/GlitterWare/Passy.git')
sha512sums=('SKIP')
_flutter='submodules/flutter/bin/flutter --no-version-check --suppress-analytics --verbose'
pkgver() {
cd Passy
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
# flutter build
cd Passy
git reset --hard $(git describe --tags $(git rev-list --tags --max-count=1))
git submodule init
git submodule update
export PATH="$PATH:$PWD/submodules/flutter/bin"
$_flutter config --no-analytics
$_flutter build linux --dart-define=UPDATES_POPUP_ENABLED=false
cd ..
# change the package name
if [ -d 'linux_assets' ]; then
rm -rf linux_assets
fi
mkdir -p linux_assets
cp -r Passy/linux_assets .
cd linux_assets
sed -i s/com.glitterware.passy/$_pkgshortname/ com.glitterware.passy.appdata.xml
sed -i s/com.glitterware.passy/$_pkgshortname/ com.glitterware.passy.desktop
cd ..
}
package() {
case "$(uname -m)" in
'x86_64')
export FLUTTER_ARCH=x64
;;
'aarch64')
export FLUTTER_ARCH=arm64
;;
esac
# install
install -dm755 ${pkgdir}/opt
mv Passy/build/linux/$FLUTTER_ARCH/release/bundle ${pkgdir}/opt/${_pkgshortname}
# link
install -dm755 ${pkgdir}/usr/bin
ln -s /opt/${_pkgshortname}/${_pkgshortname} ${pkgdir}/usr/bin/${_pkgshortname}
# icon
install -Dm644 Passy/logo.svg ${pkgdir}/usr/share/icons/hicolor/scalable/apps/${_pkgshortname}.png
# desktop entry
install -dm755 $pkgdir/usr/share/applications
install -Dm644 linux_assets/com.glitterware.passy.desktop $pkgdir/usr/share/applications/${_pkgshortname}.desktop
# metainfo
install -dm755 $pkgdir/usr/share/metainfo
install -Dm644 linux_assets/com.glitterware.passy.appdata.xml $pkgdir/usr/share/metainfo/${_pkgshortname}.appdata.xml
}
|