Name: mysql-proxy Version: 0.8.2 Release: 1%{?dist} Summary: A proxy for the MySQL Client/Server protocol Group: Applications/Databases License: GPLv2 URL: http://forge.mysql.com/wiki/MySQL_Proxy # I haven't found a link to a direct download location, only to mirrors Source0: http://mysql.he.net/Downloads/MySQL-Proxy/%{name}-%{version}.tar.gz Source1: %{name}.init Source2: %{name}.sysconfig BuildRequires: lua-devel BuildRequires: libevent-devel BuildRequires: mysql-devel BuildRequires: glib2-devel BuildRequires: gawk BuildRequires: check-devel BuildRequires: flex Requires(pre): shadow-utils Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts Requires(postun): initscripts %description MySQL Proxy is a simple program that sits between your client and MySQL server(s) that can monitor, analyze or transform their communication. Its flexibility allows for unlimited uses, common ones include: load balancing, fail-over, query analysis, query filtering and modification and many more. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: pkgconfig %description devel Development files for %{name} %prep %setup -q -n %{name}-%{version} # dirty hack to make sure mysql-proxy looks at correct location for its plugins # ideally this should be replaced with autoconf variables # reported upstream as #58888 sed -i 's#g_build_filename(base_dir, "lib"#g_build_filename(base_dir, "%{_lib}"#g' src/chassis-frontend.c sed -i 's#g_build_filename(srv->base_dir, "lib"#g_build_filename(srv->base_dir, "%{_lib}"#g' src/chassis-frontend.c cp %{SOURCE1} %{name}.init cp %{SOURCE2} %{name}.sysconfig sed -i 's#/usr/lib#%{_libdir}#g' %{name}.init sed -i 's#/usr/lib#%{_libdir}#g' %{name}.sysconfig %build %configure # strip rpath sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} find %{buildroot} -type f -name \*.la -exec rm -v {} \; rm -v examples/Makefile* examples/CMakeLists.txt install -Dp -m 0755 %{name}.init %{buildroot}%{_initrddir}/%{name} install -Dp -m 0644 %{name}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name} %clean rm -rf %{buildroot} %pre getent group %{name} &>/dev/null || groupadd -r %{name} &>/dev/null getent passwd %{name} &>/dev/null || \ useradd -r -g %{name} -d / -s /sbin/nologin \ -c "MySQL-Proxy user" %{name} &>/dev/null || : %post ldconfig /sbin/chkconfig --add %{name} || : %preun if [ "$1" = 0 ] ; then /sbin/service %{name} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name} || : fi %postun ldconfig if [ "$1" -ge 1 ]; then /sbin/service %{name} condrestart >/dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %doc AUTHORS COPYING README NEWS %doc examples/ %{_bindir}/%{name} %{_initrddir}/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_bindir}/mysql-binlog-dump %{_bindir}/mysql-myisam-dump %{_libdir}/libmysql-*.so.* %{_libdir}/%{name} %files devel %defattr(-,root,root,-) %{_includedir}/*.h %{_libdir}/libmysql-*.so %{_libdir}/pkgconfig/mysql-chassis.pc %{_libdir}/pkgconfig/mysql-proxy.pc %changelog * Sun Feb 5 2012 Scott R. Shinn - 0.8.2-1 - Update to 0.8.2 * Sat Feb 12 2011 Dominic Hopf - 0.8.1-1 - New upstream release MySQL-Proxy 0.8.1 - apply Rubens changes from current Fedora package * Wed Aug 12 2009 Ruben Kerkhof 0.7.2-1 - Upstream released new version * Sat Jul 25 2009 Fedora Release Engineering - 0.6.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering - 0.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Jun 30 2008 Ruben Kerkhof - 0.6.1-2 - Rebuild to pick up new libevent * Sat Feb 09 2008 Ruben Kerkhof - 0.6.1-1 - Sync with upstream * Thu Jan 24 2008 Ruben Kerkhof - 0.6.0-2 - Rebuild to pick up new libevent * Sat Dec 08 2007 Ruben Kerkhof - 0.6.0-1 - Upstream released new version - Fix license tag - Add BR for check-devel and flex * Wed Aug 29 2007 Fedora Release Engineering - 0.5.1-3 - BR gawk. * Wed Aug 29 2007 Fedora Release Engineering - 0.5.1-2 - Rebuild for selinux ppc32 issue. * Tue Jul 10 2007 Ruben Kerkhof 0.5.1-1 - Upstream released new version - Included examples * Sun Jul 01 2007 Ruben Kerkhof 0.5.0-1 - First version