|
|
|
%define version 0.1.0
|
|
|
|
%define release 1
|
|
|
|
%define name smeserver-samba-db-logd
|
|
|
|
|
|
|
|
|
|
|
|
Summary: samba MySQL logging module for SME Server
|
|
|
|
Name: %{name}
|
|
|
|
Version: %{version}
|
|
|
|
Release: %{release}%{?dist}
|
|
|
|
License: GPL
|
|
|
|
Group: Networking/Daemons
|
|
|
|
Source: %{name}-%{version}.tar.gz
|
|
|
|
|
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
|
|
|
BuildArchitectures: noarch
|
|
|
|
BuildRequires: e-smith-devtools
|
|
|
|
|
|
|
|
Requires: perl(File::Tail)
|
|
|
|
Requires: perl(Getopt::Long)
|
|
|
|
Requires: perl(DBI)
|
|
|
|
|
|
|
|
%description
|
|
|
|
Log samba events in a MySQL database
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
* Mon Oct 15 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.0-1
|
|
|
|
- Initial release
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%{__mkdir_p} root/var/log/samba-db-logd
|
|
|
|
perl createlinks
|
|
|
|
|
|
|
|
%install
|
|
|
|
/bin/rm -rf $RPM_BUILD_ROOT
|
|
|
|
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
|
|
|
|
/bin/rm -f %{name}-%{version}-filelist
|
|
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
|
|
|
--dir /var/log/samba-db-logd 'attr(0770,smelog,smelog)' \
|
|
|
|
--file /usr/bin/samba-db-logd 'attr(0755,root,root)' \
|
|
|
|
--file /var/service/samba-db-logd/run 'attr(0755,root,root)' \
|
|
|
|
--file /var/service/samba-db-logd/log/run 'attr(0755,root,root)' \
|
|
|
|
--file /etc/cron.monthly/samba-log-rotate 'attr(0755,root,root)' \
|
|
|
|
> %{name}-%{version}-filelist
|
|
|
|
|
|
|
|
echo "%doc CHANGELOG.git" >> %{name}-%{version}-filelist
|
|
|
|
echo "%doc samba_log.sql" >> %{name}-%{version}-filelist
|
|
|
|
%files -f %{name}-%{version}-filelist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
%preun
|
|
|
|
|