You are not logged in.
Hello I want to install cups-pdf with different names.
Each Cups pdf Printer should get a different name and a different postprocessing Rule.
First I get the src with:
yaourt -G <package>
cd <package>
makepkg -sr --nobuild
How can I build and install the package
Offline
Is this a trick question, what do you think --nobuild does? What would happen if you ran makepkg without that flag?
https://man.archlinux.org/man/core/pacman/makepkg.8.en
https://wiki.archlinux.org/title/Makepkg
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
To get a "new" pdf Printer with a different Name.
I should now edit cups-pdf.h
#define CPCONFIG "/etc/cups/cups-pdf.conf"
in
e.g.
#define CPCONFIG "/etc/cups/cups-pdf-name2.conf"
Now I get a cups-pdf-name2 Printer with a different /etc/cups/cups-pdf-name2.conf .
Now I can define a different postprocessing Rule for each (cups-pdf) Printer
Offline
I think
yay -G <package>
cd <package>
makepkg -sr --nobuild
and then only a
makepkg -e -f
makepkg --install
makepkg --clean
?
Please take a look here:
https://www.cups-pdf.de/documentation.shtml
Last edited by tinitus (2024-02-20 16:54:05)
Offline
Think again.
What does "-r" do? Does that make any sense along "--nobuild"?
Do you think you should prevent another step in the second pass?
Hint: https://man.archlinux.org/man/core/pacm … en#OPTIONS actually points that out.
And don't use yaourt for crying out loud - it's bitrotting since years.
Offline
It works.
But how can I choose a different Name for the Package.
e.g. cups-pdf-1
Edit: I edit my Post over there
Last edited by tinitus (2024-02-20 16:54:50)
Offline
But how can I choose a different Name for the Package.
1. Why?
2. In the PKGBUILD
3. But why?
Offline
To get a different name for the bin File?
Offline
The package name has no influence on the name of any packaged file.
You'll have to adjust the makefile or the install routine (renaming the built binary while installing it into usr/bin)
Offline
The post processing binary can be anything. Can it not determine any differences from its inherited environment to perform different actions? Long term I thought all printer driver support was being removed from CUPS?
Offline
But I need several pdf Printer with postprocessing
and one without.
Offline
But I need several pdf Printer with postprocessing
and one without.
If the binary (think wrapper) can determine what printer/class it was called for then it can use that information to select what post processing if any to apply.
Offline
I didn't really pay attention to the OP and just jumped onto the immediate question, but this looks like a giant https://en.wikipedia.org/wiki/XY_problem
You can add printers that have eg. "cups-pdf:/inverted" instead of "cups-pdf:/" as uri and that will read the config from /etc/cups/cups-pdf-inverted.conf
Offline
And how can I do that?
Install a "cups-pdf:/inverted" instead of "cups-pdf:/" that will use a different config?
I have no idea. Sorry....
In the cups binary is the location of config defined in
cups-pdf.h
/* User-customizable settings - if unsure leave the default values
/ they are reasonable for most systems. */
/* location of the configuration file */
#define CP_CONFIG_PATH "/etc/cups"
Offline
lpadmin -p PDF_inverted -E -v cups-pdf:/inverted -P /usr/share/cups/model/CUPS-PDF_opt.ppd
idk how that's supposed to be tied in the future "IPP everywhere only" approach, right now, cups-pdf might even be required to get IPPE working - so don't freak out about the warning.
Offline
Then should the Name of the config File:
cups-pdf_inverted.conf
Right?
Edit1:
the config Name should be: cups-pdf-inverted.conf.
Then it works! Great thanks so much!
Last edited by tinitus (2024-02-21 13:08:43)
Offline
You can add printers that have eg. "cups-pdf:/inverted" instead of "cups-pdf:/" as uri and that will read the config from /etc/cups/cups-pdf-inverted.conf
The "-p" parameter is a human readable name, the uri is the relevant bit and the dash separation part of the cups-pdf code
Offline