48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
# Description: SQL database server, drop-in replacement for MySQL
|
|
# URL: https://mariadb.org/
|
|
# Maintainer: Juergen Daubert, jue at crux dot nu
|
|
# Depends on: ncurses zlib openssl cmake libaio linux-pam
|
|
|
|
name=mariadb
|
|
version=10.6.3
|
|
release=1
|
|
source=(https://downloads.mariadb.com/MariaDB//$name-$version/source/$name-$version.tar.gz
|
|
mariadb.rc mariadb.pam
|
|
pre-install)
|
|
|
|
build() {
|
|
cmake -S $name-$version -B build \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
-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 \
|
|
-D MYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
|
|
-D WITH_READLINE=ON \
|
|
-D WITH_ZLIB=system \
|
|
-D WITH_SSL=system \
|
|
-D WITH_EXTRA_CHARSETS=complex \
|
|
-D WITH_EMBEDDED_SERVER=ON \
|
|
-D WITH_UNIT_TESTS=OFF \
|
|
-D SKIP_TESTS=ON
|
|
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
|
|
rm -r $PKG/etc/{init.d,logrotate.d}
|
|
rm -r $PKG/usr/share/{doc,groonga*,mysql-test}
|
|
rm $PKG/usr/sbin/rcmysql
|
|
rm $PKG/usr/share/man/man1/mysql-test-run.pl.1
|
|
find $PKG/usr/share/mysql/* -type d ! -name english ! -name charsets | xargs rm -rf {} \;
|
|
|
|
install -d -m 700 -o mysql -g mysql $PKG/var/{lib,log}/mysql
|
|
install -d -m 755 -o mysql -g mysql $PKG/var/run/mysqld
|
|
|
|
install -D -m 755 $SRC/mariadb.rc $PKG/etc/rc.d/mariadb
|
|
install -D -m 644 $SRC/mariadb.pam $PKG/etc/pam.d/mysql
|
|
}
|