2019-04-26 19:46:05 +02:00
|
|
|
# Description: SQL database server, drop-in replacement for MySQL
|
2021-02-24 16:30:07 +01:00
|
|
|
# URL: https://mariadb.org/
|
2022-01-12 16:01:30 +01:00
|
|
|
# Maintainer: Juergen Daubert, jue at crux dot nu
|
2023-02-18 13:36:26 +01:00
|
|
|
# Depends on: fmt libaio libpcre2 linux-pam ncurses openssl zlib
|
2019-03-08 15:10:47 +01:00
|
|
|
|
|
|
|
name=mariadb
|
2024-02-17 11:36:41 +01:00
|
|
|
version=11.3.2
|
2023-11-14 12:26:19 +01:00
|
|
|
release=1
|
2022-01-12 16:01:30 +01:00
|
|
|
source=(https://downloads.mariadb.com/MariaDB//$name-$version/source/$name-$version.tar.gz
|
2021-02-24 16:30:07 +01:00
|
|
|
mariadb.rc mariadb.pam
|
2024-02-08 11:21:40 +01:00
|
|
|
pre-install
|
|
|
|
libfmt.patch)
|
2019-03-08 15:10:47 +01:00
|
|
|
|
|
|
|
build() {
|
2024-02-08 11:21:40 +01:00
|
|
|
patch -d $name-$version/cmake -i $SRC/libfmt.patch
|
|
|
|
|
2023-02-18 13:36:26 +01:00
|
|
|
cmake -S $name-$version -B build -G Ninja \
|
2020-11-09 14:45:12 +01:00
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
2020-12-15 14:06:58 +01:00
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
2020-11-09 14:45:12 +01:00
|
|
|
-D INSTALL_LAYOUT=RPM \
|
|
|
|
-D INSTALL_LIBDIR=lib \
|
|
|
|
-D INSTALL_PLUGINDIR=lib/mysql/plugin \
|
|
|
|
-D INSTALL_PCDIR=/usr/lib/pkgconfig \
|
|
|
|
-D INSTALL_PAMDIR=/lib/security \
|
|
|
|
-D MYSQL_DATADIR=/var/lib/mysql \
|
2022-02-17 16:27:13 +01:00
|
|
|
-D MYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
|
2020-11-09 14:45:12 +01:00
|
|
|
-D WITH_READLINE=ON \
|
2023-02-18 13:36:26 +01:00
|
|
|
-D WITH_LIBAIO=ON \
|
2020-11-09 14:45:12 +01:00
|
|
|
-D WITH_ZLIB=system \
|
|
|
|
-D WITH_SSL=system \
|
2021-08-17 14:29:41 +02:00
|
|
|
-D WITH_PCRE=system \
|
2023-02-18 13:36:26 +01:00
|
|
|
-D WITH_LIBFMT=system \
|
2024-02-08 11:21:40 +01:00
|
|
|
-D WITH_SYSTEMD=no \
|
2020-11-09 14:45:12 +01:00
|
|
|
-D WITH_EXTRA_CHARSETS=complex \
|
|
|
|
-D WITH_EMBEDDED_SERVER=ON \
|
|
|
|
-D WITH_UNIT_TESTS=OFF \
|
|
|
|
-D SKIP_TESTS=ON
|
2019-03-08 15:10:47 +01:00
|
|
|
|
2022-02-17 16:27:13 +01:00
|
|
|
cmake --build build -j ${JOBS:-1}
|
2020-07-20 13:12:25 +02:00
|
|
|
DESTDIR=$PKG cmake --install build
|
2019-03-08 15:10:47 +01:00
|
|
|
|
|
|
|
rm -r $PKG/etc/{init.d,logrotate.d}
|
2023-08-24 12:38:14 +02:00
|
|
|
rm -r $PKG/usr/share/{doc,groonga*,mariadb-test}
|
2019-03-08 15:10:47 +01:00
|
|
|
rm $PKG/usr/sbin/rcmysql
|
|
|
|
rm $PKG/usr/share/man/man1/mysql-test-run.pl.1
|
2023-08-24 12:38:14 +02:00
|
|
|
find $PKG/usr/share/mariadb/* -type d ! -name english ! -name charsets | xargs rm -rf {} \;
|
2019-03-08 15:10:47 +01:00
|
|
|
|
|
|
|
install -d -m 700 -o mysql -g mysql $PKG/var/{lib,log}/mysql
|
2020-01-31 16:59:31 +01:00
|
|
|
|
|
|
|
install -D -m 755 $SRC/mariadb.rc $PKG/etc/rc.d/mariadb
|
|
|
|
install -D -m 644 $SRC/mariadb.pam $PKG/etc/pam.d/mysql
|
2019-03-08 15:10:47 +01:00
|
|
|
}
|