Nothin' but Slackware

バイクとLinuxに戯れる日々

2022年06月

ripperX-2.8.0 with Japanese LC_MESSAGES

ripperX-2.8.0 with Japanese LC_MESSAGES

ripperX is a simple and right-weight CD audio ripper.
The upstream source is not maintained for long time, but is still working.
Since original source doesn't contain Japanese LC_MESSAGES file, I made translation file and created slackware package.

< remark >
ripperX doesn't support Japanese title name of music files.
It might be better to use other modern ripper application such as "grip" for users who want the Japanese title name of music files.

[Screen shots]
ripperX_w_JP_2022-06-30-1

ripperX_w_JP_2022-06-30-2

ripperX_w_JP_2022-06-30-3


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

# Slackware build script for ripperX

# Copyright 2012,2013,2018 David Golus <bassplayer69@gmail.com>
#
# 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 ***
# 2021-05-08 : -4jw --- 1st Japanese translation
# 2021-05-09 : -5jw --- updated Japanese translation
# 2021-05-11 : -6jw --- updated Japanese translation using poedit
# 2021-06-08 : -7jw --- updated Japanese translation and fix typo
# 2022-06-30 : -8jw --- small fix to desktop file

PRGNAM=ripperX
SRCNAM=ripperx
VERSION=${VERSION:-2.8.0}
BUILD=${BUILD:-8}
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 $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION

# Add Japanese LC_MESSAGES files
cp $CWD/ja_locale-LC_MESSAGES/{ja.po,ja.gmo} po/


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

patch -i $CWD/gtk_cpp_workaround.patch -o src/gtk_cpp_workaround.h
patch -p1 < $CWD/Add-ja_locale-LC_MESSAGES.diff


LDFLAGS="-lm" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --enable-static=no \
  --build=$ARCH-slackware-linux

make
make install DESTDIR=$PKG

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

mkdir -p $PKG/usr/share/pixmaps
cp -a src/xpms/ripperX-icon.xpm $PKG/usr/share/pixmaps
mkdir -p $PKG/usr/share/applications
cp -a ripperX.desktop $PKG/usr/share/applications
echo "Categories=AudioVideo;" >> $PKG/usr/share/applications/ripperX.desktop
echo "Name[ja]=ripperX CD リッパー" >> $PKG/usr/share/applications/ripperX.desktop


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/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  BUGS CHANGES COPYING FAQ INSTALL README TODO README.plugin \
  $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}


ripperx-2.8.0 source doesn't include Japanese LC_MESSAGES.
I created ja.po translation and added the related files to original source.
My ja LC_MESSAGES files is here (ja_locale-LC_MESSAGES)

Add-ja_locale-LC_MESSAGES.diff
[code]
--- ripperx-2.8.0.orig/po/LINGUAS    2014-02-23 11:58:49.000000000 +0900
+++ ripperx-2.8.0.new/po/LINGUAS    2021-05-09 10:03:46.399502594 +0900
@@ -1,3 +1,3 @@
 # available languages
-en_GB es it gl de fr
+en_GB es it ja gl de fr

gtk_cpp_workaround.patch
[code]
diff -urN ripperx-2.8.0/src/gtk_cpp_workaround.h ripperx-2.8.0/src/gtk_cpp_workaround.h
--- ripperx-2.8.0/src/gtk_cpp_workaround.h    1969-12-31 16:00:00.000000000 -0800
+++ ripperx-2.8.0/src/gtk_cpp_workaround.h    2016-10-06 12:47:06.512778792 -0700
@@ -0,0 +1,39 @@
+#ifndef gtk_cpp_workaround_h
+#define gtk_cpp_workaround_h
+#ifdef __cplusplus
+//proto is wrong, override here for C++
+namespace
+{
+  
+inline void gtk_table_attach (GtkTable *table,
+               GtkWidget *child,
+               guint left_attach,
+               guint right_attach,
+               guint top_attach,
+               guint bottom_attach,
+               //GtkAttachOptions xoptions,
+               //GtkAttachOptions yoptions,
+               guint xoptions, guint yoptions,
+               guint xpadding,
+               guint ypadding
+               )
+{
+  gtk_table_attach(table,
+           child,
+           left_attach,
+           right_attach,
+           top_attach,
+           bottom_attach,
+           (GtkAttachOptions)xoptions,
+           (GtkAttachOptions)yoptions,
+           xpadding,
+           ypadding
+           );
+  
+    };
+
+
+}
+
+#endif
+#endif


