Commit Graph

48 Commits

Author SHA1 Message Date
Yann E. MORIN
56eb3944d5 Makefile: support running graph-depends from out-of-tree
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-09 21:16:30 +01:00
Yann E. MORIN
f1fedbb246 graphs: support generating png graphs
PDF files can not be easily embedded in other documents (eg. ODT, or HTML).

Add support for generating PNG graphs, by setting the GRAPH_OUT=pdf|png on
the command line:
    make GRAPH_OUT=png graph-build graph-depends

The default is still to generate PDF graphs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-12-29 12:13:25 +01:00
Yann E. MORIN
0cfe3ab88c Makefile: expose 'graph-depends' to generate a graph of the dependency tree
Generate the graph of the complete dependency tree by calling:
    make graph-depends

It's also possible to generate the graph-depends for a single package:
    make PKG-graph-depends

The graphs are generated in $(O)/graphs/

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-12-29 12:13:19 +01:00
Ryan Barnett
bc4f79d665 Support for multiple BR2_GLOBAL_PATCH_DIR
Adding support for specifying multiple directories in
BR2_GLOBAL_PATCH_DIR. This will allow for a layered approach for the
patching of a package.

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-12-25 17:31:10 +01:00
Peter Korsgaard
9e8015d465 pkg-generic.mk: handle packages under toolchain
E.G. for toolchain-buildroot / toolchain-external. Now these packages are
correctly handled by make source / external-deps.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-16 15:58:36 +01:00
Thomas De Schampheleire
47e82829c2 infra: remove package clean commands
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-08 19:42:14 +01:00
Thomas De Schampheleire
b64273db75 infra: remove uninstall commands
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-06 09:40:24 +01:00
Thomas De Schampheleire
858334c202 legal info: split sources for host and target
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-17 09:15:09 +01:00
Thomas De Schampheleire
366f17f747 legal info: split license texts for host and target
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-17 09:15:04 +01:00
Thomas De Schampheleire
cc4f34ddd4 legal info: split manifest for host and target
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-17 09:14:51 +01:00
Yann E. MORIN
2522fa8ed7 pkg-infra: add user-supplied step-hooks
Allow user to supply their own step-hooks by passing a variable
on the make command-line:
    make BR2_INSTRUMENTATION_SCRIPTS=/path/to/my/script

This can be useful to run site-specific actions at each step of the
build process, such as logging installed, removed or modified files,
do sanity checks on installed files...

It is possible to call more than one script, by passing a space-separated
lists of scripts to call.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-13 00:27:26 +01:00
Yann E. MORIN
17d4eb1e02 pkg-infra: add hook to log timing of steps
The timing information is stored in the file $(O)/build-time.log

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-13 00:26:27 +01:00
Yann E. MORIN
acd394ae0c pkg-infra: introduce pre/post-step hooks
This hooks will let us instrument the build process in many ways:
  - log current step to see what broke
  - time each step to see what is worth optimising
  - sanity-check installed files (rpath, overwritten files...)
  - call user-provided script
  - ...

The steps are coarse-grain, and all have a 'start' and a 'end' hooks.
Here is the list of available steps (8 total):
  - extract
  - patch
  - configure
  - build
  - install-host
  - install-staging
  - install-image
  - install-target

The download, clean and uninstall steps are not instrumented on purpose.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-13 00:25:51 +01:00
Thomas De Schampheleire
003d38da3a legal info: fix saving of host package licenses
Due to some tricky make behavior, the license texts of host packages that
did not provide an explicit HOST_FOO_LICENSE_FILES definition was not saved.
The problem is that it is not straightforward to use a variable
defined/updated inside an evaluated block as input to a foreach statement.
If you try to use $(FOO) then only the original value of FOO is used for
foreach, any update inside the block is ignored. However, if you use
$$(FOO), the entire contents of FOO (typically a list of items) is passed
as one item to foreach, thus causing just one iteration instead of several.

>From Arnout Vandecapelle's explanation:
Any variable referenced with a single $ inside the inner-generic-package
macro is expanded before the resulting contents are eval'ed. Therefore, it
is not possible to refer to variables defined by the inner-generic-package
macro from within a single-$ function call.

To fix the problem, one should defer the evaluation of the entire block
using double dollar signs.

