From: fsLeg Date: Sun, 24 Aug 2025 17:44:56 +0000 (+0300) Subject: usbimager: added X-Git-Url: https://git.t-rg.ws/?a=commitdiff_plain;h=9ab31f5d681bc608f24a56d08341c6c66ca0ee2c;p=slackbuilds.git usbimager: added --- diff --git a/usbimager/README b/usbimager/README new file mode 100644 index 0000000..23f3fe0 --- /dev/null +++ b/usbimager/README @@ -0,0 +1,37 @@ +USBImager is a really really simple GUI application that writes +compressed disk images to USB drives and creates backups. Its interface +is as simple as it gets, totally bloat-free. USBImager's main audience +is the non-expert average user, who is (sadly) afraid of the command +line. + +Features: + +- Open Source and MIT licensed +- Portable executable, no installation needed, just extract the archives +- Small. Really small, few kilobytes only, yet has no dependencies +- No privacy concerns nor advertisements like with etch*r, fully GDPR + compatible +- Minimalist, multilingual, native interface on all platforms +- Tries to be bullet-proof and avoids overwriting of the system disk +- Makes synchronized writes, that is, all data is on disk when the + progressbar reaches 100% +- Can verify writing by comparing the disk to the image +- Can read raw disk images: .img, .bin, .raw, .iso, .dd, etc. +- Can read compressed images on-the-fly: .gz, .bz2, .xz, .zst +- Can read archives on-the-fly: .zip (PKZIP and ZIP64), .zzz (ZZZip), + .tar, .cpio, .pax (*) +- Can create backups in raw and ZStandard compressed format +- Can send images to microcontrollers over serial line +- Available in 18 languages + +By default, GTK3 version is built which relies on Udisks2 to get access +to USB drives. To build an X11 version which uses an SGID bit for group +disk instead: + + USE_X11=yes ./usbimager.SlackBuild + +If an X11 version can't render text in your language, you need to +install gnu-unifont, or, alternatively, include Unifont into the +binary: + + USE_UNIFONT=yes ./usbimager.SlackBuild diff --git a/usbimager/doinst.sh b/usbimager/doinst.sh new file mode 100644 index 0000000..7d010b5 --- /dev/null +++ b/usbimager/doinst.sh @@ -0,0 +1,12 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +# If other icon themes are installed, then add to/modify this as needed +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi + + diff --git a/usbimager/slack-desc b/usbimager/slack-desc new file mode 100644 index 0000000..0c9a349 --- /dev/null +++ b/usbimager/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +usbimager: usbimager (minimal GUI app that writes disk images to USB drives) +usbimager: +usbimager: USBImager is a really really simple GUI application that writes +usbimager: compressed disk images to USB drives and creates backups. +usbimager: +usbimager: USBImager's main audience is the non-expert average user, who is +usbimager: (sadly) afraid of the command line. +usbimager: +usbimager: Homepage: https://bztsrc.gitlab.io/usbimager/ +usbimager: +usbimager: diff --git a/usbimager/usbimager.SlackBuild b/usbimager/usbimager.SlackBuild new file mode 100644 index 0000000..c62dd79 --- /dev/null +++ b/usbimager/usbimager.SlackBuild @@ -0,0 +1,104 @@ +#!/bin/bash + +# Slackware build script for usbimager + +# Copyright 2025 Vladislav 'fsLeg' Borisov, Moscow, Russia +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=usbimager +VERSION=${VERSION:-1.0.10} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# fix install target +sed -i 's/@mkdir/& $(INSTDIR)/' src/Makefile + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +DESTDIR=$PKG \ +USE_GTK=$(test "$USE_X11" = "yes" && echo "" || echo "yes") \ +make -C src install + +# make .desktop file compliant +mv $PKG/usr/share/applications/usbimager.desktop $PKG/usr/share/applications/com.gitlab.bztsrc.$PRGNAM.desktop +sed -i '/Version=/d' $PKG/usr/share/applications/com.gitlab.bztsrc.$PRGNAM.desktop +sed -i 's/Application;//' $PKG/usr/share/applications/com.gitlab.bztsrc.$PRGNAM.desktop + +mv $PKG/usr/share/man $PKG/usr/ + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + LICENSE README.md usbimager-manual.pdf \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/usbimager/usbimager.info b/usbimager/usbimager.info new file mode 100644 index 0000000..289fb00 --- /dev/null +++ b/usbimager/usbimager.info @@ -0,0 +1,10 @@ +PRGNAM="usbimager" +VERSION="1.0.10" +HOMEPAGE="https://bztsrc.gitlab.io/usbimager/" +DOWNLOAD="https://gitlab.com/bztsrc/usbimager/-/archive/1.0.10/usbimager-1.0.10.tar.gz" +MD5SUM="c76908852c4d7b084a3ef573c64c89df" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Vladislav 'fsLeg' Borisov" +EMAIL="fsleg@t-rg.ws"