Nothin' but Slackware

バイクとLinuxに戯れる日々

2025年03月

SlackBuild for hplip-plugin 3.25.2

Here is a testing slackbuild for hplip-plugin-3.25.2 package

[Acknowledgements]
When creating the script, I used Arch Linux's PKGBUILD as a reference.
Thanks to Arch linux.


hplip-plugin.SlackBuild
[code]
#!/bin/sh

# Slackware build script for hplip-plugin

# Copyright 2025 JW(Shinichi Abe) <shin1.abe@nifty.com>
# 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.

PRGNAM=hplip-plugin
VERSION=${VERSION:-
3.25.2}
BUILD=${BUILD:-1}
TAG=${TAG:-jw}
PKGTYPE=${PKGTYPE:-txz}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
mkdir $PRGNAM
unzip $CWD/hplip-${VERSION}-plugin_run.zip
sh hplip-${VERSION}-plugin.run --target $PRGNAM --noexec

rm hplip-${VERSION}-plugin.run
cd $PRGNAM

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 {} \;

  install -Dm644 -t "$PKG/usr/share/hplip" plugin.spec
  install -Dm644 -t "$PKG/usr/share/hplip/data/firmware" hp_laserjet_*.fw.gz
  install -Dm755 -t "$PKG/usr/share/hplip/fax/plugins" fax_marvell-"$ARCH".so
  install -Dm755 -t "$PKG/usr/share/hplip/prnt/plugins" hbpl1-"$ARCH".so
  install -Dm755 -t "$PKG/usr/share/hplip/prnt/plugins" lj-"$ARCH".so
  install -Dm755 -t "$PKG/usr/share/hplip/scan/plugins" bb_*-"$ARCH".so

  install -Dm644 -t "$PKG/usr/share/licenses/$PRGNAM" license.txt

  # Create hplip.state used by hplip-tools
  cat << EOF > hplip.state
[plugin]
installed = 1
eula = 1
version = $VERSION
EOF
  install -Dm644 -t "$PKG/var/lib/hp" hplip.state

# Create symlinks
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}

  find "$PKG/usr/share/hplip" -type f -name "*.so" | while read -r f; do
    lib_dir="${f%/*}"
    lib_name="${f##*/}"
    ln -vsf "$lib_name" "$lib_dir/${lib_name%%-*}.so"
  done


# Note: to check the install, perform: hp-diagnose_plugi

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

find $PKG -name perllocal.pod \
  -o -name ".packlist" \
  -o -name "*.bs" \
  | xargs rm -f

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  *.txt $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

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE}

slack-desc
[code]
# 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------------------------------------------------------|
hplip-plugin: hplip-plugin (HPLIP binary plugins)
hplip-plugin:
hplip-plugin: Binary plugin for HPs hplip printer driver library
hplip-plugin:
hplip-plugin:
hplip-plugin: HOME:https://developers.hp.com/hp-linux-imaging-and-printing/plugins
hplip-plugin:
hplip-plugin:
hplip-plugin:
hplip-plugin:
hplip-plugin:


hplip-plugin.info
[code]
PRGNAM="hplip-plugin"
VERSION="3.25.2"
HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing/plugins"
DOWNLOAD="https://developers.hp.com/system/files/2025-03/hplip-3.25.2-plugin_run.zip"
MD5SUM="dfcb94f1caecaaf2eecdfef953de2606"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="%README%"
MAINTAINER=""
EMAIL=""



===


Avidemux 2.8.2_20250323_7cf15b3

Avidemux 2.8.x with Qt6 GUI (Git 7cf15b3)

[Update] 2025-03-23: パッチ 0008_org.avidemux.Avidemux.desktop_Qt6.diff 更新
-------
現在の Avidemux2 は安定版バージョンは 2.8.1 だが、頻繁に更新とバグフィックスが行われている。
少し前まではデフォルトのQT GUIフロントエンドは Qt5 だったが、今現在(2025年3月)は Qt6 が
GUIのデフォルトになっている。

今回、これまで Qt5ベースのGUIフロントエンドでコンパイルしていたスクリプトを見直して
Qt6版のスクリプト(avidemux.SlackBuild)にしてみた。

ベーススクリプトは AlienBoB (Eric Hameleers)氏のスクリプトを元にしている。
Thanks to Eric for your  excellent script.


Git source からパッケージ作成用の TarBall を作ってからスクリプトを走らせる。

fetch-the-latest-git-master.sh
[code]
#!/bin/bash
#
# [2024-07-13] : new by J_W
# [2025.03.06] : update

MAINVER="2.8.2"
# Read date
echo -n DATE_yyyymmdd:
read DATE

# Download  git-master source
git clone https://github.com/mean00/avidemux2.git
# manipulate the commit number
COMMIT=$(cat avidemux2/.git/refs/heads/master)
COMMIT_SHORT_NBR=$(awk '{ print substr($1,1,7) }' avidemux2/.git/refs/heads/master)

# create tar.xz
mv avidemux2 avidemux_${MAINVER}_${DATE}_${COMMIT_SHORT_NBR}
tar cJvf avidemux_${MAINVER}_${DATE}_${COMMIT_SHORT_NBR}.tar.xz avidemux_${MAINVER}_${DATE}_${COMMIT_SHORT_NBR}/
rm -rf avidemux_${MAINVER}_${DATE}_${COMMIT_SHORT_NBR}
#
echo "Done..."


screen shot
Avidemux2_GUI_about_2.8.2_250323_7cf15b3

Avidemux2_encode_plugins


avidemux.SlackBuild
[code]
#!/bin/sh
# $Id: avidemux.SlackBuild,v 1.19 2021/12/29 15:38:00 root Exp root $
# Copyright 2009, 2010, 2011, 2013, 2017, 2021  Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
#   Permission to use, copy, modify, and distribute this software for
#   any purpose with or without fee is hereby granted, provided that
#   the above copyright notice and this permission notice appear in all
#   copies.
#
#   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
#   CONTRIBUTORS 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.
# -----------------------------------------------------------------------------
#
# 2.8.2_20250306_71f5a15 update git source   commit:71f5a15(2025-03-06) -- Compiled "Qt6 Gui"
# 2.8.2_20250323_7cf15b3  update git source   commit:7cf15b3(2025-03-23)
#
# Run 'sh avidemux.SlackBuild' to build a Slackware package.
# The package (.txz) and .txt file as well as build logs are created in /tmp .
# Install it using 'installpkg'.
#
# -----------------------------------------------------------------------------

# Set initial variables:
cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=
avidemux
MAJOR_VER=${VERSION:-
2.8.2}
DATE=${DATE:-
20250306}
COMMIT_VER=${COMMIT_VER:-
7cf15b3}
VERSION=
${MAJOR_VER}_${DATE}_${COMMIT_VER}
I18N_COMMIT=${I18N_COMMIT:-
4d2693414068eb60ed9eea5720d8fa916ac7ab1a}
BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
#NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-jw}
#LC_MESSAGE_VER=${LC_MESSAGE_VER:-"20240316"}

DOCS="AUTHORS COPYING License.txt scripts"

# Where do we look for sources?
SRCDIR=$CWD

# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

SOURCE=$CWD/${PRGNAM}_${VERSION}.tar.xz
#SRCURL="https://github.com/mean00/avidemux2/releases/download/2.8.1/avidemux_2.8.1.tar.gz"

##
## --- with a little luck, you won't have to edit below this point --- ##
##

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$(uname -m)" in
    i?86) ARCH=i586 ;;
    arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
    *) ARCH=$(uname -m) ;;
  esac
  export ARCH
fi

# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
case "$ARCH" in
  i?86)      SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
             ;;
  x86_64)    SLKCFLAGS="-O2 -fPIC"
             SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
             ;;
  armv7hl)   SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
             ;;
  *)         SLKCFLAGS=${SLKCFLAGS:-"-O2"}
             SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
             ;;
esac

case "$ARCH" in
    arm*)    TARGET=$ARCH-slackware-linux-gnueabi ;;
    *)       TARGET=$ARCH-slackware-linux ;;
esac

# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
# Catch unitialized variables:
set -u
P1=${1:-1}

# Save old umask and set to 0022:
_UMASK_=$(umask)
umask 0022

