Initial commit

This commit is contained in:
2025-10-04 13:41:28 +03:00
commit 2b81faeb3f
7 changed files with 129 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Exclude bpm archives
*.bpm
+40
View File
@@ -0,0 +1,40 @@
name: mariadb
description: Fast SQL database server, derived from MySQL
version: 12.0.2
revision: 1
url: https://mariadb.org/
license: GPL2-only
architecture: any
type: source
depends:
- bzip2
- coreutils
- jemalloc
- libxml2
- liburing
- libxcrypt
- lz4
- ncurses
- openssl
- pcre2
- sysusers
- zlib
- zstd
optional_depends:
- cracklib
- curl
- judy
- krb5
- xz-utils
make_depends:
- boost
- cmake
- cracklib
- curl
- judy
- xz-utils
downloads:
- url: https://downloads.mariadb.org/interstitial/mariadb-${BPM_PKG_VERSION}/source/mariadb-${BPM_PKG_VERSION}.tar.gz
extract_to_bpm_source: true
extract_strip_components: 1
checksum: 2640eaa80b6d90bedb98d1b77efd0972cb20177c72f1b01dda11b0617c427743
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# Initialize MariaDB directory
mariadb-install-db --basedir=/usr --datadir=/srv/mariadb
# Change directory ownership
chown -R 40:40 /srv/mariadb
+6
View File
@@ -0,0 +1,6 @@
name: mariadb
description: MariaDB system daemon
type: background
start_cmd: /etc/esvm/scripts/mariadb.sh
exit_method: kill
restart: true
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
[ -d /run/mariadb ] || install -dm0755 -o mariadb -g mariadb /run/mariadb
exec mariadbd --user=mariadb
+1
View File
@@ -0,0 +1 @@
u mariadb 40 "MariaDB user" /srv/mariadb/
+68
View File
@@ -0,0 +1,68 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
echo "You may remove this function if you do not intend to use it"
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
cmake -B build \
-DCOMPILATION_COMMENT="Tide Linux" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-Wno-dev \
-DINSTALL_UNIX_ADDRDIR=/run/mariadb/mariadb.sock \
-DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_SCRIPTDIR=bin \
-DINSTALL_SBINDIR=sbin \
-DINSTALL_INCLUDEDIR=include/mariadb \
-DINSTALL_PLUGINDIR=lib/mariadb/plugin \
-DINSTALL_SYSTEMD_UNITDIR=no \
-DINSTALL_SHAREDIR=share \
-DINSTALL_SUPPORTFILESDIR=share/mariadb \
-DINSTALL_MYSQLSHAREDIR=share/mariadb \
-DINSTALL_DOCREADMEDIR=share/doc/mariadb \
-DINSTALL_DOCDIR=share/doc/mariadb \
-DINSTALL_MANDIR=share/man \
-DMYSQL_DATADIR=/srv/mariadb \
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_unicode_ci \
-DENABLED_LOCAL_INFILE=ON \
-DPLUGIN_EXAMPLE=NO \
-DPLUGIN_FEDERATED=NO \
-DPLUGIN_FEEDBACK=NO \
-DWITH_EMBEDDED_SERVER=ON \
-DWITH_EXTRA_CHARSETS=complex \
-DWITH_JEMALLOC=ON \
-DWITH_LIBWRAP=OFF \
-DWITH_PCRE2=system \
-DWITH_READLINE=ON \
-DWITH_SSL=system \
-DWITH_SYSTEMD=no \
-DWITH_UNIT_TESTS=OFF \
-DWITH_ZLIB=system
cmake --build build
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
DESTDIR="$BPM_OUTPUT" cmake --install build
# Remove static libraries
rm -r "$BPM_OUTPUT"/usr/lib/*.a
# Install esvm service
install -Dm755 "$BPM_WORKDIR"/mariadb.sh "$BPM_OUTPUT"/etc/esvm/scripts/mariadb.sh
install -Dm644 "$BPM_WORKDIR"/mariadb.esv "$BPM_OUTPUT"/etc/esvm/services/mariadb.esv
# Install sysusers file
install -Dm644 "$BPM_WORKDIR"/sysusers "$BPM_OUTPUT"/usr/lib/sysusers.d/mariadb.conf
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/mariadb/COPYING
}