Additionally, a few empty lines have been added to the legal-info-foo block
for clarity.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-12 23:20:37 +01:00
Thomas De Schampheleire
b40341e14a infra: clean up 'Patching' message
The 'Patching' message in the generic infrastructure prints not only the
package name, but also a reference to the assumed package directory, based
on FOO_DIR_PREFIX/FOO_RAWNAME. This doesn't really add value, as the name
of the package is already apparent from the message and its location should
be obvious. Hence, this patch simply reduces the print to "Patching".

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:15:01 +01:00
Thomas De Schampheleire
9e7e9b2150 infra: remove incorrect default for FOO_DIR_PREFIX
Variable FOO_DIR_PREFIX is populated from pkgparentdir by the various
package infrastructures. However, if that would be empty (which in fact is
the case for the linux package), FOO_DIR_PREFIX would be set to
'$(TOP_SRCDIR)/package'.
Not only does this make no sense (LINUX_DIR_PREFIX becomes /package/linux,
and for all other packages pkgparentdir is not-empty anyway), but it is also
using a non-existing variable TOP_SRCDIR.
This patch therefore removes the incorrect default.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:14:36 +01:00
Thomas De Schampheleire
7ad286563e infra: centralize rsync exclude list for VCS files
Buildroot has three places where rsync is used:
1. to copy the target skeleton
2. to copy the rootfs overlay(s)
3. to copy overridden package sources

In all of these cases, we want to exclude version control files by default.
Place 1 and 2 used an identical set of explicit --exclude options, while
place 3 used the option --cvs-exclude. This last option, however, not only
excludes version control files, but also binary files (.o, .so) and any file
or directory named 'core' (a problem for the linux kernel that has several
directories with this name). Moreover, the exact list of excluded files when
using --cvs-exclude depends on the version of rsync.

This patch creates one global variable RSYNC_VCS_EXCLUSIONS that can be used
by the various rsync commands. It excludes the version control files of
svn, git, hg, cvs and bzr.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:10:58 +01:00
Thomas De Schampheleire
e8ab39a7b5 infra: Add POST_RSYNC_HOOKS support
One of the use cases is for the 'local packages' to restore
the SCM info.  Some packages use this information to generate
version info during build time.  In this case, the local package
can have this hook to restore it by symbolic link for example.

[Thomas: update commit title]
Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:10:45 +01:00
Thomas Petazzoni
86e61d2050 package: fix 'local' site method for host packages
Using the 'local' site method works just fine for target
packages. However, for host packages, when HOST_<pkg>_SITE is
automatically defined by the package infrastructure to be equal to
<pkg>_SITE, when defining the <pkg>_OVERRIDE_SRCDIR, the $($(2)_SITE)
is empty, due to a missing additional dollar sign.

This patch ensures that the <pkg>_OVERRIDE_SRCDIR gets the correct
value, regardless of whether the HOST_<pkg>_SITE variable has been
defined by the package itself, or inferred by the package
infrastructure using the <pkg>_SITE value.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reported-by: http://stackoverflow.com/questions/19311747/buildroot-cant-use-local-site-method-for-custom-host-packages
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-14 21:58:03 +02:00
Thomas Petazzoni
2c13d5bc60 package: add a <pkg>_EXTRA_DOWNLOADS variable
Converting the external toolchain logic into a package raises a very
special use case that wasn't handled by the package infrastructure:
the Blackfin toolchain is delivered as two tarballs instead of
one. Unfortunately <pkg>_SOURCE only allows to pass one tarball name.

However, we really want both tarballs to be known by the package
infrastructure, so that the normal 'source' and 'external-deps'
mechanism work fine.

In order to achieve this, we add a <pkg>_EXTRA_DOWNLOADS variable,
which allows a package to list other stuff it would like to see
downloaded, but that are otherwise not used by the package
infrastructure itself: it is up to the package to do it by itself.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-08 22:58:49 +02:00
Gustavo Zacarias
15eb1fafa3 downloads: add basic CVS support
The support is for pserver mode anonymous CVS.
source-check is based on login since many servers don't support or have
ls/rls disabled.

