File capisuite.spec of Package faxgate

#
# spec file for package capisuite
#
# Copyright (c) 2003 Gernot Hillier <gernot@hillier.de>
# Parts Copyright (c) SuSE Linux AG, Nuernberg, Germany.
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# This spec file was developed for the use with SuSE Linux.  But it
# should also work for any other distribution with slight changes.
# If you created your own RPM, please tell me and I'll happily include
# the spec or a link to your RPM on the homepage.
#
# neededforbuild  capi4linux gcc-c++ libstdc++-devel libxml2-devel python python-devel sfftobmp
# usedforbuild    aaa_base acl attr bash bind9-utils bison coreutils cpio cpp cvs cyrus-sasl2 db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv kbd less libacl libattr libgcc libstdc++ libxcrypt m4 make man mktemp modutils ncurses ncurses-devel net-tools netcfg pam pam-devel pam-modules patch permissions ps rcs readline sed sendmail shadow strace syslogd sysvinit tar texinfo timezone unzip util-linux vim zlib zlib-devel autoconf automake binutils bzip2 capi4linux capi4linux-devel cracklib gcc gcc-c++ gdbm gettext libstdc++-devel libtool libxml2-devel perl python python-devel rpm
# norootforbuild 

Name:         capisuite
%if %suse_version > 1020  
BuildRequires:  automake capi4linux capi4linux-devel gcc-c++ libtiff-devel libxml2-devel python-devel sfftobmp 
%endif
License:      GPL
Group:        Hardware/ISDN
Autoreqprov:  on
Version:      0.5.cvs
Release:      0.14
Requires:     sfftobmp sox tiff ghostscript-library glibc-locale
Summary:      ISDN telecommunication suite providing fax and voice services
Source0:      capisuite-%{version}.tar.bz2
Source1:      capisuite-manual-0.5.cvs.tar.bz2
Patch0:       capisuite-%{version}.python-v2.5.diff
Patch1:       capisuite-%{version}.sox.diff
Patch2:       capisuite-automake.patch
URL:          http://www.faxgate.org
Packager:     Ingo Goeppert <ingo.goeppert@gmx.de>
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
PreReq:       %insserv_prereq

%description
CapiSuite is an ISDN telecommunication suite providing easy to use
telecommunication functions which can be controlled from Python scripts.

It uses a CAPI-compatible driver for accessing the ISDN-hardware, so you'll
need an AVM card with the according driver.

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

This is a patched edition to work as Faxgate-Server.

Authors:
--------
    Gernot Hillier
    Ingo Goeppert (Faxgate-Server)

%debug_package
%prep
%setup -q
%if %suse_version > 1010
%patch0 -p1
%patch1 -p1
%patch2 -p1
%endif
aclocal
autoheader
autoconf
./configure --prefix=/usr --libdir=/usr/%{_lib} --mandir=%{_mandir} --sysconfdir=/etc --localstatedir=/var --with-docdir=%{_defaultdocdir}/capisuite

%build
export SUSE_ASNEEDED=0 
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/capisuite
ln -sf ../../etc/init.d/capisuite $RPM_BUILD_ROOT/usr/sbin/rccapisuite
rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/capisuite/manual
tar -C $RPM_BUILD_ROOT%{_defaultdocdir}/capisuite --no-same-owner -xvjf %{SOURCE1}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{insserv_force_if_yast etc/init.d/capisuite }

%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
%dir /etc/faxgate
%config /etc/faxgate/faxgate.conf
%config /etc/faxgate/messages
%config /etc/faxgate/messages.de_DE
/usr/sbin/capisuite
/usr/bin/capisuitefax
/usr/bin/faxgate.py
/usr/bin/getjobopt
%doc %{_defaultdocdir}/capisuite
/usr/share/capisuite
/usr/%{_lib}/capisuite
%dir /usr/lib/cups
%dir /usr/lib/cups/backend
/usr/lib/cups/backend/faxgate
%dir /usr/share/cups
%dir /usr/share/cups/model
/usr/share/cups/model/Faxgate.ppd.gz
/var/spool/capisuite
/usr/%{_lib}/python2.?/site-packages/cs_helpers.py
/etc/init.d/capisuite
/etc/cron.daily/capisuite
/usr/sbin/rccapisuite

%changelog
openSUSE Build Service is sponsored by