Skip to content

Commit

Permalink
add: ventoy-bin (#6004)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: V. <[email protected]>
  • Loading branch information
3 people authored May 18, 2024
1 parent 2778d03 commit 9078032
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ upscayl-app
uwufetch
vega-strike-engine-git
vega-strike-git
ventoy-bin
veracrypt-deb
viper4linux
virtualbox-deb
Expand Down
35 changes: 35 additions & 0 deletions packages/ventoy-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pkgname = ventoy-bin
gives = ventoy
pkgver = 1.0.97
pkgdesc = A new bootable USB solution
url = http://www.ventoy.net
arch = amd64
source = https://github.com/ventoy/Ventoy/releases/download/v1.0.97/ventoy-1.0.97-linux.tar.gz
source = https://aur.archlinux.org/cgit/aur.git/plain/sanitize.patch?h=ventoy-bin
source = https://aur.archlinux.org/cgit/aur.git/plain/ventoy?h=ventoy-bin
source = https://aur.archlinux.org/cgit/aur.git/plain/ventoy-extend-persistent?h=ventoy-bin
source = https://aur.archlinux.org/cgit/aur.git/plain/ventoygui?h=ventoy-bin
source = https://aur.archlinux.org/cgit/aur.git/plain/ventoy-persistent?h=ventoy-bin
source = https://aur.archlinux.org/cgit/aur.git/plain/ventoyplugson?h=ventoy-bin
source = https://aur.archlinux.org/cgit/aur.git/plain/ventoy.desktop?h=ventoy-bin
source = https://aur.archlinux.org/cgit/aur.git/plain/ventoyweb?h=ventoy-bin
depends = bash
depends = util-linux
depends = xz-utils
depends = dosfstools
optdepends = libgtk-3-dev: GTK3 GUI
optdepends = qtbase-5-dev: Qt5 GUI
optdepends = polkit: run GUI from application menu
conflicts = ventoy
provides = ventoy
license = GPL-3.0-or-later
maintainer = xdavius <[email protected]>
sha256sums = 1368a9082c9db25958e5407ef4984322d90d3bb00905337d4bd41678e06c1150
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
85 changes: 85 additions & 0 deletions packages/ventoy-bin/ventoy-bin.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
pkgname="ventoy-bin"
gives="ventoy"
pkgver="1.0.97"
pkgdesc="A new bootable USB solution"
maintainer="xdavius <[email protected]>"
arch=('amd64')
url="http://www.ventoy.net"
license=('GPL-3.0-or-later')
depends=('bash' 'util-linux' 'xz-utils' 'dosfstools')
optdepends=('libgtk-3-dev: GTK3 GUI'
'qtbase-5-dev: Qt5 GUI'
'polkit: run GUI from application menu')
provides=("${pkgname%-bin}")
conflicts=("${pkgname%-bin}")
source=("https://github.com/ventoy/Ventoy/releases/download/v${pkgver}/${pkgname%-bin}-${pkgver}-linux.tar.gz"
"https://aur.archlinux.org/cgit/aur.git/plain/sanitize.patch?h=ventoy-bin"
"https://aur.archlinux.org/cgit/aur.git/plain/ventoy?h=ventoy-bin"
"https://aur.archlinux.org/cgit/aur.git/plain/ventoy-extend-persistent?h=ventoy-bin"
"https://aur.archlinux.org/cgit/aur.git/plain/ventoygui?h=ventoy-bin"
"https://aur.archlinux.org/cgit/aur.git/plain/ventoy-persistent?h=ventoy-bin"
"https://aur.archlinux.org/cgit/aur.git/plain/ventoyplugson?h=ventoy-bin"
"https://aur.archlinux.org/cgit/aur.git/plain/ventoy.desktop?h=ventoy-bin"
"https://aur.archlinux.org/cgit/aur.git/plain/ventoyweb?h=ventoy-bin")
sha256sums=('1368a9082c9db25958e5407ef4984322d90d3bb00905337d4bd41678e06c1150'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')

prepare() {
cd "${_archive}"
# Decompress tools
pushd tool/"x86_64"
for file in ./*.xz; do
xzcat "${file}" >"${file%.xz}"
chmod +x "${file%.xz}"
done

# Cleanup .xz crap
rm -fv ./*.xz
popd

# Apply sanitize patch
patch --verbose -p0 <"${srcdir}/sanitize.patch"

# Log location
sed -i 's|log\.txt|/var/log/ventoy.log|g' WebUI/static/js/languages.js tool/languages.json

# Non-POSIX compliant scripts
sed -i 's|bin/sh|usr/bin/env bash|g' tool/{ventoy_lib.sh,VentoyWorker.sh}

# Clean up unused binaries
# Preserving mkexfatfs and mount.exfat-fuse because exfatprogs is incompatible
for binary in xzcat hexdump; do
rm -fv tool/"x86_64"/"${binary}"
done
}

package() {
cd "${_archive}"
install -Dm644 -vt "${pkgdir}/opt/${pkgname%-bin}/boot/" boot/*
install -Dm644 -vt "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}/" "${pkgname%-bin}"/*
install -Dm755 -vt "${pkgdir}/opt/${pkgname%-bin}/tool/" tool/*.{cer,glade,json,sh,xz}
install -Dm755 -vt "${pkgdir}/opt/${pkgname%-bin}/tool/x86_64/" tool/"x86_64"/*
install -Dm755 -vt "${pkgdir}/opt/${pkgname%-bin}/" ./*.sh
cp --no-preserve=o -avt "${pkgdir}/opt/${pkgname%-bin}/" plugin WebUI

install -Dm755 "VentoyGUI.x86_64" -vt "${pkgdir}/opt/${pkgname%-bin}"
install -Dm644 WebUI/static/img/VentoyLogo.png -v "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -vt "${pkgdir}/usr/share/applications"

# Link system binaries
for binary in xzcat hexdump; do
ln -svf /usr/bin/"${binary}" "${pkgdir}/opt/${pkgname%-bin}/tool/x86_64/"
done

install -Dm755 "${srcdir}/${pkgname%-bin}"{,gui,web,plugson,-{,extend-}persistent} -vt "${pkgdir}"/usr/bin/

# Remove Gtk 2 files
rm "${pkgdir}/opt/${pkgname%-bin}/tool/x86_64/Ventoy2Disk.gtk2"
}

0 comments on commit 9078032

Please sign in to comment.