Commit Graph

51 Commits

Author SHA1 Message Date
Allan McRae 2052f29cdb makepkg: add option to clear buildflags
Add the "buildflags" option, which is useful in its negative form
for disabling CFLAGS, CXXFLAGS and LDFLAGS when building a package.
This is useful when determining of one of these flags is causing
an issue with a package.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-29 19:28:33 -06:00
Allan McRae 0c29eb431a makepkg: Add check() function for running test suites
A PKGBUILD can have an option check() function for running test suites
between the build() and package() stages.  This function is run by
default but can be disabled globally in with "!check" in BUILDENV in
makepkg.conf. This setting can be controlled on an individual package
basis using makepkg's --check and --nocheck flags. Addition dependencies
needed for running the test suite can be specified in the checkdepends
array and are only checked when running the check() function.

Original-work-by: Jeff C <jeff@kcaccess.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-29 19:28:00 -06:00
Dan McGee 45146dccbb Merge branch 'maint' 2010-12-15 00:41:59 -06:00
Dan McGee ba45cb4590 doc/PKGBUILD: document that functions run in -e mode
Caught this noted on the forums, but it is definitely worth a note in the
manpage as well.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-13 22:36:10 -06:00
Dan McGee c5f6995aeb Fix manpage wrap not at 80 characters
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-13 22:35:24 -06:00
Dan McGee 42893e7165 Update documentation to reflect new epoch package variable
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13 23:29:26 -05:00
Andres P 3de32a0812 PKGBUILD.5: document illegal variable contents
Signed-off-by: Andres P <aepd87@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2010-08-23 21:50:20 -05:00
Dan McGee f03f09011f doc: fix up description of where example PKGBUILD is located
As Allan pointed out, this actually ships with pacman (at least with Arch)
and not necessarily with ABS or any other package. Also fix the language
dealing with the prototype install files.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-13 19:14:16 -05:00
Cedric Staniewski 4d2ec3751c makepkg: allow the use of only a package() function
For some packages, generally the 'any' arch ones, a build step is not
required and therefore can be skipped. In these cases, a package()
function without a build() one is sufficient.

As a side effect, this commit makes meta packages without any function
at all in the PKGBUILD possible.

Fixes FS#15147.

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-15 19:33:03 -06:00
Allan McRae c7e4d10df3 makepkg: allow overriding arch in split packages
This allows building a mixture of binary and arch=any packages.
Fixes FS#15955.

The value of CARCH is no longer overridden to "any" in when arch=any
is used and the assigning of the "any" arch is delayed to during the
packaging stage. Adjustments were required to fix installing and
checking for pre-built packages of varing arches.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-20 22:29:08 -05:00
Allan McRae 2020e6297b makepkg: allow overriding pkgver and pkgrel in split packages
Fixing a single package within a split package requires the overriding
or pkgrel.  In very rare (but existing) cases, it is useful to
override pkgver.  Partial fix for FS#15955.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-20 22:29:02 -05:00
Cedric Staniewski 2cabe336eb Introduce new PKGBUILD variable `changelog`
Currently, a changelog is added to a package if a specific file with a
hardcoded name exists in the PKGBUILD's directory. This approach is not
pretty and also inconsistent with the handling of install files, but it
works.

With the introduction of split PKGBUILDs, however, a drawback in this
old behavior has arisen: you only have the possibility to include one
specific changelog file in either every package defined in the PKGBUILD
or in none.

The use of an additional variable, `changelog`, works around this issue
and makes it possible to include a changelog in only some of the
packages, and besides, each package of the PKGBUILD can have its own
changelog file.

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 22:35:20 -05:00
Dan McGee cd5b029e93 Merge branch 'maint' 2009-09-07 15:17:47 -05:00
Xavier Chantry 2e7c569950 Update doc and vim syntax for arch=any
This fixes FS#15870

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-07 15:13:38 -05:00
Xavier Chantry 0845b2f13c sanity check for optdepends syntax
only allow optdepends like:
pkgname: description

