File scmon.spec of Package scmon

#
# spec file for package scmon (Version 0.3)
#
# Copyright (c) 2008 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           scmon
Summary:        Makes waiting for smart card events easy
Version:        0.3
Release:        90
License:        GPL v2 only
Group:          System/Daemons
Url:            http://code.google.com/p/loolixbodes/wiki/scmon
Source0:        http://scmon.googlecode.com/files/%{name}-%{version}.tar.gz
Patch0:         scmon.diff
Patch1:         scmon-init.patch
Patch2:         scmon-retval-fix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkgconfig
%if 0%{?suse_version} <= 1010
BuildRequires:  dbus-1-devel mozilla-nspr-devel mozilla-nss-devel
%endif
%if 0%{?suse_version} >= 1020
BuildRequires:  dbus-1-devel dbus-1-glib-devel mozilla-nspr-devel mozilla-nss-devel
%endif
%if 0%{?fedora_version} == 6
BuildRequires:  dbus-devel dbus-glib-devel fedora-release nspr-devel nss-devel
%endif

%description
SCMon monitors smart cards, configured in a system-wide nss database,
and broadcasts their insertion/removal over D-Bus. It also supports a
few simple queries.

It is intended to make it easy for applications such as screensavers
and login managers to support smart card events.



Authors:
--------
    jacob berkman  <jberkman@novell.com>

%prep
%setup -q
%patch0
%patch1
%patch2

%build
%configure
make

%install
%makeinstall
mkdir -p %{?buildroot:%{buildroot}}%{_sysconfdir}/init.d
cp init/scmon.sle %{?buildroot:%{buildroot}}%{_sysconfdir}/init.d/scmon

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{fillup_and_insserv scmon}

%postun
%{insserv_cleanup}

%files
%defattr(-,root,root,-)
%doc
%config %{_sysconfdir}/dbus-1/system.d/com.novell.Pkcs11Monitor.conf
%{_sysconfdir}/init.d/scmon
%{_datadir}/dbus-1/services/com.novell.Pkcs11Monitor.service
%{_sbindir}/scmon
%{_bindir}/scmon-client

%changelog
* Sun Nov 09 2008 thoenig@suse.de
- fix return value for write_a_string() in monitor/sclog.c,
  (bnc#441013)
* Thu Aug 28 2008 cthiel@suse.de
- fix init script
* Sat Mar 15 2008 coolo@suse.de
- fix build
* Fri Jul 27 2007 jberkman@suse.de
- initial import of scmon package
openSUSE Build Service is sponsored by