Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

53 wiersze
1.5 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="libpipi-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=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-java --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 || true
  27. i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll || true
  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}"