some (real) examples of invalid optdepends:
 'tcl, python and/or ruby: to use corresponding binding'
 'xorg-fonts-75dpi : X bitmap fonts needed for the interface'
 'ruby-htmlentities (AUR): for one provider named Deastore'
 'xpdf - for pdf'

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
[Allan: rebase off de39a1f6 and adjust man page]
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06 16:52:47 -05:00
Allan McRae b3a5535360 Fix typos in PKGBUILD man page
Original-patch-by: Jason Ribeiro
Signed-off-by: Allan McRae <allan@archlinux.org>
2009-06-21 20:00:00 +10:00
Allan McRae 5e32928a42 makepkg: Document package splitting
Signed-off-by: Allan McRae <allan@archlinux.org>
2009-05-14 16:30:02 +10:00
Dan McGee e37ecbe8a4 Fix asciidoc formatting warnings and issues
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 11:14:28 -05:00
Dan McGee 1c4633ea2c Merge branch 'maint' 2009-02-18 21:20:17 -06:00
Dan McGee 48b209d612 Rework optdepends documentation for clarity
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-17 16:58:33 -06:00
Allan McRae 08034ceb17 makepkg: add optional package function
This patch allows us to split the building and packaging stages of
a PKGBUILD and minimize fakeroot usage. This can be done with less
code duplication (run_build and run_package look quite similiar) but
the run_package function will be where the package splitting logic
is implemented in the future.

Signed-off-by: Allan McRae <allan@archlinux.org>
2009-01-16 22:20:05 +10:00
Dan McGee f8b689d48e Merge branch 'maint'
Conflicts:
	lib/libalpm/dload.c
	po/it.po
	scripts/makepkg.sh.in
2009-01-02 22:48:52 -06:00
Xavier Chantry bd2de5cdf6 Fix asciidoc manpage creation.
As reported here, man pages could no longer be built :
http://archlinux.org/pipermail/pacman-dev/2008-December/007726.html

I found the explanation here :
http://www.methods.co.nz/asciidoc/source-highlight-filter.html

"If you use a2x(1) to generate PDF you need to include the --no-xmllint
option to suppress xmllint(1) checking — the programlisting language
attribute (required by the dblatex source highlighter) is not part of the
DocBook 4 specification (but it is in the newer DocBook 5 specification)."

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-02 22:46:47 -06:00
Allan McRae 2f59996c54 makepkg: detect incorrect usage of provides array
Using > or < in the provides array is wrong so make it cause an error.
Fixes FS#12540.

Also, use bash substitution rather than spawning new processes where
possible in the error checking.  Move split package detection to a
better position.

Signed-off-by: Allan McRae <allan@archlinux.org>
[Dan: backport to maint]
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-02 22:46:47 -06:00
Dan McGee bd628274cc Merge branch 'maint' 2008-12-07 22:12:17 -06:00
Dan McGee 78cf32e194 Small documentation updates for clarity
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-12-07 22:09:24 -06:00
Dan McGee 1c47500ea6 Merge branch 'maint' 2008-08-26 20:11:25 -05:00
Xavier Chantry d6f62ba22d makepkg : allow to specify a download filename
A source entry can now have the following form, to specify a different
filename :
"filename::http://path/to/file"

Of course, the old syntax is still supported :
"http://path/to/file"

And as before, in the second case, the filename used is simply "file".

This fixes FS#11292, because handling multiple source files with the same
name is now possible (just choose a different filename).

