You are not logged in.

#1 2024-02-20 16:03:01

tinitus
Member
Registered: 2024-02-20
Posts: 10

How can I build a Package manually? (cups-pdf)

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

#2 2024-02-20 16:12:00

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,899
Website

Re: How can I build a Package manually? (cups-pdf)

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

#3 2024-02-20 16:20:21

tinitus
Member
Registered: 2024-02-20
Posts: 10

Re: How can I build a Package manually? (cups-pdf)

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

#4 2024-02-20 16:22:31

tinitus
Member
Registered: 2024-02-20
Posts: 10

Re: How can I build a Package manually? (cups-pdf)

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

#5 2024-02-20 16:51:13

seth
Member
Registered: 2012-09-03
Posts: 51,679

Re: How can I build a Package manually? (cups-pdf)

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

#6 2024-02-20 16:51:27

tinitus
Member
Registered: 2024-02-20
Posts: 10

Re: How can I build a Package manually? (cups-pdf)

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

#7 2024-02-20 17:08:47

seth
Member
Registered: 2012-09-03
Posts: 51,679

Re: How can I build a Package manually? (cups-pdf)

But how can I choose a different Name for the Package.

1. Why?
2. In the PKGBUILD
3. But why?

Offline

#8 2024-02-20 17:34:56

tinitus
Member
Registered: 2024-02-20
Posts: 10

Re: How can I build a Package manually? (cups-pdf)

To get a different name for the bin File?

Offline

#9 2024-02-20 18:07:15

seth
Member
Registered: 2012-09-03
Posts: 51,679

Re: How can I build a Package manually? (cups-pdf)

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

#10 2024-02-20 18:46:07

loqs
Member
Registered: 2014-03-06
Posts: 17,438

Re: How can I build a Package manually? (cups-pdf)

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

#11 2024-02-20 18:50:45

tinitus
Member
Registered: 2024-02-20
Posts: 10

Re: How can I build a Package manually? (cups-pdf)

But I need several pdf Printer with postprocessing
and one without.

Offline

#12 2024-02-20 19:46:36

loqs
Member
Registered: 2014-03-06
Posts: 17,438

Re: How can I build a Package manually? (cups-pdf)

tinitus wrote:

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

#13 2024-02-20 20:23:50

seth
Member
Registered: 2012-09-03
Posts: 51,679

Re: How can I build a Package manually? (cups-pdf)

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

#14 2024-02-21 11:11:28

tinitus
Member
Registered: 2024-02-20
Posts: 10

Re: How can I build a Package manually? (cups-pdf)

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

#15 2024-02-21 12:47:26

seth
Member
Registered: 2012-09-03
Posts: 51,679

Re: How can I build a Package manually? (cups-pdf)

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

#16 2024-02-21 12:55:22

tinitus
Member
Registered: 2024-02-20
Posts: 10

Re: How can I build a Package manually? (cups-pdf)

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

#17 2024-02-21 13:00:17

seth
Member
Registered: 2012-09-03
Posts: 51,679

Re: How can I build a Package manually? (cups-pdf)

seth wrote:

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

Board footer

Powered by FluxBB