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.
 
 
 
 
 
 

46 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. cp COPYING COPYING.LGPL "${DESTDIR}/share/doc/libcaca-dev/"
  18. mv "${DESTDIR}/bin/"* "${DESTDIR}/"
  19. mv "${DESTDIR}/lib/"* "${DESTDIR}/"
  20. i586-mingw32msvc-strip "${DESTDIR}/"*.exe
  21. i586-mingw32msvc-strip "${DESTDIR}/"*.dll
  22. rmdir "${DESTDIR}/bin"
  23. rmdir "${DESTDIR}/lib"
  24. mkdir "${DESTDIR}/doc"
  25. for f in `ls "${DESTDIR}/share/doc/libcaca-dev/"`; do
  26. sed -e 's/$/ /' < "${DESTDIR}/share/doc/libcaca-dev/${f}" > "${DESTDIR}/doc/${f}.txt"
  27. done
  28. rm -Rf "${DESTDIR}/share"
  29. rm -Rf "${DESTDIR}/man"
  30. rm -Rf "${DESTDIR}/include"
  31. rm -f "${DESTDIR}/caca-config"
  32. rm -f "${DESTDIR}/"*.a
  33. rm -f "${DESTDIR}/"*.la
  34. # Pack the directory
  35. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  36. rm -Rf "${DIRNAME}"