Last active
June 29, 2021 06:53
-
-
Save mtb-xt/81381fcc1362ded1f505a24a6ae7f61d to your computer and use it in GitHub Desktop.
proxysql PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --new-file -ur proxysql-2.2.0/deps/Makefile proxysql-2.2.0-patched/deps/Makefile | |
--- proxysql-2.2.0/deps/Makefile 2021-05-28 05:14:25.000000000 +1200 | |
+++ proxysql-2.2.0-patched/deps/Makefile 2021-06-29 13:38:43.015414700 +1200 | |
@@ -169,6 +169,7 @@ | |
cd mariadb-client-library && rm -rf mariadb-connector-c-3.1.9-src | |
cd mariadb-client-library && tar -zxf mariadb-connector-c-3.1.9-src.tar.gz | |
cd mariadb-client-library/mariadb_client && patch ./plugins/auth/CMakeLists.txt < ../plugin_auth_CMakeLists.txt.patch | |
+ cd mariadb-client-library/mariadb_client && patch -p0 < ../ConnectorName.cmake.patch | |
cd mariadb-client-library/mariadb_client && cmake . -DOPENSSL_ROOT_DIR=$(shell pwd)/libssl/openssl/ -DOPENSSL_LIBRARIES=$(shell pwd)/libssl/openssl/ . | |
# cd mariadb-client-library/mariadb_client && cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl # this is needed on MacOSX | |
cd mariadb-client-library/mariadb_client && patch libmariadb/mariadb_stmt.c < ../mariadb_stmt.c.patch | |
@@ -217,6 +218,7 @@ | |
cd prometheus-cpp && tar --strip-components=1 -zxf civetweb-v1.11.tar.gz -C prometheus-cpp/3rdparty/civetweb | |
cd prometheus-cpp/prometheus-cpp && patch -p1 < ../serial_exposer.patch | |
cd prometheus-cpp/prometheus-cpp && patch -p0 < ../registry_counters_reset.patch | |
+ cd prometheus-cpp/prometheus-cpp && patch -p0 < ../histogram.cc.fix.patch | |
cd prometheus-cpp/prometheus-cpp && cmake . -DBUILD_SHARED_LIBS=OFF -DENABLE_TESTING=OFF -DENABLE_PUSH=OFF | |
cd prometheus-cpp/prometheus-cpp && CC=${CC} CXX=${CXX} ${MAKE} | |
diff --new-file -ur proxysql-2.2.0/deps/mariadb-client-library/ConnectorName.cmake.patch proxysql-2.2.0-patched/deps/mariadb-client-library/ConnectorName.cmake.patch | |
--- proxysql-2.2.0/deps/mariadb-client-library/ConnectorName.cmake.patch 1970-01-01 12:00:00.000000000 +1200 | |
+++ proxysql-2.2.0-patched/deps/mariadb-client-library/ConnectorName.cmake.patch 2021-06-29 13:19:51.861267481 +1200 | |
@@ -0,0 +1,11 @@ | |
+--- cmake/ConnectorName.cmake 2020-06-19 03:16:18.000000000 +1200 | |
++++ cmake/ConnectorName.cmake.new 2021-06-29 13:19:07.083221888 +1200 | |
+@@ -22,7 +22,7 @@ | |
+ SET(MACHINE_NAME "x64") | |
+ ELSE() | |
+ SET(MACHINE_NAME "32") | |
+- END() | |
++ ENDIF() | |
+ ENDIF() | |
+ | |
+ SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}") | |
diff --new-file -ur proxysql-2.2.0/deps/prometheus-cpp/histogram.cc.fix.patch proxysql-2.2.0-patched/deps/prometheus-cpp/histogram.cc.fix.patch | |
--- proxysql-2.2.0/deps/prometheus-cpp/histogram.cc.fix.patch 1970-01-01 12:00:00.000000000 +1200 | |
+++ proxysql-2.2.0-patched/deps/prometheus-cpp/histogram.cc.fix.patch 2021-06-29 13:37:28.508490721 +1200 | |
@@ -0,0 +1,10 @@ | |
+--- core/src/histogram.cc 2021-06-29 13:36:58.995962491 +1200 | |
++++ core/src/histogram.cc.fix 2021-06-29 13:36:53.968117217 +1200 | |
+@@ -5,6 +5,7 @@ | |
+ #include <iterator> | |
+ #include <numeric> | |
+ #include <ostream> | |
++#include <limits> | |
+ | |
+ namespace prometheus { | |
+ | |
Binary files proxysql-2.2.0/proxysql.db and proxysql-2.2.0-patched/proxysql.db differ | |
Binary files proxysql-2.2.0/proxysql_stats.db and proxysql-2.2.0-patched/proxysql_stats.db differ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Marat Bakeev <hawara@gmail.com> | |
pkgname=proxysql | |
pkgver=2.2.0 | |
pkgrel=1 | |
pkgdesc="ProxySQL is an open source high performance, high availability, database protocol aware proxy for MySQL" | |
arch=('x86_64' 'amd64') | |
url="http://proxysql.com" | |
_github_url="https://github.com/sysown/proxysql" | |
license=('GPL') | |
makedepends=('cmake' 'automake' 'bzip2' 'make' 'gcc' 'git' 'patch' 'python2') | |
depends=('openssl' 'gnutls') | |
provides=('proxysql') | |
backup=("etc/proxysql.cnf") | |
source=("https://github.com/sysown/${pkgname}/archive/v${pkgver}.tar.gz" | |
"proxysql.sysusers" | |
"proxysql.tmpfiles" | |
"makefile-compile.patch") | |
sha256sums=('f0c8c398e5bc285e08f4a555caeabdb5d71a20d6fc1f513dba3943e8e24141f2' | |
'8b074c0d72e4b66349a84a13fdb65918145fcaf6a8697ba99304bd603d097735' | |
'6f48bd54c6b8592cd84006e991d3cbd8b38a460c6e72091acdca05f6781ae380' | |
'd4641f367a9c056e02a0b3b86f6870e36026953d2a40433b6c6979bc944ffdfd') | |
prepare() { | |
cd "$pkgname-$pkgver" | |
patch -p1 -i "$srcdir/makefile-compile.patch" | |
} | |
build() { | |
export GIT_VERSION=$(git --version | awk '{print $NF}') | |
cd "${pkgname}-${pkgver}" | |
remake cleanall | |
remake --trace=full | |
} | |
package() { | |
install -Dm 0755 "${srcdir}/${pkgname}-${pkgver}/src/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" | |
install -Dm 0644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf" | |
install -Dm 0644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" | |
install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/systemd/system/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" | |
install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/etc/${pkgname}.cnf" "${pkgdir}/etc/${pkgname}.cnf" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment