summaryrefslogtreecommitdiff
path: root/mariadb/Pkgfile
blob: ff903b67812f21d81709096bdc1f3efcaf024d95 (plain)
    1 # Description: SQL database server, drop-in replacement for MySQL
    2 # URL: https://mariadb.org/
    3 # Maintainer: Juergen Daubert, jue at crux dot nu
    4 # Depends on: ncurses zlib openssl cmake libaio linux-pam libpcre2
    5 
    6 name=mariadb
    7 version=10.10.2
    8 release=1
    9 source=(https://downloads.mariadb.com/MariaDB//$name-$version/source/$name-$version.tar.gz
   10 	mariadb.rc mariadb.pam
   11 	pre-install)
   12 
   13 build() {
   14 	cmake -S $name-$version -B build \
   15 		-D CMAKE_BUILD_TYPE=Release \
   16 		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
   17 		-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
   18 		-D INSTALL_LAYOUT=RPM \
   19 		-D INSTALL_LIBDIR=lib \
   20 		-D INSTALL_PLUGINDIR=lib/mysql/plugin \
   21 		-D INSTALL_PCDIR=/usr/lib/pkgconfig \
   22 		-D INSTALL_PAMDIR=/lib/security \
   23 		-D MYSQL_DATADIR=/var/lib/mysql \
   24 		-D MYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
   25 		-D WITH_READLINE=ON \
   26 		-D WITH_ZLIB=system \
   27 		-D WITH_SSL=system \
   28 		-D WITH_PCRE=system \
   29 		-D WITH_EXTRA_CHARSETS=complex \
   30 		-D WITH_EMBEDDED_SERVER=ON \
   31 		-D WITH_UNIT_TESTS=OFF \
   32 		-D SKIP_TESTS=ON
   33 
   34 	cmake --build build -j ${JOBS:-1}
   35 	DESTDIR=$PKG cmake --install build
   36 
   37 	rm -r $PKG/etc/{init.d,logrotate.d}
   38 	rm -r $PKG/usr/share/{doc,groonga*,mysql-test}
   39 	rm $PKG/usr/sbin/rcmysql
   40 	rm $PKG/usr/share/man/man1/mysql-test-run.pl.1
   41 	find $PKG/usr/share/mysql/* -type d ! -name english ! -name charsets | xargs rm -rf {} \;
   42 
   43 	install -d -m 700 -o mysql -g mysql $PKG/var/{lib,log}/mysql
   44 
   45 	install -D -m 755 $SRC/mariadb.rc  $PKG/etc/rc.d/mariadb
   46 	install -D -m 644 $SRC/mariadb.pam $PKG/etc/pam.d/mysql
   47 }

Generated by cgit