blob: b0e5267a1aa27cdda67acbc3d13679ae997edeef (
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
|
# Maintainer: HurricanePootis <hurricanepootis@protonmail.com>
pkgname=vencord-installer
pkgver=1.4.0
pkgrel=2
pkgdesc="A cross platform gui/cli app for installing Vencord"
arch=('x86_64')
url="https://github.com/Vencord/Installer"
license=('GPL-3.0-only')
depends=('hicolor-icon-theme' 'glibc' 'gcc-libs' 'libglvnd' 'libx11')
makedepends=('go')
source=("$pkgname::git+$url.git#tag=v$pkgver")
sha256sums=('SKIP')
prepare() {
cd "$srcdir/$pkgname"
go mod tidy
}
build() {
cd "$srcdir/$pkgname"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build --tags cli -v -ldflags "-s -w -X 'main.InstallerGitHash=$(git rev-parse --short HEAD)' -X 'main.InstallerTag=$(git describe --tags | sed "s/-.*//")'" -o vencordinstallercli
go build -v -ldflags "-s -w -X 'main.InstallerGitHash=$(git rev-parse --short HEAD)' -X 'main.InstallerTag=$(git describe --tags | sed "s/-.*//")'" -o vencordinstaller
}
package() {
cd "$srcdir/$pkgname"
install -Dm755 vencordinstallercli "$pkgdir/usr/bin/vencordinstallercli"
install -Dm755 vencordinstaller "$pkgdir/usr/bin/vencordinstaller"
install -Dm644 winres/icon.png "$pkgdir/usr/share/icons/hicolor/96x96/apps/vencordinstaller.png"
mkdir -p "$pkgdir/usr/share/applications"
cat <<EOF >> "$pkgdir/usr/share/applications/vencordinstaller.desktop"
[Desktop Entry]
Version=$pkgver
Type=Application
Name=VencordInstaller
Comment=$pkgdesc
Icon=vencordinstaller
TryExec=vencordinstaller
Exec=vencordinstaller
Categories=Utilities;
Keywords=Discord;Vencord;
EOF
}
|