Usage is pretty straightforward.
PKG_SITE defines the site hostname and remote directory.
The module is defined by the bare package name.
Version is date based.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-13 00:05:43 +02:00
Jérôme Pouiller
3e2d828c0a Add support for plain URL in $(PKG)_PATCH variable
Until now, $(PKG)_PATCH allow only to download patches from same URL than tarball.
This patch allow to detect when plain URL are used in $(PKG)_PATCH and correctly
handle them.

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-06 23:54:18 +02:00
Thomas De Schampheleire
d1f325f554 xzcat: treat as host prerequisite and build if needed
If xzcat is not present on the host system, buildroot bails out early asking
the developer to install it (xzcat is now a DL_TOOLS_DEPENDENCY)
Conversely, when BR2_TARGET_ROOTFS_CPIO_XZ is enabled, then host-xz is a
build dependency, and no manual action is required from the developer.

Because the second approach is nicer, also build host-xz when xzcat is not
available, using the host-prerequisite and suitable-host-pkg mechanisms,
already used for tar.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-06 23:30:36 +02:00
Thomas De Schampheleire
f8d89f0510 infra: introduce suitable-extractor helper function
In order to simplify determining the right extractor tool for a given
file type, this patch introduces a make function 'suitable-extractor'.
Its usage is $(call suitable-extractor,filename), and it returns the
path to the suitable extractor.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-06 23:30:27 +02:00
Jérôme Pouiller
7a1aa34235 package: make *-rebuild and *-reconfigure only rebuild the given package
Originally, the <pkg>-rebuild and <pkg>-reconfigure targets were meant
to restart the build of the package from a given step (build for
<pkg>-rebuild and configure for <pkg>-reconfigure) and then re-create
the entire root filesystem.

However, further discussion from the community has shown that this is
not really the desired behavior: we instead want <pkg>-rebuild and
<pkg>-reconfigure to only take care of rebuilding the given package,
and not the entire root filesystem.

People willing to rebuild this package and the root filesystem can do:

       make <pkg>-rebuild all

[Thomas P: rewrite commit log, since it's not fixing a bug, but
instead changing what was an intended behavior. ]

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-08-13 12:04:55 +02:00
Thomas De Schampheleire
720ca65ce8 trivial: use geturischeme helper function where possible
pkg-download.mk contains some helper functions to obtain subparts of URLs,
like the URI scheme. In pkg-generic.mk, there is still one opportunity to use
that helper function, instead of hardcoding it.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-22 00:12:00 +02:00
Thomas Petazzoni
12d1aa4b69 Remove BR2_HAVE_DEVFILES
This finally removes the BR2_HAVE_DEVFILES option, that was used to
install/keep development files on target. With the recent migration of
the internal backend to the package infrastructure, we had anyway lost
the ability to build gcc for the target, and install the uClibc
development files on the target.

[Peter: also remove support/scripts/copy.sh]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-04 09:06:33 +02:00
Luca Ceresoli
376c3aad61 legal-info: fail trying to copy a non-existent license file
If a package's _LICENSE_FILES contains the name of a non-existent file,
the make process would continue and return true, unless the
non-existent file is the last listed.

Fix this wrong beaviour by failing with an error when any of the listed
files is missing.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-14 17:17:09 +02:00
Yann E. MORIN
1f3af04db7 packages: add ability for packages to create users
Packages that install daemons may need those daemons to run as a non-root,
or an otherwise non-system (eg. 'daemon'), user.

Add infrastructure for packages to create users, by declaring the FOO_USERS
variable that contain a makedev-syntax-like description of the user(s) to
add.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Samuel Martin <s.martin49@gmail.com>
Cc: Cam Hutchison <camh@xdna.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-25 22:56:42 +02:00
Shawn J. Goff
1cbffbd015 eliminate double slashes caused by FOO_SITE ending in a slash
When a FOO_SITE variable ends in a slash and gets joined with a
FOO_SOURCE variable like $(FOO_SITE)/$(FOO_SOURCE), the resulting URI
has a double slash. While double-slashes are fine in unix paths, they
are reserved in URIs - the part following '//' must be an authority.

Signed-off-by: Shawn J. Goff <shawn7400@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-15 20:33:52 +02:00
Andreas Naumann
1539efc5d5 <pkg>-rsync: Reincluding core files and folders, which got kicked out by --cvs-exclude option.
The --cvs-exclude option also excludes 'core', which when rsyncing
e.g. a linux tree is less than optimal..

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-24 22:07:56 +01:00
Simon Dawson
5538e47662 rework patch model
At the Buildroot Developers Meeting (4-5 February 2013, in Brussels) a change
to the patch logic was discussed. See

http://elinux.org/Buildroot:DeveloperDaysFOSDEM2013

for details. In summary:

