mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 22:26:31 +00:00
openssl: convert to the generic infrastructure
OpenSSL is not using the autotools as its build system. Therefore, we must use the generic infrastructure instead of the autotools one. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
6af9c84a51
commit
c9a06efff3
@ -5,6 +5,8 @@
|
|||||||
#############################################################
|
#############################################################
|
||||||
OPENSSL_VERSION:=0.9.8n
|
OPENSSL_VERSION:=0.9.8n
|
||||||
OPENSSL_SITE:=http://www.openssl.org/source
|
OPENSSL_SITE:=http://www.openssl.org/source
|
||||||
|
OPENSSL_INSTALL_STAGING = YES
|
||||||
|
OPENSSL_DEPENDENCIES = zlib
|
||||||
|
|
||||||
OPENSSL_TARGET_ARCH=generic32
|
OPENSSL_TARGET_ARCH=generic32
|
||||||
|
|
||||||
@ -19,17 +21,8 @@ ifeq ($(ARCH),x86_64)
|
|||||||
OPENSSL_TARGET_ARCH=x86_64
|
OPENSSL_TARGET_ARCH=x86_64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OPENSSL_INSTALL_STAGING = YES
|
define OPENSSL_CONFIGURE_CMDS
|
||||||
OPENSSL_INSTALL_STAGING_OPT = INSTALL_PREFIX=$(STAGING_DIR) install
|
(cd $(@D); \
|
||||||
|
|
||||||
OPENSSL_INSTALL_TARGET_OPT = INSTALL_PREFIX=$(TARGET_DIR) install
|
|
||||||
|
|
||||||
OPENSSL_DEPENDENCIES = zlib
|
|
||||||
|
|
||||||
$(eval $(call AUTOTARGETS,package,openssl))
|
|
||||||
|
|
||||||
$(OPENSSL_TARGET_CONFIGURE):
|
|
||||||
(cd $(OPENSSL_DIR); \
|
|
||||||
$(TARGET_CONFIGURE_ARGS) \
|
$(TARGET_CONFIGURE_ARGS) \
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
./Configure \
|
./Configure \
|
||||||
@ -43,38 +36,62 @@ $(OPENSSL_TARGET_CONFIGURE):
|
|||||||
no-rc5 \
|
no-rc5 \
|
||||||
zlib-dynamic \
|
zlib-dynamic \
|
||||||
)
|
)
|
||||||
$(SED) "s:-march=[-a-z0-9] ::" -e "s:-mcpu=[-a-z0-9] ::g" $(OPENSSL_DIR)/Makefile
|
$(SED) "s:-march=[-a-z0-9] ::" -e "s:-mcpu=[-a-z0-9] ::g" $(@D)/Makefile
|
||||||
$(SED) "s:-O[0-9]:$(TARGET_CFLAGS):" $(OPENSSL_DIR)/Makefile
|
$(SED) "s:-O[0-9]:$(TARGET_CFLAGS):" $(@D)/Makefile
|
||||||
touch $@
|
endef
|
||||||
|
|
||||||
$(OPENSSL_TARGET_BUILD):
|
define OPENSSL_BUILD_CMDS
|
||||||
$(MAKE1) CC=$(TARGET_CC) -C $(OPENSSL_DIR) all build-shared
|
$(MAKE1) CC=$(TARGET_CC) -C $(@D) all build-shared
|
||||||
$(MAKE1) CC=$(TARGET_CC) -C $(OPENSSL_DIR) do_linux-shared
|
$(MAKE1) CC=$(TARGET_CC) -C $(@D) do_linux-shared
|
||||||
touch $@
|
endef
|
||||||
|
|
||||||
$(OPENSSL_HOOK_POST_INSTALL):
|
define OPENSSL_INSTALL_STAGING_CMDS
|
||||||
$(if $(BR2_HAVE_DEVFILES),,rm -rf $(TARGET_DIR)/usr/lib/ssl)
|
$(MAKE1) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install
|
||||||
ifeq ($(BR2_PACKAGE_OPENSSL_BIN),y)
|
endef
|
||||||
$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/bin/openssl
|
|
||||||
else
|
define OPENSSL_INSTALL_TARGET_CMDS
|
||||||
rm -f $(TARGET_DIR)/usr/bin/openssl
|
$(MAKE1) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install
|
||||||
|
endef
|
||||||
|
|
||||||
|
define OPENSSL_REMOVE_DEV_FILES
|
||||||
|
rm -rf $(TARGET_DIR)/usr/lib/ssl
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifneq ($(BR2_HAVE_DEVFILES),y)
|
||||||
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_DEV_FILES
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
define OPENSSL_REMOVE_OPENSSL_BIN
|
||||||
|
rm -f $(TARGET_DIR)/usr/bin/openssl
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifneq ($(BR2_PACKAGE_OPENSSL_BIN),y)
|
||||||
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_OPENSSL_BIN
|
||||||
|
endif
|
||||||
|
|
||||||
|
define OPENSSL_INSTALL_FIXUPS
|
||||||
rm -f $(TARGET_DIR)/usr/bin/c_rehash
|
rm -f $(TARGET_DIR)/usr/bin/c_rehash
|
||||||
# libraries gets installed read only, so strip fails
|
# libraries gets installed read only, so strip fails
|
||||||
for i in $(addprefix $(TARGET_DIR)/usr/lib/,libcrypto.so.* libssl.so.*); \
|
|
||||||
do chmod +w $$i; $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $$i; done
|
|
||||||
ifneq ($(BR2_PACKAGE_OPENSSL_ENGINES),y)
|
|
||||||
rm -rf $(TARGET_DIR)/usr/lib/engines
|
|
||||||
else
|
|
||||||
chmod +w $(TARGET_DIR)/usr/lib/engines/lib*.so
|
chmod +w $(TARGET_DIR)/usr/lib/engines/lib*.so
|
||||||
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/engines/lib*.so
|
for i in $(addprefix $(TARGET_DIR)/usr/lib/,libcrypto.so.* libssl.so.*); \
|
||||||
endif
|
do chmod +w $$i; done
|
||||||
touch $@
|
endef
|
||||||
|
|
||||||
$(OPENSSL_TARGET_UNINSTALL):
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_FIXUPS
|
||||||
$(call MESSAGE,"Uninstalling")
|
|
||||||
|
define OPENSSL_REMOVE_OPENSSL_ENGINES
|
||||||
|
rm -rf $(TARGET_DIR)/usr/lib/engines
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifneq ($(BR2_PACKAGE_OPENSSL_ENGINES),y)
|
||||||
|
OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_OPENSSL_ENGINES
|
||||||
|
endif
|
||||||
|
|
||||||
|
define OPENSSL_UNINSTALL_CMDS
|
||||||
rm -rf $(addprefix $(TARGET_DIR)/,etc/ssl usr/bin/openssl usr/include/openssl)
|
rm -rf $(addprefix $(TARGET_DIR)/,etc/ssl usr/bin/openssl usr/include/openssl)
|
||||||
rm -rf $(addprefix $(TARGET_DIR)/usr/lib/,ssl engines libcrypto* libssl* pkgconfig/libcrypto.pc)
|
rm -rf $(addprefix $(TARGET_DIR)/usr/lib/,ssl engines libcrypto* libssl* pkgconfig/libcrypto.pc)
|
||||||
rm -rf $(addprefix $(STAGING_DIR)/,etc/ssl usr/bin/openssl usr/include/openssl)
|
rm -rf $(addprefix $(STAGING_DIR)/,etc/ssl usr/bin/openssl usr/include/openssl)
|
||||||
rm -rf $(addprefix $(STAGING_DIR)/usr/lib/,ssl engines libcrypto* libssl* pkgconfig/libcrypto.pc)
|
rm -rf $(addprefix $(STAGING_DIR)/usr/lib/,ssl engines libcrypto* libssl* pkgconfig/libcrypto.pc)
|
||||||
rm -f $(OPENSSL_TARGET_INSTALL_TARGET) $(OPENSSL_HOOK_POST_INSTALL)
|
endef
|
||||||
|
|
||||||
|
$(eval $(call GENTARGETS,package,openssl))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user