Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

build-win32 1.5 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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="libpipi-win32-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\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. make distclean || true
  16. cd "${BUILDDIR}"
  17. # Build for win32
  18. "${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-doc "$@"
  19. make pkglibdir=/lib pkgdatadir=/data bindir=/bin
  20. # Install into our private directory
  21. make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
  22. cd "${SRCDIR}"
  23. rm -Rf "${BUILDDIR}"
  24. mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
  25. mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
  26. rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
  27. i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe || true
  28. i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll || true
  29. rmdir "${INSTALLDIR}/bin"
  30. rmdir "${INSTALLDIR}/lib"
  31. mkdir "${INSTALLDIR}/doc"
  32. for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
  33. sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
  34. done
  35. rm -Rf "${INSTALLDIR}/share"
  36. rm -Rf "${INSTALLDIR}/man"
  37. rm -Rf "${INSTALLDIR}/include"
  38. rm -Rf "${INSTALLDIR}/pkg-config"
  39. rm -f "${INSTALLDIR}/caca-config"
  40. rm -f "${INSTALLDIR}/"*.a
  41. rm -f "${INSTALLDIR}/"*.la
  42. # Pack the directory
  43. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  44. rm -Rf "${INSTALLDIR}"