Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

54 rindas
1.6 KiB

  1. #! /bin/sh
  2. ## Win32 cross-compilation for libcaca -- Sam Hocevar <sam@hocevar.net>
  3. set -x
  4. set -e
  5. # Clean up our working directory
  6. SRCDIR="`pwd`"
  7. DIRNAME="libcaca-win32-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\1/p' configure.ac`"
  8. INSTALLDIR="`pwd`/${DIRNAME}"
  9. BUILDDIR="${INSTALLDIR}/build"
  10. rm -Rf "${INSTALLDIR}"
  11. rm -f "${INSTALLDIR}.zip"
  12. mkdir "${INSTALLDIR}"
  13. mkdir "${BUILDDIR}"
  14. make distclean || true
  15. cd "${BUILDDIR}"
  16. # Build for win32
  17. "${SRCDIR}/configure" --host=i686-w64-mingw32 --build=none --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-java --disable-doc "$@"
  18. make -j4 pkglibdir=/lib pkgdatadir=/data bindir=/bin
  19. # Install into our private directory
  20. make -j4 install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
  21. cd "${SRCDIR}"
  22. rm -Rf "${BUILDDIR}"
  23. mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
  24. rmdir "${INSTALLDIR}/bin"
  25. mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
  26. for f in caca caca++; do
  27. mv "${INSTALLDIR}/lib${f}.a" "${INSTALLDIR}/lib/${f}.lib"
  28. done
  29. rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
  30. i686-w64-mingw32-strip "${INSTALLDIR}/"*.exe || true
  31. i686-w64-mingw32-strip "${INSTALLDIR}/"*.dll || true
  32. mkdir "${INSTALLDIR}/doc"
  33. for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
  34. sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
  35. done
  36. rm -Rf "${INSTALLDIR}/share"
  37. rm -Rf "${INSTALLDIR}/man"
  38. rm -Rf "${INSTALLDIR}/pkgconfig"
  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}"