# Create working directories:
mkdir -p $OUTPUT          # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
mkdir -p $PKG             # place for the package to be built
rm -rf $PKG/*             # always erase old package's contents
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
rm -rf $OUTPUT/{configure,make,install,error,makepkg,patch}-$PRGNAM.log
rm -rf $OUTPUT/{build*-$PRGNAM.log
                          # remove old log files

# --- PACKAGE BUILDING ---

echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"

cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}

cd ${PRGNAM}_${VERSION}/avidemux/qt4/i18n
tar --strip-components=1 -xvf $CWD/avidemux2_i18n-${I18N_COMMIT}.tar.gz
cd ../../../

#  [ADM_demuxers/Mp4] index to file option #521 ; https://github.com/mean00/avidemux2/commit/60145f65297b6439ffbc139f580214c0f5b2115a
#patch -p1 < $SRCDIR/patches/0005-ADM_demuxers_Mp4_index-to-file-option.patch

chown -R root:root .
chmod -R u+w,go+r-w,a+rX-st .

# Thanks FreeBSD guys!
[[ "$ARCH" = "i586" ]] && patch -p0 < $CWD/patches/
extra-patch-i386-nosse.patch

#sed -i 's|../avidemux/qt4|../avidemux/qt4 -DLRELEASE_EXECUTABLE=/usr/bin/lrelease-qt5|' bootStrap.bash || exit 1
# We use a much more recent FriBiDi library:
sed -i 's|0.19|1.0|' avidemux_plugins/ADM_videoFilters6/ass/CMakeLists.txt || exit 1

# Apply bootStrap patch for fix Qt6 build (Thanks to kgha at slackware forum )
patch -p1 < $CWD/patches/
0001_fix_BUILDTOP_in_bootstrap.bash.patch
patch -p1 < $CWD/patches/
0006_bootStrap-CXXFLAGS.patch

# Fix org.avidemux.Avidemux.desktop for Qt6
patch -p1 < $CWD/patches/
0008_org.avidemux.Avidemux.desktop_Qt6.diff

# Since the internal FFmpeg version is "7.0.2", we do not need this nv-codec-headers patch, now.
#mkdir -p avidemux_core/ffmpeg_package/patches/upstream
#cp $CWD/0004-support-nv-codec-headers-12.2.patch avidemux_core/ffmpeg_package/patches/upstream

# Apply x265-4.1.diff patch from SBo
# Thanks Willy Sudiarto Raharjo of SBo team
#patch -p1 < $CWD/x265-4.1.diff --verbose || exit 1

echo "Building..."
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}

# The Qt6 gui is the default now:
bash bootStrap.bash \
  2>&1 | tee $OUTPUT/configure-${PRGNAM}.log

# Install
cp -a install/* $PKG/

# Add an icon for the menu entry:
install -D -m0644 avidemux_icon.png $PKG/usr/share/pixmaps/avidemux.png

# Install the man page:
install -D -m0644 man/avidemux.1 -t $PKG/usr/man/man1

# Add this to the doinst.sh:
! [ -d $PKG/install ] && mkdir -p $PKG/install
cat <<EOT >> $PKG/install/doinst.sh
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
  chroot . /usr/bin/update-desktop-database /usr/share/applications > /dev/null 2>&1
fi

# Update hicolor theme cache:
if [ -d usr/share/icons/hicolor ]; then
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2>&1
  fi
fi

# Update the mime database:
if [ -x usr/bin/update-mime-database ]; then
  chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi

EOT

# Fix org.avidemux.Avidemux.desktop for Qt6
#sed -i 's/avidemux3_qt5/avidemux3_qt6/g' $PKG/usr/share/applications/org.avidemux.Avidemux.desktop

# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/patches

cp -a $SRCDIR/patches/0001_fix_BUILDTOP_in_bootstrap.bash.patch $PKG/usr/doc/$PRGNAM-$VERSION/patches/ || true
cp -a $SRCDIR/patches/0006_bootStrap-CXXFLAGS.patch $PKG/usr/doc/$PRGNAM-$VERSION/patches/ || true
cp -a $SRCDIR/patches/extra-patch-i386-nosse.patch $PKG/usr/doc/$PRGNAM-$VERSION/patches/ || true
cp -a $SRCDIR/patches/0008_org.avidemux.Avidemux.desktop_Qt6.diff $PKG/usr/doc/$PRGNAM-$VERSION/patches/ || true

chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;

# Compress the man page(s):
if [ -d $PKG/usr/man ]; then
  find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
  for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" \
  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
cat $SRCDIR/slack-required > $PKG/install/slack-required

# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep

# Restore the original umask:
umask ${_UMASK_}


slack-desc
[code]
# 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 ':'.

        |-----handy-ruler------------------------------------------------------|
avidemux: avidemux (versatile video editor with a Qt gui)
avidemux:
avidemux: Avidemux is a free video editor designed for simple cutting
avidemux: filtering and encoding tasks.It supports many file types,
avidemux: including AVI, DVD compatible MPEG files, MP4 and ASF, using
avidemux: a variety of codecs. Tasks can be automated using projects,
avidemux: job queue and powerful scripting capabilities.
avidemux:
avidemux:
avidemux: Avidemux home: http://avidemux.org/
avidemux:


0001_fix_BUILDTOP_in_bootstrap.bash.patch
[code]
--- a/bootStrap.bash    2025-03-06 11:19:46.940437964 +0900
+++ b/bootStrap.bash    2025-03-06 11:47:07.604861922 +0900
@@ -351,20 +351,4 @@
 fi
 
 echo "** Packaging **"
-cd "${BUILDTOP}"
-if [ "x$packages_ext" = "x" ]; then
-  echo "No packaging"
-else
-  echo -e "${GREEN}Preparing packages${ENDCOLOR}"
-  rm -Rf "${packages_dir}"
-  mkdir "${packages_dir}"
-  find . -name "*.$packages_ext" | grep -vi cpa | xargs cp -t "${packages_dir}"
-  echo "** ${packages_dir} directory ready **"
-  ls -l "${packages_dir}"
-fi
 echo "** ALL DONE **"
-if [ "x$packages_ext" = "x" ]; then
-  echo "** Copy the folder \"${FAKEROOT_DIR}\" to your favorite location, i.e. sudo cp -R install/usr/* /usr/ **"
-else
-  echo "** Installable packages are in the ${packages_dir} folder **"
-fi

0006_bootStrap-CXXFLAGS.patch
[code]
--- a/bootStrap.bash    2025-02-15 11:23:21.875284589 +0100
+++ b/bootStrap.bash    2025-02-15 10:47:13.000000000 +0100
@@ -78,6 +78,7 @@
     mkdir "${BUILDDIR}" || fail "creating build directory"
   fi
   pushd "${BUILDDIR}" >/dev/null
+  CXXFLAGS+=" -fPIC" \
   cmake \
     $COMPILER \
     $PKG \


0008_org.avidemux.Avidemux.desktop_Qt6.diff
[code]
--- a/avidemux/qt4/xdg_data/org.avidemux.Avidemux.desktop.in    2025-03-23 08:41:36.606786077 +0900
+++ b/avidemux/qt4/xdg_data/org.avidemux.Avidemux.desktop.in    2025-03-23 08:43:49.342127244 +0900
@@ -1,6 +1,8 @@
 [Desktop Entry]
 Name=Avidemux
+Name[ja]=Avidemux (ビデオ編集GUIツール)
 GenericName=Video Editor
+GenericName[ja]=Video Editor (ビデオエディター)
 Comment=Multiplatform video editor
 Exec=avidemux3_${QT_EXTENSION} %f
 Icon=org.avidemux.Avidemux

extra-patch-i386-nosse.patch
[code]
--- avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h.orig    2022-09-17 13:59:16 UTC
+++ avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h
@@ -153,11 +153,6 @@ namespace soundtouch
         // efficient autovectorization
         typedef float LONG_SAMPLETYPE;
 
-        #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
-            // Allow SSE optimizations
-            #define SOUNDTOUCH_ALLOW_SSE       1
-        #endif
-
     #endif  // SOUNDTOUCH_INTEGER_SAMPLES
 

     #if ((SOUNDTOUCH_ALLOW_SSE) || (__SSE__) || (SOUNDTOUCH_USE_NEON))




===


cnijfilter2 (6.80.1) -- Canon IJ Printer Driver

[Update: Mar. 17. 2025]
cnijfilter2 version  "6.80.1"
------------------------------------

cnijfilter2.SlackBuild
[code]
#!/bin/bash

# Slackware build script for cnijfilter2

# Copyright 2019 Kenneth Chan, Hong Kong
# 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.

# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2:
# - strip binaries.
# - relative symlinks.
# - remove INSTALL from doc dir.

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=
cnijfilter2
VERSION=${VERSION:-
6.80.1}
BUILD=${BUILD:-1}
TAG=${TAG:-jw}
PKGTYPE=${PKGTYPE:-txz}

SRCNAM=$PRGNAM-source
SRCVERSION=
6.80-1

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    aarch64) ARCH=aarch64 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
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"
  LIBDIRSUFFIX=""
  BITS="i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
  BITS="i686"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
  BITS="x86_64"
elif [ "$ARCH" = "aarch64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
  BITS="aarch64"
else
  echo "Package for $ARCH architecture is not available."
  exit 1
fi

export ARCH
export SLKCFLAGS
export LIBDIRSUFFIX

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$SRCVERSION

tar xvzf $CWD/$SRCNAM-${SRCVERSION}.tar.gz
cd $SRCNAM-$SRCVERSION
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 {} \;
find -L . \
 \( -type f \! -name autogen.sh \) \
  -exec chmod 644 {} \;

#patch -p1 < $CWD/gcc10.patch
patch -p1 < $CWD/001_cnijfilter2-6.80-fno-common.patch --verbose || exit 1
patch -p1 < $CWD/002_add-missing-import.patch --verbose || exit 1
patch -p1 < $CWD/003_fix-libxml2-config.patch --verbose || exit 1


for dir in cmdtocanonij2 cmdtocanonij3 ; do
  pushd $dir
  ./autogen.sh --prefix=/usr --datadir=/usr/share LDFLAGS="-L../../com/libs_bin_${BITS}"
  make
  popd
done

pushd cnijbe2
  ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
  make
popd

pushd lgmon3
  ./autogen.sh --prefix=/usr --enable-libpath=/usr/lib${LIBDIRSUFFIX}/bjlib2 --enable-progpath=/usr/bin \
    --datadir=/usr/share LDFLAGS="-L../../com/libs_bin_${BITS}"
  make
popd

pushd rastertocanonij
  ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
  make
popd

for dir in tocanonij tocnpwg ; do
  pushd $dir
  ./autogen.sh --prefix=/usr
  make
  popd
done

common_pkg="cmdtocanonij2 cmdtocanonij3 cnijbe2 lgmon3 rastertocanonij tocanonij tocnpwg"
for dir in $common_pkg; do
  pushd $dir
    make install DESTDIR=$PKG
  popd
done

if [ "$ARCH" = "x86_64" ]; then
  mv $PKG/usr/lib $PKG/usr/lib64
fi
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/bjlib2
install -c -o lp -g lp -m 644 com/ini/cnnet.ini $PKG/usr/lib${LIBDIRSUFFIX}/bjlib2/
install -c -m 755 com/libs_bin_${BITS}/*.so.* $PKG/usr/lib${LIBDIRSUFFIX}/

# 20220409 bkw: this bit of template was missing.
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

# Run ldconfig in the build script so that /usr/lib{64}/libcn*.so
# are tracked by doinst.sh
if [ -x /sbin/ldconfig ]; then
  /sbin/ldconfig $PKG/usr/lib${LIBDIRSUFFIX}
fi

mkdir -p $PKG/usr/share/ppd/cnijfilter2 $PKG/usr/share/cups/model
cp -a ppd/*.ppd $PKG/usr/share/ppd/cnijfilter2

# 20220409 bkw: made these relative symlinks.
PPD_FILES=$( cd $PKG/usr/share/ppd/cnijfilter2 ; ls *.ppd )
for f in $PPD_FILES; do
  ln -fs ../../ppd/cnijfilter2/${f} $PKG/usr/share/cups/model/${f}
done

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/lproptions
cp -a doc/* $PKG/usr/doc/$PRGNAM-$VERSION
cp -a lproptions/lpr* $PKG/usr/doc/$PRGNAM-$VERSION/lproptions
cat ppd/NEWS > $PKG/usr/doc/$PRGNAM-$VERSION/NEWS
# Copy all README to /usr/doc
for dir in $common_pkg; do
  mkdir $PKG/usr/doc/$PRGNAM-$VERSION/$dir
  pushd $dir
    for file in AUTHORS COPYING ChangeLog LICENSE* NEWS README; do
      [ -f $file ] && cp -a $file $PKG/usr/doc/$PRGNAM-$VERSION/$dir
    done
  popd
done
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

cnijfilter2.info
[code]
PRGNAM="cnijfilter2"
VERSION="
6.80.1"
HOMEPAGE="https://canon.jp/support/software/os/select/ij-mfp/cnijfilter2-source-680-1tar"
DOWNLOAD="
https://gdlp01.c-wss.com/gds/2/0100012302/02/cnijfilter2-source-6.80-1.tar.gz"
MD5SUM="98b5836e486c94a9214c79766bd532ff"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER=""
EMAIL=""

001_cnijfilter2-6.80-fno-common.patch
[code]
--- a/lgmon3/src/cnijlgmon3.c    2025-03-17 21:47:45.151131390 +0900
+++ b/lgmon3/src/cnijlgmon3.c    2025-03-17 21:52:16.590335545 +0900
@@ -55,7 +55,7 @@
 int (*GET_STATUS)(char *, int, int *, int * , char *);
 int (*GET_STATUS2)(char *, int, char *, int *, int * , char *, char *);
 int (*GET_STATUS2_MAINTENANCE)(char *, int, char *, int *, int * , char *, char *);
-int (*GET_PROTOCOL)(char *, size_t);
+static int (*GET_PROTOCOL)(char *, size_t);
 
 
  int main(int argc, char *argv[])

002_add-missing-import.patch
[code]
diff -ura cnijfilter2-source-6.60-1/lgmon3/src/keytext.c cnijfilter2-source-6.60-1-new/lgmon3/src/keytext.c
--- cnijfilter2-source-6.60-1/lgmon3/src/keytext.c    2022-12-20 05:28:46.000000000 +0000
+++ cnijfilter2-source-6.60-1-new/lgmon3/src/keytext.c    2024-07-23 20:35:24.859816250 +0100
@@ -37,6 +37,7 @@
 #include <unistd.h>
 #include <libxml/parser.h>    /* Ver.2.80 */
 #include <string.h>
