File capisuite.spec of Package capisuite

#
# spec file for package capisuite (Version 0.4.5)
#
# 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/
#

# norootforbuild


Name:           capisuite
BuildRequires:  capi4linux capi4linux-devel gcc-c++ libtiff-devel libxml2-devel python-devel sfftobmp
License:        GPL v2 or later
Group:          Hardware/ISDN
AutoReqProv:    on
Version:        0.4.5
Release:        223
%define pyver %(python -c 'import sys; print sys.version[:3]')
Requires:       sfftobmp sox tiff ghostscript-library python >= %pyver, python < %{pyver}.99
Summary:        ISDN Telecommunication Suite Providing Fax and Voice Services
Source0:        capisuite-%{version}.tar.bz2
Patch0:         capisuite-%{version}-capi4linux_v3.diff
Patch1:         capisuite-%{version}-python-v2.5.diff
Patch2:         capisuite-%{version}-warnings.diff
Patch3:         capisuite-%{version}-date.diff
Patch4:         capisuite-%{version}-gcc43.diff
Url:            http://www.capisuite.de
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %insserv_prereq

%description
CapiSuite is an ISDN telecommunication suite providing easy to use
telecommunication functions that can be controlled from Python scripts.
It uses a CAPI-compatible driver for accessing the ISDN hardware, so
requires an AVM card with the appropriate driver.

CapiSuite is distributed with two example scripts for incoming call
handling and fax sending. See /usr/share/doc/packages/capisuite for
further information.



Authors:
--------
    Gernot Hillier

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
aclocal
autoheader
autoconf
./configure --prefix=/usr --mandir=%{_mandir} --sysconfdir=/etc --localstatedir=/var --with-docdir=%{_defaultdocdir}/capisuite 
make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"

%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/etc/cron.daily
install -m 644 cronjob.conf $RPM_BUILD_ROOT/etc/capisuite/cronjob.conf
install -m 755 rc.capisuite $RPM_BUILD_ROOT/etc/init.d/capisuite
install -m 755 capisuite.cron $RPM_BUILD_ROOT/etc/cron.daily/suse-capisuite
ln -sf ../../etc/init.d/capisuite $RPM_BUILD_ROOT/usr/sbin/rccapisuite

%clean
rm -rf $RPM_BUILD_ROOT

%preun
%{stop_on_removal capisuite}

%postun
%{restart_on_update capisuite}
%{insserv_cleanup}

%files
%defattr(-,root,root)
%dir /etc/capisuite
%config /etc/capisuite/cronjob.conf
%config /etc/capisuite/capisuite.conf
%config /etc/capisuite/fax.conf
%config /etc/capisuite/answering_machine.conf
/usr/sbin/capisuite
/usr/bin/capisuitefax
%doc %{_defaultdocdir}/capisuite
/usr/share/capisuite
/usr/lib/capisuite
/var/spool/capisuite
/usr/%{_lib}/python2.?/site-packages/cs_helpers.py
/etc/init.d/capisuite
/etc/cron.daily/suse-capisuite
/usr/sbin/rccapisuite
%doc %{_mandir}/man1/capisuitefax.1.gz
%doc %{_mandir}/man5/answering_machine.conf.5.gz
%doc %{_mandir}/man5/capisuite.conf.5.gz
%doc %{_mandir}/man5/fax.conf.5.gz
%doc %{_mandir}/man8/capisuite.8.gz

