update
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/pmacct?expand=0&rev=74
This commit is contained in:
parent
d896f18f40
commit
9840fac108
@ -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);
|
|
56
pmacct.spec
56
pmacct.spec
@ -8,7 +8,6 @@ Source0: %{name}-%{version}.tar.bz2
|
|||||||
Source1: nfacctd.init
|
Source1: nfacctd.init
|
||||||
Source2: pmacctd.init
|
Source2: pmacctd.init
|
||||||
Source3: sfacctd.init
|
Source3: sfacctd.init
|
||||||
#Patch: pgsql_plugin.c.patch
|
|
||||||
URL: http://www.pmacct.net/
|
URL: http://www.pmacct.net/
|
||||||
BuildRoot: %{_tmppath}/%{name}-root
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
Requires: mysql-shared postgresql-libs sqlite
|
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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
ls -l docs examples sql
|
||||||
#%patch
|
chmod a+rx docs examples sql
|
||||||
|
find docs examples sql -type f -print0 | xargs -r0 chmod -x
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
#export CFLAGS="%{optflags}"
|
%configure \
|
||||||
#export AM_CFLAGS="%{optflags}"
|
--prefix=%{_prefix} \
|
||||||
PMACCT_BASE_CONFIG="
|
--bindir=%{_bindir} \
|
||||||
--prefix=%{_prefix}
|
--sbindir=%{_sbindir} \
|
||||||
--bindir=%{_bindir}
|
--sysconfdir=%{_sysconfdir}/%{name} \
|
||||||
--sbindir=%{_sbindir}
|
--enable-threads \
|
||||||
--sysconfdir=%{_sysconfdir}/%{name}
|
--enable-64bit \
|
||||||
--enable-64bit
|
--enable-mysql \
|
||||||
--enable-mysql
|
--enable-pgsql \
|
||||||
--enable-pgsql
|
--enable-sqlite3 \
|
||||||
%if %{?suse_version:1}0
|
|
||||||
%if %suse_version > 920
|
|
||||||
--enable-sqlite3
|
|
||||||
%endif
|
|
||||||
--with-pgsql-includes=/usr/include/pgsql/
|
--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
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__rm} -rf %{buildroot}
|
|
||||||
%makeinstall
|
%makeinstall
|
||||||
|
|
||||||
%{__install} -Dpm555 %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/nfacctd
|
%{__install} -Dp %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/nfacctd
|
||||||
%{__install} -Dpm555 %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/pmacctd
|
%{__install} -Dp %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/pmacctd
|
||||||
%{__install} -Dpm555 %{SOURCE3} %{buildroot}/%{_sysconfdir}/init.d/sfacctd
|
%{__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/nfacctd $RPM_BUILD_ROOT/usr/sbin/rcnfacctd
|
||||||
ln -sf ../../etc/init.d/pmacctd $RPM_BUILD_ROOT/usr/sbin/rcpmacctd
|
ln -sf ../../etc/init.d/pmacctd $RPM_BUILD_ROOT/usr/sbin/rcpmacctd
|
||||||
ln -sf ../../etc/init.d/sfacctd $RPM_BUILD_ROOT/usr/sbin/rcsfacctd
|
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} -Dp 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/pmacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/pmacctd.conf
|
||||||
touch %{buildroot}/%{_sysconfdir}/pmacct/sfacctd.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
|
%clean
|
||||||
%{__rm} -rf %{buildroot}
|
%{__rm} -rf %{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%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(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) %{_bindir}/*
|
||||||
%attr(755,root,root) %{_sbindir}/*
|
%attr(755,root,root) %{_sbindir}/*
|
||||||
%{_sysconfdir}/init.d/*
|
%{_sysconfdir}/init.d/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user