--
[2022-06-30] New
[2022-07-01] Added <remark>
[ ]






texlive with Japanese language support on slackware

My steps of installing texlive on slackware64-15.0 with Japanese language support

TeX使いではないので設定が不十分(或いは間違っている)かもしれないが、
いちおう日本語TeX原稿のコンパイルは出来てるっぽい。(縦書き文書は成功していない)

Step-1. Install slackware's official texlive package (Currentlly, I'm using texlive-2021.210418-x86_64-4.)
Step-2. Then install texlive-extra package for japanese language support (using SBo script)
Step-3. After installing texlive-extra, run texinit.sh
  ※ The original texinit.sh is "texinit.sh (Plamolinux)" Thanks to plamolinux.

my texinit.sh.sample
[code]
#!/bin/sh

#SAVEPATH=$PATH

PREFIX=/usr
#TEXARCH=$(uname -m | sed -e 's/i.86/i386/' -e 's/$/-linux/')

#PATH=$PREFIX/bin/$TEXARCH:$PATH
#export PATH

if ! grep "$PREFIX/lib64" /etc/ld.so.conf ; then
  echo "ld.so.conf に $PREFIX/lib64 を追加中 (for texlive)"
  echo "$PREFIX/lib64" >> /etc/ld.so.conf
fi

#if [ ! -d $PREFIX/../texmf-local ]; then
#  mkdir -p $PREFIX/../texmf-local
#fi

# make links
#texlinks -v -f $PREFIX/texmf-dist/web2c/fmtutil.cnf -e "" $PREFIX/bin/$TEXARCH

# set system fontdir
sed -i -e 's|^OSFONTDIR.*$|OSFONTDIR = /usr/share/fonts|' $PREFIX/share/texmf-dist/web2c/fmtutil.cnf

# initialize
mktexlsr
fmtutil-sys --all
mtxrun --generate

# setup Japanese fonts
kanji-config-updmap-sys ipaex
echo "TeXLive の日本語フォントの設定を行いました: "
kanji-config-updmap-sys status

#PATH=$SAVEPATH


Log output with texinit.sh
[code]
...
...
Scanning for LW35 support files  [  3 files]
Scanning for MixedMap entries    [ 18 files]
Scanning for KanjiMap entries    [  5 files]
Scanning for Map entries         [ 56 files]

Generating output for dvipdfmx...
Generating output for ps2pk...
Generating output for dvips...
Generating output for pdftex...

Files generated:
  /usr/share/texmf-var/fonts/map/dvips/updmap:
       15770 2022-06-30 06:31:14 builtin35.map
       21243 2022-06-30 06:31:14 download35.map
      127129 2022-06-30 06:31:14 psfonts_pk.map
      133040 2022-06-30 06:31:14 psfonts_t1.map
      132049 2022-06-30 06:31:14 ps2pk.map
          14 2022-06-30 06:31:14 psfonts.map -> psfonts_t1.map
  /usr/share/texmf-var/fonts/map/pdftex/updmap:
      132056 2022-06-30 06:31:14 pdftex_dl14.map
      130391 2022-06-30 06:31:14 pdftex_ndl14.map
          15 2022-06-30 06:31:14 pdftex.map -> pdftex_dl14.map
  /usr/share/texmf-var/fonts/map/dvipdfmx/updmap:
        1709 2022-06-30 06:31:14 kanjix.map

Transcript written on "/usr/share/texmf-var/web2c/updmap.log".
updmap: Updating ls-R files.
TeXLive の日本語フォントの設定を行いました:
CURRENT family for ja: ipaex (variant: <empty>)
Standby family : haranoaji
Standby family : ipa
Standby family : kozuka-pr6n
Standby family : ms
Standby family : noto-otc (AI0)
Standby family : ume



