Skip to content
Snippets Groups Projects
rpmbuild.sh 931 B
Newer Older
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

cd $(dirname $0)/..    # top level of the checkout
mkdir -p rpmbuild/SOURCES rpmbuild/SPECS rpmbuild/SOURCES
rm -rf rpmbuild/RPMS rpmbuild/SOURCES/browserid

tar --exclude rpmbuild --exclude .git --exclude .svn \
    --exclude var -czf \
    $PWD/rpmbuild/SOURCES/browserid-server.tar.gz .
export GIT_REVISION=$(git log -1 --oneline)
export SVN_REVISION=$(svn info locale/ | sed -n -e "s,^Revision: ,,p")
rpmbuild --define "_topdir $PWD/rpmbuild" \
         --define "svnrev $SVN_REVISION" -ba scripts/browserid.spec
else
    echo "$progname: failed to build browserid RPM (rpmbuild rc=$rc)" >&2
fi

exit $rc