You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1.2 KiB

  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. DIRNAME="libcaca-win32-`sed -ne '/^VERSION/s/[^0-9]*//p' Makefile`"
  8. DESTDIR="`pwd`/${DIRNAME}"
  9. rm -Rf "${DIRNAME}"
  10. rm -f "${DIRNAME}.zip"
  11. mkdir "${DIRNAME}"
  12. # Build for win32
  13. ./configure --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-doc
  14. make pkglibdir=/lib pkgdatadir=/data bindir=/bin
  15. # Install into our private directory
  16. make install DESTDIR="${DESTDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
  17. mv "${DESTDIR}/bin/"* "${DESTDIR}/"
  18. mv "${DESTDIR}/lib/"* "${DESTDIR}/"
  19. i586-mingw32msvc-strip "${DESTDIR}/"*.exe
  20. i586-mingw32msvc-strip "${DESTDIR}/"*.dll
  21. rmdir "${DESTDIR}/bin"
  22. rmdir "${DESTDIR}/lib"
  23. mkdir "${DESTDIR}/doc"
  24. for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS TODO; do
  25. sed -e 's/$/ /' < "${f}" > "${DESTDIR}/doc/${f}.txt"
  26. done
  27. rm -Rf "${DESTDIR}/share"
  28. rm -Rf "${DESTDIR}/man"
  29. rm -Rf "${DESTDIR}/include"
  30. rm -f "${DESTDIR}/caca-config"
  31. rm -f "${DESTDIR}/"*.a
  32. rm -f "${DESTDIR}/"*.la
  33. # Pack the directory
  34. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  35. rm -Rf "${DIRNAME}"