Package Details: pdfcpu-bin 0.9.1-1

Git Clone URL: https://aur.archlinux.org/pdfcpu-bin.git (read-only, click to copy)
Package Base: pdfcpu-bin
Description: A PDF processor written in Go.
Upstream URL: https://pdfcpu.io/
Keywords: cli go pdf pdfcpu
Licenses: Apache-2.0
Conflicts: pdfcpu
Provides: pdfcpu
Submitter: AsukaMinato
Maintainer: gromit
Last Packager: gromit
Votes: 1
Popularity: 0.000052
First Submitted: 2023-03-06 14:53 (UTC)
Last Updated: 2024-10-24 09:44 (UTC)

Dependencies (0)

Required by (1)

Sources (3)

Latest Comments

gromit commented on 2024-10-24 09:46 (UTC)

@m040601, thanks for your suggestions, I polished the PKGBUILD a bit in the latest revision!

or some Archlinux official packager will pick it up and turn it into an official package

Hah! That could be me 😂

m040601 commented on 2024-10-24 09:29 (UTC)

@gromit

Thanks for keeping up with the work on this PKGBUILD.

This tool is VERY usefull and is on a good path for contituous improvement.

Hopefully @alerque or some Archlinux official packager will pick it up and turn it into an official package.

In the mean time, there are some things that you need to polish and watch out on this "pdfcpu-bin" PKGBUILD.

Ask for help if you need. It would be nice if both you and @Rubo, https://aur.archlinux.org/packages/pdfcpu could coordinate and share work.

Right now your PKGBUILD install this,

pdfcpu-bin /usr/bin/pdfcpu
pdfcpu-bin /usr/share/doc/pdfcpu-bin/README.md
pdfcpu-bin /usr/share/licenses/pdfcpu-bin/LICENSE.txt

This is wrong for "doc" and "licenses". You should not create folders named "pdfcpu-bin". That is this PKGBUILD name. The tool name is and stays "pdfcpu". Independent of the PKGBUILD you choose to install it, "pdfcpu-git", "pdfcpu" or "pdfcpu-bin".

So no "-bin" there:

pdfcpu-bin /usr/share/doc/pdfcpu/README.md
pdfcpu-bin /usr/share/licenses/pdfcpu/LICENSE.txt

gromit commented on 2023-12-16 17:43 (UTC)

Hey @alerque,

thanks for your suggestions, especially about the conflicts=(...) and other architectures, I applied them ^_^ I should have audited the PKGBUILD more carefully when I adopted/updated the package 😬

What I didn't understand what the reason is to add the provides statement?

-provides=(pdfcpu)
+provides=("pdfcpu=$pkgver")

alerque commented on 2023-12-16 12:15 (UTC)

It is helpful for packages that provide something other than their pkgname to also note the version that they provide. Also it isn't necessary to conflict with X-git, not just because in this case it doesn't exist but because all packages that conflict with X will conflict with each other automatically. VCS/bin and other variant packages should always only conflict with the base name, they don't have to note all the possible variants.

This patch should apply with git am < file.patch and also fix the ARM builds:

From 44ab33def1af5e5254b91b1f14e90414e339811f Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Sat, 16 Dec 2023 15:12:20 +0300
Subject: [PATCH] Provide with version, remove unused confics, fix aarch64

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .SRCINFO | 11 +++++------
 PKGBUILD |  9 +++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 163ba73..79e2133 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,19 @@
 pkgbase = pdfcpu-bin
    pkgdesc = A PDF processor written in Go.
    pkgver = 0.6.0
-   pkgrel = 2
+   pkgrel = 3
    url = https://pdfcpu.io/
    arch = x86_64
    arch = aarch64
    arch = i686
    license = Apache
-   provides = pdfcpu
+   provides = pdfcpu=0.6.0
    conflicts = pdfcpu
-   conflicts = pdfcpu-git
-   source_x86_64 = pdfcpu-x86_64-0.6.0-2.tar.xz::https://github.com/pdfcpu/pdfcpu/releases/download/v0.6.0/pdfcpu_0.6.0_Linux_x86_64.tar.xz
+   source_x86_64 = pdfcpu-x86_64-0.6.0-3.tar.xz::https://github.com/pdfcpu/pdfcpu/releases/download/v0.6.0/pdfcpu_0.6.0_Linux_x86_64.tar.xz
    sha256sums_x86_64 = 8c42a920469e1638eff7f61fb763ddf2b8082991004db6dd591c23407792ac05
