legacy/libisoburn/trunk/test/make_xorriso_standalone.sh

137 lines
2.3 KiB
Bash
Executable File

#!/bin/sh
#
# Copyright 2008 Thomas Schmitt, scdbackup@gmx.net, GPL
#
# Creates a standalone tree for building xorriso
# from the contents of a unified libburnia development tree.
# To be executed in the parent of the *-develop directories.
#
# From that tree can be build a binary xorriso/xorriso
# which at runtime depends only on libc and libpthread.
# Execute in $lone_dir :
#
# ./bootstrap && ./configure && make
#
current_dir=$(pwd)
lone_dir="$current_dir"/"xorriso-standalone"
create_dir() {
if mkdir "$1"
then
dummy=dummy
else
echo "Failed to create : $r1o" >&2
exit 1
fi
}
goto_dir() {
if cd "$1"
then
dummy=dummy
else
echo "Failed to cd $1" >&2
exit 1
fi
}
copy_files() {
if cp "$@"
then
dummy=dummy
else
echo "Failed to : cp " "$@" >&2
exit 1
fi
}
if test -e "$lone_dir"
then
echo "Already existing : $lone_dir" >&2
exit 1
fi
# Top level directory
goto_dir "$current_dir"/libisoburn-develop
create_dir "$lone_dir"
copy_files \
AUTHORS \
CONTRIBUTORS \
TODO \
acinclude.m4 \
aclocal.m4 \
bootstrap \
compile \
config.guess \
config.status \
config.sub \
depcomp \
install-sh \
libtool \
ltmain.sh \
missing \
mkinstalldirs \
version.h.in \
\
"$lone_dir"
copy_files \
test/configure_ac.txt \
"$lone_dir"/configure.ac
copy_files \
test/xorriso_makefile_am.txt \
"$lone_dir"/Makefile.am
copy_files \
test/xorriso_pc_in.txt \
"$lone_dir"/xorriso.pc.in
# libisoburn
create_dir "$lone_dir"/libisoburn
copy_files \
ng_src/*.[ch] \
"$lone_dir"/libisoburn
create_dir "$lone_dir"/xorriso
copy_files \
test/compile_xorriso.sh \
test/ng_xorrisoburn.[ch] \
test/xorriso.[ch1] \
test/xorriso_private.h \
test/xorriso_timestamp.h \
"$lone_dir"/xorriso
mv "$lone_dir"/xorriso/ng_xorrisoburn.h "$lone_dir"/xorriso/xorrisoburn.h
mv "$lone_dir"/xorriso/ng_xorrisoburn.c "$lone_dir"/xorriso/xorrisoburn.c
# >>> patch compile_xorriso.sh for standalone
# nglibisofs
create_dir "$lone_dir"/libisofs
goto_dir "$current_dir"/nglibisofs-develop
copy_files src/*.[ch] "$lone_dir"/libisofs
# libburn
create_dir "$lone_dir"/libburn
goto_dir "$current_dir"/libburn-develop
copy_files libburn/*.[ch] "$lone_dir"/libburn
echo "Done"
echo "HINT: Now build xorriso/xorriso by:"
echo " cd '$lone_dir' && ./bootstrap && ./configure && make"
echo