File gnugk.spec of Package gnugk

# spec file for package gnugk
# Copyright (c) 2011 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

Name:           gnugk
BuildRequires:  SDL-devel
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  krb5
BuildRequires:  libdv
BuildRequires:  openh323-devel
BuildRequires:  openldap2-devel
BuildRequires:  pwlib-devel
BuildRequires:  sgml-skel
BuildRequires:  sgmltool
BuildRequires:  speex-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       pwlib openh323
Provides:       openh323gk
Obsoletes:      openh323gk
PreReq:         %insserv_prereq %fillup_prereq grep diffutils
Summary:        OpenH323 Gatekeeper--The GNU Gatekeeper
License:        GPL-2.0+
Group:          Productivity/Telephony/H323/Servers
Version:        2.2.6
Release:        0
Source0:        gnugk-%{version}.tar.bz2
Source1:        rc.gnugk

The gatekeeper controls H.323 compatible clients (like ohphone) and can
be used to set up a complete Internet telephony system.

%setup -q

autoconf --force
%{?suse_update_config:%{suse_update_config -f}}
export OPENH323VERSIONFILE=/usr/include/openh323/openh323buildopts.h
%configure \
	--disable-mysql \
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fexceptions" OPENH323DIR=/usr/share/openh323 PREFIX=/usr OH323_LIBDIR=%{_libdir} opt %{?_smp_mflags}
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" OPENH323DIR=/usr/share/openh323 PREFIX=/usr OH323_LIBDIR=%{_libdir} addpasswd %{?_smp_mflags}
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" OPENH323DIR=/usr/share/openh323 PREFIX=/usr OH323_LIBDIR=%{_libdir} doc %{?_smp_mflags}

export M=`uname -m`
# only ix86 have problematic unames.
case $M in ??86) M=x86;; esac
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 755 obj_linux_"$M"_r/gnugk $RPM_BUILD_ROOT%{_sbindir}
install -m 755 obj_linux_"$M"_r/addpasswd $RPM_BUILD_ROOT%{_sbindir}/gkaddpasswd
install -m 644 etc/complete.ini $RPM_BUILD_ROOT/etc/gnugk.ini
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/gnugk
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
install -m 644 docs/gnugk.1 $RPM_BUILD_ROOT/%{_mandir}/man1/gnugk.1
ln -s ../../etc/init.d/gnugk $RPM_BUILD_ROOT/usr/sbin/rcgnugk
# Create symbolic run level links during installation
mkdir -p $RPM_BUILD_ROOT/var/log/gk
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
cat << EOF > $RPM_BUILD_ROOT/etc/logrotate.d/gnugk
/var/log/gk/gk.log {
    rotate 30
        kill -HUP \`cat /var/run/\`

%{fillup_and_insserv gnugk }

%{stop_on_removal gnugk }

%{restart_on_update gnugk }

%doc *.txt
%doc /usr/share/man/man1/gnugk.1.gz
%doc docs/manual/*.html
%doc etc/*
%config /etc/init.d/gnugk
%config /etc/gnugk.ini

openSUSE Build Service is sponsored by