Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

54 рядки
1.5 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. 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}"