mirror of
https://github.com/bspeice/libcvautomation
synced 2024-12-11 09:18:11 -05:00
Commit scripts to help building packages
This commit is contained in:
parent
fa1a7432c0
commit
1b498a8bd9
55
packageDebian.sh
Normal file
55
packageDebian.sh
Normal file
@ -0,0 +1,55 @@
|
||||
#!/bin/bash -
|
||||
#===============================================================================
|
||||
#
|
||||
# FILE: packageDebian.sh
|
||||
#
|
||||
# USAGE: ./packageDebian.sh
|
||||
#
|
||||
# DESCRIPTION:
|
||||
#
|
||||
# OPTIONS: ---
|
||||
# REQUIREMENTS: ---
|
||||
# BUGS: ---
|
||||
# NOTES: ---
|
||||
# AUTHOR: Bradlee Speice (), bspeice@uncc.edu
|
||||
# ORGANIZATION:
|
||||
# REVISION: ---
|
||||
#===============================================================================
|
||||
|
||||
#This script is a simple wrapper for building the .deb packages for libcvautomation
|
||||
#It is not intended to be bullet-proof - if it gets broken I will do my best to
|
||||
#provide bugfixes, but this is a fairly low priority.
|
||||
|
||||
#Also, this script is intended to be run from the Git source, and *not* from
|
||||
#a release tarball.
|
||||
|
||||
set -o errexit
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Building without signing the package..."
|
||||
fi
|
||||
|
||||
PACKAGE_NAME=`grep AC_INIT configure.ac | cut -d'(' -f2 | cut -d',' -f1`
|
||||
PACKAGE_VERSION=`grep AC_INIT configure.ac | cut -d',' -f2 | tr -d [:space:]`
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
make -j`grep processor /proc/cpuinfo | wc -l`
|
||||
make dist
|
||||
|
||||
BUILD_DIR=`mktemp -d`
|
||||
TARBALL="${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz"
|
||||
cp $TARBALL $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
|
||||
cp $TARBALL `echo $TARBALL | sed 's/-/_/g;s/tar/orig.tar/'`
|
||||
tar xf $TARBALL
|
||||
cd $PACKAGE_NAME-$PACKAGE_VERSION/debian
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
debuild
|
||||
else
|
||||
debuild -k$1
|
||||
fi
|
||||
|
||||
echo "Package successfully built in $BUILD_DIR."
|
55
packageRPM.sh
Normal file
55
packageRPM.sh
Normal file
@ -0,0 +1,55 @@
|
||||
#!/bin/bash -
|
||||
#===============================================================================
|
||||
#
|
||||
# FILE: packageRPM.sh
|
||||
#
|
||||
# USAGE: ./packageRPM.sh
|
||||
#
|
||||
# DESCRIPTION:
|
||||
#
|
||||
# OPTIONS: ---
|
||||
# REQUIREMENTS: ---
|
||||
# BUGS: ---
|
||||
# NOTES: ---
|
||||
# AUTHOR: Bradlee Speice (), bspeice.nc@gmail.com
|
||||
# ORGANIZATION:
|
||||
# CREATED: 07/30/2012 11:29:28 AM EDT
|
||||
# REVISION: ---
|
||||
#===============================================================================
|
||||
|
||||
#This script is a simple wrapper for building the .rpm packages for libcvautomation
|
||||
#It is not intended to be bullet-proof - if it gets broken I will do my best to
|
||||
#provide bugfixes, but this is a fairly low priority.
|
||||
|
||||
#Also, this script is intended to be run from the Git source, and *not* from
|
||||
#a release tarball.
|
||||
set -o errexit
|
||||
|
||||
if [ -z "$SIGN_PACKAGE" ]; then
|
||||
echo "Building without signing packages..."
|
||||
fi
|
||||
|
||||
PACKAGE_NAME=`grep AC_INIT configure.ac | cut -d'(' -f2 | cut -d',' -f1`
|
||||
PACKAGE_VERSION=`grep AC_INIT configure.ac | cut -d',' -f2 | tr -d [:space:]`
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
make -j`grep processor /proc/cpuinfo | wc -l`
|
||||
make dist
|
||||
|
||||
if [ ! -d $HOME/rpmbuild ]; then
|
||||
echo "Could not find the rpmbuild directory!"
|
||||
echo "Please make sure your packaging environment is set up correctly."
|
||||
fi
|
||||
|
||||
TARBALL="${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz"
|
||||
cp $TARBALL $HOME/rpmbuild/SOURCES
|
||||
cp rpm/libcvautomation.spec $HOME/rpmbuild/SPECS
|
||||
cd $HOME/rpmbuild/SPECS
|
||||
if [ -z "$SIGN_PACKAGE" ]; then
|
||||
rpmbuild -ba libcvautomation.spec
|
||||
else
|
||||
rpmbuild -ba --sign libcvautomation.spec
|
||||
fi
|
||||
|
||||
echo "Package successfully built in $HOME/rpmbuild/RPMS."
|
Loading…
Reference in New Issue
Block a user