diff --git a/Makefile.org b/Makefile.org index 7fa4b52a9..89e074f5c 100644 --- a/Makefile.org +++ b/Makefile.org @@ -276,7 +276,7 @@ Makefile: Makefile.org Configure config @false libclean: - rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib + rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib clean: libclean rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c @@ -476,13 +476,13 @@ install_sw: chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ else \ - c=`echo $$i | sed 's/^lib/cyg/'`; \ + c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ - cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \ - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \ + cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ fi ); \ fi; \ done; \ diff --git a/Makefile.shared b/Makefile.shared index 827b01d8e..6d6876193 100644 --- a/Makefile.shared +++ b/Makefile.shared @@ -231,7 +231,8 @@ link_o.cygwin: SHLIB=cyg$(LIBNAME); \ expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \ SHLIB_SUFFIX=.dll; \ - SHLIB_SOVER=-$(LIBVERSION); \ + LIBVERSION="$(LIBVERSION)"; \ + SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \ @@ -242,16 +243,16 @@ link_a.cygwin: SHLIB=cyg$(LIBNAME); \ expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \ SHLIB_SUFFIX=.dll; \ - SHLIB_SOVER=; \ + SHLIB_SOVER=-$(LIBVERSION); \ ALLSYMSFLAGS='-Wl,--whole-archive'; \ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ - base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x61200000; \ + base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \ [ -f apps/$$SHLIB$$SHLIB_SUFFIX ] && rm apps/$$SHLIB$$SHLIB_SUFFIX; \ [ -f test/$$SHLIB$$SHLIB_SUFFIX ] && rm test/$$SHLIB$$SHLIB_SUFFIX; \ $(LINK_SO_A) || exit 1; \ - cp -p $$SHLIB$$SHLIB_SUFFIX apps/; \ - cp -p $$SHLIB$$SHLIB_SUFFIX test/ + cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX apps/; \ + cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX test/ link_app.cygwin: $(LINK_APP) diff --git a/engines/Makefile b/engines/Makefile index 483ed7237..9ac5471ac 100644 --- a/engines/Makefile +++ b/engines/Makefile @@ -82,14 +82,19 @@ files: links: # XXXXX This currently only works on systems that use .so as suffix -# for shared libraries. +# for shared libraries as well as for Cygwin which uses the +# dlfcn_name_converter and therefore stores the engines with .so suffix, too. install: @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... @if [ -n "$(SHARED_LIBS)" ]; then \ set -e; \ for l in $(LIBNAMES); do \ ( echo installing $$l; \ - cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + if [ "$(PLATFORM)" != "Cygwin" ]; then \ + cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + else \ + cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + fi; \ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so ); \ done; \ diff --git a/util/cygwin.sh b/util/cygwin.sh index 7f791d47f..fabbf8422 100755 --- a/util/cygwin.sh +++ b/util/cygwin.sh @@ -47,6 +47,14 @@ function doc_install() create_cygwin_readme } +function certs_install() +{ + CERTS_DIR=${INSTALL_PREFIX}/usr/ssl/certs + + mkdir -p ${CERTS_DIR} + cp -rp certs/* ${CERTS_DIR} +} + function create_cygwin_readme() { README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin @@ -104,6 +112,8 @@ base_install doc_install +certs_install + create_cygwin_readme create_profile_files @@ -112,11 +122,13 @@ cd ${INSTALL_PREFIX} strip usr/bin/*.exe usr/bin/*.dll # Runtime package -find etc usr/bin usr/share/doc usr/ssl/certs usr/ssl/man/man[157] \ - usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d | +find etc usr/bin usr/lib/engines usr/share/doc usr/ssl/certs \ + usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private \ + -empty -o \! -type d | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - # Development package -find usr/include usr/lib usr/ssl/man/man3 -empty -o \! -type d | +find usr/include usr/lib/*.a usr/lib/pkgconfig usr/ssl/man/man3 \ + -empty -o \! -type d | tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 - ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2