25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

52 satır
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="libcaca-win32-`sed -ne 's/^AM_INIT_AUTOMAKE(.*, \(.*\)).*/\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. cd "${BUILDDIR}"
  16. # Build for win32
  17. "${SRCDIR}/configure" --host=i586-mingw32msvc --program-suffix=.exe --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --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
  27. i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll
  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 TODO; 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}"