But it will also allow to deal much more nicely with funny url like this by
using a sane filename (and unfortunately, there are quite a few) :
http://www.vim.org/scripts/download_script.php?src_id=6992

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-25 18:23:05 -05:00
Allan McRae 7865fb9af4 Treat info pages like man pages
As far a package building is concerned, info pages need to be treated
in the same fashion as man pages in that they both can be compressed.
This separates them from other forms of documentation and so it makes
sense to make that distinction within makepkg.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-23 09:20:51 -05:00
Dan McGee 7edb2e5b0d Add information on version comparison to manpages
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-19 19:28:56 -05:00
Dan McGee d594b6e797 Merge branch 'maint' 2008-06-19 08:51:36 -05:00
Dan McGee 2158b8e298 Expand PKGBUILD documentation
Add documentation for $startdir, $srcdir, and $pkgdir variables, as well as
general information about the build() function and about custom variables
in PKGBUILDs. This addresses FS#10634.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-14 12:00:43 -05:00
Dan McGee 0fc538fcdb Various updates needed prior to a new release
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-08 13:50:01 -05:00
Chantry Xavier dae3f9deef Add zipman makepkg option.
All other steps in tidy_install function were already controlled by an
option in makepkg.conf, so this patch adds an option for the man page
compression step too.
This will allow to keep man pages uncompressed, which is required for some
special meta man page, like the zshall one (see FS#4580).

Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011472.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-16 23:22:17 +01:00
Chantry Xavier 0c5b68877b Change the versioned provision format.
Change the 'provname provver' format to 'provname=provver'.
In .PKGINFO, the provisions are copied from the PKGBUILD without quotes. So
the provision version was actually handled as a different provision...

See FS#9171.

Dan: Unfortunately we have to change our original specification for
versioned provisions with this patch, but it ends up being the simpler and
cleaner solution in the long run, and if there is any time to change it the
time is now before many packages have been built. Keeping the ' ' based
format would have required us to do special parsing in repo-add, as well as
being susceptible to users not using quotes in their provides array.

Hopefully this will resolve the issues we had with our initial plan. Sorry
for the confusion.

Acked-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-14 22:03:03 -06:00
Chantry Xavier 3de2147376 Fix cvsmod typo in PKGBUILD man page.
Fixes FS#9175.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-13 12:19:10 -06:00
Dan McGee 71ca587f2a doc: add info about optdepends
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-10 22:58:20 -06:00
Dan McGee b3c6bdda38 doc: rename manlink macro to linkman
Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock
Asciidoc configuration:

@@ -149,7 +153,10 @@
 # Inline macros.
 # Backslash prefix required for escape processing.
 # (?s) re flag for line spanning.
-(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
+# Explicit so they can be nested.
+(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
 # Anchor: [[[id]]]. Bibliographic anchor.
 (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
 # Anchor: [[id,xreflabel]]

This default regex now matches explicit values, and unfortunately in this
case manlink was being matched by just 'link', causing the wrong inline
macro template to be applied. By renaming the macro, we can avoid being
matched by the wrong regex.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-29 00:24:15 -06:00
Dan McGee 8e53cea8f8 Update PKGBUILD manpage to give info on scriptlet arguments
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-19 23:41:17 -06:00
Nagy Gabor b06ce1e8ad Add PM_DEP_MOD_GT and PM_DEP_MOD_LT to documentation
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-19 14:48:10 -06:00
Dan McGee bd83a1fd85 Updates to PKGBUILD manpage
Make the manpage a little more distro agnostic by referring to ABS in the
context of Arch Linux, and saying that prototype files are also available
with the pacman source.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10 21:14:55 -06:00
Dan McGee 3e9c590480 doc: use source highlighter on PKGBUILD guide, update wrong example text
Note that if you are building manpages with asciidoc now, you must also
have source-highlight installed for it to correctly generate everything.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-20 23:40:20 -06:00
Chantry Xavier 967a78f5e4 Update PKGBUILD manpage with versioned conflicts.
As the b96922679e commit showed with two
pactests (which were renamed to depconflict110/111), versioned conflicts are
now possible.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-20 23:31:40 -06:00
Nagy Gabor 84ebf82319 Versioned provisions.
This patch introduces versioned provisions in "provision 1.0-1" format.
_alpm_db_whatprovides was modified accordingly (added sync500.py),
alpm_depcmp was modified accordingly (add043.py passes now; added add044.py
and add045.py).

Notes:
alpm_db_search now uses the whole versioned %PROVIDES% string in its search.
debug logging was simplified in alpm_depcmp.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
[Xavier: fixed a few typos, duplicate const strings with strdup before
modifying them, put some debugging back in alpm_depcmp, minor code cleanups
(var/function renaming), added a note in PKGBUILD man page.]
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
[Dan: made strcmp checks clearer, added a comment]
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-18 20:05:51 -06:00
Dan McGee f3e8343c7e Update PKGBUILD.5 with missing devel variable descriptions
The lack of descriptions on some of the variables was causing issues with
documentation generation. Adding text to them fixes this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-08 09:33:05 -06:00
Scott Horowitz aea45a8b20 Small updates to documentation.
Signed-off-by: Scott Horowitz <stonecrest@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 22:47:48 -05:00
Dan McGee c9189f54cd Man page revision time
Spruce up the asciidoc formatting, fix a few issues that we had. Formatting
now looks pretty good in both the manpage output and the XHTML output.

Also added some options that we have changed since 3.0, and a few wording
updates, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-16 12:57:02 -04:00
Dan McGee e412ac19f5 Asciidoc updates- make it pretty, fix build, etc.
* Fix up the target so we rebuild the manpages when we edit the corresponding
  text file.
* Add vim modelines to all of the asciidoc files ensureing the right syntax
  highlighting is used and we have expandtabs turned off.
* Start making a few small changes to PKGBUILD.5 to make it pretty in both
  HTML and manpage format output.
* Fix the manlink macro to include the manpage section in the link.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-09 13:47:56 -04:00
Andrew Fyfe f1fac6abfb Update PKGBUILD example.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-07-09 13:47:56 -04:00
Andrew Fyfe ab87657b93 Add Synopsis section to man 5 pages.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-07-09 13:47:56 -04:00