Package Details: papercut-client-bin 22.0.8-1

Git Clone URL: https://aur.archlinux.org/papercut-client-bin.git (read-only, click to copy)
Package Base: papercut-client-bin
Description: Client software for PaperCut printers
Upstream URL: https://www.papercut.com/support/resources/manuals/ng-mf/clienttool/topics/user-client-install-linux.html
Licenses: custom
Submitter: nrobinson2000
Maintainer: nrobinson2000
Last Packager: nrobinson2000
Votes: 0
Popularity: 0.000000
First Submitted: 2021-09-03 05:01 (UTC)
Last Updated: 2023-02-21 03:57 (UTC)

Dependencies (2)

Required by (0)

Sources (3)

Latest Comments

cbhihe commented on 2023-06-22 12:02 (UTC) (edited on 2023-06-22 15:25 (UTC) by cbhihe)

Experimented with @fiskhest's PKGBUILD file. First difference occurs when running '$ papercut-client'.

$ pwd
.../.../papercut-client-bin

$ papercut-client
bash: /usr/bin/papercut-client: No such file or directory

$ which papercut-client
which: no papercut-client in (...)

whereas with PKGBUILD 22.x a new binary was correctly created as '/usr/bin/papercut-client'

I'm stuck.

cbhihe commented on 2023-06-22 10:59 (UTC) (edited on 2023-06-22 11:22 (UTC) by cbhihe)

After updating the PKGBUILD file with the adequate '_print_server' and '_print_port' values, I ran '$ makepkg -sric' followed by '$ papercut-client' and eventually got a Java related error:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: biz/papercut/pcng/client/uit/UserClient has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)

Apparently there is an issue with java versions not matching, my JRE being behind that of the compiler associated with Papercut code being installed. On a rolling release such as Arch, I don't think jumping ahead of the schedule release of JRE with class file version 54 is advised. How to get out of this bind ? By reverting to 21.2.x as @fiskhest writes below ?

fiskhest commented on 2023-02-09 11:02 (UTC)

I was able to get the latest 21.x release installed with the following PKGBUILD. Was unable to retrieve the URL to the install script for the latest 22.x version.

# Maintainer: Nathan Robinson <nrobinson2000 at me dot com>

pkgname=papercut-client-bin
pkgdesc="Client software for PaperCut printers"
arch=('x86_64')
license=('custom')
url="https://www.papercut.com/support/resources/manuals/ng-mf/clienttool/topics/user-client-install-linux.html"

depends=('java-runtime>=11' 'gtk3')
install="$pkgname.install"

pkgver=21.2.10
pkgrel=4
_version_prefix="21.x"
_build="62198"

source=("papercut-client"
"config.properties.tmpl"
"https://cdn.papercut.com/web/products/ng-mf/installers/ng/$_version_prefix/pcng-setup-$pkgver.$_build.sh")

noextract=("pcng-setup-$pkgver.$_build.sh")

sha256sums=('3096295e90a23594e34ee3ff394e070ebabe15df42740cd95b27cf04adbd7ba3'
            '55e2e1ea938d8a74846b29237f66ee97a80987f2a66ff54530f31bd84b727c00'
            '18ba0d8ac934df31ab69ac371cb84d5f96f85578dd555d28ad5e694e9c6d5b69')

# App Configuration
# Either edit here or in $HOME/.config/papercut-client/config.properties
_print_server="print.example.com"
_print_port="9191"

prepare() {
    # Extract archive from script
    dd if="pcng-setup-$pkgver.$_build.sh" bs=4096 skip=1 | bsdtar -C "$srcdir" -xzf -
}

package() {
    _install_dir="$pkgdir/usr/share/$pkgname"

    # Create installation directory
    install -d "$_install_dir"

    # Copy libraries
    cp -r "$srcdir/papercut/client/win/lib" "$_install_dir"
    rm "$_install_dir/lib/clientjni.dll" "$_install_dir/lib/pc-toast-notify.exe"

    # Create minimal config
    cat << EOF > "$_install_dir/config.properties"
#Bootstrap configuration information
#$(date)
server-name=$_print_server
server-ip=$_print_server
server-port=$_print_port
EOF

    # Create advanced config template
    cat "$_install_dir/config.properties" \
    "$srcdir/config.properties.tmpl" > "$_install_dir/config.properties.tmpl"

    # Install LICENSE
    install -D -m644 "$srcdir/papercut/LICENCE.TXT" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    # Install launcher script
    install -D -m755 papercut-client "$pkgdir/usr/bin/papercut-client"
}