mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-06 21:42:35 +03:00
mariadb: remove development components
This commit is contained in:
parent
4a3a31be57
commit
3c824cd0f6
@ -1,21 +0,0 @@
|
||||
diff --git a/libmariadb/mariadb_config/mariadb_config.c.in b/libmariadb/mariadb_config/mariadb_config.c.in
|
||||
index 703c9466..c6d3f1bc 100644
|
||||
--- a/libmariadb/mariadb_config/mariadb_config.c.in
|
||||
+++ b/libmariadb/mariadb_config/mariadb_config.c.in
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
static char *mariadb_progname;
|
||||
|
||||
-#define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql"
|
||||
-#define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb"
|
||||
+#define INCLUDE "-I@CMAKE_INSTALL_PREFIX_DEV@/@INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX_DEV@/@INSTALL_INCLUDEDIR@/mysql"
|
||||
+#define LIBS "-L@CMAKE_INSTALL_PREFIX_DEV@/@INSTALL_LIBDIR@/ -lmariadb"
|
||||
#define LIBS_SYS "@extra_dynamic_LDFLAGS@"
|
||||
#define CFLAGS INCLUDE
|
||||
#define VERSION "@MARIADB_CLIENT_VERSION@"
|
||||
#define CC_VERSION "@CPACK_PACKAGE_VERSION@"
|
||||
-#define PLUGIN_DIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@"
|
||||
+#define PLUGIN_DIR "@CMAKE_INSTALL_PREFIX_DEV@/@INSTALL_PLUGINDIR@"
|
||||
#define SOCKET "@MARIADB_UNIX_ADDR@"
|
||||
#define PORT "@MARIADB_PORT@"
|
||||
#define TLS_LIBRARY_VERSION "@TLS_LIBRARY_VERSION@"
|
@ -44,7 +44,6 @@ common = rec { # attributes common to both builds
|
||||
|
||||
patches = [
|
||||
./cmake-includedir.patch
|
||||
./cmake-libmariadb-includedir.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
@ -86,10 +85,14 @@ common = rec { # attributes common to both builds
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# Remove Development components. Need to use libmysqlclient.
|
||||
rm "$out"/lib/mysql/plugin/daemon_example.ini
|
||||
mkdir -p "$dev"/bin && mv "$out"/bin/{mariadb_config,mysql_config} "$dev"/bin
|
||||
mkdir -p "$dev"/lib/ && mv "$out"/lib/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} "$dev"/lib
|
||||
mkdir -p "$dev"/lib/mysql/plugin && mv "$out"/lib/mysql/plugin/{caching_sha2_password.so,dialog.so,mysql_clear_password.so,sha256_password.so} "$dev"/lib/mysql/plugin
|
||||
rm "$out"/lib/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a}
|
||||
rm "$out"/lib/mysql/plugin/{caching_sha2_password.so,dialog.so,mysql_clear_password.so,sha256_password.so}
|
||||
rm "$out"/bin/{mariadb_config,mysql_config}
|
||||
rm -r $out/include
|
||||
rm -r $out/lib/pkgconfig
|
||||
rm -r $out/share/{aclocal,pkgconfig}
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@ -108,9 +111,7 @@ common = rec { # attributes common to both builds
|
||||
client = stdenv.mkDerivation (common // {
|
||||
pname = "mariadb-client";
|
||||
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
|
||||
propagatedBuildInputs = [ openssl zlib ]; # required from mariadb.pc
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
patches = common.patches ++ [
|
||||
./cmake-plugin-includedir.patch
|
||||
@ -123,11 +124,6 @@ client = stdenv.mkDerivation (common // {
|
||||
"-DINSTALL_MYSQLSHAREDIR=share/mysql-client"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlags="$cmakeFlags \
|
||||
-DCMAKE_INSTALL_PREFIX_DEV=$dev"
|
||||
'';
|
||||
|
||||
postInstall = common.postInstall + ''
|
||||
rm -r "$out"/share/doc
|
||||
rm "$out"/bin/{mysqltest,mytop,wsrep_sst_rsync_wan}
|
||||
@ -141,7 +137,7 @@ client = stdenv.mkDerivation (common // {
|
||||
server = stdenv.mkDerivation (common // {
|
||||
pname = "mariadb-server";
|
||||
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
nativeBuildInputs = common.nativeBuildInputs ++ [ bison ] ++ optional (!stdenv.isDarwin) makeWrapper;
|
||||
|
||||
@ -176,12 +172,7 @@ server = stdenv.mkDerivation (common // {
|
||||
"-DWITHOUT_TOKUDB=1"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlags="$cmakeFlags \
|
||||
-DCMAKE_INSTALL_PREFIX_DEV=$dev
|
||||
-DINSTALL_SHAREDIR=$dev/share/mysql
|
||||
-DINSTALL_SUPPORTFILESDIR=$dev/share/mysql"
|
||||
'' + optionalString (!stdenv.isDarwin) ''
|
||||
preConfigure = optionalString (!stdenv.isDarwin) ''
|
||||
patchShebangs scripts/mytop.sh
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user