Permalink
Browse files

Fix build.sh to work on Amazon Linux.

On Amazon Linux, `buildsys-macros` providing `/etc/rpm/macros.dist` does
not exist. Rather, `system-release` provides `/etc/rpm/macros.disttag`.
Apart from failing the check for `/etc/rpm/macros.dist` in build.sh, the
RPM builds fine. This patch changes build.sh to look for either file.
  • Loading branch information...
1 parent aedff83 commit f5d78867dd95defac9f9a5d74eba0c46808c7db4 @psi psi committed Mar 5, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 build.sh
View
3 build.sh
@@ -2,7 +2,8 @@
whereami=$(dirname $0)
-if [ ! -f "/etc/rpm/macros.dist" ]; then echo "please install 'buildsys-macros' rpm and try again" ; exit 1 ; fi
+if [ ! -f "/etc/rpm/macros.dist" ] && \
+ [ ! -f "/etc/rpm/macros.disttag" ]; then echo "please install 'buildsys-macros' rpm and try again" ; exit 1 ; fi
if [ ! -f "$(which rpmbuild)" ]; then echo "please install 'rpm-build' rpm and try again" ; exit 1 ; fi
if [ ! -f "$(which spectool)" ]; then echo "please install 'rpmdevtools' rpm and try again" ; exit 1 ; fi
if [ ! -f "$(which rpmdev-setuptree)" ]; then echo "please install 'rpmdevtools' rpm and try again" ; exit 1 ; fi

0 comments on commit f5d7886

Please sign in to comment.