summaryrefslogtreecommitdiff
path: root/mysql/Pkgfile
blob: 1d4b94fa34c53cc2361081100ccacc258ac10180 (plain)
    1 # Description: SQL database server
    2 # URL: https://www.mysql.com
    3 # Maintainer: Juergen Daubert, jue at crux dot nu
    4 # Depends on: ncurses zlib openssl cmake libaio rpcsvc-proto
    5 
    6 name=mysql
    7 version=5.7.35
    8 release=1
    9 source=(https://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.7/$name-boost-$version.tar.gz \
   10 	my.cnf mysqld)
   11 
   12 build() {
   13 
   14 	export CXXFLAGS+=" -Wno-deprecated-declarations"
   15 
   16 	cmake -S $name-$version -B build \
   17 		-D CMAKE_BUILD_TYPE=Release \
   18 		-D CMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
   19 		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
   20 		-D CMAKE_INSTALL_PREFIX=/usr \
   21 		-D BUILD_CONFIG=mysql_release \
   22 		-D INSTALL_LAYOUT=RPM \
   23 		-D SYSCONFDIR=/etc \
   24 		-D INSTALL_LIBDIR=lib \
   25 		-D INSTALL_PLUGINDIR=lib/mysql/plugin \
   26 		-D INSTALL_MANDIR=share/man \
   27 		-D INSTALL_SECURE_PRIVDIR=/var/lib/mysql-files \
   28 		-D WITH_BOOST=$name-$version/boost \
   29 		-D WITH_LIBWRAP=0 \
   30 		-D WITH_SSL=system \
   31 		-D WITH_ZLIB=system \
   32 		-Wno-dev
   33 
   34 	cmake --build build
   35 	DESTDIR=$PKG cmake --install build
   36 
   37 	rm -r $PKG/usr/share/{mysql-test,info}
   38 	rm $PKG/usr/share/mysql/charsets/README
   39 	find $PKG/usr/share/mysql/* -type d ! -name english ! -name charsets | xargs rm -rf {} \;
   40 
   41 	install -d -m 700 -o mysql -g mysql $PKG/var/{{lib,log,run}/mysql,lib/mysql-files}
   42 	install -D -m 755 $SRC/mysqld $PKG/etc/rc.d/mysqld
   43 	install -m 600 $SRC/my.cnf $PKG/etc
   44 }

Generated by cgit