diff --git a/README b/README index 0ce81b1..78599bc 100644 --- a/README +++ b/README @@ -16,6 +16,12 @@ dch-repeat [--help] get-branches [checkout|branch] ... will branch / checkout all the Bazaar branches in a Launchpad team. +get-build-deps [] + ... will install the build dependencies for a package, if you are inside + it's source file. Alternatively, you can pass it the name of a file + containing a list of packages, one on each line, or just pass them all + as parameters, and it will get their build dependencies. + hugdaylist [-n ] ... will create a list of bug list for a hug day listing diff --git a/debian/changelog b/debian/changelog index a58d49b..d6825cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,10 @@ ubuntu-dev-tools (0.21) UNRELEASED; urgency=low [ Kees Cook ] * mk-sbuild-lv: fix gnupg install, adjust symlink creation - -- Kees Cook Tue, 23 Oct 2007 10:22:44 -0700 + [ Siegfried-Angel Gevatter Pujals (RainCT) ] + * Add get-build-deps and it's documentation. + + -- Siegfried-Angel Gevatter Pujals (RainCT) Sat, 27 Oct 2007 23:03:42 +0200 ubuntu-dev-tools (0.20) hardy; urgency=low diff --git a/debian/control b/debian/control index d0f2aac..4108050 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Ubuntu MOTU Developers XS-Vcs-Bzr: https://launchpad.net/ubuntu-dev-tools/ XS-Vcs-Browser: http://codebrowse.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk/changes -Build-Depends: cdbs (>= 0.4.43), debhelper (>= 5), python-central (>= 0.5), python-all-dev (>= 2.4) +Build-Depends: cdbs (>= 0.4.43), debhelper (>= 5), python-central (>= 0.5), python-all-dev (>= 2.4) Build-Depends-Indep: docbook2x XS-Python-Version: all Standards-Version: 3.7.2 diff --git a/debian/copyright b/debian/copyright index 3433c5d..b5b8006 100644 --- a/debian/copyright +++ b/debian/copyright @@ -45,7 +45,7 @@ submittodebian, update-maintainer, and what-patch are licensed under GPLv2: On Debian systems, the complete text of the GNU General Public License v2 can be found in `/usr/share/common-licenses/GPL-2'. -get-branches and suspicious-source are licensed under GPLv3: +get-branches, suspicious-source and get-build-deps are licensed under GPLv3: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -63,4 +63,4 @@ On Debian systems, the complete text of the GNU General Public License v3 can be found in `/usr/share/common-licenses/GPL-3'. The following of the scripts can be used, at your option, regarding any later version -of the previously specified license: pbuilder-dist and suspicious-source. +of the previously specified license: pbuilder-dist, suspicious-source and get-build-deps. diff --git a/doc/get-build-deps.1 b/doc/get-build-deps.1 new file mode 100644 index 0000000..614e0d2 --- /dev/null +++ b/doc/get-build-deps.1 @@ -0,0 +1,55 @@ +.\" Title: get-build-deps +.\" Author: Siegfried-Angel Gevatter Pujals +.\" Contact details: siggi.gevatter@gmail.com +.\" +.TH GET\-BUILD\-DEPS 1 "October 27, 2007" +.\" +.SH NAME +get\-build\-deps \- install build dependencies for one or more packages +.\" +.SH SYNOPSIS +\fBget\-build\-deps\fP [\fIPACKAGE(S)\fR] +.\" +.SH DESCRIPTION +\fBget\-build\-deps\fP is a script to install the build dependencies for either a +local source package or one or more packages from the repositories. +.PP +In order to obtain all missing build dependencies for a package on which source +you are currently working, just run this script without any argument, and it'll +read it's debian/control file to determine the missing build dependencies. +.PP +Alternatively, you can call it with a list of space-separated package names, or the +name of a single file which contains the package names each on a line. Then it will +install the missing dependencies for those packages using "apt-get build-dep". +.\" +.SH EXAMPLES +.TP +get\-build\-deps +Looks for a the debian/control file in the current working directory and installs the +dependencies listed there. +.TP +get\-build\-deps geany +Installs the build dependencies for version of «geany» that's in the repositories. +.TP +get\-build\-deps geany epiphany-browser rhythmbox +Same as the previous example but also with the dependencies for «epiphany-browser» +and «rhythmbox». +.TP +get\-build\-deps ./package_list.txt +Reads the file «package_list.txt» (relatively to the current working directory), +where each line contains the name of a package, and installs the dependencies +for the versions of all those that's in the repositories. +.\" +.SH KNOWN BUGS AND LIMITATIONS +When it's being used to install the missing dependencies for a local source package +(ie, no arguments are passed to it) it doesn't check for the dependencies to match +the indicated versions, but just installs the newest one available in the repositories. +.\" +.SH SEE ALSO +\fBdpkg-checkbuilddeps(1)\fR, +\fBapt-get(8)\fR +.SH AUTHORS +.\" +\fBget\-build\-deps\fP and this manual page have been written by Siegfried-Angel +Gevatter Pujals . They are released under the GNU General +Public License, version 3 or later. diff --git a/doc/submittodebian.1 b/doc/submittodebian.1 index e753ffe..5b1b97d 100644 --- a/doc/submittodebian.1 +++ b/doc/submittodebian.1 @@ -22,4 +22,4 @@ It expects to find the .dsc and diff.gz of the current version (which you likely .BR reportbug (1). .br .SH AUTHOR -submittodebian and this man page was written by Soren Hansen . +submittodebian and this man page were written by Soren Hansen . diff --git a/get-build-deps b/get-build-deps index 0ab794c..09526c1 100755 --- a/get-build-deps +++ b/get-build-deps @@ -33,32 +33,17 @@ to use this script." exit 1 fi - if [ ! -x /usr/lib/pbuilder/pbuilder-satisfydepends ]; then - # The package «pbuilder» isn't installed, but it's required - # to install the build dependencies of a source package. - # Ask the user if he wants to install it automatically. - echo -n "\ -This script requires a component that's included in the «pbuilder» \ -package, which isn't currently installed, in order to install the \ -dependencies required to build the source package in the current \ -directory. - -Would you like to install pbuilder now? [y/N] " - read install_now - - if [ ! $install_now ] || ([ $install_now != 'y' ] && [ $install_now != 'Y' ]) - then - # Don't install it. Abort. - exit 1 - fi - - echo 'Installing package «pbuilder»...' - sudo aptitude install pbuilder - echo; echo + filepath="`pwd`/debian/control" + missing_dependencies=$(dpkg-checkbuilddeps 2>&1) + + if [ -z "$missing_dependencies" ]; then + echo "The build dependencies described in «$filepath» are already satisfied." + exit 0 fi - echo "Installing the build dependencies described in «`pwd`/debian/control»..." - sudo /usr/lib/pbuilder/pbuilder-satisfydepends + echo "Installing the build dependencies described in «$filepath»..." + sudo aptitude install $(echo $missing_dependencies | awk -F: '{ print $3 }' | sed 's/([^)]*)//g' | sed 's/|\s[^\s]*//g') + #' <--- Fix to avoid Geanys markup breaking exit 0 elif [ $# -eq 1 ] then diff --git a/setup.py b/setup.py index 19c35d7..48c2ae3 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ if os.path.exists(changelog): match = re.compile(".*\((.*)\).*").match(head) if match: version = match.group(1) - + setup(name='ubuntu-dev-tools', version=version, scripts=['404main', @@ -27,9 +27,9 @@ setup(name='ubuntu-dev-tools', 'suspicious-source', 'ppaput', 'requestsync', - 'hugdaylist', - 'massfile', - 'submittodebian' - ], + 'hugdaylist', + 'massfile', + 'submittodebian', + 'get-build-deps' + ], ) -