[pacman-dev] [PATCH] makepkg: Document package splitting

Allan McRae allan at archlinux.org
Sun May 10 11:24:33 EDT 2009

Signed-off-by: Allan McRae <allan at archlinux.org>

This is a RFC patch. I would like comments on the documentation I have written.
I find it hard to write documentation for features I implemented as I know what I
am talking about, even if no-one else does...

(I haven't actually checked that the docs still build after these changes.)
 doc/PKGBUILD.5.txt    |   19 +++++++++++++++++++
 doc/makepkg.8.txt     |    6 +++---
 scripts/makepkg.sh.in |    2 +-
 3 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index e1ea632..e2f19ac 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -264,6 +264,25 @@ combination with the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakero
 usage will be limited to running the packaging stage. The build() function will be
 run as the user calling makepkg.
+Package Splitting
+makepkg supports building multiple packages from a single PKGBUILD. This is achieved
+by assigning an array of package names to the `pkgname` directive. Each sub-package
+uses a corresponding package function with name `package_foo()`, where `foo` is the
+name of the package.
+All options and directives for the split packages default to the global values given
+within the PKGBUILD. However, some of these can be overridden within each sub-package's
+package function. The following variables can be overridden: `pkgdesc`, `license`,
+`groups`, `depends`, `optdepends`, `provides`, `conflicts`, `replaces`, `backup`,
+`options` and `install`.
+An additional directive is available when building a split package:
+	The name used to refer to the group of packages in the output of makepkg.
+	Also, used when creating source-only tarballs.
 Install/Upgrade/Remove Scripting
 Pacman has the ability to store and execute a package-specific script when it
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
index fb2e805..e480d8e 100644
--- a/doc/makepkg.8.txt
+++ b/doc/makepkg.8.txt
@@ -122,9 +122,9 @@ Options
 	during dependency auto-resolution and installation when using `-s`.
 *-R, \--repackage*::
-	Repackage contents of pkg/ without rebuilding the package. This is
-	useful if you forgot a depend or install file in your PKGBUILD and the
-	build itself will not change.
+	Repackage contents of the package without rebuilding the package. This
+	is useful if you forgot a depend or install file in your PKGBUILD and
+	the build itself will not change.
 *-s, \--syncdeps*::
 	Install missing dependencies using pacman. When build-time or run-time
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index ebc19bc..fefcc73 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1308,7 +1308,7 @@ usage() {
 	printf "$(gettext "  -p <buildscript> Use an alternate build script (instead of '%s')")\n" "$BUILDSCRIPT"
 	echo "$(gettext "  -r, --rmdeps     Remove installed dependencies after a successful build")"
 	# fix flyspray feature request #2978
-	echo "$(gettext "  -R, --repackage  Repackage contents of pkg/ without building")"
+	echo "$(gettext "  -R, --repackage  Repackage contents of the package without rebuilding")"
 	echo "$(gettext "  -s, --syncdeps   Install missing dependencies with pacman")"
 	echo "$(gettext "      --allsource  Generate a source-only tarball including downloaded sources")"
 	echo "$(gettext "      --asroot     Allow makepkg to run as root user")"

More information about the pacman-dev mailing list