diff --git a/akonadi-mysql_conf.patch b/akonadi-mysql_conf.patch deleted file mode 100644 index f3479ca..0000000 --- a/akonadi-mysql_conf.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up akonadi/server/src/storage/mysql-global.conf.mysql_conf akonadi/server/src/storage/mysql-global.conf ---- akonadi/server/src/storage/mysql-global.conf.mysql_conf 2010-05-21 05:17:10.000000000 -0500 -+++ akonadi/server/src/storage/mysql-global.conf 2010-05-23 17:14:08.144227600 -0500 -@@ -49,7 +49,7 @@ innodb_additional_mem_pool_size=1M - # SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema"); - innodb_buffer_pool_size=80M - # size of average write burst, keep Innob_log_waits small, keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables) --innodb_log_file_size=64M -+innodb_log_file_size=8M - innodb_flush_log_at_trx_commit=2 - - # Do not drop the connection to the DB after 8 hours of inactivity diff --git a/akonadi.spec b/akonadi.spec index c0846e5..a791baf 100644 --- a/akonadi.spec +++ b/akonadi.spec @@ -1,11 +1,11 @@ -## can be Can be either MYSQL(default), POSTGRES or SQLITE -#global database_backend MYSQL +## Can be either MYSQL(default), SQLITE, or POSTGRES(untested) +%global database_backend MYSQL Summary: PIM Storage Service Name: akonadi Version: 1.5.80 -Release: 1%{?dist} +Release: 2%{?dist} Group: System Environment/Libraries License: LGPLv2+ @@ -20,9 +20,7 @@ Source0: http://download.akonadi-project.org/akonadi-%{version}.tar.bz2 %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%define mysql_conf_timestamp 20110211 -# shrink default initial db size a bit (approx 140mb->28mb) -Patch1: akonadi-mysql_conf.patch +%define mysql_conf_timestamp 20110629 BuildRequires: automoc4 BuildRequires: boost-devel @@ -38,26 +36,27 @@ BuildRequires: sqlite-devel >= 3.6.23 %{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}} -# when/if akonadi grows support for other backends, consider splitting -# these similar to how phonon is done currently. +%if "%{?database_backend}" == "MYSQL" Requires: qt4-mysql%{?_isa} # not *strictly* required, but we need a functional default configuration Requires: mysql-server +%endif Requires(postun): /sbin/ldconfig %description %{summary}. +%if "%{?database_backend}" == "MYSQL" Requires an available instance of mysql server at runtime. Akonadi can spawn a per-user one automatically if the mysql-server package is installed on the machine. See also: %{_sysconfdir}/akonadi/mysql-global.conf +%endif %package devel Summary: Developer files for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: qt4-devel -Requires: pkgconfig %description devel %{summary}. @@ -65,11 +64,6 @@ Requires: pkgconfig %prep %setup -q -n akonadi-%{version} -%if 0%{?fedora} < 16 -%patch1 -p1 -b .mysql_conf -%endif -touch -d %{mysql_conf_timestamp} server/src/storage/mysql-global.conf - %build mkdir -p %{_target_platform} @@ -89,7 +83,19 @@ make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} mkdir -p %{buildroot}%{_datadir}/akonadi/agents -touch -d %{mysql_conf_timestamp} %{buildroot}%{_sysconfdir}/akonadi/mysql-local.conf +# create "big" config (analog to -mobile.conf) +install -p \ + %{buildroot}%{_sysconfdir}/akonadi/mysql-global.conf \ + %{buildroot}%{_sysconfdir}/akonadi/mysql-global-big.conf + +# default to small/mobile config +install -p \ + %{buildroot}%{_sysconfdir}/akonadi/mysql-global-mobile.conf \ + %{buildroot}%{_sysconfdir}/akonadi/mysql-global.conf + +touch -d %{mysql_conf_timestamp} \ + %{buildroot}%{_sysconfdir}/akonadi/mysql-global*.conf \ + %{buildroot}%{_sysconfdir}/akonadi/mysql-local.conf # create/own %{_libdir}/akondi mkdir -p %{buildroot}%{_libdir}/akonadi @@ -121,7 +127,9 @@ fi %defattr(-,root,root,-) %doc AUTHORS lgpl-license %dir %{_sysconfdir}/akonadi/ -%config(noreplace) %{_sysconfdir}/akonadi/mysql-global-mobile.conf +# example conf's +%{_sysconfdir}/akonadi/mysql-global-big.conf +%{_sysconfdir}/akonadi/mysql-global-mobile.conf %config(noreplace) %{_sysconfdir}/akonadi/mysql-global.conf %config(noreplace) %{_sysconfdir}/akonadi/mysql-local.conf %{_bindir}/akonadi_agent_launcher @@ -147,6 +155,10 @@ fi %changelog +* Wed Jun 29 2011 Rex Dieter 1.5.80-2 +- drop mysql_config patch, use -mobile.conf instead +- use database_backend macro more + * Thu Jun 02 2011 Jaroslav Reznik 1.5.80-1 - 1.5.80