python/types-setuptools: update to 75.6.0.20241223
[oi-userland.git] / components / encumbered / megasync / Makefile
blob605e93e74db81a44c4aa92eef0d3b66af9aab3e9
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 2022, Daniel Chan
24 # Copyright (c) 2022-2023 Niklas Poslovski
27 include ../../../make-rules/shared-macros.mk
29 COMPONENT_NAME= MEGAsync
30 COMPONENT_VERSION= 4.9.5.0
31 _REL=Linux
32 GIT_TAG=v$(COMPONENT_VERSION)_$(_REL)
33 COMPONENT_SUMMARY= Easy automated syncing between your computers and your MEGA cloud drive
34 COMPONENT_SRC= $(COMPONENT_NAME)-$(GIT_TAG)
35 COMPONENT_GIT_URL= https://github.com/meganz
36 COMPONENT_PROJECT_URL= $(COMPONENT_GIT_URL)/$(COMPONENT_NAME)
37 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)_$(_REL)
38 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
39 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/archive/refs/tags/$(GIT_TAG).tar.gz
40 COMPONENT_ARCHIVE_HASH= sha256:33e0d4e26492ef7ffd965a739f1d050b634aef69110d85af693f823e98718976
41 COMPONENT_FMRI= network/megasync
42 COMPONENT_CLASSIFICATION= Applications/System Utilities
43 COMPONENT_LICENSE= custom:MEGA LIMITED CODE REVIEW LICENCE
44 COMPONENT_LICENSE_FILE= LICENCE.md
46 GIT_BRANCH_1=0f6531827ff7b15d1955f2e5843d44f90efd6f8d
47 COMPONENT_SRC_1= sdk-$(GIT_BRANCH_1)
48 COMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.gz
49 COMPONENT_ARCHIVE_URL_1= $(COMPONENT_GIT_URL)/sdk/archive/$(GIT_BRANCH_1).tar.gz
50 COMPONENT_ARCHIVE_HASH_1= sha256:21dd9e2f502f42566419bfc53a2b4214e3adaf052c771eb6d47d6401e2b37491
52 include $(WS_MAKE_RULES)/encumbered.mk
53 include $(WS_MAKE_RULES)/common.mk
55 PATH=$(QT5_BINDIR):$(GNUBIN):$(USRBINDIR$(BITS)):$(USRBINDIR):$(USRSBINDIR$(BITS)):$(USRSBINDIR):$(PERL5BINDIR)
56 COMPONENT_POST_UNPACK_ACTION_1= \
57 mv $(COMPONENT_SRC_1)/* $(SOURCE_DIR)/src/MEGASync/mega
58 CONFIGURE_OPTIONS += with_pcre=/usr
59 CONFIGURE_OPTIONS += with_libmediainfo=/usr
60 CONFIGURE_OPTIONS += with_freeimage=yes
61 CONFIGURE_OPTIONS += --disable-silent-rules
62 CONFIGURE_OPTIONS += --disable-curl-checks
63 CONFIGURE_OPTIONS += --disable-megaapi
64 CONFIGURE_OPTIONS += --disable-posix-threads
65 CONFIGURE_OPTIONS += --disable-examples
66 CONFIGURE_OPTIONS += --prefix="$(@D)/MEGAsync/src/MEGASync/mega/bindings/qt/3rdparty"
67 CONFIGURE_SCRIPT = configure
68 COMPONENT_PRE_CONFIGURE_ACTION= \
69 (mv $(SOURCE_DIR)/* $(@D)); \
70 cd $(@D)/src/MEGASync/mega && ./autogen.sh
71 COMPONENT_PRE_BUILD_ACTION= \
72 cd $(@D)/src && qmake "CONFIG += FULLREQUIREMENTS" "QMAKE_LFLAGS += -lelf -ljpegxr -lsocket -Wl,-z,ignore -Wl,-z,redlocsym -fPIC" "QMAKE_CC = $(CC)" "QMAKE_CXX = $(CXX)" MEGA.pro && lrelease MEGASync/MEGASync.pro
73 COMPONENT_POST_BUILD_ACTION= \
74 mv $(BUILD_DIR)/amd64/LICENCE.md $(SOURCE_DIR)/LICENCE.md
75 COMPONENT_INSTALL_ARGS += INSTALL_ROOT=$(PROTO_DIR)
76 COMPONENT_POST_INSTALL_ACTION = \
77 cd $(@D)/src/ && mkdir -p $(PROTO_DIR)/usr/bin/ && ginstall -Dm 755 MEGASync/megasync $(PROTO_DIR)/usr/bin/
79 $(BUILD_DIR)/%/.configured: $(SOURCE_DIR)/.prep
80 ($(RM) -rf $(@D) ; $(MKDIR) $(@D))
81 $(COMPONENT_PRE_CONFIGURE_ACTION)
82 (cd $(@D) ; cd $(@D)/src/MEGASync/mega && $(ENV) $(CONFIGURE_ENV) $(CONFIG_SHELL) \
83 $(CONFIGURE_SCRIPT) $(CONFIGURE_OPTIONS))
84 $(COMPONENT_POST_CONFIGURE_ACTION)
85 $(TOUCH) $@
87 $(BUILD_DIR)/%/.built: $(BUILD_DIR)/%/.configured
88 $(COMPONENT_PRE_BUILD_ACTION)
89 (cd $(@D) ; cd $(@D)/src && $(ENV) $(COMPONENT_BUILD_ENV) \
90 $(GMAKE) $(COMPONENT_BUILD_GMAKE_ARGS) $(COMPONENT_BUILD_ARGS) \
91 $(COMPONENT_BUILD_TARGETS))
92 $(COMPONENT_POST_BUILD_ACTION)
93 ifeq ($(strip $(PARFAIT_BUILD)),yes)
94 -$(PARFAIT) build
95 endif
96 $(TOUCH) $@
98 $(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built
99 $(COMPONENT_PRE_INSTALL_ACTION)
100 (cd $(@D) ; cd $(@D)/src && $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \
101 $(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
102 $(COMPONENT_POST_INSTALL_ACTION)
103 $(TOUCH) $@
105 # Auto-generated dependencies
106 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
107 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
108 REQUIRED_PACKAGES += database/sqlite-3
109 REQUIRED_PACKAGES += library/cryptopp
110 REQUIRED_PACKAGES += library/icu
111 REQUIRED_PACKAGES += library/libcares
112 REQUIRED_PACKAGES += library/libfreeimage
113 REQUIRED_PACKAGES += library/libmediainfo
114 REQUIRED_PACKAGES += library/libuv
115 REQUIRED_PACKAGES += library/libzen
116 REQUIRED_PACKAGES += library/qt5
117 REQUIRED_PACKAGES += library/security/libsodium
118 REQUIRED_PACKAGES += library/security/openssl
119 REQUIRED_PACKAGES += library/zlib
120 REQUIRED_PACKAGES += system/library
121 REQUIRED_PACKAGES += system/library/math
122 REQUIRED_PACKAGES += video/ffmpeg
123 REQUIRED_PACKAGES += web/curl
124 REQUIRED_PACKAGES += x11/library/libxcb