blob: 851dae1e977444c75a662ac56baac53d7c43b471 (
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
|
# Maintainer: RamazanBerk20 <ramazanberksirin@protonmail.com>
pkgname=mini-downloader
pkgver=3.1.0
pkgrel=1
pkgdesc="Lightweight native download manager (aria2 + yt-dlp, browser capture)"
arch=('x86_64')
url="https://github.com/RamazanBerk20/mini-downloader"
license=('GPL-3.0-or-later')
depends=('aria2' 'fontconfig' 'libx11' 'libxcb' 'libxcursor' 'libxi'
'libxkbcommon' 'libxkbcommon-x11' 'libxrandr' 'wayland' 'xdg-utils')
optdepends=('yt-dlp: video, HLS, and DASH downloads'
'ffmpeg: merge media streams, embed subtitles/thumbnails, and convert audio')
makedepends=('rust' 'cargo' 'git' 'pkgconf')
provides=('mini-downloader')
conflicts=('mini-downloader-bin' 'mini-downloader-git')
options=('!lto')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('d45e0798e8ebd9e414a824eba23c4a5ece18608727da4baf0d0ed3cf2dc76ed1')
prepare() {
cd "$pkgname-$pkgver"
cargo fetch --locked --target x86_64-unknown-linux-gnu
}
build() {
cd "$pkgname-$pkgver"
local separator=$'\x1f'
local rustflags="${CARGO_ENCODED_RUSTFLAGS:-}"
[[ -z "$rustflags" ]] || rustflags+="$separator"
rustflags+="--remap-path-prefix=$srcdir/$pkgname-$pkgver=."
rustflags+="$separator--remap-path-prefix=${CARGO_HOME:-$HOME/.cargo}=/cargo"
CARGO_ENCODED_RUSTFLAGS="$rustflags" CARGO_TARGET_DIR=target \
cargo build --frozen --release \
-p minidl-native-desktop -p minidl-native-host
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 target/release/mini-downloader \
"$pkgdir/usr/bin/mini-downloader"
install -Dm755 target/release/minidl-native-host \
"$pkgdir/usr/bin/minidl-native-host"
install -Dm644 assets/icons/512x512.png \
"$pkgdir/usr/share/icons/hicolor/512x512/apps/mini-downloader.png"
install -Dm644 packaging/linux/io.minidownloader.app.desktop \
"$pkgdir/usr/share/applications/io.minidownloader.app.desktop"
install -Dm644 packaging/linux/io.minidownloader.app.metainfo.xml \
"$pkgdir/usr/share/metainfo/io.minidownloader.app.metainfo.xml"
install -Dm644 packaging/com.minidownloader.host.json \
"$pkgdir/usr/lib/mozilla/native-messaging-hosts/com.minidownloader.host.json"
install -Dm644 LICENSE \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 PRIVACY.md SECURITY.md THIRD_PARTY_NOTICES.md THIRD_PARTY_LICENSES.txt \
-t "$pkgdir/usr/share/doc/$pkgname"
}
|