1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

makepkg: move BUILDSCRIPT from makepkg.conf

Commit 4b183bf9 moved makepkg.conf sourcing to after the parsing
of options, breaking the -p option and --help output.  The solution
is to move BUILDSCRIPT out of makepkg.conf.  This patch moves the
definition BUILDSCRIPT back to makepkg itself and adds configure
option to allow easy changing of this value during build time.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2008-12-27 16:35:06 +10:00 committed by Dan McGee
parent 9a7f68317a
commit 8f26bb9052
4 changed files with 12 additions and 2 deletions

View File

@ -88,6 +88,11 @@ AC_ARG_WITH(db-ext,
AS_HELP_STRING([--with-db-ext=ext], [set the file extension used by the database]), AS_HELP_STRING([--with-db-ext=ext], [set the file extension used by the database]),
[DBEXT=$withval], [DBEXT=.db.tar.gz]) [DBEXT=$withval], [DBEXT=.db.tar.gz])
# Help line for buildscript filename
AC_ARG_WITH(buildscript,
AS_HELP_STRING([--with-buildscript=name], [set the build script name used by makepkg]),
[BUILDSCRIPT=$withval], [BUILDSCRIPT=PKGBUILD])
# Help line for libdownload/libfetch # Help line for libdownload/libfetch
AC_ARG_ENABLE(internal-download, AC_ARG_ENABLE(internal-download,
AS_HELP_STRING([--disable-internal-download], [do not build with libdownload/libfetch support]), AS_HELP_STRING([--disable-internal-download], [do not build with libdownload/libfetch support]),
@ -314,6 +319,9 @@ AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman sourc
# Set database file extension # Set database file extension
AC_SUBST(DBEXT) AC_SUBST(DBEXT)
AC_DEFINE_UNQUOTED([DBEXT], "$DBEXT", [The file extension used by pacman databases]) AC_DEFINE_UNQUOTED([DBEXT], "$DBEXT", [The file extension used by pacman databases])
# Set makepkg build script name
AC_SUBST(BUILDSCRIPT)
AC_DEFINE_UNQUOTED([BUILDSCRIPT], "$BUILDSCRIPT", [The build script name used by makepkg])
# Configuration files # Configuration files
AC_CONFIG_FILES([ AC_CONFIG_FILES([
@ -362,6 +370,7 @@ ${PACKAGE_NAME}:
package extension : ${PKGEXT} package extension : ${PKGEXT}
source pkg extension : ${SRCEXT} source pkg extension : ${SRCEXT}
database extension : ${DBEXT} database extension : ${DBEXT}
build script name : ${BUILDSCRIPT}
Compilation options: Compilation options:
Run make in doc/ dir : ${wantdoc} Run make in doc/ dir : ${wantdoc}

View File

@ -95,13 +95,12 @@ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#PACKAGER="John Doe <john@doe.com>" #PACKAGER="John Doe <john@doe.com>"
######################################################################### #########################################################################
# BUILDSCRIPT/EXTENSION DEFAULTS # EXTENSION DEFAULTS
######################################################################### #########################################################################
# #
# WARNING: Do NOT modify these variables unless you know what you are # WARNING: Do NOT modify these variables unless you know what you are
# doing. # doing.
# #
BUILDSCRIPT='PKGBUILD'
PKGEXT='@PKGEXT@' PKGEXT='@PKGEXT@'
SRCEXT='@SRCEXT@' SRCEXT='@SRCEXT@'

View File

@ -37,6 +37,7 @@ edit = sed \
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \ -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@DBEXT[@]|$(DBEXT)|g' \ -e 's|@DBEXT[@]|$(DBEXT)|g' \
-e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \ -e 's|@SIZECMD[@]|$(SIZECMD)|g' \
-e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g' -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'

View File

@ -38,6 +38,7 @@ export COMMAND_MODE='legacy'
myver='@PACKAGE_VERSION@' myver='@PACKAGE_VERSION@'
confdir='@sysconfdir@' confdir='@sysconfdir@'
BUILDSCRIPT='@BUILDSCRIPT@'
startdir="$PWD" startdir="$PWD"
srcdir="$startdir/src" srcdir="$startdir/src"
pkgdir="$startdir/pkg" pkgdir="$startdir/pkg"