2 # $1 ... install prefix -- defaults to /usr/local
4 PREFIX
="${1:-/usr/local}"
7 # tarball is kinda out of date and not compiling
8 #BASEURL="http://svn.macosforge.org/repository/odcctools/release"
9 #ODCCTOOLS=odcctools-20090808.tar.bz2
10 #ODCCTOOLS_MD5SUM=cb8ce536e204fc2399fc27079012c37b
14 BASEURL
="http://svn.macosforge.org/repository/odcctools/trunk/"
23 if [[ ${USETAR} != no
]]; then
24 if [[ -e ${ODCCTOOLS} ]]; then
25 MD5LINE
="${ODCCTOOLS_MD5SUM} ${ODCCTOOLS}"
26 if ! echo "${MD5LINE}" |
md5sum -c --quiet -; then
27 echo "Re-fetching ${ODCCTOOLS} due to checksum error"
30 echo "Using pre-downloaded ${ODCCTOOLS}"
35 if [[ ${NOFETCH} != yes ]]; then
36 wget
"${BASEURL}/${ODCCTOOLS}"
39 tar jxf
${ODCCTOOLS} || die
"Unpacking ${ODCCTOOLS} failed"
40 S
=${ODCCTOOLS/.tar.bz2}
43 if [[ -e ${ODCCTOOLS} ]]; then
48 svn co
"${BASEURL}" ${ODCCTOOLS}
52 .
/extract.sh || die
"Unpacking with ./extract.sh failed"
54 S
=${ODCCTOOLS}/odcctools
61 pushd ${S} || die
"pushd failed"
62 .
/configure
--target=i386-apple-darwin9
--prefix="${PREFIX}" || die
"configure failed"
63 make -C libstuff || die
"make libstuff failed"
64 make -C misc lipo || die
"make lipo failed"
65 mkdir
-p "${PREFIX}"/bin || die
"mkdir install dir failed"
66 cp misc
/lipo
"${PREFIX}"/bin
/ || die
"copying lipo failed"
67 popd || die
"popd failed"