APKBUILD examples:Special Subpackages Doc

From Alpine Linux
Revision as of 09:14, 24 June 2018 by Ty99 (talk | contribs) (Fixed dead link to PHP APKBUILD)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Sometimes there is a large amount of documentation files in the source available. If you want to ship these files in a -doc packages the snippet below can help you. Packaging only a license file and be done as described here.

doc() {
	# Man pages
	mkdir -p "$subpkgdir"/usr/share/man || return 1
	mv "$pkgdir"/usr/share/man/man* "$subpkgdir"/usr/share/man/ \
		|| return 1

	# Doc files
	_docs="CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS \
	README.EXTENSIONS README.EXT_SKEL README.MAILINGLIST_RULES \
	TODO-PHP5 UPGRADING UPGRADING.INTERNALS"
	for _doc in $_docs; do
		install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \
			"$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
	done
}

Source: PHP APKBUILD