-   source_aarch64 = pdfcpu-aarch64-0.6.0-2.tar.xz::https://github.com/pdfcpu/pdfcpu/releases/download/v0.6.0/pdfcpu_0.6.0_Linux_arm64.tar.xz
+   source_aarch64 = pdfcpu-aarch64-0.6.0-3.tar.xz::https://github.com/pdfcpu/pdfcpu/releases/download/v0.6.0/pdfcpu_0.6.0_Linux_arm64.tar.xz
    sha256sums_aarch64 = 60f5790c1a9c33ce6f036ad456cc121ad84c8f212dc37d784e55faf541321896
-   source_i686 = pdfcpu-i686-0.6.0-2.tar.xz::https://github.com/pdfcpu/pdfcpu/releases/download/v0.6.0/pdfcpu_0.6.0_Linux_i386.tar.xz
+   source_i686 = pdfcpu-i686-0.6.0-3.tar.xz::https://github.com/pdfcpu/pdfcpu/releases/download/v0.6.0/pdfcpu_0.6.0_Linux_i386.tar.xz
    sha256sums_i686 = 3c9ae50fce44e6f5f4ba3d6e611ec15b7fcea7466c820d25f89a88db2ab7c1eb

 pkgname = pdfcpu-bin
diff --git a/PKGBUILD b/PKGBUILD
index bbdd12d..5894dc6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,17 @@
 # Maintainer: Christian Heusel <christian@heusel.eu>
+# Contributor: Caleb Maclennan <caleb@alerque.com>
 # Contributor: Asuka Minato <asukaminato at nyan dot eu dot org>

 _pkgname=pdfcpu
 pkgname=pdfcpu-bin
 pkgver=0.6.0
-pkgrel=2
+pkgrel=3
 pkgdesc="A PDF processor written in Go."
 arch=(x86_64 aarch64 i686)
 url="https://pdfcpu.io/"
 license=('Apache')
-provides=(pdfcpu)
-conflicts=(pdfcpu pdfcpu-git)
+provides=("pdfcpu=$pkgver")
+conflicts=(pdfcpu)

 source_x86_64=("pdfcpu-x86_64-${pkgver}-${pkgrel}.tar.xz::https://github.com/pdfcpu/pdfcpu/releases/download/v${pkgver}/pdfcpu_${pkgver}_Linux_x86_64.tar.xz")
 source_aarch64=("pdfcpu-aarch64-${pkgver}-${pkgrel}.tar.xz::https://github.com/pdfcpu/pdfcpu/releases/download/v${pkgver}/pdfcpu_${pkgver}_Linux_arm64.tar.xz")
@@ -20,7 +21,7 @@ sha256sums_aarch64=('60f5790c1a9c33ce6f036ad456cc121ad84c8f212dc37d784e55faf5413
 sha256sums_i686=('3c9ae50fce44e6f5f4ba3d6e611ec15b7fcea7466c820d25f89a88db2ab7c1eb')

 package() {
-    cd "${_pkgname}_${pkgver}_Linux_${CARCH}"
+    cd "${_pkgname}_${pkgver}_Linux_${CARCH/aarch/arm}"

     install -Dm755 "${_pkgname}" -t "$pkgdir/usr/bin/"
     install -Dm644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
-- 
2.43.0

m040601 commented on 2023-12-11 00:48 (UTC)

pacman -Ql pdfcpu-bin

pdfcpu-bin /usr/
pdfcpu-bin /usr/bin/
pdfcpu-bin /usr/bin/pdfcpu
pdfcpu-bin /usr/share/
pdfcpu-bin /usr/share/licenses/
pdfcpu-bin /usr/share/licenses/pdfcpu-bin/
pdfcpu-bin /usr/share/licenses/pdfcpu-bin/LICENSE.txt

tar tvf pdfcpu_0.6.0_Linux_x86_64.tar.xz

-rw-r--r-- horstrutter/staff 11358 2023-12-10 09:03 pdfcpu_0.6.0_Linux_x86_64/LICENSE.txt
-rw-r--r-- horstrutter/staff 17223 2023-12-10 09:03 pdfcpu_0.6.0_Linux_x86_64/README.md
-rwxr-xr-x horstrutter/staff 10498048 2023-12-10 09:33 pdfcpu_0.6.0_Linux_x86_64/pdfcpu

The tar.xz also includes a README. Please dont throw it away and make sure it gets installed to something like

/usr/share/doc/pdfcpu/README

Thanks in advance

m040601 commented on 2023-12-11 00:44 (UTC)

https://pdfcpu.io/;y

"Upstream URL:" needs to be changed from

http://pdfcpu.io/

to

https://pdfcpu.io/