---
[2022-06-30] 新規
[ ]



dolphin-megasync-4.6.7.0

dolphin-megasync-4.6.7.0 package for slackware-15.0
- This is tiny but useful MEGAsync related application.
- Works as a Dolphin plugin of plasma5.
The file can be uploaded to MEGA cloud storage via Dolphin file manager.


Source for this package is same as MEGAsync (4.6.7.0_Linux) .
https://github.com/meganz/MEGAsync/r...v4.6.7.0_Linux

Package was compiled successfully on slackware64-15.0 and is working fine so far.
I put the build script file (dolphin-megasync-build_nosrc.tar.xz) DL Here

dolphin-megasync.SlackBuild
[code]
#!/bin/sh

# Slackware build script for MEGAsync

# Copyright 2022 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=dolphin-megasync
SRCNAM=MEGAsync
VERSION=${VERSION:-4.6.7.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 $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-${VERSION}_Linux.tar.gz
cd $SRCNAM-${VERSION}_Linux
# prepare source
mkdir -p build
# Apply Arch patch (Thanks to Arch)
patch -p2 -i $CWD/kf5.patch --verbose || extit 1
mv src/MEGAShellExtDolphin/CMakeLists.txt src/MEGAShellExtDolphin/CMakeLists.txt.old
mv src/MEGAShellExtDolphin/CMakeLists_kde5.txt src/MEGAShellExtDolphin/CMakeLists.txt


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 build
cmake ../src/MEGAShellExtDolphin \
  -DCMAKE_BUILD_TYPE=None \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX}
make

make install DESTDIR=$PKG
cd ..
install -Dm644 LICENCE.md $PKG/usr/share/licenses/$PRGNAM/LICENCE.md

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

cd $TMP/$SRCNAM-${VERSION}_Linux
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  CREDITS.md  LICENCE.md  README.md $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}