+#include <stdlib.h>
 
 #include "keytext.h"


003_fix-libxml2-config.patch
[code]
diff -ura cnijfilter2-source-6.80-1/lgmon3/configure.in cnijfilter2-source-6.80-1.new/lgmon3/configure.in
--- cnijfilter2-source-6.80-1/lgmon3/configure.in    2024-09-20 07:28:40.000000000 +0100
+++ cnijfilter2-source-6.80-1.new/lgmon3/configure.in    2025-02-24 01:21:57.676721707 +0000
@@ -72,7 +72,7 @@
 
 CFLAGS="-O2"
 
-XML2_CFLAGS=`xml2-config --cflags`
+XML2_CFLAGS=`pkg-config libxml-2.0 --cflags`
 AC_SUBST(XML2_CFLAGS)
 
 AC_OUTPUT([
diff -ura cnijfilter2-source-6.80-1/tocnpwg/configure.in cnijfilter2-source-6.80-1.new/tocnpwg/configure.in
--- cnijfilter2-source-6.80-1/tocnpwg/configure.in    2024-09-20 07:28:40.000000000 +0100
+++ cnijfilter2-source-6.80-1.new/tocnpwg/configure.in    2025-02-24 01:22:00.930699848 +0000
@@ -41,7 +41,7 @@
 
 CFLAGS="-O2"
 
-XML_2_CFLAGS=`xml2-config --cflags`
+XML_2_CFLAGS=`pkg-config libxml-2.0 --cflags`
 AC_SUBST(XML_2_CFLAGS)
 
 AC_OUTPUT(Makefile


slack-desc
[code]
# 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 ':'.

           |-----handy-ruler------------------------------------------------------|
cnijfilter2: cnijfilter2 (Canon IJ Printer Driver)
cnijfilter2:
cnijfilter2: cnijfilter2 provides printing functions for Canon Inkjet printers
cnijfilter2: operating under the CUPS (Common UNIX Printing System) environment.
cnijfilter2:
cnijfilter2: It supports MG7500 series, MG6700 series, MG6600 series, MG5600
cnijfilter2: series, MG2900 series, MB2000 series, MB2300, iB4000 series,
cnijfilter2: MB5000 series, MB5300 series, iP110 series, E450 series, MX490
cnijfilter2: series, E480 series.
cnijfilter2:
cnijfilter2: Homepage: https://asia.canon/en/support/0101163901

Supported_printers.lst
[code]
canone200.ppd    canong1030.ppd    canong3090.ppd   canong7000.ppd   canongx6000.ppd   canonmb5300.ppd   canonmx490.ppd   canontr8530.ppd  
canonts3500.ppd  canonts6180.ppd   canonts7330.ppd  canonts8180.ppd  canonts9000.ppd   canonxk70.ppd     canone300.ppd    canong2020.ppd  
canong4000.ppd   canong7080.ppd    canongx6500.ppd  canonmb5400.ppd  canontr150.ppd    canontr8580.ppd   canonts3600.ppd  canonts6200.ppd  
canonts7400.ppd  canonts8200.ppd   canonts9100.ppd  canonxk80.ppd    canone3100.ppd    canong2030.ppd    canong4010.ppd   canongm2000.ppd  
canongx7000.ppd  canonmg2900.ppd   canontr4500.ppd  canontr8600.ppd  canonts3700.ppd   canonts6230.ppd   canonts7430.ppd  canonts8230.ppd  
canonts9180.ppd  canonxk90.ppd     canone3300.ppd   canong2060.ppd   canong4070.ppd    canongm2080.ppd   canonib4000.ppd  canonmg3000.ppd  
canontr4600.ppd  canontr8630.ppd   canonts5000.ppd  canonts6280.ppd  canonts7450i.ppd  canonts8280.ppd   canonts9500.ppd  canone3400.ppd  
canong2070.ppd   canong4080.ppd    canongm4000.ppd  canonib4100.ppd  canonmg3600.ppd   canontr4700.ppd   canontr9530.ppd  canonts5100.ppd   
canonts6300.ppd  canonts7530.ppd   canonts8300.ppd  canonts9580.ppd  canone3600.ppd    canong3000.ppd    canong4090.ppd   canongm4080.ppd  
canonip110.ppd   canonmg5600.ppd   canontr7000.ppd  canonts200.ppd   canonts5300.ppd   canonts6330.ppd   canonts7600i.ppd canonts8330.ppd  
canonxk100.ppd   canone4200.ppd    canong3010.ppd   canong500.ppd    canongx1000.ppd   canonmb2000.ppd   canonmg5700.ppd  canontr703.ppd   
canonts2400.ppd  canonts5350i.ppd  canonts6380.ppd  canonts7700.ppd  canonts8380.ppd   canonxk110.ppd    canone4500.ppd   canong3020.ppd  
canong5000.ppd   canongx2000.ppd   canonmb2100.ppd  canonmg6600.ppd  canontr7500.ppd   canonts2600.ppd   canonts5380.ppd  canonts6400.ppd  
canonts7700a.ppd  canonts8430.ppd  canonxk120.ppd   canone460.ppd    canong3030.ppd    canong5080.ppd    canongx3000.ppd  canonmb2300.ppd  
canonmg6800.ppd  canontr7530.ppd   canonts300.ppd   canonts5400.ppd  canonts6630.ppd   canonts7700i.ppd  canonts8530.ppd  canonxk130.ppd
canone470.ppd    canong3060.ppd    canong600.ppd    canongx4000.ppd  canonmb2700.ppd   canonmg6900.ppd   canontr7600.ppd  canonts3100.ppd  
canonts6000.ppd  canonts6730.ppd   canonts8000.ppd  canonts8630.ppd  canonxk50.ppd     canone480.ppd     canong3070.ppd   canong6000.ppd  
canongx5000.ppd  canonmb5000.ppd   canonmg7500.ppd  canontr7800.ppd  canonts3300.ppd   canonts6100.ppd   canonts700.ppd   canonts8100.ppd   
canonts8700.ppd  canonxk500.ppd    canong1020.ppd   canong3080.ppd   canong6080.ppd    canongx5500.ppd   canonmb5100.ppd  canonmg7700.ppd  
canontr8500.ppd  canonts3400.ppd   canonts6130.ppd  canonts708.ppd   canonts8130.ppd   canonts8800.ppd   canonxk60.ppd

---
[Update] Mar.17,2025

MEGAsync-5.9.0.3_Linux リリース

[Update: Mar. 14. 2025]
Version bump to "5.9.0.3"
------------------------------------
 -   Numerous interface improvements.
 -   Improved HiDpi handling in Windows.
 -   Updates to third party libraries.
 -   Other bugs have been fixed and numerous improvements made.

------------------------------------


MEGAsync.SlackBuild
[code]
#!/bin/sh

# Slackware build script for MEGASync input plugin

# Copyright 2017,2018 Felipe Bugno <capent@yahoo.com>
#
# 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.
#
# 2025-01-21 : 5.7.1.0 (1jw) -- version bump to 5.7.1.0 with sdk-8.0.1
# 2025-02-05 : 5.8.0.2 (1jw) -- version bump to 5.8.0.2 with sdk-8.3.1
# 2025-03-14 : 5.9.0.3 (1jw) -- version bump to 5.9.0.3 with sdk-8.6.0
#

PRGNAM=MEGAsync
VERSION=${VERSION:-
5.9.0.3}
SDK=${SDK:-
8.6.0}
BUILD=${BUILD:-1}
TAG=${TAG:-jw}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION\_Linux
tar xvf $CWD/$PRGNAM-$VERSION\_Linux.tar.gz
cd $PRGNAM-$VERSION\_Linux/src/MEGASync/mega
tar --strip-components=1 -xvf $CWD/sdk-$SDK.tar.gz
cd ../../../
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 {} \;

cd src/MEGASync/mega
patch -p1 < $CWD/010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch
cd ../../../
patch -p1 < $CWD/030-megasync-app-fix-cmake-dependencies-detection.patch


cd $TMP
rm -rf vcpkg
# Now.. we will use microsoft VCPKG build system for MEGAsync desktop apps
git clone https://github.com/microsoft/vcpkg


CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS"
export CXXFLAGS+=' -DNDEBUG'

cmake -DVCPKG_ROOT=$TMP/vcpkg  -B build -S $PRGNAM-$VERSION\_Linux -DCMAKE_BUILD_TYPE=Release \
-G 'Unix Makefiles' \
-DCMAKE_MODULE_PATH:PATH="$TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/mega/contrib/cmake/modules/packages" \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL='YES' \
-Wno-dev

cmake --build build --target MEGAsync

#Install
DESTDIR=$PKG cmake --install build
install -d "$PKG/usr/lib${LIBDIRSUFFIX}"
# Do Not overwrite *.so of default ffmpeg-7.x's libraries.
rm $PKG/opt/megasync/lib/*.so
# Now move ffmpeg related libs to STD lib64 dir
mv $PKG/opt/megasync/lib/* $PKG/usr/lib${LIBDIRSUFFIX}/

install -D -m644 $PRGNAM-$VERSION\_Linux/LICENCE.md -t "$PKG/usr/share/licenses/megasync"
install -D -m644 $PRGNAM-$VERSION\_Linux/installer/terms.txt -t "$PKG/usr/share/licenses/megasync"
install -D -m644 $PRGNAM-$VERSION\_Linux/src/MEGASync/mega/LICENSE "$PKG/usr/share/licenses/megasync/LICENCE-SDK"
rm -d "$PKG/opt"{/megasync{/lib,},}

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION\_Linux
cp -a  README.md LICENCE.md CREDITS.md $PKG/usr/doc/$PRGNAM-$VERSION
cp $CWD/010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch \
 $CWD/030-megasync-app-fix-cmake-dependencies-detection.patch \
 $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:-txz}

MEGAsync.info
[code]
PRGNAM="MEGAsync"
VERSION="
5.9.0.3"
HOMEPAGE="
https://github.com/meganz/MEGAsync/"
DOWNLOAD="https://github.com/meganz/MEGAsync/archive/v5.9.0.3_Linux/MEGAsync-5.9.0.3_Linux.tar.gz
\
 
https://github.com/meganz/sdk/archive/v8.6.0/sdk-8.6.0.tar.gz"
MD5SUM="
aa89b5678748bc6f736b2725a885e533 \
 
4e115b08d0adf11201ae985a501d2e7e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="FreeImage libmediainfo"
MAINTAINER=""
EMAIL=""

010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch
[code]
--- a/src/gfx/freeimage.cpp
+++ b/src/gfx/freeimage.cpp
@@ -200,12 +200,6 @@ bool GfxProviderFreeImage::readbitmapFreeimage(const LocalPath& imagePath, int s
 
 #ifdef HAVE_FFMPEG
 
-#ifdef AV_CODEC_CAP_TRUNCATED
-#define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED
-#else
-#define CAP_TRUNCATED CODEC_CAP_TRUNCATED
-#endif
-
 const char *GfxProviderFreeImage::supportedformatsFfmpeg()
 {
     return  ".264.265.3g2.3gp.3gpa.3gpp.3gpp2.mp3"
@@ -321,10 +315,6 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(const LocalPath& imagePath, int size
 
     // Force seeking to key frames
     formatContext->seek2any = false;
-    if (decoder->capabilities & CAP_TRUNCATED)
-    {
-        codecContext->flags |= CAP_TRUNCATED;
-    }
 
     AVPixelFormat sourcePixelFormat = static_cast<AVPixelFormat>(codecParm->format);
     AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format


030-megasync-app-fix-cmake-dependencies-detection.patch
[code]
--- a/src/MEGAUpdateGenerator/CMakeLists.txt
+++ b/src/MEGAUpdateGenerator/CMakeLists.txt
@@ -15,10 +15,11 @@ target_sources(MEGAUpdateGenerator
 )
 
 # Load and link needed libraries for the CHATlib target
-find_package(cryptopp CONFIG REQUIRED)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcryptopp)
 target_link_libraries(MEGAUpdateGenerator
     PRIVATE
-    cryptopp::cryptopp
+    PkgConfig::cryptopp
     MEGA::SDKlib
 )


slack-desc
[code]
# 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------------------------------------------------------|
MEGAsync: MEGAsync (mega cloud storage service)
MEGAsync:
MEGAsync: MEGAsync open source release for MEGA cloud storage services
MEGAsync:
MEGAsync:
MEGAsync: Compiled using default Slackware Qt4.
MEGAsync:
MEGAsync: Homepage: https://github.com/meganz/MEGAsync
MEGAsync: Service: https://mega.nz/
MEGAsync:
MEGAsync:

doinst.sh
[code]
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

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

---
[Update] Mar.16,2025

Avidemux 2.8.x with Qt6 GUI

Avidemux 2.8.x with Qt6 GUI

現在の Avidemux2 は安定版バージョンは 2.8.1 だが、頻繁に更新とバグフィックスが行われている。
少し前まではデフォルトのQT GUIフロントエンドは Qt5 だったが、今現在(2025年3月)は Qt6 が
GUIのデフォルトになっている。

今回、これまで Qt5ベースのGUIフロントエンドでコンパイルしていたスクリプトを見直して
Qt6版のスクリプト(avidemux.SlackBuild)にしてみた。

ベーススクリプトは AlienBoB (Eric Hameleers)氏のスクリプトを元にしている。
Thanks to Eric for your  excellent script.


Git source からパッケージ作成用の TarBall を作ってからスクリプトを走らせる。

fetch-the-latest-git-master.sh
[code]
:#!/bin/bash
#
# [2024-07-13] : new by J_W
# [2025.03.06] : update

MAINVER="2.8.2"
# Read date
echo -n DATE(yyyymmdd):
read DATE

# Download  git-master source
git clone https://github.com/mean00/avidemux2.git
# manipulate the commit number
COMMIT=$(cat avidemux2/.git/refs/heads/master)
COMMIT_SHORT_NBR=$(awk '{ print substr($1,1,7) }' avidemux2/.git/refs/heads/master)

# create tar.xz
mv avidemux2 avidemux_${MAINVER}_${DATE}_${COMMIT_SHORT_NBR}
tar cJvf avidemux_${MAINVER}_${DATE}_${COMMIT_SHORT_NBR}.tar.xz avidemux_${MAINVER}_${DATE}_${COMMIT_SHORT_NBR}/
rm -rf avidemux_${MAINVER}_${DATE}_${COMMIT_SHORT_NBR}
#
echo "Done..."


screen shot
Avidemux2_GUI_about

Avidemux2_encode_plugins


avidemux.SlackBuild
[code]
#!/bin/sh
# $Id: avidemux.SlackBuild,v 1.19 2021/12/29 15:38:00 root Exp root $
# Copyright 2009, 2010, 2011, 2013, 2017, 2021  Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
#   Permission to use, copy, modify, and distribute this software for
#   any purpose with or without fee is hereby granted, provided that
#   the above copyright notice and this permission notice appear in all
#   copies.
#
#   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
#   CONTRIBUTORS 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.
# -----------------------------------------------------------------------------
#
# 2.8.2_20250306_71f5a15 update git source   commit:71f5a15(2025-03-06) -- Compiled "Qt6 Gui"
#
# Run 'sh avidemux.SlackBuild' to build a Slackware package.
# The package (.txz) and .txt file as well as build logs are created in /tmp .
# Install it using 'installpkg'.
#
# -----------------------------------------------------------------------------

# Set initial variables:
cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=
avidemux
MAJOR_VER=${VERSION:-
2.8.2}
DATE=${DATE:-
20250306}
COMMIT_VER=${COMMIT_VER:-
71f5a15}
VERSION=
${MAJOR_VER}_${DATE}_${COMMIT_VER}
I18N_COMMIT=${I18N_COMMIT:-
4d2693414068eb60ed9eea5720d8fa916ac7ab1a}
BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
#NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-jw}
#LC_MESSAGE_VER=${LC_MESSAGE_VER:-"20240316"}

DOCS="AUTHORS COPYING License.txt scripts"

# Where do we look for sources?
SRCDIR=$CWD

# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

SOURCE=$CWD/${PRGNAM}_${VERSION}.tar.xz
#SRCURL="https://github.com/mean00/avidemux2/releases/download/2.8.1/avidemux_2.8.1.tar.gz"

##
## --- with a little luck, you won't have to edit below this point --- ##
##

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$(uname -m)" in
    i?86) ARCH=i586 ;;
    arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
    *) ARCH=$(uname -m) ;;
  esac
  export ARCH
fi

# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
case "$ARCH" in
  i?86)      SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
             ;;
  x86_64)    SLKCFLAGS="-O2 -fPIC"
             SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
             ;;
  armv7hl)   SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
             ;;
  *)         SLKCFLAGS=${SLKCFLAGS:-"-O2"}
             SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
             ;;
esac

case "$ARCH" in
    arm*)    TARGET=$ARCH-slackware-linux-gnueabi ;;
    *)       TARGET=$ARCH-slackware-linux ;;
esac

# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
# Catch unitialized variables:
set -u
P1=${1:-1}

# Save old umask and set to 0022:
_UMASK_=$(umask)
umask 0022

# Create working directories:
mkdir -p $OUTPUT          # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
mkdir -p $PKG             # place for the package to be built
rm -rf $PKG/*             # always erase old package's contents
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
rm -rf $OUTPUT/{configure,make,install,error,makepkg,patch}-$PRGNAM.log
rm -rf $OUTPUT/{build*-$PRGNAM.log
                          # remove old log files

# --- PACKAGE BUILDING ---

echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"

cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}

cd ${PRGNAM}_${VERSION}/avidemux/qt4/i18n
tar --strip-components=1 -xvf $CWD/avidemux2_i18n-${I18N_COMMIT}.tar.gz
cd ../../../

#  [ADM_demuxers/Mp4] index to file option #521 ; https://github.com/mean00/avidemux2/commit/60145f65297b6439ffbc139f580214c0f5b2115a
#patch -p1 < $SRCDIR/patches/0005-ADM_demuxers_Mp4_index-to-file-option.patch

chown -R root:root .
chmod -R u+w,go+r-w,a+rX-st .

# Thanks FreeBSD guys!
[[ "$ARCH" = "i586" ]] && patch -p0 < $CWD/patches/
extra-patch-i386-nosse.patch

#sed -i 's|../avidemux/qt4|../avidemux/qt4 -DLRELEASE_EXECUTABLE=/usr/bin/lrelease-qt5|' bootStrap.bash || exit 1
# We use a much more recent FriBiDi library:
sed -i 's|0.19|1.0|' avidemux_plugins/ADM_videoFilters6/ass/CMakeLists.txt || exit 1

# Apply bootStrap patch for fix Qt6 build (Thanks to kgha at slackware forum )
patch -p1 < $CWD/patches/
0001_fix_BUILDTOP_in_bootstrap.bash.patch
patch -p1 < $CWD/patches/
0006_bootStrap-CXXFLAGS.patch

# Fix org.avidemux.Avidemux.desktop for Qt6
patch -p1 < $CWD/patches/
0008_org.avidemux.Avidemux.desktop_Qt6.diff

# Since the internal FFmpeg version is "7.0.2", we do not need this nv-codec-headers patch, now.
#mkdir -p avidemux_core/ffmpeg_package/patches/upstream
#cp $CWD/0004-support-nv-codec-headers-12.2.patch avidemux_core/ffmpeg_package/patches/upstream

# Apply x265-4.1.diff patch from SBo
# Thanks Willy Sudiarto Raharjo of SBo team
#patch -p1 < $CWD/x265-4.1.diff --verbose || exit 1

echo "Building..."
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}

# The Qt6 gui is the default now:
bash bootStrap.bash \
  2>&1 | tee $OUTPUT/configure-${PRGNAM}.log

# Install
cp -a install/* $PKG/

# Add an icon for the menu entry:
install -D -m0644 avidemux_icon.png $PKG/usr/share/pixmaps/avidemux.png

# Install the man page:
install -D -m0644 man/avidemux.1 -t $PKG/usr/man/man1

# Add this to the doinst.sh:
! [ -d $PKG/install ] && mkdir -p $PKG/install
cat <<EOT >> $PKG/install/doinst.sh
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
  chroot . /usr/bin/update-desktop-database /usr/share/applications > /dev/null 2>&1
fi

# Update hicolor theme cache:
if [ -d usr/share/icons/hicolor ]; then
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2>&1
  fi
fi

# Update the mime database:
if [ -x usr/bin/update-mime-database ]; then
  chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi

EOT

# Fix org.avidemux.Avidemux.desktop for Qt6
#sed -i 's/avidemux3_qt5/avidemux3_qt6/g' $PKG/usr/share/applications/org.avidemux.Avidemux.desktop

# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/patches

cp -a $SRCDIR/patches/0001_fix_BUILDTOP_in_bootstrap.bash.patch $PKG/usr/doc/$PRGNAM-$VERSION/patches/ || true
cp -a $SRCDIR/patches/0006_bootStrap-CXXFLAGS.patch $PKG/usr/doc/$PRGNAM-$VERSION/patches/ || true
cp -a $SRCDIR/patches/extra-patch-i386-nosse.patch $PKG/usr/doc/$PRGNAM-$VERSION/patches/ || true
cp -a $SRCDIR/patches/0008_org.avidemux.Avidemux.desktop_Qt6.diff $PKG/usr/doc/$PRGNAM-$VERSION/patches/ || true

chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;

# Compress the man page(s):
if [ -d $PKG/usr/man ]; then
  find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
  for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" \
  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
cat $SRCDIR/slack-required > $PKG/install/slack-required

# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep

# Restore the original umask:
umask ${_UMASK_}


slack-desc
[code]
# 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 ':'.

        |-----handy-ruler------------------------------------------------------|
avidemux: avidemux (versatile video editor with a Qt gui)
avidemux:
avidemux: Avidemux is a free video editor designed for simple cutting
avidemux: filtering and encoding tasks.It supports many file types,
avidemux: including AVI, DVD compatible MPEG files, MP4 and ASF, using
avidemux: a variety of codecs. Tasks can be automated using projects,
avidemux: job queue and powerful scripting capabilities.
avidemux:
avidemux:
avidemux: Avidemux home: http://avidemux.org/
avidemux:


0001_fix_BUILDTOP_in_bootstrap.bash.patch
[code]
--- a/bootStrap.bash    2025-03-06 11:19:46.940437964 +0900
+++ b/bootStrap.bash    2025-03-06 11:47:07.604861922 +0900
@@ -351,20 +351,4 @@
 fi
 
 echo "** Packaging **"
-cd "${BUILDTOP}"
-if [ "x$packages_ext" = "x" ]; then
-  echo "No packaging"
-else
-  echo -e "${GREEN}Preparing packages${ENDCOLOR}"
-  rm -Rf "${packages_dir}"
-  mkdir "${packages_dir}"
-  find . -name "*.$packages_ext" | grep -vi cpa | xargs cp -t "${packages_dir}"
-  echo "** ${packages_dir} directory ready **"
-  ls -l "${packages_dir}"
-fi
 echo "** ALL DONE **"
-if [ "x$packages_ext" = "x" ]; then
-  echo "** Copy the folder \"${FAKEROOT_DIR}\" to your favorite location, i.e. sudo cp -R install/usr/* /usr/ **"
-else
-  echo "** Installable packages are in the ${packages_dir} folder **"
-fi

0006_bootStrap-CXXFLAGS.patch
[code]
--- a/bootStrap.bash    2025-02-15 11:23:21.875284589 +0100
+++ b/bootStrap.bash    2025-02-15 10:47:13.000000000 +0100
@@ -78,6 +78,7 @@
     mkdir "${BUILDDIR}" || fail "creating build directory"
   fi
   pushd "${BUILDDIR}" >/dev/null
+  CXXFLAGS+=" -fPIC" \
   cmake \
     $COMPILER \
     $PKG \


0008_org.avidemux.Avidemux.desktop_Qt6.diff
[code]
--- a/avidemux/qt4/xdg_data/org.avidemux.Avidemux.desktop    2025-03-06 15:15:09.084590154 +0900
+++ b/avidemux/qt4/xdg_data/org.avidemux.Avidemux.desktop    2025-03-06 15:14:40.877539662 +0900
@@ -1,8 +1,10 @@
 [Desktop Entry]
 Name=Avidemux
+Name[ja]=Avidemux (ビデオ編集GUIツール)
 GenericName=Video Editor
+GenericName[ja]=Video Editor (ビデオエディター)
 Comment=Multiplatform video editor
-Exec=avidemux3_qt5 %f
+Exec=avidemux3_qt6 %f
 Icon=org.avidemux.Avidemux
 Terminal=false
 Type=Application


extra-patch-i386-nosse.patch
[code]
--- avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h.orig    2022-09-17 13:59:16 UTC
+++ avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h
@@ -153,11 +153,6 @@ namespace soundtouch
         // efficient autovectorization
         typedef float LONG_SAMPLETYPE;
 
-        #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
-            // Allow SSE optimizations
-            #define SOUNDTOUCH_ALLOW_SSE       1
-        #endif
-
     #endif  // SOUNDTOUCH_INTEGER_SAMPLES
 

     #if ((SOUNDTOUCH_ALLOW_SSE) || (__SSE__) || (SOUNDTOUCH_USE_NEON))




===


MEGAcmd-2.0.0_Linux

[Update] 2025-02-06 : Version bump to 2.0.0_Linux

クラウド・ストレージ MEGA のコマンドライン・ユーティリティ MEGAcmd-2.0.0_Linux

screen shot
MEGAcmd-2.0.0

MEGAcmd.SlackBuild
[code]
#!/bin/bash

# Slackware build script for <appname>

# Copyright <year> <you> <where you live>
# 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.

# |-----------------------------------------------------------------| #
### ChangeLog ###
# 2025-02-06 - Major version bump to "2.0.0" with cmake and vcppkg build system
#              SDL: "8.3.1"
#

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=
MEGAcmd
VERSION=${VERSION:-
2.0.0}
SDK=${SDK:-
8.3.1}
FFMPEG6_PATCHREV=${FFMPEG6_PATCHREV:-
1.7.0}
BUILD=${BUILD:-1}
TAG=${TAG:-jw}
PKGTYPE=${PKGTYPE:-txz}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
       *) ARCH=$( uname -m ) ;;
  esac
fi

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
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"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
elif [ "$ARCH" = "aarch64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e # Exit on most errors

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-${VERSION}_Linux
tar xvf $CWD/$PRGNAM-${VERSION}_Linux.tar.gz
cd $PRGNAM-${VERSION}_Linux/sdk
tar --strip-components=1 -xvf $CWD/sdk-$SDK.tar.gz
cd ..

# Apply patch for FFmpeg6 ; This patch also works against FFmpeg7
patch -p1 < $CWD/megacmd-${FFMPEG6_PATCHREV}_ffmpeg6.patch

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 {} \;

cd $TMP
rm -rf vcpkg
# Now.. we will use microsoft VCPKG build system for MEGAsync desktop apps
git clone https://github.com/microsoft/vcpkg

cd $PRGNAM-${VERSION}_Linux
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS"
export CXXFLAGS+=' -DNDEBUG'

#CONFIGURE
 
cmake -DVCPKG_ROOT=$TMP/vcpkg  -B build -S $TMP/$PRGNAM-${VERSION}_Linux \
  -DCMAKE_BUILD_TYPE=Release


#BUILD
cd build
make $NUMJOBS

#INSTALL
make install/strip DESTDIR=$PKG
cd ..

# Fix installdir of megacmd_completion.sh
rm -rf $PKG/etc
install -Dm644 src/client/megacmd_completion.sh $PKG/usr/share/bash-completion/completions/megacmd

install -d "$PKG/usr/lib${LIBDIRSUFFIX}"
# Do Not overwrite *.so of default ffmpeg-7.x's libraries.
rm $PKG/opt/megacmd/lib/*.so
# Now move ffmpeg related libs to STD lib64 dir
mv $PKG/opt/megacmd/lib/* $PKG/usr/lib${LIBDIRSUFFIX}/

install -D -m644 $TMP/$PRGNAM-${VERSION}_Linux/LICENSE -t "$PKG/usr/share/licenses/megacmd"
rm -d "$PKG/opt"{/megacmd{/lib,},}

# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la

# Strip binaries and libraries - this can be done with 'make install-strip'
# in many source trees, and that's usually acceptable, if not, use this:
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

# Remove perllocal.pod and other special files that don't need to be installed,
# as they will overwrite what's already on the system.  If this is not needed,
# remove it from the script.
find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true

# Copy program documentation and other files into the package
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
    *.txt LICENSE README.md UserGuide.md \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/megacmd-${FFMPEG6_PATCHREV}_ffmpeg6.patch > $PKG/usr/doc/$PRGNAM-$VERSION/megacmd-${FFMPEG6_PATCHREV}_ffmpeg6.patch

# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

# Make the package
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE


MEGAcmd.info
[code]
PRGNAM="MEGAcmd"
VERSION="2.0.0"
HOMEPAGE="https://github.com/meganz/MEGAcmd"
DOWNLOAD="https://github.com/meganz/MEGAcmd/archive/2.0.0_Linux/MEGAcmd-2.0.0_Linux.tar.gz \
          https://github.com/meganz/sdk/archive/v8.3.1/sdk-8.3.1.tar.gz"
MD5SUM="3a10c59014cefb8e8ec2ae7cf6a26cb6 \
        8e2c0573310cdb99294626b0ca3e3438"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="FreeImage libmediainfo"
MAINTAINER=""
EMAIL=""


slack-desc
[code]
# 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 ':'.

       |-----handy-ruler------------------------------------------------------|
MEGAcmd: MEGAcmd (MEGAcmd)
MEGAcmd: URL : https://github.com/meganz/MEGAcmd
MEGAcmd:
MEGAcmd: MEGAcmd provides non UI access to MEGA services. It intends to offer
MEGAcmd: all the functionality with your MEGA account via commands.
MEGAcmd: It features synchronization , backup of local folders into your MEGA
MEGAcmd: account and a webdav/streaming server
MEGAcmd:
MEGAcmd:
MEGAcmd:
MEGAcmd:

megacmd-1.7.0_ffmpeg6.patch
[code]
--- MEGAcmd-1.7.0_Linux/sdk/src/gfx/freeimage.cpp    2024-05-23 05:35:56.462093962 +0900
+++ MEGAcmd-1.7.0_Linux.New/sdk/src/gfx/freeimage.cpp    2024-05-23 05:38:41.790152966 +0900
@@ -209,12 +209,6 @@
 
 #ifdef HAVE_FFMPEG
 
-#ifdef AV_CODEC_CAP_TRUNCATED
-#define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED
-#else
-#define CAP_TRUNCATED CODEC_CAP_TRUNCATED
-#endif
-
 const char *GfxProviderFreeImage::supportedformatsFfmpeg()
 {
     return  ".264.265.3g2.3gp.3gpa.3gpp.3gpp2.mp3"
@@ -330,10 +324,6 @@
 
     // Force seeking to key frames
     formatContext->seek2any = false;
-    if (decoder->capabilities & CAP_TRUNCATED)
-    {
-        codecContext->flags |= CAP_TRUNCATED;
-    }
 
     AVPixelFormat sourcePixelFormat = static_cast<AVPixelFormat>(codecParm->format);
     AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format



===


MEGAsync-5.8.0.2_Linux

[Update: Mar. 06. 2025]
Version bump to "5.8.0.2"
------------------------------------
- We’ve enhanced the interface and behaviour of the transfer manager feature.
- You can now create sync exclusions using wildcards.
- There are new releases available now for the Raspberry Pi OS.
- We’ve fixed crashes that were occurring due to missing or broken OpenGL drivers on Windows.
- Qt has been upgraded to a newer version.
- Other bugs have been fixed and numerous improvements made.

------------------------------------


MEGAsync.SlackBuild
[code]
#!/bin/sh

# Slackware build script for MEGASync input plugin

# Copyright 2017,2018 Felipe Bugno <capent@yahoo.com>
#
# 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.
#
#

PRGNAM=
MEGAsync
VERSION=${VERSION:-
5.8.0.2}
SDK=${SDK:-
8.3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-jw}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION\_Linux
tar xvf $CWD/$PRGNAM-$VERSION\_Linux.tar.gz
cd $PRGNAM-$VERSION\_Linux/src/MEGASync/mega
tar --strip-components=1 -xvf $CWD/sdk-$SDK.tar.gz
cd ../../../
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 {} \;

cd src/MEGASync/mega
patch -p1 < $CWD/
010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch
cd ../../../
patch -p1 < $CWD/
030-megasync-app-fix-cmake-dependencies-detection.patch

cd $TMP
rm -rf vcpkg
# Now.. we will use microsoft VCPKG build system for MEGAsync desktop apps
git clone https://github.com/microsoft/vcpkg

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS"
export CXXFLAGS+=' -DNDEBUG'

cmake -DVCPKG_ROOT=$TMP/vcpkg  -B build -S $PRGNAM-$VERSION\_Linux -DCMAKE_BUILD_TYPE=Release \
-G 'Unix Makefiles' \
-DCMAKE_MODULE_PATH:PATH="$TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/mega/contrib/cmake/modules/packages" \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL='YES' \
-Wno-dev


cmake --build build --target MEGAsync

#Install
DESTDIR=$PKG cmake --install build
install -d "$PKG/usr/lib${LIBDIRSUFFIX}"
# Do Not overwrite *.so of default ffmpeg-7.x's libraries.
rm $PKG/opt/megasync/lib/*.so
# Now move ffmpeg related libs to STD lib64 dir
mv $PKG/opt/megasync/lib/* $PKG/usr/lib${LIBDIRSUFFIX}/

install -D -m644 $PRGNAM-$VERSION\_Linux/LICENCE.md -t "$PKG/usr/share/licenses/megasync"
install -D -m644 $PRGNAM-$VERSION\_Linux/installer/terms.txt -t "$PKG/usr/share/licenses/megasync"
install -D -m644 $PRGNAM-$VERSION\_Linux/src/MEGASync/mega/LICENSE "$PKG/usr/share/licenses/megasync/LICENCE-SDK"
rm -d "$PKG/opt"{/megasync{/lib,},}

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION\_Linux
cp -a  README.md LICENCE.md CREDITS.md $PKG/usr/doc/$PRGNAM-$VERSION
cp $CWD/010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch \
 $CWD/030-megasync-app-fix-cmake-dependencies-detection.patch \
 $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:-txz}

MEGAsync.info
[code]
PRGNAM="MEGAsync"
VERSION="5.8.0.2"
HOMEPAGE="https://github.com/meganz/MEGAsync/"
DOWNLOAD="https://github.com/meganz/MEGAsync/archive/v5.8.0.2_Linux/MEGAsync-5.8.0.2_Linux.tar.gz \
 https://github.com/meganz/sdk/archive/v8.3.1/sdk-8.3.1.tar.gz"
MD5SUM="1d454c162ed5f2ca85a84783774aa99a \
 8e2c0573310cdb99294626b0ca3e3438"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="FreeImage libmediainfo"
MAINTAINER=""
EMAIL=""

010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch
[code]
--- a/src/gfx/freeimage.cpp
+++ b/src/gfx/freeimage.cpp
@@ -200,12 +200,6 @@ bool GfxProviderFreeImage::readbitmapFreeimage(const LocalPath& imagePath, int s
 
 #ifdef HAVE_FFMPEG
 
-#ifdef AV_CODEC_CAP_TRUNCATED
-#define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED
-#else
-#define CAP_TRUNCATED CODEC_CAP_TRUNCATED
-#endif
-
 const char *GfxProviderFreeImage::supportedformatsFfmpeg()
 {
     return  ".264.265.3g2.3gp.3gpa.3gpp.3gpp2.mp3"
@@ -321,10 +315,6 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(const LocalPath& imagePath, int size
 
     // Force seeking to key frames
     formatContext->seek2any = false;
-    if (decoder->capabilities & CAP_TRUNCATED)
-    {
-        codecContext->flags |= CAP_TRUNCATED;
-    }
 
     AVPixelFormat sourcePixelFormat = static_cast<AVPixelFormat>(codecParm->format);
     AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format


030-megasync-app-fix-cmake-dependencies-detection.patch
[code]
--- a/src/MEGAUpdateGenerator/CMakeLists.txt
+++ b/src/MEGAUpdateGenerator/CMakeLists.txt
@@ -15,10 +15,11 @@ target_sources(MEGAUpdateGenerator
 )
 
 # Load and link needed libraries for the CHATlib target
-find_package(cryptopp CONFIG REQUIRED)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcryptopp)
 target_link_libraries(MEGAUpdateGenerator
     PRIVATE
-    cryptopp::cryptopp
+    PkgConfig::cryptopp
     MEGA::SDKlib
 )


slack-desc
[code]
# 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------------------------------------------------------|
MEGAsync: MEGAsync (mega cloud storage service)
MEGAsync:
MEGAsync: MEGAsync open source release for MEGA cloud storage services
MEGAsync:
MEGAsync:
MEGAsync: Compiled using default Slackware Qt4.
MEGAsync:
MEGAsync: Homepage: https://github.com/meganz/MEGAsync
MEGAsync: Service: https://mega.nz/
MEGAsync:
MEGAsync:

doinst.sh
[code]
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

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

---
[Update] Mar.06,2025

UFR II/UFRII LT Printer Driver for Linux V6.00

Slackware フォーラムに書き込んだ成り行きで作った Canon UFR II/UFRII LT Printer の Slackware向けドライバーパッケージ作成スクリプト.
スクリプト見れば解る通り、Debianのコンパイル済みバイナリパッケージをSlackware用に再配置してるだけの手抜きパッケージです。


Canonサイトから元ソースファイルをダウンロードしてきて、アーカイブ中に含まれている Debian パッケージを取り出して作業ディレクトリに置き、
下記スクリプトを実行すればパッケージが出来上がる。

こんな感じで取り出す
[code] 
# tar xvf linux-UFRII-drv-v600-m17n-06.tar.gz
# cp linux-UFRII-drv-v600-m17n/x64/Debian/cnrdrvcups-ufr2-uk_6.00-1.06_amd64.deb .

# rm -rf linux-UFRII-drv-v600-m17n/
# rm linux-UFRII-drv-v600-m17n-06.tar.gz

# ls -al
canon-ufrii-printer-driver.SlackBuild
cnrdrvcups-ufr2-uk_6.00-1.06_amd64.deb
slack-desc



[code]  canon-ufrii-printer-driver.info
PRGNAM="canon-ufrii-printer-driver"
VERSION="6.00_1.06"
HOMEPAGE="https://asia.canon/en/support/0100924010"
DOWNLOAD="wget https://gdlp01.c-wss.com/gds/0/0100009240/36/linux-UFRII-drv-v600-m17n-06.tar.gz"
MD5SUM="cc957d0824c53c24c878057e0e96e9e2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="JW(Shinichi Abe)"
EMAIL=""


[code]  canon-ufrii-printer-driver.SlackBuild
#!/bin/bash

# Slackware build script for skypeforlinux

# Copyright 2017, 2023  Mario Preksavec, Zagreb, Croatia
# 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=canon-ufrii-printer-driver
SRCNAM=cnrdrvcups-ufr2-uk
SRCVER=${SRCVER:-6.00-1.06}
VERSION=${VERSION:-6.00_1.06}
BUILD=${BUILD:-1}
TAG=${TAG:-jw}
PKGTYPE=${PKGTYPE:-txz}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
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" != "x86_64" ]; then
  echo "$ARCH is not supported."
  exit 1
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
if [ -f $CWD/${SRCNAM}_${SRCVER}_amd64.deb ]; then
  ar p $CWD/${SRCNAM}_${SRCVER}_amd64.deb data.tar.xz | tar -xvJ
elif [ -f $CWD/${SRCNAM}-64.deb ]; then
  # Support the website download
  ar p $CWD/${SRCNAM}_${SRCVER}_amd64.deb data.tar.xz | tar -xvJ
  VERSION=$(ar p $CWD/${SRCNAM}_${SRCVER}_amd64.deb control.tar.xz \
            | tar -Ozxf - ./control | awk '/^Version:/{print $NF}')
fi
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 {} \;

#Rename "lib" to "lib64"
mv $PKG/usr/lib $PKG/usr/lib64

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
#mv $PKG/usr/share/$PRGNAM/LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/share/doc/$SRCNAM/* $PKG/usr/doc/$PRGNAM-$VERSION
rm -rf $PKG/usr/share/doc

cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
touch $CWD/doinst.sh
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

[code]  slack-desc
# 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 ':'.

                          |-----handy-ruler------------------------------------------------------|
canon-ufrii-printer-driver: canon-ufrii-printer-driver (UFR II/UFRII LT Printer Driver)
canon-ufrii-printer-driver:
canon-ufrii-printer-driver: UFR II/UFRII LT Printer Driver for Linux V6.00
canon-ufrii-printer-driver: Install the official Canon UFRII/UFRII LT driver made for Debian
canon-ufrii-printer-driver: on Slackware.
canon-ufrii-printer-driver:
canon-ufrii-printer-driver:
canon-ufrii-printer-driver:
canon-ufrii-printer-driver:
canon-ufrii-printer-driver: Home: https://asia.canon/en/support/0100924010
canon-ufrii-printer-driver:



ギャラリー
  • deepl-clip.sh で簡単翻訳 [更新:2025-04-29]
  • Avidemux 2.8.2_20250323_7cf15b3
  • Avidemux 2.8.2_20250323_7cf15b3
  • Avidemux 2.8.x with Qt6 GUI
  • Avidemux 2.8.x with Qt6 GUI
  • MEGAcmd-2.0.0_Linux
  • gcolor3 with Japanese menu and LC_MESSAGES
  • avidemux2 TEST package from the latest git source (on jul.23.2024)
  • fcitx5-mozc-2.29.5135.102.1 (15jw) -- Added "merge-ut-dictionaries"