Skip to content

Commit

Permalink
Added -i option to change the installation make target. Installing to…
Browse files Browse the repository at this point in the history
… /usr.
  • Loading branch information
rcrowley committed Apr 16, 2010
1 parent 4c4c0fe commit 736be0d
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Expand Up @@ -63,7 +63,7 @@ deb:
ifeq (root, $(shell whoami))
bin/debra create debian control
$(GIT) archive --prefix=debian/ HEAD | $(GZIP) >debian.tar.gz
bin/debra sourceinstall debian debian.tar.gz -p $(prefix)
bin/debra sourceinstall debian debian.tar.gz -p /usr
rm debian.tar.gz
chown -R root:root debian
bin/debra build debian debra_$(VERSION)_all.deb
Expand Down
11 changes: 7 additions & 4 deletions bin/sourceinstall
Expand Up @@ -4,14 +4,15 @@ set -e
usage() {
echo "Usage: $(basename $0) <tarball>" >&2
echo " [-b <bootstrap>]" >&2
echo " [-f <flags>] [-p <prefix>] [-d <destdir>]" >&2
echo " [-f <flags>] [-p <prefix>] [-d <destdir>] [-i <target>]" >&2
echo " [-c <command>] [-h]" >&2
if [ -n "$1" ]; then
echo " <tarball> path or URI to a source tarball" >&2
echo " -b <bootstrap> bootstrap command to run before any others" >&2
echo " -f <flags> flags passed to configure" >&2
echo " -p <prefix> prefix passed to configure" >&2
echo " -d <destdir> destination directory passed to make as DESTDIR" >&2
echo " -i <install> make target to run instead of install" >&2
echo " -c <command> command to run instead of configure && make && make install" >&2
echo " -h show this help message" >&2
fi
Expand All @@ -23,12 +24,13 @@ TARBALL=$1
[ -z "$TARBALL" ] && usage
[ -h = $TARBALL ] && usage MOAR
shift
while getopts b:f:p:c:d:h name; do
while getopts b:f:p:c:d:i:h name; do
case "$name" in
b) BOOTSTRAP=$OPTARG;;
f) FLAGS=$OPTARG;;
p) PREFIX=$OPTARG;;
d) DESTDIR=$OPTARG;;
i) INSTALL=$OPTARG;;
c) COMMAND=$OPTARG;;
h) usage MOAR;;
*) usage;;
Expand Down Expand Up @@ -65,10 +67,11 @@ if [ -z "$COMMAND" ]; then
./configure $FLAGS --prefix=$(readlink -f $PREFIX)
fi
make
[ -z "$INSTALL"] && INSTALL=install
if [ -z "$DESTDIR" ]; then
make install
make $INSTALL
else
make install DESTDIR=$DESTDIR
make $INSTALL DESTDIR=$DESTDIR
fi
else
eval $COMMAND
Expand Down
18 changes: 9 additions & 9 deletions configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for debra 0.2.4.
# Generated by GNU Autoconf 2.64 for debra 0.2.5.
#
# Report bugs to <richard@devstructure.com>.
#
Expand Down Expand Up @@ -549,8 +549,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='debra'
PACKAGE_TARNAME='debra'
PACKAGE_VERSION='0.2.4'
PACKAGE_STRING='debra 0.2.4'
PACKAGE_VERSION='0.2.5'
PACKAGE_STRING='debra 0.2.5'
PACKAGE_BUGREPORT='richard@devstructure.com'
PACKAGE_URL=''

Expand Down Expand Up @@ -1151,7 +1151,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures debra 0.2.4 to adapt to many kinds of systems.
\`configure' configures debra 0.2.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1212,7 +1212,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of debra 0.2.4:";;
short | recursive ) echo "Configuration of debra 0.2.5:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1279,7 +1279,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
debra configure 0.2.4
debra configure 0.2.5
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
Expand All @@ -1296,7 +1296,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by debra $as_me 0.2.4, which was
It was created by debra $as_me 0.2.5, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2502,7 +2502,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by debra $as_me 0.2.4, which was
This file was extended by debra $as_me 0.2.5, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -2553,7 +2553,7 @@ Report bugs to <richard@devstructure.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
debra config.status 0.2.4
debra config.status 0.2.5
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.64])
AC_INIT([debra], [0.2.4], [richard@devstructure.com])
AC_INIT([debra], [0.2.5], [richard@devstructure.com])

# Checks for programs.
AC_PROG_INSTALL
Expand Down
2 changes: 1 addition & 1 deletion control
@@ -1,5 +1,5 @@
Package: debra
Version: 0.2.4-1
Version: 0.2.5-1
Section: devel
Priority: optional
Essential: no
Expand Down
Binary file modified man/man1/debra-build.1.gz
Binary file not shown.
Binary file modified man/man1/debra-create.1.gz
Binary file not shown.
Binary file modified man/man1/debra-destroy.1.gz
Binary file not shown.
Binary file modified man/man1/debra-makefile.1.gz
Binary file not shown.
Binary file modified man/man1/debra-sourceinstall.1.gz
Binary file not shown.
Binary file modified man/man1/debra.1.gz
Binary file not shown.
Binary file modified man/man1/sourceinstall.1.gz
Binary file not shown.
4 changes: 3 additions & 1 deletion man/man1/sourceinstall.1.md
Expand Up @@ -3,7 +3,7 @@ sourceinstall(1) -- install from a source tarball

## SYNOPSIS

`sourceinstall` _tarball_ [`-b` _bootstrap_] [`-f` _flags_] [`-p` _prefix_] [`-d` _destdir_] [`-c` _command_] [`-h`]
`sourceinstall` _tarball_ [`-b` _bootstrap_] [`-f` _flags_] [`-p` _prefix_] [`-d` _destdir_] [`-i` _install_] [`-c` _command_] [`-h`]

## DESCRIPTION

Expand All @@ -23,6 +23,8 @@ Options may be set multiple times. In all cases, the last one wins.
Prefix passed to `./configure`. Shortcut to the `--prefix` flag which will override any `--prefix` set in _flags_.
* `-d` _destdir_:
Destination directory passed to `make install` as `DESTDIR`.
* `-i` _install_:
Make target to run instead of `install`.
* `-c` _command_:
Command to run instead of `./configure`, `make`, `make install`. This command is run from the root of the extracted tarball.
* `-h`:
Expand Down

0 comments on commit 736be0d

Please sign in to comment.