2008-01-16 20:13:18 +00:00
|
|
|
#!/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.
|
2008-01-19 09:09:11 +00:00
|
|
|
# The ./bootstrap script gets applied and a source tarball
|
|
|
|
# is made.
|
|
|
|
#
|
2008-01-16 20:13:18 +00:00
|
|
|
# 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 :
|
|
|
|
#
|
2008-01-19 09:09:11 +00:00
|
|
|
# ./configure && make
|
2008-01-16 20:13:18 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
current_dir=$(pwd)
|
|
|
|
lone_dir="$current_dir"/"xorriso-standalone"
|
|
|
|
|
2008-01-19 09:09:11 +00:00
|
|
|
xorriso_rev=0.1.0
|
|
|
|
xorriso_pl=".pl00"
|
|
|
|
|
|
|
|
with_bootstrap_tarball=1
|
|
|
|
|
2008-01-16 20:13:18 +00:00
|
|
|
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 \
|
|
|
|
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"
|
|
|
|
|
2008-01-17 19:27:51 +00:00
|
|
|
copy_files test/configure_ac.txt "$lone_dir"/configure.ac
|
2008-01-16 20:13:18 +00:00
|
|
|
|
2008-01-17 19:27:51 +00:00
|
|
|
copy_files test/xorriso_makefile_am.txt "$lone_dir"/Makefile.am
|
2008-01-16 20:13:18 +00:00
|
|
|
|
2008-01-17 19:27:51 +00:00
|
|
|
copy_files test/xorriso_pc_in.txt "$lone_dir"/xorriso.pc.in
|
|
|
|
|
|
|
|
copy_files test/README "$lone_dir"/README
|
|
|
|
|
2008-01-18 10:19:36 +00:00
|
|
|
echo "See end of xorriso/changelog.txt" >"$lone_dir"/TODO
|
2008-01-16 20:13:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
# libisoburn
|
|
|
|
|
|
|
|
create_dir "$lone_dir"/libisoburn
|
|
|
|
copy_files \
|
|
|
|
ng_src/*.[ch] \
|
|
|
|
"$lone_dir"/libisoburn
|
|
|
|
|
2008-01-18 17:03:41 +00:00
|
|
|
test/convert_man_to_html.sh
|
|
|
|
|
2008-01-16 20:13:18 +00:00
|
|
|
create_dir "$lone_dir"/xorriso
|
|
|
|
copy_files \
|
|
|
|
test/ng_xorrisoburn.[ch] \
|
|
|
|
test/xorriso.[ch1] \
|
|
|
|
test/xorriso_private.h \
|
|
|
|
test/xorriso_timestamp.h \
|
2008-01-17 19:27:51 +00:00
|
|
|
test/changelog.txt \
|
2008-01-18 17:03:41 +00:00
|
|
|
test/xorriso_eng.html \
|
|
|
|
test/man_1_xorriso.html \
|
2008-01-16 20:13:18 +00:00
|
|
|
"$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
|
|
|
|
|
2008-01-17 19:27:51 +00:00
|
|
|
# >>> create compile_xorriso.sh for standalone
|
2008-01-16 20:13:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
# nglibisofs
|
|
|
|
|
|
|
|
create_dir "$lone_dir"/libisofs
|
|
|
|
goto_dir "$current_dir"/nglibisofs-develop
|
|
|
|
copy_files src/*.[ch] "$lone_dir"/libisofs
|
|
|
|
|
2008-01-24 20:16:52 +00:00
|
|
|
|
|
|
|
# <<< obsoleted
|
|
|
|
if test 1 = 0
|
|
|
|
then
|
|
|
|
|
2008-01-17 19:27:51 +00:00
|
|
|
# Filter out the semi-illegal TODO comments
|
|
|
|
( cd "$lone_dir"/libisofs && grep '^[[:space:]]*//' *.[ch] | less )
|
|
|
|
echo "Is it ok delete all shown //-lines ?"
|
|
|
|
read yesno
|
|
|
|
if test "$yesno" = "y" -o "$yesno" = "1"
|
|
|
|
then
|
|
|
|
for i in "$lone_dir"/libisofs/*.[ch]
|
|
|
|
do
|
|
|
|
# first copy attributes
|
|
|
|
cp "$i" "$lone_dir"/libisofs/tmpfile
|
|
|
|
# now filter away // lines
|
|
|
|
grep -v '^[[:space:]]*//' <"$i" >"$lone_dir"/libisofs/tmpfile && \
|
|
|
|
mv "$lone_dir"/libisofs/tmpfile "$i"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
echo "Remaining // lines:"
|
|
|
|
( cd "$lone_dir"/libisofs && grep '//' *.[ch] )
|
|
|
|
|
2008-01-24 20:16:52 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2008-01-16 20:13:18 +00:00
|
|
|
|
|
|
|
# libburn
|
|
|
|
|
|
|
|
create_dir "$lone_dir"/libburn
|
|
|
|
goto_dir "$current_dir"/libburn-develop
|
|
|
|
copy_files libburn/*.[ch] "$lone_dir"/libburn
|
|
|
|
|
2008-01-17 19:27:51 +00:00
|
|
|
copy_files COPYING "$lone_dir"/COPYING
|
2008-01-16 20:13:18 +00:00
|
|
|
|
2008-01-19 09:09:11 +00:00
|
|
|
|
|
|
|
# tarball
|
|
|
|
|
|
|
|
if test "$with_bootstrap_tarball" = 1
|
|
|
|
then
|
|
|
|
|
|
|
|
tarball_dir="$current_dir"/xorriso-"$xorriso_rev"
|
|
|
|
mv "$lone_dir" "$tarball_dir"
|
|
|
|
|
|
|
|
goto_dir "$tarball_dir"
|
|
|
|
|
|
|
|
./bootstrap
|
|
|
|
|
|
|
|
# Remove unneeded temporary data from ./bootstrap
|
|
|
|
rm -r ./autom4te.cache
|
|
|
|
|
|
|
|
# Repair non-portable shell code output of ./bootstrap
|
|
|
|
(
|
|
|
|
cd "$compile_dir" || exit 1
|
|
|
|
sed -e 's/^for ac_header in$/test -z 1 \&\& for ac_header in dummy/' \
|
|
|
|
< ./configure > ./configure-repaired
|
|
|
|
if test "$?" = 0
|
|
|
|
then
|
|
|
|
echo "$0: Empty 'for ac_header in' found in configure." >&2
|
|
|
|
fi
|
|
|
|
mv ./configure-repaired ./configure
|
|
|
|
chmod a+rx,go-w,u+w ./configure
|
|
|
|
)
|
|
|
|
|
|
|
|
cd "$current_dir"
|
|
|
|
tar czf ./xorriso-"$xorriso_rev""$xorriso_pl".tar.gz $(basename "$tarball_dir")
|
|
|
|
|
|
|
|
ls -l $(pwd)/xorriso-"$xorriso_rev""$xorriso_pl".tar.gz
|
|
|
|
|
|
|
|
mv "$tarball_dir" "$lone_dir"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2008-01-16 20:13:18 +00:00
|
|
|
echo "Done"
|
|
|
|
echo "HINT: Now build xorriso/xorriso by:"
|
2008-01-19 09:09:11 +00:00
|
|
|
echo " cd '$lone_dir' && ./configure && make"
|
2008-01-16 20:13:18 +00:00
|
|
|
echo
|