File isdngw.spec of Package isdngw
#
# spec file for package isdngw
#
# Copyright (c) 2012 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: isdngw
BuildRequires: SDL-devel
BuildRequires: gcc-c++
BuildRequires: krb5
BuildRequires: libdv
BuildRequires: openh323-devel
BuildRequires: openldap2
BuildRequires: openldap2-devel
BuildRequires: pwlib-devel
BuildRequires: sgml-skel
BuildRequires: sgmltool
BuildRequires: speex-devel
Url: http://www.gnugk.org/h323-isdn-gw.html
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq %fillup_prereq
%if %suse_version > 1130
PreReq: sysvinit(network)
%endif
Requires: openh323
Recommends: logrotate
Summary: An ISDN to H.323 Gateway
License: GPL-2.0+
Group: Productivity/Telephony/H323/Utilities
Version: 0.4.0
Release: 0
Source0: isdngw-%{version}.tar.bz2
Source1: rc.isdngw
%description
isdngw is a gateway between telephony on ISDN and telephony on IP
networks using H.323. It is based on OpenH323 and ISDN4Linux. The
gateway uses ISDN to make and receive calls but any type of phone
(pots, mobiles, etc.) can call and be called.
%prep
%setup -q
%build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fexceptions" OPENH323DIR=/usr/share/openh323 PREFIX=/usr OH323_LIBDIR=%{_libdir} opt %{?_smp_mflags}
%install
export M=`uname -m`
# only ix86 have problematic unames.
if [ `uname -m | cut -b 3-` == "86" ]; then
export M="x86"
fi
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/etc/isdngw
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 755 obj_linux_"$M"_r/isdngw $RPM_BUILD_ROOT%{_sbindir}
install -m 644 sample_conf/directory $RPM_BUILD_ROOT/etc/isdngw
install -m 644 sample_conf/isdngw.conf $RPM_BUILD_ROOT/etc/isdngw
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/isdngw
ln -s ../../etc/init.d/isdngw $RPM_BUILD_ROOT%{_sbindir}/rcisdngw
# Create symbolic run level links during installation
mkdir -p $RPM_BUILD_ROOT/var/log/isdngw
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
cat << EOF > $RPM_BUILD_ROOT/etc/logrotate.d/isdngw
/var/log/isdngw/isdngw.log {
rotate 30
size=100M
notifempty
missingok
postrotate
kill -HUP \`cat /var/run/isdngw.pid\`
endscript
}
EOF
%post
%{insserv_force_if_yast etc/init.d/isdngw }
%preun
%{stop_on_removal isdngw }
%postun
%{restart_on_update isdngw }
%{insserv_cleanup}
%files
%defattr(-,root,root)
%dir /etc/isdngw
%config /etc/init.d/isdngw
%config /etc/isdngw/directory
%config /etc/isdngw/isdngw.conf
%{_sbindir}/isdngw
%{_sbindir}/rcisdngw
%config /etc/logrotate.d/isdngw
%dir /var/log/isdngw
%changelog