smlinux/net/mariadb/mariadb.SMBuild
PktSurf d18addf386 Replaced upper case variable with lower case in net/cgit
Improved code to install dump1090 binary in net/dump1090 and hostname symlinks in net/hostname
Removed code that manually discards static archives in net/php
Miscellaneous SHA512 checksum updates and minor fixes in several net pkg build files
2022-10-10 22:54:00 +05:30

101 lines
2.9 KiB
Text
Executable file

app=mariadb
version=10.6.7
build=1sml
homepage="http://mariadb.org/"
download="https://archive.mariadb.org/mariadb-$version/source/mariadb-$version.tar.gz"
desc="Drop-in replacement for the MySQL Database Server"
requires="libxml2 zstd bzip2 cmake openssl zlib libaio netbsd-curses gcc-libs"
build() {
mkandenterbuilddir
rm -rf $app-$version
tar xf $srcdir/$app-$version.tar.?z*
cd $app-$version
fixbuilddirpermissions
unset CFLAGS CXXFLAGS
mkdir -p smbuild && cd smbuild
cmake .. \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX="/" \
-DINSTALL_SBINDIR=bin \
-DINSTALL_MANDIR=share/man \
-DINSTALL_LAYOUT=STANDALONE \
-DINSTALL_INCLUDEDIR=include/mysql \
-DINSTALL_MYSQLSHAREDIR=share/mysql \
-DINSTALL_PLUGINDIR=lib/mysql/plugin \
-DINSTALL_SCRIPTDIR=bin \
-DINSTALL_SUPPORTFILESDIR=share/mysql \
-DINSTALL_MYSQLDATADIR=/var/lib/mysql \
-DMYSQL_DATADIR="/var/lib/mysql" \
-DMYSQL_UNIX_ADDR="/var/run/mysql/mysql.sock" \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_SSL=system \
-DWITH_ZLIB=system \
-DWITH_EXTERNAL_ZLIB=ON \
-DWITH_JEMALLOC=NO \
-DSKIP_TESTS=ON \
-DPLUGIN_MROONGA=NO \
-DPLUGIN_AUTH_PAM=NO \
-DPLUGIN_ROCKSDB=NO \
-DWITH_WSREP=NO \
-DWITH_READLINE=ON \
-DWITH_INNODB_LZ4=OFF \
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DWITH_LIBARCHIVE=system \
-DWITH_PCRE=system \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DTMPDIR=/var/tmp \
-DCONNECT_WITH_MYSQL=ON \
-DCONNECT_WITH_LIBXML2=system \
-DPLUGIN_ARCHIVE=YES \
-DPLUGIN_CSV=YES \
-DWITH_SYSTEMD=no
# Am sure there must be a better way to do it, but for now it works
sed -i 's@-lcurses@-lcurses -lterminfo@g' client/CMakeFiles/mariadb.dir/link.txt
make
make install DESTDIR=$pkg
mv $pkg/COPYING $pkgdocs/
rm $pkg/{README-wsrep,CREDITS,README.md,INSTALL-BINARY,THIRDPARTY}
cd ..
install -Dm 644 support-files/rpm/my.cnf $pkg/etc/my.cnf.new
for i in client mysql-clients server ; do
install -Dm 644 support-files/rpm/$i.cnf $pkg/etc/my.cnf.d/$i.cnf.new
done
install -Dm 644 support-files/rpm/client.cnf $pkg/etc/my.cnf.d/client.cnf.new
# Remove sql-bench and mysql-tests
rm -rf $pkg/{sql-bench,mysql-test}
# This is the directory where databases are stored
mkdir -p $pkg/var/lib/mysql
chown mysql.mysql $pkg/var/lib/mysql
chmod 0750 $pkg/var/lib/mysql
# This is where the socket is stored
mkdir -p $pkg/var/run/mysql
chown mysql.mysql $pkg/var/run/mysql
chmod 0755 $pkg/var/run/mysql
# Add the init script
install -Dm 0755 $srcdir/rc.mysqld $pkg/etc/rc.d/rc.mysqld.new
# Install mysqlaccess.conf
install -m 644 scripts/mysqlaccess.conf $pkg/etc/mysqlaccess.conf.new
mkfinalpkg
}
sha512sums="
fee9a8ce06266c7c27f937755c3ebba3b4926874d7040d45b9f692c008e518cb473bbe8f8ded4e6cb756ca0564d19b676d72e3e0a8c5ed95728cde901d8d2c20 mariadb-10.6.7.tar.lz
"