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.
 
 
 
 
 
 

52 line
1.3 KiB

  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. make distclean || true
  16. cd "${BUILDDIR}"
  17. # Build for win32
  18. "${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib "$@"
  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. i586-mingw32msvc-strip "${INSTALLDIR}/bin/"*.exe || true
  25. i586-mingw32msvc-strip "${INSTALLDIR}/lib/"*.dll || true
  26. # Install gtk-sharp
  27. cp -r "win32/dist/"* "${INSTALLDIR}/"
  28. cp -r "win32/assembly/"* "${INSTALLDIR}/bin/"
  29. # Install pipi-sharp
  30. mv "${INSTALLDIR}/lib/pipi-sharp/"* "${INSTALLDIR}/bin/"
  31. rm -Rf "${INSTALLDIR}/lib/pipi-sharp"
  32. mkdir "${INSTALLDIR}/doc"
  33. for f in COPYING NOTES; do
  34. sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
  35. done
  36. rm -f "${INSTALLDIR}/lib/"*.a
  37. rm -f "${INSTALLDIR}/lib/"*.la
  38. # Pack the directory
  39. zip "${DIRNAME}.zip" `find "${DIRNAME}"`
  40. rm -Rf "${INSTALLDIR}"