summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6a38f8b1126e1818d5b846eee189624c2a521dcb (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
# Maintainer: JianQing Liu <me at pegasis dot site>
pkgname=discord-chat-exporter-cli
pkgver=2.35
pkgrel=1
pkgdesc="Export message history from a Discord channel to a file"
arch=('any')
url="https://github.com/Tyrrrz/DiscordChatExporter"
license=('GPL')
depends=('dotnet-runtime>=6.0.0')
makedepends=('unzip')
source=("$pkgname-$pkgver.zip::https://github.com/Tyrrrz/DiscordChatExporter/releases/download/$pkgver/DiscordChatExporter.CLI.zip"
"discord-chat-exporter-cli")
noextract=("$pkgname-$pkgver.zip")
md5sums=('207ca04c2753f75f7640e139f2d0547d' 
'8077678acad67ad31578593deee8bcc6')
BUILDENV+=('!check')

prepare() {
    cd "$srcdir"
    mkdir -p "$srcdir/unzip"
    cd "$srcdir/unzip"
    unzip -q "$srcdir/$pkgname-$pkgver.zip"
    chmod 666 -R ./*
    rm "$srcdir/$pkgname-$pkgver.zip"
}

package() {
    cd "$srcdir"
    mkdir -p "$pkgdir/opt/"
    mv "$srcdir/unzip" "$pkgdir/opt/discord-chat-exporter-cli"
    install -m755 discord-chat-exporter-cli "$pkgdir/opt/discord-chat-exporter-cli/"
    mkdir -p "$pkgdir/usr/bin/"
    ln -s "/opt/discord-chat-exporter-cli/discord-chat-exporter-cli" "$pkgdir/usr/bin/discord-chat-exporter-cli"
}