[aur-general] Package Review

Eli Schwartz eschwartz at archlinux.org
Mon Jan 8 00:35:20 UTC 2018


On 01/07/2018 07:11 PM, Joaquin Garmendia Cabrera wrote:
> I just updated the pkgbuild following your recommendations. I just have a
> question: Why not to put `autoreconf -fi` and `configure --prefix=/usr`
> under prepare() function?
> 
> Thanks for your time!,
> Joaquin

Strictly speaking, the prepare() function is meant to perform final
changes to the source code in order to get it ready for building. This
includes things like applying patches or sed commands, as well as
autoreconf as autoreconf is used to create "dist" tarballs. It copies
various m4 macros into the source tree, and generates the ./configure
script as well as various other bits and pieces of an autotools system,
and the final result is a source tree that is ready for distribution as
"ready to build", since it has no need of external tools like aclocal,
autoconf, autoheader, automake etc.

In comparison, ./configure is where the packaging starts. You use
./configure to specify things for *your* specific build, e.g. the
--prefix, enabling and disabling optional features, toggling out-of-tree
builds.

Semantically, autoreconf/autogen.sh are very much preparatory tools,
whereas /.configure is very much a build tool. I like to be exact about
things like this.

-- 
Eli Schwartz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20180107/caceef14/attachment.asc>


More information about the aur-general mailing list