mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-19 15:11:23 +01:00
Updates to maketarball.sh
1) Removed tabs and cleaned up consistency
2) Added removeal of "win" and "mac" directories which don't do
Linux users any good
3) Added removal of "lv2" directory as a system install of lv2
and requisites will be used instead
4) Added removal of "libvamp" directory as a system install of libvamp
will be used instead
5) Added removeal of "libsoxr" directory as a system install of libsoxr
will be used instead
6) Removed deletion of portaudio-v19/test since it seems to be required
to build now
7) Removed Windows project file updating
8) Reordered the src directory copy so that it is done before any
changes are made. This way if the tarball creation fails, you still
have a pristine src directory.
This commit is contained in:
@@ -9,8 +9,7 @@ function myrmrvf {
|
|||||||
# a replacement for rm -rvf that has it's output controlled
|
# a replacement for rm -rvf that has it's output controlled
|
||||||
# by the value of the first argument
|
# by the value of the first argument
|
||||||
# setting it to 1 makes it verbose, to anything else makes it quiet
|
# setting it to 1 makes it verbose, to anything else makes it quiet
|
||||||
if [ $1 -eq 1 ]
|
if [ $1 -eq 1 ] ; then #verbose mode
|
||||||
then #verbose mode
|
|
||||||
shift
|
shift
|
||||||
echo "rm -rf $*"
|
echo "rm -rf $*"
|
||||||
rm -rf $*
|
rm -rf $*
|
||||||
@@ -25,8 +24,7 @@ function myrmvf {
|
|||||||
# a replacement for rm -vf that has it's output controlled
|
# a replacement for rm -vf that has it's output controlled
|
||||||
# by the value of the first argument
|
# by the value of the first argument
|
||||||
# setting it to 1 makes it verbose, to anything else makes it quiet
|
# setting it to 1 makes it verbose, to anything else makes it quiet
|
||||||
if [ $1 -eq 1 ]
|
if [ $1 -eq 1 ] ; then #verbose mode
|
||||||
then #verbose mode
|
|
||||||
shift
|
shift
|
||||||
echo "rm -f $*"
|
echo "rm -f $*"
|
||||||
rm -f $*
|
rm -f $*
|
||||||
@@ -49,42 +47,24 @@ function myfindrm {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function updsln {
|
|
||||||
# removes unwanted projects from the Windows solution
|
|
||||||
# setting it to 1 makes it verbose, to anything else makes it quiet
|
|
||||||
if [ $1 -eq 1 ]
|
|
||||||
then #verbose mode
|
|
||||||
shift
|
|
||||||
echo "sed -e '/$*/,/EndProject/d' win/audacity.sln >win/audacity.sln.new"
|
|
||||||
sed -e "/$*/,/EndProject/d" win/audacity.sln >win/audacity.sln.new
|
|
||||||
echo "mv win/audacity.sln.new win/audacity.sln"
|
|
||||||
mv win/audacity.sln.new win/audacity.sln
|
|
||||||
else
|
|
||||||
# quietly
|
|
||||||
shift
|
|
||||||
sed -e "/$*/,/EndProject/d" win/audacity.sln >win/audacity.sln.new
|
|
||||||
mv win/audacity.sln.new win/audacity.sln
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function cleanfulltree {
|
function cleanfulltree {
|
||||||
# does the clean-up op on the full source tree prior to building the full
|
# does the clean-up op on the full source tree prior to building the full
|
||||||
# tarball
|
# tarball
|
||||||
printf "making distclean ... "
|
printf "making distclean ... "
|
||||||
if [ $1 -eq 1 ] ; then
|
if [ $1 -eq 1 ] ; then
|
||||||
make distclean;
|
make distclean
|
||||||
else
|
else
|
||||||
make distclean 2>/dev/null > /dev/null;
|
make distclean 2>/dev/null > /dev/null
|
||||||
fi
|
fi
|
||||||
status=${?}
|
status=${?}
|
||||||
if [[ ${status} -eq 0 ]] ; then
|
if [ ${status} -eq 0 ] ; then
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
else
|
else
|
||||||
echo "Failed to make distclean: exit status was ${status}"
|
echo "Failed to make distclean: exit status was ${status}"
|
||||||
exit ${status}
|
exit ${status}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Checking SVN status... ";
|
printf "Checking SVN status ... "
|
||||||
revision="$(svnversion)"
|
revision="$(svnversion)"
|
||||||
regex="[[:digit:]]*"
|
regex="[[:digit:]]*"
|
||||||
if [[ ${revision} =~ ${regex} ]] ; then
|
if [[ ${revision} =~ ${regex} ]] ; then
|
||||||
@@ -94,22 +74,22 @@ function cleanfulltree {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "removing SVN directories... ";
|
printf "removing SVN directories ... "
|
||||||
find . -depth -name '.svn' -execdir rm -rf '{}' ';'
|
find . -depth -name '.svn' -execdir rm -rf '{}' ';'
|
||||||
# -depth is needed to avoid find trying to examine directories it has just
|
# -depth is needed to avoid find trying to examine directories it has just
|
||||||
# deleted.
|
# deleted.
|
||||||
# The sort of quotes used is critical!
|
# The sort of quotes used is critical!
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing vim / emacs temp files... ";
|
printf "removing vim / emacs temp files ... "
|
||||||
myfindrm $1 "*~"
|
myfindrm $1 "*~"
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing Python droppings... ";
|
printf "removing Python droppings ... "
|
||||||
myfindrm $1 "*.pyc"
|
myfindrm $1 "*.pyc"
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing executable and other intermediate files... ";
|
printf "removing executable and other intermediate files ... "
|
||||||
myrmvf $1 src/audacity src/.depend src/.gchdepend
|
myrmvf $1 src/audacity src/.depend src/.gchdepend
|
||||||
myfindrm $1 config.status
|
myfindrm $1 config.status
|
||||||
myfindrm $1 config.log
|
myfindrm $1 config.log
|
||||||
@@ -118,62 +98,59 @@ function cleanfulltree {
|
|||||||
myfindrm $1 aclocal.m4
|
myfindrm $1 aclocal.m4
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing orphaned symlinks in lib-src/ ... ";
|
printf "removing orphaned symlinks in lib-src/ ... "
|
||||||
myrmvf $1 lib-src/*.a
|
myrmvf $1 lib-src/*.a
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing doxygen output files ... ";
|
printf "removing doxygen output files ... "
|
||||||
myrmrvf $1 dox
|
myrmrvf $1 dox
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing unused libraries from SVN tree ..."
|
printf "removing unused libraries from SVN tree ..."
|
||||||
myrmrvf $1 lib-src/id3lib ;
|
myrmrvf $1 lib-src/id3lib
|
||||||
myrmrvf $1 lib-src/portburn;
|
myrmrvf $1 lib-src/portburn
|
||||||
myrmrvf $1 lib-src/portmidi;
|
myrmrvf $1 lib-src/portmidi
|
||||||
myrmrvf $1 lib-src/taglib;
|
myrmrvf $1 lib-src/taglib
|
||||||
myrmrvf $1 lib-src/libresample;
|
myrmrvf $1 lib-src/libresample
|
||||||
myrmrvf $1 lib-src/libscorealign;
|
myrmrvf $1 lib-src/libscorealign
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
# remove all the things we have in SVN for convenience rather than being
|
# remove all the things we have in SVN for convenience rather than being
|
||||||
# necessary
|
# necessary
|
||||||
function slimtree {
|
function slimtree {
|
||||||
printf "removing todo lists ... ";
|
printf "removing todo lists ... "
|
||||||
myrmvf $1 todo.txt
|
myrmvf $1 todo.txt
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
# we cannot remove tests/ because subsequent builds fail ...
|
# we cannot remove tests/ because subsequent builds fail ...
|
||||||
printf "removing scripts and tests ... ";
|
printf "removing scripts and tests ... "
|
||||||
myrmrvf $1 scripts tests/ProjectCheckTests/
|
myrmrvf $1 scripts tests/ProjectCheckTests/
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing libraries that should be installed locally ... "
|
printf "removing libraries that should be installed locally ... "
|
||||||
myrmrvf $1 lib-src/expat lib-src/libflac lib-src/libid3tag;
|
myrmrvf $1 lib-src/expat lib-src/libflac lib-src/libid3tag
|
||||||
myrmrvf $1 lib-src/libmad lib-src/libogg;
|
myrmrvf $1 lib-src/libmad lib-src/libogg
|
||||||
myrmrvf $1 lib-src/libsamplerate lib-src/libsndfile;
|
myrmrvf $1 lib-src/libsamplerate lib-src/libsndfile
|
||||||
myrmrvf $1 lib-src/libvorbis lib-src/soundtouch;
|
myrmrvf $1 lib-src/libvorbis lib-src/soundtouch
|
||||||
myrmrvf $1 lib-src/twolame;
|
myrmrvf $1 lib-src/libsoxr lib-src/twolame
|
||||||
|
myrmrvf $1 lib-src/libvamp lib-src/lv2
|
||||||
# these bindings aren't built by default, we don't need them
|
# these bindings aren't built by default, we don't need them
|
||||||
myrmrvf $1 lib-src/portaudio-v19/bindings/;
|
myrmrvf $1 lib-src/portaudio-v19/bindings/
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing qa ... ";
|
printf "removing qa ... "
|
||||||
myrmrvf $1 qa
|
myrmrvf $1 qa
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing unused portaudio-v19 directories ... ";
|
printf "removing unused portaudio-v19 directories ... "
|
||||||
myrmrvf $1 lib-src/portaudio-v19/docs
|
myrmrvf $1 lib-src/portaudio-v19/docs
|
||||||
myrmrvf $1 lib-src/portaudio-v19/pa_asio
|
myrmrvf $1 lib-src/portaudio-v19/pa_asio
|
||||||
myrmrvf $1 lib-src/portaudio-v19/pa_sgi
|
myrmrvf $1 lib-src/portaudio-v19/pa_sgi
|
||||||
myrmrvf $1 lib-src/portaudio-v19/pa_mac_sm
|
myrmrvf $1 lib-src/portaudio-v19/pa_mac_sm
|
||||||
myrmrvf $1 lib-src/portaudio-v19/test
|
|
||||||
myrmrvf $1 lib-src/portaudio-v19/testcvs
|
myrmrvf $1 lib-src/portaudio-v19/testcvs
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing wxstd locale files (since they come with wxWidgets)\n";
|
|
||||||
myrmrvf $1 locale/wxstd
|
|
||||||
|
|
||||||
printf "removing Nyquist plug-ins that are just for show ... "
|
printf "removing Nyquist plug-ins that are just for show ... "
|
||||||
myrmvf $1 plug-ins/analyze.ny plug-ins/fadein.ny plug-ins/fadeout.ny
|
myrmvf $1 plug-ins/analyze.ny plug-ins/fadein.ny plug-ins/fadeout.ny
|
||||||
myrmvf $1 plug-ins/undcbias.ny
|
myrmvf $1 plug-ins/undcbias.ny
|
||||||
@@ -182,57 +159,17 @@ function slimtree {
|
|||||||
printf "Removing developer scripts not needed to build audacity ... "
|
printf "Removing developer scripts not needed to build audacity ... "
|
||||||
myrmrvf $1 scripts/mw2html_audacity
|
myrmrvf $1 scripts/mw2html_audacity
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
}
|
|
||||||
|
|
||||||
function fixwinforslim {
|
printf "Removing Mac and Windows build files ... "
|
||||||
printf "Changing Windows header so that it doesn't try to build with\n";
|
myrmrvf $1 mac
|
||||||
printf "support for optional libraries by default.\n";
|
myrmrvf $1 win
|
||||||
|
printf "Done\n"
|
||||||
echo "" >> "win/configwin.h"
|
|
||||||
echo "// The Audacity source tarball does NOT come with" >> "win/configwin.h"
|
|
||||||
echo "// any optional libraries." >> "win/configwin.h"
|
|
||||||
echo "" >> "win/configwin.h"
|
|
||||||
echo "// Delete the following lines if you install them manually." >> "win/configwin.h"
|
|
||||||
echo "" >> "win/configwin.h"
|
|
||||||
echo "#undef MP3SUPPORT" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_FFMPEG" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_LIBFLAC" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_LIBID3TAG" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_LIBLRDF" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_LIBMAD" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_LIBSAMPLERATE" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_LIBTWOLAME" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_LIBVORBIS" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_SLV2" >> "win/configwin.h"
|
|
||||||
echo "#undef USE_SOUNDTOUCH" >> "win/configwin.h"
|
|
||||||
echo "#undef EXPERIMENTAL_SCOREALIGN" >> "win/configwin.h"
|
|
||||||
|
|
||||||
|
|
||||||
printf "removing unwanted projects from VC++ solution\n"
|
|
||||||
updsln $mode libflac
|
|
||||||
updsln $mode libflac++
|
|
||||||
updsln $mode libid3tag
|
|
||||||
updsln $mode libmad
|
|
||||||
updsln $mode liblrdf
|
|
||||||
updsln $mode librdf
|
|
||||||
updsln $mode libsamplerate
|
|
||||||
updsln $mode twolame
|
|
||||||
updsln $mode libvorbis
|
|
||||||
updsln $mode libogg
|
|
||||||
updsln $mode raptor
|
|
||||||
updsln $mode rasqal
|
|
||||||
updsln $mode slv2
|
|
||||||
updsln $mode soundtouch
|
|
||||||
updsln $mode libscorealign
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Maketarball 2.1.0 -- make an Audacity distribution tarball"
|
echo "Maketarball 2.1.0 -- make an Audacity distribution tarball"
|
||||||
|
|
||||||
# check number of arguments, if not one then print a usage message
|
# check number of arguments, if not one then print a usage message
|
||||||
if [ $# == 1 ]; then
|
if [ $# -ne 1 ] ; then
|
||||||
:
|
|
||||||
# carry on, looks like they know what they are doing
|
|
||||||
else
|
|
||||||
echo "Script to make directory trees for audacity source tarballs"
|
echo "Script to make directory trees for audacity source tarballs"
|
||||||
echo "Usage: $0 <mode>"
|
echo "Usage: $0 <mode>"
|
||||||
echo "Where mode is either \"quiet\" or \"verbose\""
|
echo "Where mode is either \"quiet\" or \"verbose\""
|
||||||
@@ -248,14 +185,22 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "src/Audacity.h" ]
|
if [ ! -f "src/Audacity.h" ] ; then
|
||||||
then :
|
|
||||||
# a null body - we will just carry straight on
|
|
||||||
else
|
|
||||||
echo "$0 must be run from top-level audacity directory"
|
echo "$0 must be run from top-level audacity directory"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# capture some directory information, we'll want it later
|
||||||
|
sourcedir="$(pwd)" # where the sources are
|
||||||
|
cd ..
|
||||||
|
topdir="$(pwd)" # one level up where the tarballs come out
|
||||||
|
tmpsrc="${topdir}/$(mktemp -d audacity-src-XXXXXX)" # where initial modifications are done
|
||||||
|
|
||||||
|
printf "making copy of source directory ... "
|
||||||
|
cp -pr "${sourcedir}/." "${tmpsrc}"
|
||||||
|
cd "${tmpsrc}"
|
||||||
|
printf "Done\n"
|
||||||
|
|
||||||
# The script relies on make working, so Makefiles need to be present. This
|
# The script relies on make working, so Makefiles need to be present. This
|
||||||
# means that configure must have been run on the sources. In general it doesn't
|
# means that configure must have been run on the sources. In general it doesn't
|
||||||
# matter what options, but the generation of a Makefile in lib-src/ in
|
# matter what options, but the generation of a Makefile in lib-src/ in
|
||||||
@@ -266,11 +211,11 @@ fi
|
|||||||
# dependency turned off, so we should check that libsndfile is clean, and ask
|
# dependency turned off, so we should check that libsndfile is clean, and ask
|
||||||
# for reconfiguration if not.
|
# for reconfiguration if not.
|
||||||
reconf=0
|
reconf=0
|
||||||
if [[ -f "lib-src/Makefile" ]] ; then
|
if [ -f "lib-src/Makefile" ] ; then
|
||||||
# we have a Makefile - is it new enough?
|
# we have a Makefile - is it new enough?
|
||||||
t2=$(date +%s -r "lib-src/Makefile")
|
t2=$(date +%s -r "lib-src/Makefile")
|
||||||
t1=$(date +%s -r "lib-src/Makefile.in")
|
t1=$(date +%s -r "lib-src/Makefile.in")
|
||||||
if [[ $t1 -gt $t2 ]] ; then
|
if [ $t1 -gt $t2 ] ; then
|
||||||
# not new enough, reconfigure
|
# not new enough, reconfigure
|
||||||
reconf=1
|
reconf=1
|
||||||
fi
|
fi
|
||||||
@@ -282,7 +227,7 @@ fi
|
|||||||
# these are the arguments we will pass to configure when it is run
|
# these are the arguments we will pass to configure when it is run
|
||||||
configargs="--enable-maintainer-mode"
|
configargs="--enable-maintainer-mode"
|
||||||
|
|
||||||
if [[ x"$reconf" = x1 ]] ; then
|
if [ $reconf -eq 1 ] ; then
|
||||||
echo "Your Makefiles are out of date or missing. (Re)running configure to"
|
echo "Your Makefiles are out of date or missing. (Re)running configure to"
|
||||||
echo "create up-to-date Makefiles before building tarballs..."
|
echo "create up-to-date Makefiles before building tarballs..."
|
||||||
echo " ./configure ${configargs}"
|
echo " ./configure ${configargs}"
|
||||||
@@ -293,7 +238,7 @@ if [[ x"$reconf" = x1 ]] ; then
|
|||||||
else
|
else
|
||||||
$SHELL -c "./configure ${configargs}" > /dev/null 2>&1
|
$SHELL -c "./configure ${configargs}" > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
if [[ ${?} -ne 0 ]] ; then
|
if [ ${?} -ne 0 ] ; then
|
||||||
echo "Error - configure exited with non-zero status!"
|
echo "Error - configure exited with non-zero status!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -307,10 +252,11 @@ fi
|
|||||||
# through the pre-processor to get the version string components where we can
|
# through the pre-processor to get the version string components where we can
|
||||||
# find them.
|
# find them.
|
||||||
|
|
||||||
if [[ ! -x "config.status" ]] ; then
|
if [ ! -x "config.status" ] ; then
|
||||||
echo "config.status is not present or executable - cannot proceed"
|
echo "config.status is not present or executable - cannot proceed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Getting program version ... "
|
echo -n "Getting program version ... "
|
||||||
# first off, find out what C++ pre-processor configure has found for us to use
|
# first off, find out what C++ pre-processor configure has found for us to use
|
||||||
# (because we want the same one that will be used to build Audacity). This is a
|
# (because we want the same one that will be used to build Audacity). This is a
|
||||||
@@ -318,72 +264,49 @@ echo -n "Getting program version... "
|
|||||||
# been run
|
# been run
|
||||||
cppprog="$(echo '@CXX@' | ./config.status --file=-)"
|
cppprog="$(echo '@CXX@' | ./config.status --file=-)"
|
||||||
|
|
||||||
# now create a temporary directory where out source file will live
|
# run the preprocessor, convert output to shell variables, and evaluate to
|
||||||
cppdir="$(mktemp -d mktarball.XXXXXXXXXXX)"
|
# define them
|
||||||
cppfile="${cppdir}/ver.cpp"
|
eval $(cpp -E <<CPPEOF | sed -e 's/wxT("//g' \
|
||||||
# create the test source file
|
-e 's/")//g' \
|
||||||
cat > "${cppfile}" << EOFCPP
|
-e 's/ //g' \
|
||||||
#include "$(pwd)/src/Audacity.h"
|
-e "s/__TDATE__/$(date +%Y%m%d)/" \
|
||||||
AUDACITY_VERSION
|
-e 's/=/="/' \
|
||||||
AUDACITY_RELEASE
|
-e 's/$/"/' \
|
||||||
AUDACITY_REVISION
|
-e '/^v_/p' \
|
||||||
AUDACITY_SUFFIX
|
-e 'd'
|
||||||
EOFCPP
|
#include "src/Audacity.h"
|
||||||
|
v_major=AUDACITY_VERSION
|
||||||
|
v_minor=AUDACITY_RELEASE
|
||||||
|
v_micro=AUDACITY_REVISION
|
||||||
|
v_suffix=AUDACITY_SUFFIX
|
||||||
|
CPPEOF
|
||||||
|
)
|
||||||
|
|
||||||
# pre-process the source (to get macros expanded) and parse the result
|
version="${v_major}.${v_minor}.${v_micro}${v_suffix}"
|
||||||
major_version=$(${cppprog} "${cppfile}" -E | tail -n 4 | head -n 1)
|
printf "${version}\n"
|
||||||
minor_version=$(${cppprog} "${cppfile}" -E | tail -n 3 | head -n 1)
|
|
||||||
micro_version=$(${cppprog} "${cppfile}" -E | tail -n 2 | head -n 1)
|
|
||||||
# this gets the text out of the wxT("") macro it is already wrapped in
|
|
||||||
version_suffix=$(${cppprog} "${cppfile}" -E | tail -n 1 | cut -d\" -f 2)
|
|
||||||
# see if the suffix contains a compiler date macro
|
|
||||||
${cppprog} "${cppfile}" -E | tail -n 1 | grep -v -q '__TDATE__'
|
|
||||||
version_date=$?
|
|
||||||
|
|
||||||
if [[ ${version_date} -ne 0 ]] ; then
|
|
||||||
# need to suffix the date on to the suffix string
|
|
||||||
version_suffix="${version_suffix}$(date "+%Y%m%d")"
|
|
||||||
fi
|
|
||||||
# remove that temp directory and the associated files
|
|
||||||
rm -fr "${cppdir}"
|
|
||||||
|
|
||||||
version="${major_version}.${minor_version}.${micro_version}${version_suffix}"
|
|
||||||
echo "${version}"
|
|
||||||
# completes previous echo -n call
|
|
||||||
|
|
||||||
# capture some directory information, we'll want it later
|
|
||||||
sourcedir="$(pwd)" # where the sources are
|
|
||||||
cd ..
|
|
||||||
topdir="$(pwd)" # one level up where the tarballs come out
|
|
||||||
tarname="audacity-src-${version}" # the directory we will find inside tarballs
|
|
||||||
tardir="${topdir}/${tarname}" # absolute tar directory
|
|
||||||
|
|
||||||
printf "making copy of source directory... "
|
|
||||||
cd "${sourcedir}" # go to sources dir
|
|
||||||
cp -r . "${tardir}"
|
|
||||||
cd "${tardir}"
|
|
||||||
printf "Done\n"
|
|
||||||
|
|
||||||
# now clean out the directory of all the things we don't need in the
|
# now clean out the directory of all the things we don't need in the
|
||||||
# tarball, prior to building the source tarball
|
# tarball, prior to building the source tarball
|
||||||
cleanfulltree $mode;
|
cleanfulltree $mode
|
||||||
|
|
||||||
# now we have the full source tree, lets slim it down to the bits that
|
# now we have the full source tree, lets slim it down to the bits that
|
||||||
# you actually need to build audacity on a shared library system with the
|
# you actually need to build audacity on a shared library system with the
|
||||||
# relevant libraries installed on the system (e.g. Linux distros)
|
# relevant libraries installed on the system (e.g. Linux distros)
|
||||||
slimtree $mode;
|
slimtree $mode
|
||||||
|
|
||||||
# Fix up windows builds for the slimmed state of the tarball
|
# Rename the source tree to the versioned name
|
||||||
fixwinforslim ${mode}
|
cd "${topdir}"
|
||||||
|
printf "Renaming source tree ... "
|
||||||
|
tarname="audacity-minsrc-${version}" # the directory we will find inside tarballs
|
||||||
|
mv "${tmpsrc}" "${tarname}"
|
||||||
|
printf "Done\n"
|
||||||
|
|
||||||
# Tar up that lot as the source tarball
|
# Tar up that lot as the source tarball
|
||||||
cd "${topdir}"
|
printf "Creating source tarball ... "
|
||||||
printf "Creating source tarball .... "
|
tar cf "${tarname}.tar" "${tarname}"
|
||||||
tar cf "audacity-minsrc-${version}.tar" "${tarname}"
|
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "Compressing source tarball .... "
|
printf "Compressing source tarball ... "
|
||||||
xz "audacity-minsrc-${version}.tar"
|
xz "${tarname}.tar"
|
||||||
|
cd "${tarname}"
|
||||||
cd "${tardir}"
|
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user