File gnugk.spec of Package gnugk

#
# spec file for package gnugk (Version 2.2.6)
#
# Copyright (c) 2009 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:           gnugk
BuildRequires:  SDL-devel gcc-c++ krb5 libdv openh323-devel openldap2 openldap2-devel pwlib-devel sgml-skel sgmltool speex-devel
Url:            http://www.gnugk.org
License:        GPL v2 or later
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    on
Group:          Productivity/Telephony/H323/Servers
Requires:       pwlib openh323
Provides:       openh323gk
Obsoletes:      openh323gk
PreReq:         %insserv_prereq %fillup_prereq grep diffutils
Summary:        OpenH323 Gatekeeper--The GNU Gatekeeper
Version:        2.2.6
Release:        116
Source0:        gnugk-%{version}.tar.bz2
Source1:        rc.gnugk

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



Authors:
--------
    Jan Willamowius <jan@willamowius.de>

%prep
%setup -n gnugk-%{version}

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

%install
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
    size=100M
    notifempty
    missingok
    postrotate
        kill -HUP \`cat /var/run/gnugk.pid\`
    endscript
}
EOF

%post
%{fillup_and_insserv gnugk }

%preun
%{stop_on_removal gnugk }

%postun
%{restart_on_update gnugk }
%{insserv_cleanup}

%clean
# Clean up the mess
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%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
%{_sbindir}/gnugk
%{_sbindir}/gkaddpasswd
%{_sbindir}/rcgnugk
/etc/logrotate.d/gnugk
/var/log/gk

%changelog
* Wed Nov 07 2007 kkeil@suse.de
- update to stable 2.2.6
  * BUGFIX(toolkit.cxx) Fixed DefaultDomain Alias rewrite
  * BUGFIX(routing.cxx) ENUM policy not to be used with LRQ
  * BUGFIX(Neighbors.cxx) Fixed SRV policy to try both CS and LR
  records and not use with LRQ request
  * remove ArjReasonRouteCallToSCN
  (was inactive + broken for a long time)
  * BUGFIX(Toolkit.cxx) enable SQLConfig also if only Firebird is
  available
  * BUGFIX(RasTbl.cxx) reject the call if no gateway has capacity,
  don't just use the first matching gateway
  * BUGFIX(RasTbl.cxx) the first route was duplicated and a call
  was sent twice to the same gw.
  Thanks to Alex Golyshev for pointing this out!
  * BUGFIX(RasSrv.cxx) fixed crash inside IRR handler
  * BUGFIX(yasocket.cxx) due to recent changes, it was impossible
  send more than 10240 bytes of data when data queuing had to be
  involved
  * move status port examples to contrib/statusport/
  * fix nonStandardData field usage, make use of assigned
  T.35 codes
  * BUGFIX(RasTbl.cxx) ensure that full gateways are eliminated,
  when failover is active and remaining gateways are sorted due
  to their priority correctly
  * BUGFIX(ProxyChannel.cxx) preserve presentation and screening
  indicators in Calling-Party-Number IEs
  * BUGFIX(RasTbl.cxx) restore default value for capacity and
  priority on config reload, if removed from an EP section
  (or if the whole section has been removed)
  * BUGFIX(Neighbor.cxx,ProxyChannel.cxx): fix canMapAlias for LRQs
  with unregistered endpoints
  * new config section [H225toQ931] to change the H.225 reason to
  Q.931 cause code mapping
  * optional priorities for gateway prefixes:
  gw-alias=prefix[:=priority][,prefix[:=priority],...]
  (patch by Alex Golyshev and Andrey Pasukov)
  * change default value for CallSignalHandler to 5
  * BUGFIX(Toolkit.cxx): fix for calling between 2 internal
  networks
  * Added AcceptNonNeighborLCF to LRQFeatures settings
  * Added GnuGk OID & T.35 Codes
  * BUGFIX(Toolkit.cxx): fix to allow URI rewriting on ARQ
  processing
  * BUGFIX(ProxyChannel.cxx): fix to show correct Setup
  CallSignallingAddress when behind NAT
  * Added RemoveH235Call & RemoveH460Call Settings
  * BUGFIX(ProxyChannel.cxx): H.245 addresses being incorrectly
  written in NATHandler for public proxies.
* Sat May 12 2007 olh@suse.de
- remove unused libavc1394-devel libdc1394-devel from Buildrequires
* Mon Feb 26 2007 kkeil@suse.de
- update to 2.2.5
  * RADIUS AAA module now handles a Class attribute correctly
  * BUGFIX(clirw.cxx) missing iterator check, that could cause an
  invalid memory access, fixed - thanks to Vladimir Voronin
  * implement optional call-id parameter for Routing commands
  * Bugfix(RasSrv.cxx) fix SignalCallID=1
  * Bugfix(Proxychannel.cxx) avoid inserting same socket twice in
  cleanup list
  * Bugfix(Proxychannel.cxx) make sure all members of
  CallSignalSocket are initialized on creation
  * Bugfix(yasocket.cxx) send very large status port messages
  in 10KB chunks and sleep after each
  * new feature: StatusPort filtering by Doron Bleiberg
  * new switch: [RoutedMode]DisableRetryChecks retries all calls
  * BUGFIX(ProxyChannel.cxx) make sure we preserve the original
  Setup message for retries and not only copy the buffer address
  * Bugfix(Neighbor.cxx) copy canMapAlias when forwarding LRQs
  * implement virtual queues for LRQs sponsored by Associated
  Engineering Srl.
  * implement canMapAlias for LCFs sponsored by TelecomUnity Ltd.
  * copy all unknown IEs in Notify messages when forwarding
  (fixes some failed transfers)
  * BUGFIX(*.cxx) set all deleted pointers to NULL
  * new SyslogAcct accounting module for the Unix syslog
  * (gkauth.cxx)Reapplied H235.1 (formally known as H235AnnexA)
  by using OpenH323 Authenticator factory loader
  * (rassrv.cxx)Registration Priority Added
  * (Proxychannel.cxx)TreatUnregisteredNat added. Treat
  unregistered calls unknown NAT status as being NAT
  * (routing.cxx)DNS SRV support to DNS Routing policy
  * (toolkit.cxx)RewriteAlias section added
  * BUGFIX(ProxyChannel.cxx) WaitAndSignal added to OnInformation
  to avoid NAT support crash.
  * BUGFIX(ProxyChannel.cxx) Check for NATSupport added.
  * BUGFIX(RasTbl.cxx) WaitAndSignal added to FindByEndPointid()
  * BUGFIX(ProxyChannel.cxx) Added SupportCallingNATedEndpoints.
  * Moved DNS SRV to it's own seperate policy
  * Registration pre-emption support added
  * Support for EP's on dynamic IP's
  * fixed code to compile with the latest pwlib CVS
  (STL string conversion)
  * Added support for GnuGK to work behind NAT box
  * Added support for Third party (non-neighbor) Gatekeepers
  (AcceptNonNeighborLRQ=1)
  * Added auto-detection on internal network for proxy mode.
  * Added DefaultDomain for H323 URI rewriting
* Thu Aug 10 2006 kkeil@suse.de
- fixes for pwlib 1.11.1
- update to 2.2.4
  * new Calling/CalledTypeOfNumber and Proxy configuration variables
  in [RouteMode] section and endpoint configuration. Thanks to Vladimir Voronin
  * (ipauth.cxx) added support for prefixes. Thanks to Vladimir Voronin
  * (gksql_firebird.cxx) Firebird/Interbase driver for SQL modules. Sponsored
  by Roitel Telecommunication S.A.
  * (Routing.cxx) NumberAnalysis routing policy can handle Setup messages now.
  Thanks to Vladimir (vl@kamatele.com)
  * (pwlib_compat.h) adapt to changed mutexes starting with PWLib 1.9.2
  * call mute in proxy mode using userinput * (patch by Simon Horne)
  * NAT support for unregistered callers (patch by Simon Horne)
  * (gk.cxx) allow correct spelling for FortyTwo=42 entry
  * BUGFIX(yasocket.h) fix compilation with gcc 4.1
  * (clirw.cxx) process CLI ranges with leading zeros correctly
  * new CapacityControl auth/acct modules to control inbound traffic
  * BUGFIX(ProxyChannel.cxx) check added for a NULL pointer in NAT traversal code
  * (RasTbl.cxx) default SignalTimeout value increased from 15 to 30 seconds
  * BUGFIX(RasSrv.cxx) remove call records correctly in direct signaling mode,
  when only called party is registered. Thanks to Julius Bajzik
  * BUGFIX(RasTbl.cxx) fixed race condition when accessing endpoint records
  * BUGFIX(ProxyChannel.cxx) fixed race condition in H245Socket when H.245
  tunneling is disabled
  * (configure) better detection of PostgreSQL on FreeBSD
  * BUGFIX(RasSrv.cxx) allow bandwidth=0 in ARQ / ACF
  * BUGFIX(ProxyChannel.cxx) fix bug when using RADIUS/SQL based routing
  for Setup messages
  * BUGFIX(ProxyChannel.cxx) check for poor NAT implementations, that might
  have crashed GnuGk (by Simon Horne)
  * new accounting variables: %%{media-oip}, %%{codec}
  * new accounting variables: %%{call-attemps}, %%{last-cdr}, %%{caller/callee-epid}
  * new feature: call failover (see manual)
  * BUGFIX(clirw.cxx) set presentationIndicator correctly in H.225.0 Setup UUIE
  * BUGFIX(RasTbl.h) when active, perform IRR checks for local
  endpoints only, others (parent, neighbor etc.) won't send us IRRs
  * BUGFIX(Routing.cxx) remove leading zeros for ENUM queries
  * BUGFIX(RasSrv.cxx) have AcceptNeighborsCalls default to 1 like
  the documentation always said
  * BUGFIX(Routing.cxx) fix ENUMPolicy implementation
  * new StatusAcct accounting module for the status port sponsored by Grupo Isec
* Mon May 01 2006 kkeil@suse.de
- install man page (#171056)
* Thu Apr 06 2006 hvogel@suse.de
- define operation on "buf1ptr" [#159102]
* Fri Jan 27 2006 nadvornik@suse.cz
- fixed BuildRequires
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jan 20 2006 schwab@suse.de
- Don't strip binaries.
* Mon Oct 24 2005 kkaempf@suse.de
- update to 2.2.3-2
- fix for gcc 4.1.x
* Tue Jul 26 2005 kkaempf@suse.de
- update to 2.2.2, lots of small fixes.
* Thu Jan 20 2005 kkaempf@suse.de
- update to 2.2.1
- security fix and better error checking in socket handling
- RouteToGateway command for virtual queue routing (out-of-zone routing)
- race condition in config reload fixed
- changed default for RTPPortRange in proxy mode
- for flexible rewrite rules and prefix matching with '.' and '%%'
  wildcards
- per call proxy control
- new TcpKeepAlive option to remove problem with network errors
  and hanging calls
- additional accounting variable for original destination number
* Tue Dec 21 2004 kkaempf@suse.de
- update to 2.2.0
- compile with exceptions enabled
* Thu Aug 19 2004 kkaempf@suse.de
- update to 2.2beta4
* Mon Mar 08 2004 ro@suse.de
- added libdc1394-devel to neededforbuild
* Tue Feb 24 2004 kkaempf@suse.de
- and ppc64 and s930 need the 64bit patch too
* Mon Feb 23 2004 kkaempf@suse.de
- ia64 is 64bit (and needs the 64bit patch ;-))
* Mon Feb 23 2004 ro@suse.de
- split patch into normal and 64bit part
* Sun Feb 22 2004 kkaempf@suse.de
- update to 2.2beta3
* Sun Feb 22 2004 ro@suse.de
- updated neededforbuild and make-flags
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Tue Jul 22 2003 kkaempf@suse.de
- update to 2.0.5
  adapt to pwlib 1.5.x and openh323 1.12.x
* Fri Feb 07 2003 kkaempf@suse.de
- adapt to latest openh323 library.
* Sun Jan 26 2003 meissner@suse.de
- ppc64 support, cleaned up arch handling.
* Wed Jan 15 2003 kkaempf@suse.de
- update to 2.0.2
* Wed Nov 20 2002 kkaempf@suse.de
- add expat for VoiceXML support.
- update to 2.0.1
* Sat Aug 17 2002 kkaempf@suse.de
- Include ldap library to %%files section.
* Tue Aug 06 2002 kkaempf@suse.de
- Update to final 2.0a
- Rename to "gnugk" (see RELEASE-NOTES for details)
- Disable external password auth functionality for gcc 3.x
  as suggested on the openh323gk mailing list.
- Add PreReq to .spec file.
* Wed Jul 10 2002 kkaempf@suse.de
- Update to 2.0beta9
* Tue May 28 2002 sf@suse.de
- %%{_lib} fixes
* Wed May 08 2002 ro@suse.de
- make it compile with gcc-3.1 (compose1 is not in std::)
* Mon Feb 25 2002 kkaempf@suse.de
- properly update from START_* to insserv (#13206).
* Mon Feb 04 2002 kkaempf@suse.de
- Update to 1.0 (final).
- Remove rc.config and START_ variable from rc script.
* Fri Aug 17 2001 kkaempf@suse.de
- renamed to openh323gk
  the OpenH323 project now has it's own gatekeeper named 'opengk'
* Thu Aug 16 2001 kkaempf@suse.de
- implement RPM_BUILD_ROOT in spec file.
* Thu Aug 09 2001 kkaempf@suse.de
- update to 0.18
* Tue May 29 2001 kkaempf@suse.de
- update to 0.17
  search for gatekeeper.ini in /etc
  lsb compatible rcopengk script
* Wed Jan 03 2001 kkaempf@suse.de
- install directly to /usr/sbin
* Tue Nov 21 2000 kkaempf@suse.de
- fix filelist, more %%doc entries
* Mon Nov 20 2000 kkaempf@suse.de
- fix neededforbuild
  provide wrapper script
* Mon Nov 20 2000 kkaempf@suse.de
- use %%doc in spec file
* Fri Jul 14 2000 kkaempf@suse.de
- adapted to current openh323 library interface
* Thu Jul 13 2000 kkaempf@suse.de
- fix Summary
* Wed Jul 12 2000 kkaempf@suse.de
- fix sparc machtype, add ia64
* Mon Jul 03 2000 kkaempf@suse.de
- created package
openSUSE Build Service is sponsored by