COMPONENT_TARGETS = $(HARDWARE_INTEL_PC64)
NEED_ABS_PATH = true
COMPONENT_IS_3PP = true
CREATE_X86_32_PACKAGE = true
include ../../../build-system/constants.mk
SOURCE_REQUIRES = sources/packages/b/mariadb
REQUIRES = app/mariadb/10.6.5
REQUIRES += libs/pcre2/10.36-x86_32
REQUIRES += libs/libaio/0.3.112-x86_32
REQUIRES += libs/libarchive/3.5.2-x86_32
REQUIRES += libs/libevent/2.1.12-x86_32
REQUIRES += libs/readline/8.2-x86_32
REQUIRES += libs/boost/1.77.0-x86_32
REQUIRES += libs/liburing/2.1-x86_32
REQUIRES += libs/jemalloc/5.2.1-x86_32
REQUIRES += libs/judy/1.0.5-x86_32
REQUIRES += net/openssl/1.1.1r-x86_32
REQUIRES += net/krb5/1.19.1-x86_32
REQUIRES += net/curl/7.75.0-x86_32
REQUIRES += secure/cracklib/2.9.7-x86_32
REQUIRES += secure/pam/1.5.1-x86_32
# ======= __END_OF_REQUIRES__ =======
version = 10.6.5
tar_gz_archive = $(SRC_PACKAGE_PATH)/packages/b/mariadb/mariadb-$(version).tar.gz
SRC_ARCHIVE = $(tar_gz_archive)
SRC_DIR = $(TARGET_BUILD_DIR)/mariadb-$(version)
src_dir_name = mariadb-$(version)
src_done = $(TARGET_BUILD_DIR)/.source_done
PATCHES = PATCHES
build_target = $(TARGET_BUILD_DIR)/.build_done
install_target = $(TARGET_BUILD_DIR)/.install_done
####### Targets
PKG_GROUP = app
#
# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
#
MARIADB_32_PKG_NAME = mariadb-x32
MARIADB_32_PKG_VERSION = 10.6.5
MARIADB_32_PKG_ARCH = $(PKGARCH)
MARIADB_32_PKG_DISTRO_NAME = $(DISTRO_NAME)
MARIADB_32_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
MARIADB_32_PKG_GROUP = $(PKG_GROUP)
### |---handy-ruler-------------------------------|
MARIADB_32_PKG_SHORT_DESCRIPTION = the MySQL Database Server
MARIADB_32_PKG_URL = $(BUG_URL)
MARIADB_32_PKG_LICENSE = GPLv2
MARIADB_32_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(MARIADB_32_PKG_NAME)-pkg-description
MARIADB_32_PKG_DESCRIPTION_FILE_IN = $(MARIADB_32_PKG_NAME)-pkg-description.in
MARIADB_32_PKG_INSTALL_SCRIPT = $(MARIADB_32_PKG_NAME)-pkg-install.sh
MARIADB_32_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(MARIADB_32_PKG_NAME)-package
pkg_basename = $(MARIADB_32_PKG_NAME)-$(MARIADB_32_PKG_VERSION)-$(MARIADB_32_PKG_ARCH)-$(MARIADB_32_PKG_DISTRO_NAME)-$(MARIADB_32_PKG_DISTRO_VERSION)
pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
pkg_certificate = $(call cert-name,$(pkg_archive))
pkg_signature = $(call sign-name,$(pkg_archive))
pkg_description = $(call desc-name,$(pkg_archive))
products = $(call pkg-files,$(pkg_archive))
BUILD_TARGETS = $(build_target)
BUILD_TARGETS += $(install_target)
PRODUCT_TARGETS = $(products)
ROOTFS_TARGETS = $(pkg_archive)
include ../../../build-system/core.mk
env_sysroot = DESTDIR=$(MARIADB_32_PKG)
#
# MariaDB cannot use CCACHE:
# =========================
# Therefore, we use the following workaround:
#
# We do not explicitly set the CMAKE_C_COMPILER variable,
# but substituting CC from the Build-System environment gives
# 'ccache gcc' and the variable CMAKE_C_COMPILER is set to
# CMAKE_C_COMPILER=ccache. Next, we indicate the real path to
# the compiler through the CMAKE_C_COMPILER_ARG1 variable.
#
# -DCMAKE_C_COMPILER='$(CROSS_PREFIX)gcc'
# -DCMAKE_CXX_COMPILER='$(CROSS_PREFIX)g++'
#
configure_switches += -DCMAKE_C_COMPILER_ARG1='$(CROSS_PREFIX)gcc'
configure_switches += -DCMAKE_CXX_COMPILER_ARG1='$(CROSS_PREFIX)g++'
configure_switches += -DCMAKE_LINKER='$(CROSS_PREFIX)ld'
configure_switches += -DCMAKE_AR='$(CROSS_PREFIX)ar'
configure_switches += -DCMAKE_NM='$(CROSS_PREFIX)nm'
configure_switches += -DCMAKE_ADDR2LINE='$(CROSS_PREFIX)addr2line'
configure_switches += -DCMAKE_READELF='$(CROSS_PREFIX)readelf'
configure_switches += -DCMAKE_RANLIB='$(CROSS_PREFIX)ranlib'
configure_switches += -DCMAKE_OBJCOPY='$(CROSS_PREFIX)objcopy'
configure_switches += -DCMAKE_OBJDUMP='$(CROSS_PREFIX)objdump'
configure_switches += -DCMAKE_STRIP='$(CROSS_PREFIX)strip'
configure_switches += -DCMAKE_C_COMPILER_AR='$(AR)'
configure_switches += -DCMAKE_CXX_COMPILER_AR='$(AR)'
configure_switches += -DCMAKE_C_COMPILER_RANLIB='$(RANLIB)'
configure_switches += -DCMAKE_CXX_COMPILER_RANLIB='$(RANLIB)'
suppress-warnings = -Wno-restrict -Wformat-overflow=0 -Wimplicit-fallthrough=0 -Wno-return-local-addr
suppress-warnings += -Wno-stringop-truncation -Wstringop-overflow=0 -Wno-maybe-uninitialized
configure_switches += -DCMAKE_C_FLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 $(CFLAGS) $(ARCH_FLAGS) $(ARCH_DEFS) $(HW_FLAGS) -fPIC -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks $(suppress-warnings)'
configure_switches += -DCMAKE_CXX_FLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 $(CFLAGS) $(ARCH_FLAGS) $(ARCH_DEFS) $(HW_FLAGS) -fPIC -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-delete-null-pointer-checks -Wno-range-loop-construct $(suppress-warnings)'
configure_switches += -DCMAKE_EXE_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 $(LDFLAGS)'
configure_switches += -DCMAKE_SHARED_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 $(LDFLAGS)'
configure_switches += -DCMAKE_MODULE_LINKER_FLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 $(LDFLAGS)'
configure_switches += -DCMAKE_BUILD_TYPE=RelWithDebInfo
configure_switches += -DFEATURE_SET='community'
configure_switches += -DINSTALL_LAYOUT='RPM'
configure_switches += -DCMAKE_INSTALL_PREFIX=/usr
configure_switches += -DINSTALL_LIBDIR='lib$(MULTILIB_X86_32_SUFFIX)'
configure_switches += -DINSTALL_PCDIR='lib$(MULTILIB_X86_32_SUFFIX)/pkgconfig'
configure_switches += -DINSTALL_SCRIPTDIR=bin
configure_switches += -DINSTALL_SBINDIR=libexec
configure_switches += -DINSTALL_INCLUDEDIR=include/mysql
configure_switches += -DINSTALL_MYSQLSHAREDIR=share/mysql
configure_switches += -DINSTALL_SQLBENCHDIR=
configure_switches += -DINSTALL_MYSQLTESTDIR=share/mysql-test
configure_switches += -DINSTALL_MANDIR=share/man
configure_switches += -DINSTALL_PLUGINDIR='lib$(MULTILIB_X86_32_SUFFIX)/mysql/plugin'
configure_switches += -DINSTALL_SUPPORTFILESDIR=share/mysql
configure_switches += -DINSTALL_MYSQLDATADIR='/var/lib/mysql'
configure_switches += -DINSTALL_DOCREADMEDIR='share/doc/$(src_dir_name)'
configure_switches += -DINSTALL_DOCDIR='share/doc/$(src_dir_name)'
configure_switches += -DMYSQL_DATADIR='/var/lib/mysql'
configure_switches += -DINSTALL_PAMDATADIR=/etc/security
configure_switches += -DINSTALL_PAMDIR=/lib$(MULTILIB_X86_32_SUFFIX)/security
configure_switches += -DMYSQL_UNIX_ADDR='/var/run/mysql/mysql.sock'
configure_switches += -DDEFAULT_CHARSET=utf8mb4
configure_switches += -DDEFAULT_COLLATION=utf8mb4_general_ci
configure_switches += -DWITH_EXTRA_CHARSETS=complex
configure_switches += -DENABLED_LOCAL_INFILE=ON
configure_switches += -DWITH_EMBEDDED_SERVER=YES
configure_switches += -DWITH_LIBARCHIVE=ON
configure_switches += -DWITH_READLINE=ON
configure_switches += -DWITH_JEMALLOC=ON
configure_switches += -DWITH_ZLIB=system
configure_switches += -DWITH_EXTERNAL_ZLIB=ON
configure_switches += -DWITH_ZSTD=system
configure_switches += -DWITH_SSL=system
configure_switches += -DWITH_PCRE=system
configure_switches += -DWITH_SYSTEMD=no
configure_switches += -DCONC_WITH_UNIT_TESTS=OFF
configure_switches += -DWITH_UNIT_TESTS=OFF
configure_switches += -DUSE_ARIA_FOR_TMP_TABLES=ON
configure_switches += -DAWS_SDK_EXTERNAL_PROJECT=OFF
configure_switches += -DCMAKE_CROSSCOMPILING='TRUE'
configure_switches += -DCMAKE_SYSTEM_PROCESSOR=$(word 1,$(subst -, ,$(TARGET32)))
configure_switches += -DPYTHON_SHEBANG=$(PYTHON3)
configure_switches += -DWITH_READLINE=ON
configure_switches += -DWITH_LIBWRAP=OFF
############################################################
#
# Extra settings:
#
configure_switches += -DJudy_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DJudy_LIBRARIES=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libJudy.so
configure_switches += -DKRB5_CONFIG=$(TARGET_DEST_DIR)/usr/bin/krb5-config
configure_switches += -DLIBAIO_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DLIBAIO_LIBRARIES=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libaio.so
configure_switches += -DPAM_LIBRARY=$(TARGET_DEST_DIR)/lib$(MULTILIB_X86_32_SUFFIX)/libpam.so
configure_switches += -DBZIP2_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DBZIP2_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libbz2.so
configure_switches += -DZLIB_INCLUDE=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DZLIB_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libz.so
configure_switches += -DZSTD_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DZSTD_LIBRARIES=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libzstd.so
configure_switches += -DURING_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DURING_LIBRARIES=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/liburing.so
configure_switches += -DCURSES_INCLUDE_PATH=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DCURSES_CURSES_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libcurses.so
configure_switches += -DCURSES_FORM_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libform.so
configure_switches += -DCURSES_NCURSES_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libncurses.so
configure_switches += -DOPENSSL_CRYPTO_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libcrypto.so
configure_switches += -DOPENSSL_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DOPENSSL_SSL_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libssl.so
configure_switches += -DEVENT_LIBRARY=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libevent.so
BOOST_VERSION = 1.77.0
configure_switches += -DBoost_INCLUDE_DIR=$(TARGET_DEST_DIR)/usr/include
configure_switches += -DBoost_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/Boost-$(BOOST_VERSION)
configure_switches += -DBoost_ATOMIC_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libboost_atomic.so.$(BOOST_VERSION)
configure_switches += -DBoost_CHRONO_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libboost_chrono.so.$(BOOST_VERSION)
configure_switches += -DBoost_DATE_TIME_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libboost_date_time.so.$(BOOST_VERSION)
configure_switches += -DBoost_FILESYSTEM_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libboost_filesystem.so.$(BOOST_VERSION)
configure_switches += -DBoost_REGEX_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libboost_regex.so.$(BOOST_VERSION)
configure_switches += -DBoost_SYSTEM_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libboost_system.so.$(BOOST_VERSION)
configure_switches += -DBoost_THREAD_LIBRARY_RELEASE=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libboost_thread.so.$(BOOST_VERSION)
configure_switches += -Dboost_atomic_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/boost_atomic-$(BOOST_VERSION)
configure_switches += -Dboost_chrono_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/boost_chrono-$(BOOST_VERSION)
configure_switches += -Dboost_date_time_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/boost_date_time-$(BOOST_VERSION)
configure_switches += -Dboost_filesystem_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/boost_filesystem-$(BOOST_VERSION)
configure_switches += -Dboost_headers_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/boost_headers-$(BOOST_VERSION)
configure_switches += -Dboost_regex_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/boost_regex-$(BOOST_VERSION)
configure_switches += -Dboost_system_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/boost_system-$(BOOST_VERSION)
configure_switches += -Dboost_thread_DIR=$(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/cmake/boost_thread-$(BOOST_VERSION)
#
# End of Extra settings
#
############################################################
configure_switches += -DPLUGIN_EXAMPLE=NO
configure_switches += -DPLUGIN_FEDERATED=NO
configure_switches += -DPLUGIN_FEEDBACK=NO
configure_switches += -DWITH_INNOBASE_STORAGE_ENGINE=1
build_switches = -DCMAKE_C_COMPILER='gcc'
build_switches += -DCMAKE_CXX_COMPILER='g++'
build_switches += -DCMAKE_C_FLAGS='-I/usr/include'
build_switches += -DCMAKE_CXX_FLAGS='-I/usr/include'
build_switches += -DCMAKE_INSTALL_PREFIX=/usr
build_switches += -DINSTALL_LIBDIR='lib$(MULTILIB_X86_32_SUFFIX)'
build_switches += -DINSTALL_INCLUDEDIR='include/mysql'
build_switches += -DINSTALL_PLUGINDIR='lib$(MULTILIB_X86_32_SUFFIX)/mysql/plugin'
####### Dependencies
$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
$(UNPACK_SRC_ARCHIVE)
$(APPLY_PATCHES)
@touch $@
$(build_target): $(src_done)
@mkdir -p $(SRC_DIR)/build-machine
@( cd $(SRC_DIR)/build-machine ; \
PKG_CONFIG_PATH= cmake $(build_switches) .. ; \
$(MAKE) import_executables ; \
$(MAKE) mariadb_config ; \
cp -a libmariadb/mariadb_config/mariadb_config $(TARGET32)-mysql_config ; \
)
@mkdir -p $(SRC_DIR)/build-$(HARDWARE)
@( cd $(SRC_DIR)/build-$(HARDWARE) ; \
$(BUILD_ENVIRONMENT) cmake $(configure_switches) .. ; \
\
cp -a ../build-machine/extra/comp_err extra/$(TARGET32)-comp_err ; \
sed -i 's, \./comp_err, \./$(TARGET32)-comp_err,g' extra/CMakeFiles/GenError.dir/build.make ; \
\
cp -a ../build-machine/sql/gen_lex_hash sql/$(TARGET32)-gen_lex_hash ; \
sed -i 's, \./gen_lex_hash, \./$(TARGET32)-gen_lex_hash,g' sql/CMakeFiles/sql.dir/build.make ; \
sed -i 's, \./gen_lex_hash, \./$(TARGET32)-gen_lex_hash,g' sql/CMakeFiles/GenServerSource.dir/build.make ; \
\
cp -a ../build-machine/sql/gen_lex_token sql/$(TARGET32)-gen_lex_token ; \
sed -i 's, \./gen_lex_token, \./$(TARGET32)-gen_lex_token,g' sql/CMakeFiles/sql.dir/build.make ; \
sed -i 's, \./gen_lex_token, \./$(TARGET32)-gen_lex_token,g' sql/CMakeFiles/GenServerSource.dir/build.make ; \
\
cp -a ../build-machine/dbug/factorial dbug/$(TARGET32)-factorial ; \
sed -i 's, \./factorial, \./$(TARGET32)-factorial,g' dbug/CMakeFiles/user_t.dir/build.make ; \
sed -i 's, \./factorial, \./$(TARGET32)-factorial,g' dbug/CMakeFiles/user_ps.dir/build.make ; \
\
cp -a ../build-machine/scripts/comp_sql scripts/$(TARGET32)-comp_sql ; \
sed -i 's, $(CURDIR)/$(SRC_DIR)/build-$(HARDWARE)/scripts/comp_sql, \./$(TARGET32)-comp_sql,g' scripts/CMakeFiles/GenFixPrivs.dir/build.make ; \
\
$(BUILD_ENVIRONMENT) $(MAKE) $(environment) ; \
)
@touch $@
$(install_target): $(build_target)
@mkdir -p $(MARIADB_32_PKG)
@( cd $(SRC_DIR)/build-$(HARDWARE) ; \
$(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot) ; \
)
@rm -rf $(MARIADB_32_PKG)/etc
@rm -rf $(MARIADB_32_PKG)/usr/bin
@rm -rf $(MARIADB_32_PKG)/usr/include
@rm -rf $(MARIADB_32_PKG)/usr/libexec
@rm -rf $(MARIADB_32_PKG)/usr/share
# ======= Install mysql_config for development environment =======
@mkdir -p $(MARIADB_32_PKG)/usr/bin
@cp -a $(SRC_DIR)/build-machine/$(TARGET32)-mysql_config $(MARIADB_32_PKG)/usr/bin
ifneq ($(__ENABLE_STATIC__),yes)
# ======= Remove large static libraries: =======
@rm -f $(MARIADB_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libmariadbclient.a
@rm -f $(MARIADB_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libmariadbd.a
@rm -f $(MARIADB_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libmysqlclient.a
@rm -f $(MARIADB_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libmysqlclient_r.a
@rm -f $(MARIADB_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libmysqld.a
@rm -f $(MARIADB_32_PKG)/usr/lib$(MULTILIB_X86_32_SUFFIX)/libmysqlservices.a
endif
# ======= Install the same to $(TARGET_DEST_DIR) =======
$(call install-into-devenv, $(MARIADB_32_PKG))
# ======= Remove devenv mysql_config from target package =======
@rm -f $(MARIADB_32_PKG)/usr/bin/$(TARGET32)-mysql_config
# ======= Tune pkg-config *.pc search path to the target destination for development =======
@( cd $(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/pkgconfig ; \
sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libmariadb.pc mariadb.pc ; \
)
# ======= Strip Binaries =======
@( cd $(MARIADB_32_PKG); \
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
)
ifeq ($(__ENABLE_STATIC__),yes)
@( cd $(MARIADB_32_PKG); \
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null ; \
)
endif
@touch $@
$(MARIADB_32_PKG_DESCRIPTION_FILE): $(MARIADB_32_PKG_DESCRIPTION_FILE_IN)
@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
$(pkg_certificate) : $(pkg_archive) ;
$(pkg_signature) : $(pkg_archive) ;
$(pkg_description) : $(pkg_archive) ;
$(pkg_archive): $(install_target) $(MARIADB_32_PKG_DESCRIPTION_FILE) $(MARIADB_32_PKG_INSTALL_SCRIPT)
@cp $(MARIADB_32_PKG_DESCRIPTION_FILE) $(MARIADB_32_PKG)/.DESCRIPTION
@cp $(MARIADB_32_PKG_INSTALL_SCRIPT) $(MARIADB_32_PKG)/.INSTALL
@$(BUILD_PKG_REQUIRES) $(MARIADB_32_PKG)/.REQUIRES
@echo "pkgname=$(MARIADB_32_PKG_NAME)" > $(MARIADB_32_PKG)/.PKGINFO ; \
echo "pkgver=$(MARIADB_32_PKG_VERSION)" >> $(MARIADB_32_PKG)/.PKGINFO ; \
echo "arch=$(MARIADB_32_PKG_ARCH)" >> $(MARIADB_32_PKG)/.PKGINFO ; \
echo "distroname=$(MARIADB_32_PKG_DISTRO_NAME)" >> $(MARIADB_32_PKG)/.PKGINFO ; \
echo "distrover=$(MARIADB_32_PKG_DISTRO_VERSION)" >> $(MARIADB_32_PKG)/.PKGINFO ; \
echo "group=$(MARIADB_32_PKG_GROUP)" >> $(MARIADB_32_PKG)/.PKGINFO ; \
echo "short_description=\"$(MARIADB_32_PKG_SHORT_DESCRIPTION)\"" >> $(MARIADB_32_PKG)/.PKGINFO ; \
echo "url=$(MARIADB_32_PKG_URL)" >> $(MARIADB_32_PKG)/.PKGINFO ; \
echo "license=$(MARIADB_32_PKG_LICENSE)" >> $(MARIADB_32_PKG)/.PKGINFO
@$(PSEUDO) sh -c "cd $(MARIADB_32_PKG) && \
chown -R root:root . && \
$(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."