1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
#!/bin/bash
##
## $Id$
##
## This file is part of Vidalia, and is subject to the license terms in the
## LICENSE file, found in the top level directory of this distribution. If
## you did not receive the LICENSE file with this file, you may obtain it
## from the Vidalia source package distributed by the Vidalia Project at
## http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
## including this file, may be copied, modified, propagated, or distributed
## except according to the terms described in the LICENSE file.
##
# Builds distribution packages for various platforms.
# Check for proper script arguments
if [ "$#" -eq 0 ]
then
echo "Usage: $0 <rpm>"
exit 1
fi
# Make the distribution depending on what type was requested
case "$1" in
#
# rpm package
#
"rpm")
if [ $# -ne 2 ]
then
echo "Usage: $0 rpm <path-to-vidalia-source-tarball>"
exit 1
fi
vidalia_source_path="$2"
pushd rpm
rpmbuild -ba --define "_sourcedir $vidalia_source_path" vidalia.spec
popd
;;
# Invalid
#
*)
echo "Unrecognized distribution type."
;;
esac
exit $?
|