kf5.patch
[code]
diff --git a/MEGAsync/src/MEGAShellExtDolphin/CMakeLists_kde5.txt b/MEGAsync/src/MEGAShellExtDolphin/CMakeLists_kde5.txt
@@ -64,4 +64,4 @@ target_link_libraries(${MEGASYNCPLUGIN} KF5::CoreAddons KF5::KIOCore KF5::KIOWid
 
 #install(FILES ${CMAKE_CURRENT_BINARY_DIR}/megasync-plugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
 install(FILES megasync-plugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
-install(TARGETS ${MEGASYNCPLUGIN} DESTINATION ${CMAKE_INSTALL_LIBDIR}/qt5/plugins)
+install(TARGETS ${MEGASYNCPLUGIN} DESTINATION ${PLUGIN_INSTALL_DIR})
 
diff --git a/MEGAsync/src/MEGAShellExtDolphin/megasync-plugin.moc b/src/MEGAShellExtDolphin/megasync-plugin.moc
deleted file mode 100644
index e69de29b..00000000


dolphin-megasync.info
[code]
PRGNAM="dolphin-megasync"
VERSION="4.6.7.0"
HOMEPAGE="https://github.com/meganz/MEGAsync/"
DOWNLOAD="https://github.com/meganz/MEGAsync/archive/v4.6.7.0_Linux/MEGAsync-4.6.7.0_Linux.tar.gz"
MD5SUM="e4435f3088b8b28fb271b554894dc470 "
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 ':' except on otherwise blank lines.

                |-----handy-ruler------------------------------------------------------|
dolphin-megasync: dolphin-megasync (MEGAsync plugin for dolphin file manager)
dolphin-megasync:
dolphin-megasync: MEGAsync plugin for dolphin file manager.
dolphin-megasync: Upload your files to your Mega account via Dolphin.
dolphin-megasync:
dolphin-megasync: HomePage: https://github.com/meganz/MEGAsync
dolphin-megasync:
dolphin-megasync:
dolphin-megasync:
dolphin-megasync:
dolphin-megasync:

do-inst.sh
[code]
i
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 usr/share/icons/hicolor >/dev/null 2>&1
  fi


---


Convert file system with tune2fs

恥ずかしながら、とある自宅PCのファイルシステムを長らく「ext3 」で使っていた。
よくまぁ今までトラブル無く動いていたもんだと感心したものの、流石に最近不安になってきたので
 「ext3」->「ext4」へ変換することにした。

やったこと

command example:
1. Check current file system
[code]
# df -hT | awk '{print $1,$2,$NF}' | grep "^/dev"

/dev/root ext3 /
/dev/sdx2 ext3 /mnt/data1

2. Convert file system from ext3 to ext4 (In my case, /dev/root is /dev/sdx1)

※ I unmounted the target file system just in case.
[code]
# tune2fs -O extents,uninit_bg,dir_index /dev/sdx1
# tune2fs -O extents,uninit_bg,dir_index /dev/sdx2

3. Check and repair converted ext4 system
[code]
# e2fsck -pf /dev/sdx1
# e2fsck -pf /dev/sdx2

4. Edit /etc/fstab


---



thunar-megasync-4.6.7.0

thunar-megasync-4.6.7.0 package for slackware-15.0
- This is tiny but useful MEGAsync related application.
- Works as a thunar plugin.
The file can be uploaded to MEGA cloud storage via thunar file manager.

[Screenshot]
thunar-megasync_2022-06-26


Source for this package is same as MEGAsync (4.6.7.0_Linux) .
https://github.com/meganz/MEGAsync/r...v4.6.7.0_Linux

Package was compiled successfully on slackware64-15.0 and is working fine so far.
I put the build script file (thunar-megasync-build_nosrc.tar.xz) DL Here

thunar-megasync.SlackBuild
[code]
#!/bin/sh

# Slackware build script for MEGAsync

# Copyright 2022 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=thunar-megasync
SRCNAM=MEGAsync
VERSION=${VERSION:-4.6.7.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 $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-${VERSION}_Linux.tar.gz
cd $SRCNAM-${VERSION}_Linux
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/MEGAShellExtThunar
qmake-qt5 MEGAShellExtThunar.pro
make

install -dm 755 $PKG/usr/lib64/thunarx-3/
install -m 644 libMEGAShellExtThunar.so.1.0.0 $PKG/usr/lib64/thunarx-3/

cd "$PKG/usr/lib64/thunarx-3"
ln -f -s libMEGAShellExtThunar.so.1.0.0 libMEGAShellExtThunar.so.1.0
ln -f -s libMEGAShellExtThunar.so.1.0.0 libMEGAShellExtThunar.so.1
ln -f -s libMEGAShellExtThunar.so.1.0.0 libMEGAShellExtThunar.so

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

cd $TMP/$SRCNAM-${VERSION}_Linux
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  CREDITS.md  LICENCE.md  README.md $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}

thunar-megasync.info
[code]
PRGNAM="thunar-megasync"
VERSION="4.6.7.0"
HOMEPAGE="https://github.com/meganz/MEGAsync/"
DOWNLOAD="https://github.com/meganz/MEGAsync/archive/v4.6.7.0_Linux/MEGAsync-4.6.7.0_Linux.tar.gz"
MD5SUM="e4435f3088b8b28fb271b554894dc470 "
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 ':' except on otherwise blank lines.

               |-----handy-ruler------------------------------------------------------|
thunar-megasync: thunar-megasync (MEGAsync plugin for thunar file manager)
thunar-megasync:
thunar-megasync: MEGAsync plugin for thunar file manager.
thunar-megasync: Upload your files to your Mega account from Thunar.
thunar-megasync:
thunar-megasync: HomePage: https://github.com/meganz/MEGAsync
thunar-megasync:
thunar-megasync:
thunar-megasync:
thunar-megasync:
thunar-megasync:

do-inst.sh
[code]
i
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 usr/share/icons/hicolor >/dev/null 2>&1
  fi


---


MEGAsync-4.6.7.0_Linux

MEGAsync (4.6.7.0_Linux) has been released.
https://github.com/meganz/MEGAsync/r...v4.6.7.0_Linux

Package was compiled successfully on slackware64-15.0 and is working fine so far.
src :
MEGAsync-4.6.7.0_Linux.tar.gz
sdk-3.9.16a.tar.gz

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.
#
# 2021-08-23 : version bump to 4.5.0.0 -- Build with gcc-11 and with ffmpeg4.4 patch
# 2021-08-24 : version bump to 4.5.3.0 -- Build with gcc-11 and with ffmpeg4.4 patch
# 2021-08-24 : version 4.5.3.0 2jw -- use sdk-3.8.2c instead of commit version "c11a688d578e16dc25d4c94fee7995730be1aa50".
# 2021-11-22 : version 4.6.1.0 1jw -- use source 4.6.1.0_Win and sdk-3.9.6a
# 2021-12-15 : version 4.6.2.0 1jw -- use source 4.6.2.0_Linux and sdk-3.9.6a
# 2022-01-30 : version 4.6.3.0 1jw -- version bump to 4.6.3.0 with official 4.6.3.0_Linux source
# 2022-03-07 : version 4.6.3.0-2jw -- rebuild under ibmediainfo-21.0 and libzen-0.4.39
# 2022-03-30 : version 4.6.5.0-1jw -- version bump to 4.6.5.0 Linux
# 2022-04-23 : Version 4.6.6.0-1jw -- version bump to 4.6.6.0_Linux with sdk-3.9.16
# 2022-06-25 : Version 4.6.7.0-1jw -- version bump to 4.6.7.0_Linux with sdk-3.9.16a

PRGNAM=MEGAsync
VERSION=${VERSION:-4.6.7.0}
SDK=${SDK:-3.9.16a}
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/megasync-4.5.0.0_pdfium.patch

./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --datarootdir=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --build=$ARCH-slackware-linux \
  --with-cares \
  --with-cryptopp \
  --with-curl \
  --with-sodium \
  --with-sqlite \
  --with-zlib \
  --with-termcap \
  --with-freeimage \
  --enable-chat \
  --enable-gcc-hardening

# Apply ffmpeg4 fix patch ; Thanks Gentoo
cd ../../../
patch -p1 < $CWD/megasync-4.6.0.0_ffmpeg.patch

cd src/
#cd ../../../src
qmake CONFIG+="release" QMAKE_CXXFLAGS="$SLKCFLAGS" MEGA.pro
lrelease MEGASync/MEGASync.pro
make
install -m 755 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/megasync $PKG/usr/bin/megasync
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/megasync.desktop $PKG/usr/share/applications/megasync.desktop
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/16x16/apps/mega.png $PKG/usr/share/icons/hicolor/16x16/apps/mega.png
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/32x32/apps/mega.png $PKG/usr/share/icons/hicolor/32x32/apps/mega.png
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/48x48/apps/mega.png $PKG/usr/share/icons/hicolor/48x48/apps/mega.png
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/128x128/apps/mega.png $PKG/usr/share/icons/hicolor/128x128/apps/mega.png
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/256x256/apps/mega.png $PKG/usr/share/icons/hicolor/256x256/apps/mega.png

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/megasync-4.5.0.0_pdfium.patch $CWD/megasync-4.6.0.0_ffmpeg.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="4.6.6.0"
HOMEPAGE="https://github.com/meganz/MEGAsync/"
DOWNLOAD="https://github.com/meganz/MEGAsync/archive/v4.6.6.0_Linux/MEGAsync-4.6.6.0_Linux.tar.gz \
          https://github.com/meganz/sdk/archive/v3.9.16/sdk-3.9.16.tar.gz"
MD5SUM="74bacd4939c5ab1fed67d5174ded02c1 \
        f289d25b841e7d31c2d2b0887b6f8acd"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="FreeImage libmediainfo"
MAINTAINER="Felipe Bugno"
EMAIL="capent@yahoo.com"

megasync-4.5.0.0_pdfium.patch
[code]
diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri
index 83ddc2e2f..46aa06d33 100644
--- a/bindings/qt/sdk.pri
+++ b/bindings/qt/sdk.pri
@@ -255,6 +255,11 @@ CONFIG(USE_PDFIUM) {
                 DEFINES += HAVE_PDFIUM
                 LIBS += -lpdfium
             }
+            else:exists(/usr/include/pdfium/fpdfview.h) {
+                DEFINES += HAVE_PDFIUM
+                INCLUDEPATH += /usr/include/pdfium
+                LIBS += -lpdfium
+            }
         }
         else {#win/mac
             DEFINES += HAVE_PDFIUM


megasync-4.6.0.0_ffmpeg.patch
[code]
diff -Naur a/src/MEGASync/mega/src/gfx/freeimage.cpp b/src/MEGASync/mega/src/gfx/freeimage.cpp
--- a/src/MEGASync/mega/src/gfx/freeimage.cpp    2021-05-23 02:28:08.694081111 +0100
+++ b/src/MEGASync/mega/src/gfx/freeimage.cpp    2021-05-23 02:29:56.189964969 +0100
@@ -188,7 +188,7 @@
 
     // Force seeking to key frames
     formatContext->seek2any = false;
-    videoStream->skip_to_keyframe = true;
+    //videoStream->skip_to_keyframe = true;
     if (decoder->capabilities & CAP_TRUNCATED)
     {
         codecContext.flags |= CAP_TRUNCATED;


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:

do-inst.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

---


MEGAcmd-1.5.1_Linux

The MEGAcmd-1.5.1_Linux has been released on upstream.
I updated my SlackBuild and had confirmed that it was compiled under Slackware64-15.0 / ffmpeg-4.4.2 and works fine.

I also reported my update information to slackbuils-users ML.

クラウド・ストレージ MEGA のコマンドライン・ユーティリティである MEGAcmd-1.5.1_Linux がリリースされた。

個人環境のパッケージ MEGAcmd-1.5.1-x86_64-1jw.txz を作成&インストールして動作に
問題なかったので、slackbuilds_orgへも報告済み。
 
screen shot
MEGAcmd-01_1.5.1


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

# Slackware build script for MEGAcmd

# 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.

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

PRGNAM=MEGAcmd
VERSION=${VERSION:-1.5.1}
SDK=${SDK:-3.9.11d}
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" = "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.?z
cd $PRGNAM-${VERSION}_Linux/sdk
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 {} \;

./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --without-ffmpeg \
  --build=$ARCH-slackware-linux

make
make install DESTDIR=$PKG

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

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
cp -a \
  LICENSE README.md UserGuide.md $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

MEGAcmd.info
[code]
PRGNAM="MEGAcmd"
VERSION="1.5.1"
HOMEPAGE="https://github.com/meganz/MEGAcmd"
DOWNLOAD="https://github.com/meganz/MEGAcmd/archive/1.5.1_Linux/MEGAcmd-1.5.1_Linux.tar.gz \
          https://github.com/meganz/sdk/archive/v3.9.11d/sdk-3.9.11d.tar.gz"
MD5SUM="a0047f8f025c46b4646c8e7f953b79d8 \
        5028b95cad49c7cc654d1249e39e8f84"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="FreeImage libmediainfo"
MAINTAINER="JW(Shinichi Abe)"
EMAIL="shin1.abe@nifty.com"


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:




===


nkf and e2ps for printing japanese UTF-8 plain text

日本語UTF-8 のプレーンテキストをコマンドラインから印刷するのに nkfとe2psを使ってます。
メールクライアント(sylpheedf)の外部印刷コマンドとしても使用してる。
※ 手っ取り早いのは こんなことせずに papsを使えばいいが、昔から e2ps使ってるので惰性で...。

e2ps-4.34 and nkf-2.1.5   
for printing Japanese-plain-text(ja_JP.UTF-8) from command line.

command exsample:
[code]
$ nkf -e [FILE.txt(ja_JP.UTF-8)] | e2ps -p -box -P [My Printer Name]

Usage e2ps:
[code]
$ e2ps --help

'e2ps' Version 4.34 (08/21/2002) ---  White Tools Presents.
                Copyright (c) 1999-2002  Nobuyuki Shiraki

Usage : e2ps
    [-l|-l2|-l4|-lv4|-p|-p2|-p4|-pv4] [-af ascii-font] [-abf ascii-bold]
    [-abif ascii-bolditalic] [-size fontsize] [-ls nlrate] [-line line]
    [-a4|-b4|-le] [-ohp] [-box] [-tm margin] [-bm margin] [-lm margin]
    [-rm margin] [-nh] [-P printer] [-date string] [-head string]
    [-page string] [-e] [-j] [-h|--help] [-v|--version] [-fl] [-lib]
    [filenames...]

    -l                        : landscape
    -l2                       : landscape 2 pages/paper
    -l4                       : landscape 4 pages/paper
    -lv4                      : landscape vertical 4 pages/paper
    -p                        : portrate
    -p2                       : portrate 2 pages/paper (default)
    -p4                       : portrate 4 pages/paper
    -pv4                      : portrate vertical 4 pages/paper
    -af ascii-font            : ASCII font (Courier)
    -abf ascii-bold           : ASCII bold font (Courier-Bold)
    -abif ascii-bolditalic    : ASCII bold italic font (Courier-BoldOblique)
    -size fontsize            : font size (10.0)
    -afw magnification        : ASCII width  (0.6)
    -afh magnification        : ASCII height (1.0)
    -kfw magnification        : ASCII width  (1.2)
    -kfh magnification        : ASCII height (1.0)
    -ls nlrate                : space ratio between lines (1.1)
    -line line                : max lines (66)
    -a4                       : A4 paper (default)
    -b4                       : B4 paper
    -le                       : letter paper
    -ohp                      : OHP printing (font size:25.0)
    -box                      : print page frame-line (looks like a2ps)
    -tm margin                : top    margin
    -bm margin                : bottom margin
    -lm margin                : left   margin
    -rm margin                : right  margin
    -nh                       : not print headers
    -Pprinter                 : printer
    -date string              : date string (Jun 18 2022 22:29:43)
    -head string              : header string
    -page string              : page string (Page)
    -e                        : print with EUC postscript font
    -j                        : print with JIS postscript font(default)
    -h | --help               : show help
    -v | --version            : show version
    -fl                       : show font list
    -lib                      : show library


1. e2ps-4.34 package

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

# Slackware build script for paps

# Copyright (c) 2015 Leonard Schmidt <lems@gmx.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1.- Redistributions of source code 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=e2ps
VERSION=${VERSION:-4.34}
BUILD=${BUILD:-2}
TAG=${TAG:-jw}

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

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

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -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/usr/bin $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION

# Apply debian patch
zcat $CWD/fix-source.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/fix-makefile.patch.gz | patch -p1 --verbose || exit 1


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

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \

make
make install E2PS_INST_DIR=$PKG/usr/bin/

# find $PKG/usr/man -type f -exec gzip -9 {} \;
# for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

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

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README.english README.euc README.jis README.sjis $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:-txz}

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------------------------------------------------------|
e2ps: e2ps (Unicode-aware text to PostScript converter)
e2ps:
e2ps: e2ps reads a UTF-8 encoded file and generates a PostScript language
e2ps: rendering of it.
e2ps:
e2ps: http://wtpage.info/wtseries/unix.html#e2ps
e2ps:
e2ps:
e2ps:
e2ps:
e2ps:



2. nkf-2.1.5 package
    SlackBuild is available at SlackBuilds.org

---
[2022-06-18] New

xscreensaver-6.04 with all LC_MESSAGES and improve Japanese translation

Current xscreensaver-6.04 slackware package doesn't include LC_MESSAGE data.
I modified slackware's original SlackBuild so that the package includes all LC_MESSAGEs.
And I also updated Japanese LC_MESSAGE.

My modification of the SlackBuild was based on openSUSE's spec file. Thank you openSUSE.

[code] diff from SlackBuild(original)
--- xscreensaver.SlackBuild.PV    2022-06-05 21:51:26.646361661 +0900
+++ xscreensaver.SlackBuild.JW    2022-06-05 21:58:03.833326312 +0900
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2016, 2018, 2019, 2020, 2021, 2022  Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2016, 2018, 2019, 2020, 2021  Patrick J. Volkerding, Sebeka, Minnesota, USA
 # All rights reserved.
 #
 # Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
 
 PKGNAM=xscreensaver
 VERSION=${VERSION:-$(echo xscreensaver-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-1jw} # Updated ja_LC_MESSAGES and enabled all locales
 
 # Automatically determine the architecture we're building on:
 if [ -z "$ARCH" ]; then
@@ -71,6 +71,9 @@
 tar xvf $CWD/xscreensaver-$VERSION.tar.?z || exit 1
 cd xscreensaver-$VERSION
 
+# workaround ja LC_MESSAGES
+zcat $CWD/0001_xscreensaver-6.03_ja.po.diff.gz | patch -p1 --verbose || exit 1
+
 if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
   USE_PAM="--with-pam"
   unset USE_SHADOW
@@ -88,6 +91,24 @@
 # Add support for the electricsheep distributed screensaver:
 zcat $CWD/xscreensaver.electricsheep.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1

+# Generate POT file for translators
+  cd po && intltool-update --verbose -p && cd ..
+
+# Fix man pages header:
+find hacks -name '*.man' -print0 | xargs -0 sed -ie 's/TH XScreenSaver 1/TH XScreenSaver 6/'
+# Modify hack list to fit our needs:
+sed -re '
+  s/^([[:space:]]*(rorschach|greynetic|noseguy|deco|moire|spiral|laser|sierpinski|flag|sphere|mountain|triangle|worm|xlyap|cynosure|bsod|t3d|wander"Wander|critical|phosphor|blaster|nerverot|"SpeedMine"|poluominoes|fluidballs|barcode|bubbles))/-\1/;
+  s/^-([[:space:]]*(juggle))/\1/;
+  s/^@GL_KLUDGE@([[:space:]]*GL:[[:space:]]*(sproingies|"Molecule \(lumpy\)"|circuit|atunnel|glmatrix|stairs|pulsar|starwars|"GLText|boxed|"GLForestFire"|sballs|cubenetic|queens|endgame))/-\1/;
+  s/^-([[:space:]]*GL:[[:space:]]*(fireflies))/\1/;
+  /.*vidwhacker -stdin -stdout/D;
+  ' driver/XScreenSaver.ad.in > driver/XScreenSaver.ad.in.tmp && mv -f driver/XScreenSaver.ad.in.tmp driver/XScreenSaver.ad.in
+intltoolize --copy --force
+# fix po/Makefile.in.in
+sed -i "s|@install_sh@|../install-sh -c|" po/Makefile.in.in
+chmod +x install-sh
+
 chown -R root:root .
 find . \
   \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -102,18 +123,29 @@
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
   --mandir=/usr/man \
+  --localedir=/usr/share/locale \
   --with-app-defaults=/etc/X11/app-defaults \
   --with-text-file=/usr/doc/netdate/COPYRIGHT \
   $USE_SHADOW \
   $USE_PAM \
   --without-kerberos \
+  --with-gtk \
   --with-jpeg \
   --with-gl \
   --build=$ARCH-slackware-linux || exit 1

 # Build:
-make $NUMJOBS || make || exit 1
-make install_prefix=$PKG install-strip || exit 1
+make all || exit 1
+make install install_prefix=$PKG || exit 1
+# install all LC_MESSAGE
+mkdir -p $PKG/usr/share/locale
+( cd po
+make install-data DESTDIR=${PKG}
+cd .. )
+
+# 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 )
 
 if [ -z $USE_PAM ]; then
   # Needed for password unlock:
@@ -139,6 +171,7 @@
 cp -a \
   README* \
   $PKG/usr/doc/xscreensaver-$VERSION
+cp -a $CWD/xscreensaver.SlackBuild $PKG/usr/doc/xscreensaver-$VERSION
 
 # Compress and link manpages, if any:
 if [ -d $PKG/usr/man ]; then


About ja.po patch:
I think that most users except Japan might not be interested in this patch.
Anyway I put  0001_xscreensaver-6.03_ja.po.diff.gz  Here


---
[2022-06-05] New


ギャラリー
  • 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"