Do you have several Antergos machines, but their apps are not the same?
Would you like to to have the same apps on all your machines? Including virtual machines?
So you find it hard to have your favorite apps easily installed?
There’s an answer: meta packages!
Meta packages are simple definitions of a list of packages. They are easy to create, mainly list the apps you’d like to install in a PKGBUILD file and create a meta package with a single command.
The PKGBUILD file is very simple a bash file with a certain format. The following example shows what you need to write in your PKGBUILD file:
# Contents of a PKGBUILD example file. # Comments start with a '#' character (and end on the same line). pkgname=my-meta-package # give a desired name here pkgver=1.0 # version info pkgrel=1 # additional version info pkgdesc='My meta package' # simple description url='http://www.antergos.com' # give a web address arch=('any') # architecture, 'any' will do license=('GPL3') depends=( # Here's YOUR list of apps! This is just an example. # Useful stuff atril audacity avidemux-qt clamav code diffuse dkms emacs encfs gufw gparted kaffeine linux-headers linux-lts linux-lts-headers meld qterminal rcs simple-scan solaar terminator thunderbird unison yay # The following apps are from my repos. # antergos-maur bashdb ccrypt inxi # antergos-mup downgrade dropbox-latest yad # antergos-m antergos-customcfg remirror )
Note that the PKGBUILD above may not be directly suitable for you, so modify it as you wish.
When you have a great PKGBUILD file, you can make it a package with this terminal command:
You need to be in the same directory as the PKGBUILD file.
Note that when running makepkg you probably get (many) error messages like:
$ LANG=C makepkg ==> Making package: my-meta-package 1.0-1 (Sun May 12 21:56:57 2019) ==> Checking runtime dependencies... ==> Missing dependencies: -> atril ==> Checking buildtime dependencies... ==> ERROR: Could not resolve all dependencies.
That simpy says you haven’t installed those packages yet. To solve it, install the missing dependencies (or modify your PKGBUILD!) and try again.
When makepkg finishes successfully, you have the meta package:
If you have only
you can create the final package with command
Once you have the meta package, you can install it with
sudo pacman -U /path/to/my-meta-package-1.0-1-any.pkg.tar.xz
on any Antergos machine you have. It will install the depedencies (= your apps!) too, if not yet installed.
Tip: note that you can create many different meta packages for different purposes. Simply copy the PKGUILD file to a different folder, change the pkgname and modify the apps list.