diff --git a/pgsql_plugin.c.patch b/pgsql_plugin.c.patch deleted file mode 100644 index 350fe19..0000000 --- a/pgsql_plugin.c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/pgsql_plugin.c 2006-08-28 22:28:02.000000000 +0300 -+++ src/pgsql_plugin.c.new 2006-08-28 22:28:22.000000000 +0300 -@@ -519,7 +519,7 @@ - - /* "LOCK ..." stuff */ - if (config.sql_dont_try_update) snprintf(lock_clause, sizeof(lock_clause), "BEGIN;"); -- else snprintf(lock_clause, sizeof(lock_clause), "BEGIN; LOCK %s IN EXCLUSIVE MODE;", config.sql_table); -+ else snprintf(lock_clause, sizeof(lock_clause), "BEGIN; LOCK %s IN ROW EXCLUSIVE MODE;", config.sql_table); - - /* "UPDATE ... SET ..." stuff */ - snprintf(update_clause, sizeof(update_clause), "UPDATE %s ", config.sql_table); diff --git a/pmacct.spec b/pmacct.spec index c6c06d4..5012560 100644 --- a/pmacct.spec +++ b/pmacct.spec @@ -8,7 +8,6 @@ Source0: %{name}-%{version}.tar.bz2 Source1: nfacctd.init Source2: pmacctd.init Source3: sfacctd.init -#Patch: pgsql_plugin.c.patch URL: http://www.pmacct.net/ BuildRoot: %{_tmppath}/%{name}-root Requires: mysql-shared postgresql-libs sqlite @@ -22,61 +21,50 @@ pmacct is a small set of passive network monitoring tools to measure, account, c %prep %setup -q - -#%patch +ls -l docs examples sql +chmod a+rx docs examples sql +find docs examples sql -type f -print0 | xargs -r0 chmod -x %build export CFLAGS="$RPM_OPT_FLAGS" -#export CFLAGS="%{optflags}" -#export AM_CFLAGS="%{optflags}" -PMACCT_BASE_CONFIG=" - --prefix=%{_prefix} - --bindir=%{_bindir} - --sbindir=%{_sbindir} - --sysconfdir=%{_sysconfdir}/%{name} - --enable-64bit - --enable-mysql - --enable-pgsql -%if %{?suse_version:1}0 -%if %suse_version > 920 - --enable-sqlite3 -%endif +%configure \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --sysconfdir=%{_sysconfdir}/%{name} \ + --enable-threads \ + --enable-64bit \ + --enable-mysql \ + --enable-pgsql \ + --enable-sqlite3 \ --with-pgsql-includes=/usr/include/pgsql/ -%endif -%if %{?mandriva_version:1}0 - --with-pgsql-includes=/usr/include/pgsql/ - --with-pcap-includes=/usr/include/ -%endif -" - -./configure $PMACCT_BASE_CONFIG make %install -%{__rm} -rf %{buildroot} %makeinstall -%{__install} -Dpm555 %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/nfacctd -%{__install} -Dpm555 %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/pmacctd -%{__install} -Dpm555 %{SOURCE3} %{buildroot}/%{_sysconfdir}/init.d/sfacctd +%{__install} -Dp %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/nfacctd +%{__install} -Dp %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/pmacctd +%{__install} -Dp %{SOURCE3} %{buildroot}/%{_sysconfdir}/init.d/sfacctd ln -sf ../../etc/init.d/nfacctd $RPM_BUILD_ROOT/usr/sbin/rcnfacctd ln -sf ../../etc/init.d/pmacctd $RPM_BUILD_ROOT/usr/sbin/rcpmacctd ln -sf ../../etc/init.d/sfacctd $RPM_BUILD_ROOT/usr/sbin/rcsfacctd -%{__install} -Dpm555 examples/nfacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/nfacctd.conf -%{__install} -Dpm555 examples/pmacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/pmacctd.conf +%{__install} -Dp examples/nfacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/nfacctd.conf +%{__install} -Dp examples/pmacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/pmacctd.conf touch %{buildroot}/%{_sysconfdir}/pmacct/sfacctd.conf - +ls -l docs examples sql +chmod a+rx docs examples sql +find docs examples sql -type f -print0 | xargs -r0 chmod -x %clean %{__rm} -rf %{buildroot} %files %defattr(-, root, root) -#%dir %{_docdir}/pmacct -%doc %attr(644,root,root) docs examples sql %doc %attr(644,root,root) AUTHORS ChangeLog CONFIG-KEYS COPYING EXAMPLES FAQS INSTALL KNOWN-BUGS NEWS README TODO TOOLS UPGRADE +%doc %attr(755,root,root) docs examples sql %attr(755,root,root) %{_bindir}/* %attr(755,root,root) %{_sbindir}/* %{_sysconfdir}/init.d/*