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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #! /bin/sh
  2. ## Win32 cross-compilation for libpipi -- 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. cd "${BUILDDIR}"
  16. # Build for win32
  17. "${SRCDIR}/configure" --host=i586-mingw32msvc --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. i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe
  26. i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll
  27. rmdir "${INSTALLDIR}/bin"
  28. rmdir "${INSTALLDIR}/lib"
  29. mkdir "${INSTALLDIR}/doc"
  30. for f in COPYING NOTES; do
  31. sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
  32. done
  33. rm -Rf "${INSTALLDIR}/share"
  34. rm -Rf "${INSTALLDIR}/man"
  35. rm -Rf "${INSTALLDIR}/include"
  36. rm -Rf "${INSTALLDIR}/pkg-config"
  37. rm -f "${INSTALLDIR}/"*.a
  38. rm -f "${INSTALLDIR}/"*.la
  39. # Pack the directory
  40. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  41. rm -Rf "${INSTALLDIR}"