選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

build-win32 1.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #! /bin/sh
  2. ## Win32 cross-compilation for libcaca -- Sam Hocevar <sam@zoy.org>
  3. ## $Id$
  4. set -x
  5. set -e
  6. # Clean up our working directory
  7. SRCDIR="`pwd`"
  8. DIRNAME="libcaca-win32-`sed -ne 's/^AM_INIT_AUTOMAKE(.*, \(.*\)).*/\1/p' configure.ac`"
  9. INSTALLDIR="`pwd`/${DIRNAME}"
  10. BUILDDIR="${INSTALLDIR}/build"
  11. rm -Rf "${INSTALLDIR}"
  12. rm -f "${INSTALLDIR}.zip"
  13. mkdir "${INSTALLDIR}"
  14. mkdir "${BUILDDIR}"
  15. cd "${BUILDDIR}"
  16. # Build for win32
  17. "${SRCDIR}/configure" --host=i586-mingw32msvc --program-suffix=.exe --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-doc
  18. make pkglibdir=/lib pkgdatadir=/data bindir=/bin
  19. # Install into our private directory
  20. make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
  21. cd "${SRCDIR}"
  22. rm -Rf "${BUILDDIR}"
  23. mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
  24. mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
  25. rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
  26. i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe
  27. i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll
  28. rmdir "${INSTALLDIR}/bin"
  29. rmdir "${INSTALLDIR}/lib"
  30. mkdir "${INSTALLDIR}/doc"
  31. for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
  32. sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
  33. done
  34. rm -Rf "${INSTALLDIR}/share"
  35. rm -Rf "${INSTALLDIR}/man"
  36. rm -Rf "${INSTALLDIR}/include"
  37. rm -Rf "${INSTALLDIR}/pkg-config"
  38. rm -f "${INSTALLDIR}/caca-config"
  39. rm -f "${INSTALLDIR}/"*.a
  40. rm -f "${INSTALLDIR}/"*.la
  41. # Pack the directory
  42. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  43. rm -Rf "${INSTALLDIR}"