* For patches stored in the package directory, if
  package/<pkg>/<version>/ does exist, apply package/<pkg>/<version>/*.patch,
  otherwise, apply package/<pkg>/*.patch
* For patches stored in the global patches directory, if
  $(GLOBAL_PATCH_DIR)/<pkg>/<version>/ does exist, apply
  $(GLOBAL_PATCH_DIR)/<pkg>/<version>/*.patch, otherwise, apply
  $(GLOBAL_PATCH_DIR)/<pkg>/*.patch

This patch adds the new BR2_GLOBAL_PATCH_DIR configuration item, and reworks
the generic package infrastructure to implement the new patch logic.

[Peter: fixup doc nits as pointed out by Thomas]
Signed-off-by: Simon Dawson <spdawson@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-19 23:10:49 +01:00
Thomas De Schampheleire
3b681efa4c <pkg>-rsync: exclude version control files
When using rsync to import package sources (typically with
PKG_OVERRIDE_SRCDIR), it often happens that these external sources
are under version control, and contain directories like .git,
.hg, etc.

Depending on the project, these directories can become pretty large
and typically have a lot of files. Moreover, they are not necessary
in the context of building the package. Therefore, this commit adds
the --cvs-exclude option to the rsync call, saving both disk space
and sync time.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-17 14:40:23 +01:00
Thomas Petazzoni
580225af20 package: remove scripts listed in <pkg>_CONFIG_SCRIPTS from target
The <foo>-config scripts are useless on the target, since they are
only needed for development, so we remove them automatically.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: "Samuel Martin" <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-02-08 22:32:53 +01:00
Thomas Petazzoni
4705347ddf package: rename <pkg>_CONFIG_FIXUP to <pkg>_CONFIG_SCRIPTS
This commit renames the newly introduced <pkg>_CONFIG_FIXUP variable
to <pkg>_CONFIG_SCRIPTS, for two reasons:

 * <pkg>_CONFIG_SCRIPTS will not only "fixup" the scripts in
   $(STAGING_DIR)/usr/bin, but also remove them from
   $(TARGET_DIR)/usr/bin. So it is not only about doing a "fixup".

 * On the principle, it is strange that the variable carries an
   indication of the action that will take place on those files. It
   should rather be named to say "Here are the <foo>-config scripts",
   and let the package infrastructure decide if it should fix them up,
   remove them, etc.

This commit also updates the documentation accordingly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: "Samuel Martin" <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-02-08 22:31:49 +01:00
Stefan Fröberg
834f9311aa pkg-infra: add <pkg>_CONFIG_FIXUP to fix *-config files
This patch will add <pkg>_CONFIG_FIXUP variable to buildroot infra.

It's purpose is to inform buildroot that the package in question
contains some $(STAGING_DIR)/usr/bin/*-config files and that we
want to automatically fix prefixes of such files.

It is often the case that many packages call these
files during their configuration step to determine 3rd party
library package locations and any flags needed to link against them.

For example:
Some package might try to check the existense and linking flags
of NSPR package by calling $(STAGING_DIR)/usr/bin/nspr-config --prefix.
Without this fix. NSPR would return /usr/ as it's prefix which is
wrong when cross-compiling.
Correct would be $(STAGING_DIR)/usr.

All packages that have <pkg>_INSTALL_STAGING = YES defined and
also install some config file(s) into $(STAGING_DIR)/usr/bin must
hereafter also define <pkg>_CONFIG_FIXUP with the correspondig
filename(s).

For example:

DIVINE_CONFIG_FIXUP = divine-config

or for multiple files:

IMAGEMAGICK_CONFIG_FIXUP = Magick-config Wand-config

Signed-off-by: Stefan Fröberg <stefan.froberg@petroprogram.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-02-04 23:47:34 +01:00
Thomas Petazzoni
e260a2d9b3 package: support multiple patches
With this commit, we extend the behaviour of the <pkg>_PATCH variable
so that it now allows to list several patches to be downloaded and
applied, and no longer just one patch.

This will be useful for the elfutils package, and should anyway not
break the existing behaviour for packages using just one patch.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-01-07 21:30:56 +01:00
Arnout Vandecappelle (Essensium/Mind)
054f97e1f2 pkg-infra: add <pkg>-extract and <pkg>-patch targets to OVERRIDE support
The legal-info target (and possibly others as well) depends on
<pkg>-extract to make sure the license file is available.  However,
when <PKG>_OVERRIDE_SRCDIR is active, the <pkg>-extract target
doesn't exist.

To solve this, we add <pkg>-extract which depends on <pkg>-rsync.
While we're at it, we do the same for <pkg>-patch.  That avoids the
same problem in the future if something starts depending on
<pkg>-patch.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-12-06 17:13:57 -08:00
Stephan Hoffmann
7f77121fdd make legal-info: fails with OVERRIDE_SRCDIR
There is a check for OVERRIDE_SRCDIR in pkg-generic.mk that is
supposed to produce a warning when OVERRIDE_SRCDIR is active.
This does not work and instead the whole make terminates with
an error message.

This patch changes the check for active OVERRIDE_SRCDIR so that
it works as expected.

Signed-off-by: Stephan Hoffmann <sho@relinux.de>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-12-05 11:29:37 -08:00
Luca Ceresoli
7c992ac341 legal-info: split _LICENSE and _REDISTRIBUTE constants
Currently packages can be described in two ways: proprietary (tarball not
saved, license not described in further detail), and others (tarball
saved, license described).

Split the logic to allow the license to be always described whether or not
the source code can be redistributed.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-04 17:38:46 +01:00
Luca Ceresoli
c6917357ed legal-info: move $(2)_LICENSE to a proper line
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-04 17:25:10 +01:00
Luca Ceresoli
db961da67f legal-info: support per-package hooks
Useful to produce extra warnings for packages that have special
licensing-related issues.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-04 13:33:29 +01:00
Arnout Vandecappelle
79bfcd5560 pkg-infra: correct the source name for host-only packages
Host-only package that don't define their <PKG>_SOURCE variable would
default to host-<pkg>-<version>.tar.gz.  It's more logical to remove
the host- prefix in this case.

This problem is most apparent with host-only packages downloaded from
version control, because they never define <PKG>_SOURCE.

Reported by Thomas Petazzoni and initial analysis by Luca Ceresoli.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-10-15 10:21:33 +02:00
Thomas Petazzoni
cdfebcfca6 Remove BR2_SOURCEFORGE_MIRROR variable
Now that all packages have been converted to use the
downloads.sourceforge.net URLs that automatically selects an available
Sourceforge mirror, we can get rid of the BR2_SOURCEFORGE_MIRROR
configuration variable.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-08-29 01:04:58 +02:00
Maxime Ripard
c92aacd330 Rework of the init system
Since we have now two uncompatible init systems, and we want only one of
them at the same time in use in the rootfs, we need to select a
particular init system. This patch also adds $(PKG)_INSTALL_INIT_SYSTEMD
and $(PKG)_INSTALL_INIT_SYSV hooks that are called when the matching
init systems are selected to install properly the init scripts of the
package.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-30 23:12:17 +02:00
Thomas Petazzoni
8e26abecd0 pkg-generic: fix SUBDIR handling
Commit 9ba9bfb9a0 inverted the logic to
define $(2)_SUBDIR, breaking the build of things using the _SUBDIR
feature, like the tcl package.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-24 09:17:56 +02:00
Samuel Martin
9ba9bfb9a0 pkg-*targets.mk: factorize and fix $(PKG)_SRCDIR and $(PKG)_BUILDDIR declaration
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-22 19:28:42 +02:00
Arnout Vandecappelle (Essensium/Mind)
2359e1223f Clean up naming of old GENTARGETS infrastructure
With the renaming of XXXTARGETS to xxx-package, the names of the
pkg-xxx.mk files is inconsistent, as well as some internal names in
the documentation.  These inconsistencies are cleaned up here.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 ...kages-autotargets.txt => adding-packages-autotools.txt} |    4 ++--
 ...packages-cmaketargets.txt => adding-packages-cmake.txt} |    4 ++--
 docs/manual/adding-packages-directory.txt                  |   12 ++++++------
 ...packages-gentargets.txt => adding-packages-generic.txt} |    4 ++--
 docs/manual/adding-packages.txt                            |    6 +++---
 package/Makefile.in                                        |    6 +++---
 package/{pkg-autotargets.mk => pkg-autotools.mk}           |    0
 package/{pkg-cmaketargets.mk => pkg-cmake.mk}              |    0
 package/{pkg-gentargets.mk => pkg-generic.mk}              |    0
 9 files changed, 18 insertions(+), 18 deletions(-)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 20:24:03 +02:00