python_distutils buildsystem: Build for all supported Python
versions in case they're installed. Ensure that correct
shebangs are created by using `python' first during build
and install. Closes: #520834
dh_install: Fix support for the case where --sourcedir=debian/tmp/foo is used. Perl was not being greedy enough and the 'foo' was not stripped from the destination directory in this unusual case. Closes: #537017
dh_install: Fix installation of entire top-level directory from debian/tmp. Closes: #535367
This was broken by the slash removal fix in e45749314e98a3304b1f845884ac50327c29cc10. Of course those
unnecessary slashes were actually necessary for dirname to
DTRT.
Joey Hess [Tue, 30 Jun 2009 16:56:42 +0000 (12:56 -0400)]
dh_install: Fix use of debian/tmp in v7 mode; a bug caused it to put files inside a debian/tmp directory in the package build directory, now that prefix is stripped. (See #534565)
(This also includes a fix to avoid doubled slashes in paths passed to
commands.)
Modestas Vainius [Tue, 30 Jun 2009 13:04:50 +0000 (16:04 +0300)]
rmdir_builddir(): use shell commands rather than perl equivalent.
Pass --ignore-fail-on-non-empty option to shell rmddir and later
check with -d if the exists to get the same effect. Also drop
no act check from rmdir_builddir(), doit() does it for us now.
Modestas Vainius [Mon, 29 Jun 2009 23:55:41 +0000 (02:55 +0300)]
Use ASCII RS for separating options in DH_INTERNAL_OPTIONS.
Since now extra options via dh command line arguments are encouraged, dh will
break when a bit more complex option gets added to DH_INTERNAL_OPTIONS and it
gets misparsed by the debhelper command called from the override. E.g.
debian/rules:
| ....
| make[1]: Entering directory `............'
| dh_install
| cp: cannot stat `debian/tmp/dir': No such file or directory
| dh_install: cp returned exit code 1
| make[1]: *** [override_dh_install] Error 1
So since DH_INTERNAL_OPTIONS is exclusively for internal use, why not to use an
old good ASCII unrepresentable control character as a separator? So I chose
ASCII 1E - RS Record Separator.
Modestas Vainius [Mon, 29 Jun 2009 19:00:26 +0000 (22:00 +0300)]
Support absolute paths for builddir.
If build directory is absolute or ../ path, _rel2rel falls back to
absolute paths. Try even harder to convert supplied builddir to
relative in _set_builddir().
Modestas Vainius [Mon, 29 Jun 2009 16:11:42 +0000 (19:11 +0300)]
Rename enforce_out_of_source_building() to prefer_
Also add enforce_out_of_source_building() for clarity which does not
take any parameters. Now both have a clear name and no confusing
parameter combinations.
Joey Hess [Mon, 29 Jun 2009 01:47:52 +0000 (21:47 -0400)]
clean up --sourcedir/--sourcedirectory conflict
* Move two move command-specific options to only be accepted by the commands
that use them. The options are:
--sourcedir, --destdir
* If any third-party debhelper commands use either of the above options,
they will be broken, and need to be changed to pass options to init().
This was done because of a conflict with the --sourcedirectory options
used by dh_auto_*. I originally wanted to make dh_auto_* and dh_install
both use --sourcedir, but that didn't work out.
Joey Hess [Fri, 26 Jun 2009 13:01:20 +0000 (09:01 -0400)]
dh_installinfo: No longer inserts install-info calls into maintainer scripts
as that is now triggerized. Adds a dependency via misc:Depends to handle
partial upgrades. Note that while dh_installinfo already required that info
files had a INFO-DIR-SECTION, the new system also requires they have
START-INFO-DIR-ENTRY and END-INFO-DIR-ENTRY for proper registration. I
assume there will be some mass bug filing for any packages that do not have
that. Closes: #528864
Modestas Vainius [Sun, 21 Jun 2009 19:35:30 +0000 (22:35 +0300)]
Terminology change.
I previously used "built-in debhelper build system" or "default debhelper build
system" for those shipped with debhelper. Now it is "standard debhelper build
system".
Modestas Vainius [Wed, 17 Jun 2009 23:19:40 +0000 (02:19 +0300)]
Generate and install dh_auto docs when building debhelper.
Since dh_auto_* PODs and dh_auto.pod contain placeholders and final versions
are generated with the use of podselect, they are not directly translatable.
However, the final postprocessed PODs (with man/dh_auto_pod) are translatable.
So these temporary PODs are written to the man/ subdir and they could be added
to po4a as needed. However, I do not add those PODs for translation in this
commit (neither previous versions of dh_auto_* were there).
Modestas Vainius [Wed, 17 Jun 2009 23:11:45 +0000 (02:11 +0300)]
Update dh_auto documentation.
* dh_auto.pod -> dh_auto.7 - contains general information about dh_auto,
its features, build systems supported by default (the latter is injected by
man/dh_auto_pod script from Debian/Debhelper/Buildsystem/*.pm PODs via
placeholders (#PLACEHOLDER#))
* POD in Debian/Debhelper/Buildsystem/*.pm -> dh_auto_<buildsystem>.7 - build
system specific information.
* dh_auto_* -> dh_auto_*.1 - relatively shorty description of the specific
dh_auto_* program and build system specific info for that step injected from
Debian/Debhelper/Buildsystem/*.pm with man/dh_auto_pod script.
* man/dh_auto_pod $step - generates full dh_auto_$step POD (replaces
placeholders).
* man/dh_auto_pod - generates full dh_auto.pod (replaces placeholders).
Modestas Vainius [Wed, 17 Jun 2009 22:16:33 +0000 (01:16 +0300)]
Do not explicitly repass env. variables {C,CXX,LD}FLAGS to cmake.
Apparently, cmake itself reads values of those environment variables and uses
them accordingly. There is no need to repass them via -DCMAKE_{C,CXX,LD}_FLAGS.
Modestas Vainius [Mon, 15 Jun 2009 13:20:11 +0000 (16:20 +0300)]
Some cosmetic changes in the comments and strings.
* buildsystem -> build system
* dh_auto build system -> debhelper build system
* plugin -> class
* a few rewording changes in the comments.
* Enhance python_distutils::DESCRIPTION().
Modestas Vainius [Tue, 16 Jun 2009 00:44:43 +0000 (03:44 +0300)]
Add --help-buildsystem option to dh_auto.
Displays POD of the (auto)selected build system. It should be useful to get
more information about third party build systems. Implementation uses
perldoc whenever possible.
Modestas Vainius [Mon, 15 Jun 2009 12:58:31 +0000 (15:58 +0300)]
Fix build directory handling in python_distutils build system.
* Apparently, Distutils does out of source tree building by default.
* Default build directory is "$srcdir/build".
* --build-base command line option is ineffective (some even fail)
unless it is passed to the "build" command. However, if build-base is set in
the config file, all setup.py commands use it (build, install and clean).
That's a big flaw in Distutils design but it has been like this for a long
time. Therefore write a custom distutils cfg file in the build directory
to make build-base work. The best choice for config file path is
$HOME/.pydistutils.cfg (one of the paths Distutils reads) and setting $HOME
to the build directory.
Modestas Vainius [Fri, 12 Jun 2009 17:05:20 +0000 (20:05 +0300)]
Enforce out of source building in soft mode for cmake.
Technically, cmake supports in source builds, they are simply not
recommended. However, if the user insists and explicitly specifies
the build directory that is equal to the source directory, allow
this (aka soft mode).
Modestas Vainius [Fri, 12 Jun 2009 16:57:35 +0000 (19:57 +0300)]
Drop special handling for build directory ./path.
Now build directory is always relative to the top directory
(including default build directory) regardless what source
directory is. However, if the build directory is not specified,
it defaults to the source directory (aka in source building).
Modestas Vainius [Thu, 11 Jun 2009 15:17:36 +0000 (18:17 +0300)]
Ensure make doesn't print directories when checking for target existance.
Whenever make is run with --print-directory option, make -C sometimes print
Entering/Leaving directory messages to stdout even with -s in effects This
breakes a check for target existance as it relies on make printing nothing when
target does not do anything. Hence explicitly pass --no-print-directory to make
to avoid it.