diff options
author | Andrew Fyfe <andrew@neptune-one.net> | 2007-05-31 18:21:37 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-05-31 20:30:41 +0200 |
commit | e422b71a48c9f7637595c510d8766f0f38b1114e (patch) | |
tree | 33fa3c11e1ccc9e0e6a10ad50d6e4b2b249c181e | |
parent | 139d3c5e99fa6cb28fba7883123891a73fbb2421 (diff) | |
download | pacman-e422b71a48c9f7637595c510d8766f0f38b1114e.tar.gz pacman-e422b71a48c9f7637595c510d8766f0f38b1114e.tar.xz |
Add autotool substitution for SRCEXT.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | etc/Makefile.am | 1 | ||||
-rw-r--r-- | etc/makepkg.conf.in | 1 | ||||
-rw-r--r-- | scripts/makepkg.in | 4 |
4 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index a03a242a..7ab8e3a0 100644 --- a/configure.ac +++ b/configure.ac @@ -38,6 +38,11 @@ AC_ARG_WITH(pkg-ext, AC_HELP_STRING([--with-pkg-ext=ext], [Set the file extension used by packages]), [PKGEXT=$withval], [PKGEXT=.pkg.tar.gz]) +# Help line for source package directory +AC_ARG_WITH(src-ext, + AC_HELP_STRING([--with-src-ext=ext], [Set the file extension used by source packages]), + [SRCEXT=$withval], [SRCEXT=.src.tar.gz]) + # Help line for database extension AC_ARG_WITH(db-ext, AC_HELP_STRING([--with-db-ext=ext], [Set the file extension used by the database]), @@ -195,6 +200,9 @@ rectory]) # Set package file extension AC_SUBST(PKGEXT) AC_DEFINE_UNQUOTED([PKGEXT], "$PKGEXT", [The file extension used by pacman packages]) +# Set source package file extension +AC_SUBST(SRCEXT) +AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman source packages]) # Set database file extension AC_SUBST(DBEXT) AC_DEFINE_UNQUOTED([DBEXT], "$DBEXT", [The file extension used by pacman databases]) @@ -243,6 +251,7 @@ $PACKAGE_STRING: Directory and file information: root working directory : ${ROOTDIR} package extension : ${PKGEXT} + source pkg extension : ${SRCEXT} database extension : ${DBEXT} Compilation options: diff --git a/etc/Makefile.am b/etc/Makefile.am index 135eae6f..b26a3e6c 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -13,6 +13,7 @@ edit = sed \ -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ -e 's|@PKGEXT[@]|$(PKGEXT)|g' \ + -e 's|@SRCEXT[@]|$(SRCEXT)|g' \ -e 's|@CARCH[@]|$(CARCH)|g' \ -e 's|@CHOST[@]|$(CHOST)|g' \ -e 's|@ARCHSWITCH[@]|$(ARCHSWITCH)|g' \ diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index c3ac0f67..049fd178 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -94,6 +94,7 @@ DOC_DIRS=(usr/{,share/}{info,doc,gtk-doc} opt/gnome/{,share/}{info,doc,gtk-doc}) # BUILDSCRIPT='PKGBUILD' PKGEXT='@PKGEXT@' +SRCEXT='@SRCEXT@' DB_COMPRESSION='gz' DB_CHECKSUMS=(md5) diff --git a/scripts/makepkg.in b/scripts/makepkg.in index 1bc6f3cc..553221be 100644 --- a/scripts/makepkg.in +++ b/scripts/makepkg.in @@ -666,7 +666,7 @@ create_srcpackage() { done # TODO make package extension configurable like $PKGEXT - local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}.src.tar.gz" + local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" # tar it up msg2 "$(gettext "Compressing source package...")" @@ -990,7 +990,7 @@ msg "$(gettext "Making package: %s")" "$pkgname $pkgver-$pkgrel ($date)" # if we are creating a source-only package, go no further if [ "$SOURCEONLY" = "1" ]; then - if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}.src.tar.gz" \ + if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" \ -a "$FORCE" = "0" ]; then error "$(gettext "a package has already been built. (use -f to overwrite)")" exit 1 |