Skip to content

Commit

Permalink
Run SPL_AC_PACMAN only if $VENDOR is "arch"
Browse files Browse the repository at this point in the history
Unfortunately, Arch's package manager `pacman` shares it's name with a
popular arcade video game. Thus, in order to refrain from executing the
video game when we mean to execute the package manager, SPL_AC_PACMAN is
now only run when $VENDOR is determined to be "arch".

Signed-off-by: Prakash Surya <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs/zfs#517
  • Loading branch information
behlendorf committed Jan 13, 2012
1 parent 588d900 commit 0b14b9f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 46 deletions.
5 changes: 3 additions & 2 deletions config/spl-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,12 @@ dnl #
dnl # Default SPL user configuration
dnl #
AC_DEFUN([SPL_AC_PACKAGE], [
SPL_AC_DEFAULT_PACKAGE
SPL_AC_RPM
SPL_AC_DPKG
SPL_AC_ALIEN
SPL_AC_PACMAN
SPL_AC_DEFAULT_PACKAGE
AS_IF([test "$VENDOR" = "arch"], [SPL_AC_PACMAN])
])

AC_DEFUN([SPL_AC_LICENSE], [
Expand Down
92 changes: 48 additions & 44 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,6 @@ LINUX_VERSION
LINUX_OBJ
LINUX
SPL_CONFIG
DEFAULT_PACKAGE
VENDOR
MAKEPKG_VERSION
MAKEPKG
HAVE_MAKEPKG
Expand All @@ -822,6 +820,8 @@ HAVE_RPMBUILD
RPM_VERSION
RPM
HAVE_RPM
DEFAULT_PACKAGE
VENDOR
LICENSE
CPP
OTOOL64
Expand Down Expand Up @@ -11485,6 +11485,49 @@ $as_echo "$LICENSE" >&6; }



{ $as_echo "$as_me:$LINENO: checking linux distribution" >&5
$as_echo_n "checking linux distribution... " >&6; }
if test -f /etc/redhat-release ; then
VENDOR=redhat ;
elif test -f /etc/fedora-release ; then
VENDOR=fedora ;
elif test -f /etc/arch-release ; then
VENDOR=arch ;
elif test -f /etc/lsb-release ; then
VENDOR=ubuntu ;
elif test -f /etc/debian_version ; then
VENDOR=debian ;
elif test -f /etc/SuSE-release ; then
VENDOR=sles ;
elif test -f /etc/slackware-version ; then
VENDOR=slackware ;
elif test -f /etc/gentoo-release ; then
VENDOR=gentoo ;
else
VENDOR= ;
fi
{ $as_echo "$as_me:$LINENO: result: $VENDOR" >&5
$as_echo "$VENDOR" >&6; }


{ $as_echo "$as_me:$LINENO: checking default package type" >&5
$as_echo_n "checking default package type... " >&6; }
case "$VENDOR" in
fedora) DEFAULT_PACKAGE=rpm ;;
redhat) DEFAULT_PACKAGE=rpm ;;
sles) DEFAULT_PACKAGE=rpm ;;
ubuntu) DEFAULT_PACKAGE=deb ;;
debian) DEFAULT_PACKAGE=deb ;;
slackware) DEFAULT_PACKAGE=tgz ;;
arch) DEFAULT_PACKAGE=arch;;
*) DEFAULT_PACKAGE=rpm ;;
esac

{ $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5
$as_echo "$DEFAULT_PACKAGE" >&6; }



RPM=rpm
RPMBUILD=rpmbuild

Expand Down Expand Up @@ -11607,6 +11650,8 @@ fi



if test "$VENDOR" = "arch"; then

PACMAN=pacman
MAKEPKG=makepkg

Expand Down Expand Up @@ -11658,48 +11703,7 @@ fi




{ $as_echo "$as_me:$LINENO: checking linux distribution" >&5
$as_echo_n "checking linux distribution... " >&6; }
if test -f /etc/redhat-release ; then
VENDOR=redhat ;
elif test -f /etc/fedora-release ; then
VENDOR=fedora ;
elif test -f /etc/arch-release ; then
VENDOR=arch ;
elif test -f /etc/lsb-release ; then
VENDOR=ubuntu ;
elif test -f /etc/debian_version ; then
VENDOR=debian ;
elif test -f /etc/SuSE-release ; then
VENDOR=sles ;
elif test -f /etc/slackware-version ; then
VENDOR=slackware ;
elif test -f /etc/gentoo-release ; then
VENDOR=gentoo ;
else
VENDOR= ;
fi
{ $as_echo "$as_me:$LINENO: result: $VENDOR" >&5
$as_echo "$VENDOR" >&6; }


{ $as_echo "$as_me:$LINENO: checking default package type" >&5
$as_echo_n "checking default package type... " >&6; }
case "$VENDOR" in
fedora) DEFAULT_PACKAGE=rpm ;;
redhat) DEFAULT_PACKAGE=rpm ;;
sles) DEFAULT_PACKAGE=rpm ;;
ubuntu) DEFAULT_PACKAGE=deb ;;
debian) DEFAULT_PACKAGE=deb ;;
slackware) DEFAULT_PACKAGE=tgz ;;
arch) DEFAULT_PACKAGE=arch;;
*) DEFAULT_PACKAGE=rpm ;;
esac

{ $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5
$as_echo "$DEFAULT_PACKAGE" >&6; }

fi



Expand Down

0 comments on commit 0b14b9f

Please sign in to comment.