Skip to content

Making a PKGBUILD for my printer drivers; how to combine files from two different debs?

I've never written my own PKGBUILD before, and I'm following this guide: https://wiki.archlinux.org/index.php/Packaging_Brother_printer_drivers

I have two working packages for the LPR filter and another for the CUPS PPD, just like the guide (I'm using .deb source files to extract from). In each package, I have a package() method that looks something like this:

package() {
  tar -xf data.tar.gz -C "${pkgdir}"
  mkdir -p "${pkgdir}/usr/lib/cups/filter/"
  ln -s "/opt/brother/Printers/mfcj835dw/lpd/filtermfcj835dw" "${pkgdir}/usr/lib/cups/filter/brother_lpdwrapper_mfcj835dw"
}

There must be some magic before package() runs that takes the content from the .deb file so that data.tar.gz exists. I'd like to combine my two PKGBUILDs into a single one, since both the LPR filter and the PPD are needed. However, since I have two .deb files, the second data.tar.gz is going to clobber the first tone.

How would I run this `tar -xf` command twice, one for each .deb so that I can get the contents of both .debs?

3 points2 comments
Open on Reddit
About this post
Posted
Archived
Score
3 · 100% up
Kind
Text
ID
cuwisc

Author

28
posts
129
comments
0
media
View profile

2 comments

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.