Home | News | Download | Packages | Forum | Wiki | Github

[Solved] Template for debian package


Hello, I want to install a sofware for which a debian package is available: it’s pdfstudio. At the moment it’s what I have:

# Template file for 'pdfstudio'
#only_for_archs="i686 x86_64"
#make_dirs="/var/log/dir 0755 root root"
short_desc="Review, annotate, and edit PDF Documents"

    ar vx PDFStudio_v12_0_0_linux64.deb
    tar xvzf data.tar.gz
    rm -rf opt/pdfstudio12/jre
    vcopy opt/* opt/

Basically I have to unpack the deb package and to remove the java virtual machine to use the installed one (I’ll add the denpendency later). I don’t knwo if I’m on the right way at the moment. I used instead of “vcopy opt/* opt/” the function vmove, but it didn’t work. At the moment the package is created, it’s size is bigger than 0 but when I installed it, I get the following:

Name      Action    Version           New version            Download size
pdfstudio install   -                 12.0.0_1               - 

Free space on disk:             45GB

Do you want to continue? [Y/n] y

[*] Downloading binary packages

[*] Verifying package integrity
pdfstudio-12.0.0_1: verifying SHA256 hash...
ERROR: pdfstudio-12.0.0_1: SHA256 hash is not valid: Numerical result out of range

It seems that it’s empty and the SHA hash is wrong. But I was able to create the package. What’s wrong here ?

Thank you!

 do_extract() {
         ar vx ${XBPS_SRCDISTDIR}/${pkgname}-${version}/PDFStudio_v12_0_0_linux64.deb
         tar xvzf data.tar.gz -C ${DESTDIR}
         rm -rf ${DESTDIR}/opt/pdfstudio12/jre


Thank you, the package builds now without problem. But I can’t install it. I have always the second problem: the sha256 is not valid. I have tried to display debug information or to be more verbose, but it doesn’t help.

Here is the command I use to install the package:

sudo xbps-install --repository=hostdir/binpkgs/myrepo pdfstudio


Add only_for_archs="x86_64" line to your template. This won’t let xbps-src build this package for i686.
Also add this to your do_install():
vmkdir /usr/bin ln -s /opt/pdfstudio12/pdfstudio12 "${DESTDIR}/usr/bin/pdfstudio"
This will allow starting pdfstudio from command line.


Ok, at the end it worked… but I still don’t know why. I did the following: I created one package for some scripts named “wmutils-perso”. Now when a package is created, it is put in hostdir/binpks/wmutils-perso. That folder contains a file name x86_64-repodata. I thought the SHA256 was perhaps saved for wmutils-perso so I deleted the folder wmutis-perso. Now I can build the package and there is no problem. I also can install it without a problem.

I tried to rebuild another package and I noticed I had again the same error about the wrong sha256 sum. Do I have to put each package in separate repository ? Or is the problem something else ?


If you built it before with the same version and revision you have to build with xbps-src -f pkg ..., otherwise the existing package will not be overwritten.


It was probably the problem. Thank you for all your help!