%changelog
* Mon Aug 18 2008 kkeil@suse.de
- fix init script
* Thu Oct 11 2007 kkeil@suse.de
- fixes for GCC 4.3
* Thu Aug 16 2007 kkeil@suse.de
- add mandatory DATE header to email (#212564)
* Thu May 24 2007 ro@suse.de
- added capi4linux-devel to buildrequires
* Tue Nov 21 2006 kkeil@suse.de
- python 2.5 do not accept none ASCII in comments if no charset
  was defined (#222837)
* Mon Oct 02 2006 kkeil@suse.de
- fixes for python 2.5
- small cleanups, compile with RPM_OPT_FLAFGS
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jun 02 2005 ro@suse.de
- rename cron.daily script
* Tue Mar 08 2005 kkeil@suse.de
- add missing SENDING_COMPLETE in CONNECT_REQ
* Sun Feb 20 2005 kkeil@suse.de
- add support for new capi4linux version with Globalconfiguration
* Sat Jan 22 2005 kkeil@suse.de
- update to version 0.4.5
* Tue Aug 31 2004 kkeil@suse.de
- fix compile error with new capi4linux package ALERT_REQ now
  has one more parameter SENDING_COMPLETE
* Mon Mar 08 2004 kkeil@suse.de
- update to 0.4.4
* Sun Jan 11 2004 kkeil@suse.de
- fix install -o (typo)
* Sun Jan 11 2004 adrian@suse.de
- add %%defattr
* Tue Sep 02 2003 ro@suse.de
- fix specfile typo
* Mon Sep 01 2003 kkeil@suse.de
- fix automatic voice-->fax switching (#29703)
* Fri Aug 29 2003 mcihar@suse.cz
- require same python version as it was built with
* Mon Jul 28 2003 kkeil@suse.de
- update to 0.4.3
  * support color fax reception
  * fax headline is now converted to the right charset internally
  * scripts: capisuitefax now handles filenames and dialstrings
  with special chars (spaces etc.) correctly
  * lot of fixes; see file NEWS in the package doc dir
* Thu Jun 12 2003 kkeil@suse.de
- fix filelist
* Tue Apr 08 2003 kkeil@suse.de
- update to 0.4.1a because bug 26169 and 25838
  * fixed a bug in the rc-script of CapiSuite which made
  "capisuite start" unfunctional in 0.4.1 (path of executable changed)
  * included tests and changes for gcc-2.95, no patch necessary
  any more to build CapiSuite with it
  * CapiSuite now checks controller abilities and respects them
  when connecting (e.g. use extended fax protocols if available)
    -> this also works around a severe crash with AVM drivers when
  transmitting a fax to/from some analog devices
  * fixed SECURITY bug in cronjob which allowed every CapiSuite user
  to become root. Sorry... :-((
* Wed Apr 02 2003 ro@suse.de
- use wildcard in filelist for python-dir
* Thu Mar 20 2003 ghillie@suse.de
- updated to 0.4.1, thrown away all patches which are already
  included in this release
* Thu Mar 13 2003 ghillie@suse.de
- SECURITY FIX: permissions of saved documents and waves are 0600
  now instead of 0644 and dirs have 0700 instead of 0755. This
  fixes critical bug #25242. Bug severity was approved by kkeil.
* Mon Mar 10 2003 ghillie@suse.de
- added current documentation as .tar.bz2 to avoid change of
  Makefile so late (old Makefiles won't install new docs correctly)
* Mon Mar 03 2003 ghillie@suse.de
- added capisuite-faxid.diff: fixes sending of fax station ID, fax
  headline works now
* Sun Feb 23 2003 ghillie@suse.de
- added capisuite-cron.diff: cron-script errors to /dev/null
* Fri Feb 21 2003 ghillie@suse.de
- capisuite-removesetuid.diff: fixes Bugzilla 23732 (freeze because
  of usage of setuid() which isn't allowed in threads)
- capisuite-cosmetical.diff: cosmetical fixes (examples in conf files
  were wrong, removed debug output)
- added tiff & ghostscript-library to Requires: fixes Bug 23962
* Tue Feb 18 2003 ghillie@suse.de
- fixed Bugzilla 23731 (lock files weren't deleted in idle.py)
* Mon Feb 17 2003 ghillie@suse.de
- updated to 0.4 (new/old messages in remote inquiry, capisuitefax
  can show sendqueue and abort jobs)
* Tue Feb 11 2003 ghillie@suse.de
- included cron job for cleaning up
- rc.capisuite was moved into tar ball
* Mon Feb 10 2003 ghillie@suse.de
- updated to 0.3.2 (got rid of CommonC++, using native pthreads now,
  fixed some major bugs)
* Mon Feb 03 2003 ghillie@suse.de
- updated to 0.3.1: (bugfixes, use different sendqueue for each user,
  script improvements, e.g. sayNumber supports 0-99 well now)
* Wed Jan 29 2003 ghillie@suse.de
- added sox to Require:
* Wed Jan 29 2003 ghillie@suse.de
- don't start if no user configured for default scripts
- added insserv to %%post (spec file)
* Tue Jan 28 2003 ghillie@suse.de
- included startup script
* Mon Jan 27 2003 ghillie@suse.de
- updated to 0.3 (split configuration files into fax and
  answering machine config)
* Thu Jan 23 2003 ghillie@suse.de
- updated to 0.2.1 (mainly documentation improvements, has an own
  manual now)
* Mon Jan 20 2003 ghillie@suse.de
- updated to 0.2 (see included NEWS for changes)
- added correct docdir to configure call in specfile
* Mon Dec 16 2002 gernot@hillier.de
- fixed 2 small bugs (physical disconnect was missing in some cases,
  file delete in remote inquiry didn't work)
* Mon Dec 16 2002 gernot@hillier.de
- first package
openSUSE Build Service is sponsored by