File monitord.spec of Package monitord
#
# spec file for package monitord (Version 2.0svn)
#
# Copyright 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# norootforbuild
Name: monitord
%define _tarversion 2.0svn
Version: %{_tarversion}20090916
Release: 0
Requires: alsa
AutoReqProv: on
BuildRequires: gcc-c++ alsa-devel libmysqlclient-devel libjthread-devel
%if 0%{?fedora_version}
BuildRequires: fedora-release mysql-devel
%endif
Summary: A POCSAG, FMS and ZVEI decoding daemon
Group: Productivity/Hamradio/Logging
URL: http://www.monitord.de
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{_tarversion}-build
Source: monitord-%{_tarversion}.tar.bz2
Source1: monitord.xml
Source2: monitord
Patch: SocketServer_buffer_overflow.patch
Patch1: mysql-fedora-dir.patch
Source3: monitor-protokoll-03.pdf
#Source4: mysql_schema.sql
%description
Platform independent POCSAG, FMS and ZVEI decoding daemon using standard soundcards as input device.
Authors:
--------
Martin Diedrich
Stephan Effertz
and others
%package -n monitord-plugin-mysql
Summary: Plugin for monitord for logging to a mysql database
Group: Productivity/Hamradio/Logging
Requires: %{name} = %{version}
%description -n monitord-plugin-mysql
Logs decoded POCSAG, FMS and ZVEI data to a prepared mysql database
Authors:
--------
Martin Diedrich
Stephan Effertz
and others
%package -n monitord-plugin-audiorecorder
Summary: Plugin for monitord for recording audio to files
Group: Productivity/Hamradio/Logging
Requires: %{name} = %{version}
%description -n monitord-plugin-audiorecorder
Enables clients to trigger recording of audio to files.
This package supports only writing to raw files. Compressing to mp3 using
libmp3lame would be supported but is not enabled in this package because of
legal issues.
Authors:
--------
Martin Diedrich
Stephan Effertz
and others
%prep
%setup -q -n monitord-%{_tarversion}
%patch
%patch1
%build
%if 0%{?fedora_version}
autoconf
%endif
%configure --enable-plugins --with-alsa --with-mysql
make %{?jobs:-j%jobs}
%install
%makeinstall
# init script
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 744 $RPM_SOURCE_DIR/%{name} $RPM_BUILD_ROOT/etc/init.d/%{name}
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
ln -sf ../../etc/init.d/%{name} $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
# default config file
install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/
# Documentation of monitord's protocol
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 %{S:3} $RPM_BUILD_ROOT%{_docdir}/%{name}
# default dir for audio recording - not sure of that is LSB conform
mkdir -p $RPM_BUILD_ROOT/var/spool/%{name}
# removing some stuff that would usually go to a -devel package that - in my
# opinion - would be quite useless for this package
%{__rm} -f %{buildroot}%{_libdir}/%{name}/*.la
%{__rm} -f %{buildroot}%{_libdir}/%{name}/*.so
%debug_package
%clean
rm -rf %{buildroot}
%preun
%stop_on_removal
%post
%{fillup_and_insserv -f %{name}}
%postun
%insserv_cleanup
%post -n monitord-plugin-mysql -p /sbin/ldconfig
%postun -n monitord-plugin-mysql -p /sbin/ldconfig
%post -n monitord-plugin-audiorecorder -p /sbin/ldconfig
%postun -n monitord-plugin-audiorecorder -p /sbin/ldconfig
%files
%defattr (-,root,root)
%doc COPYING NEWS README AUTHORS INSTALL ChangeLog sample-config
%doc %{_docdir}/%{name}/monitor-protokoll-03.pdf
%config /etc/monitord.xml
%{_bindir}/monitord
%{_sbindir}/rc%{name}
/etc/init.d/%{name}
%files -n monitord-plugin-mysql
%defattr (-,root,root)
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/libmplugin_mysql.*
%files -n monitord-plugin-audiorecorder
%defattr (-,root,root)
%dir %{_libdir}/%{name}
%dir /var/spool/%{name}
%{_libdir}/%{name}/libmplugin_audiorecorder.*
%changelog -n monitord