# Don't try fancy stuff like debuginfo, which is useless on binary-only # packages. Don't strip binary too # Be sure buildpolicy set to do nothing %define __spec_install_post %{nil} %define debug_package %{nil} %define __os_install_post %{_dbpath}/brp-compress Summary: A high-performance MySQL proxy Name: proxysql Version: 1.3.8 Release: 1 License: GPL+ Group: Development/Tools SOURCE0 : %{name}-%{version}.tar.gz URL: http://www.proxysql.com/ BuildRequires: gcc-c++ cmake openssl-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description %{summary} %prep %setup -q %build # change to use proxysql account instead of mysql sed -i -e 's/mysql/proxysql/g' systemd/%{name}.service make clean make %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_unitdir}/ mkdir -p %{buildroot}/usr/share/%{name}/tools mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}/var/lib/%{name} mkdir -p %{buildroot}/var/run/%{name} install -m 0755 src/%{name} %{buildroot}/%{_bindir} install -m 0640 etc/%{name}.cnf %{buildroot}/%{_sysconfdir} install -m 0644 systemd/%{name}.service %{buildroot}%{_unitdir}/ install -m 0755 tools/proxysql_galera_checker.sh %{buildroot}/usr/share/%{name}/tools install -m 0755 tools/proxysql_galera_writer.pl %{buildroot}/usr/share/%{name}/tools %clean rm -rf %{buildroot} %pre /usr/sbin/groupadd -r proxysql >/dev/null 2>&1 || : /usr/sbin/useradd -g proxysql -r -d /var/lib/proxysql -s /bin/false \ -c "ProxySQL" proxysql >/dev/null 2>&1 || : %post systemctl daemon-reload %systemd_post ${name}.service %postun rm -rf /var/run/%{name} %systemd_postun_with_restart %{name}.service %files %defattr(-,root,root,-) %{_bindir}/* %{_unitdir}/%{name}.service /usr/share/proxysql/tools/proxysql_galera_checker.sh /usr/share/proxysql/tools/proxysql_galera_writer.pl %defattr(-,root,proxysql,-) %config(noreplace) %{_sysconfdir}/%{name}.cnf %defattr(-,proxysql,proxysql,-) /var/lib/proxysql /var/run/proxysql %changelog * Tue Jul 11 2017 Barry Powell 1.3.8 - rebuilt to match upstream version * Mon May 08 2017 Barry Powell 1.3.6 - rebuilt to match upstream version * Thu Apr 06 2017 Barry Powell 1.3.5 - custom build for systemd only * Wed Oct 19 2016 Rene Cannao 1.3.0 - experimental support for Prepared Statements - enhanced scalability * Thu Sep 29 2016 Rene Cannao 1.2.4 - Forth stable release of 1.2 * Tue Sep 20 2016 Rene Cannao 1.2.3 - Third stable release of 1.2 * Fri Sep 2 2016 Rene Cannao 1.2.2 - Second stable release of 1.2 * Tue Aug 2 2016 Rene Cannao 1.2.1 - First stable release of 1.2 * Mon Mar 14 2016 Rene Cannao 1.2.0 - First testing release of 1.2 * Fri Mar 11 2016 Rene Cannao 1.1.2 - Upgraded to release 1.1.2 * Sat Oct 31 2015 Rene Cannao 1.0.1 - Compiles 1.0.1 * Wed Sep 9 2015 Andrei Ismail 0.2 - Added support for automatic packaging on Ubuntu 14.04 and CentOS 7.