Пакет sobexsrv: Specfile

%define beta pre4

Name: sobexsrv
Version: 1.0.0
Release: alt1%beta

Summary: The scripting OBEX server for BlueZ stack
License: GPL
Group: Networking/Other

Url: http://www.mulliner.org/bluetooth/sobexsrv.php
Source0: %name-%version%beta.tar.gz
Source1: %name.init
Source2: %name.sysconfig
Patch: %name-%version%beta-alt-makefile.patch
Packager: Michael Shigorin <mike@altlinux.org>

BuildPreReq: libopenobex-devel libbluez-devel
Requires: bluez-utils

# Automatically added by buildreq on Tue Dec 23 2008
BuildRequires: libopenobex-devel

%description
This is a OBEX server implementation based on the openobex library focused towards
Bluetooth as the transport layer. The server itself only supports the minimal
needed OBEX commands like connect, disconnect, put, get and setpath. The
actual services need to be implemented outside of the server through e.g.
a script written in bash, perl, python or C. It is believed that through this
it is easy to implement nice and good behaving services.

%prep
%setup -n %name-%version%beta
%patch -p1

%build
%make

%install
%makeinstall_std

mkdir -p %buildroot%_docdir/%name-%version
mkdir -p %buildroot%_localstatedir/%name/{inbox/mime,tmp}
mkdir -p %buildroot%_initdir
mkdir -p %buildroot%_sysconfdir/sysconfig

install -m755 %SOURCE1 %buildroot%_initdir/%name
install -m644 %SOURCE2 %buildroot%_sysconfdir/sysconfig/%name

cp -a {AU*,CH*,CO*,RE*,SE*,TO*,VE*} %buildroot/%_docdir/%name-%version/

%pre
%_sbindir/groupadd -r -f %name >/dev/null 2>&1 ||:
%_sbindir/useradd -r -n -g %name -d %_localstatedir/%name -s /dev/null %name >/dev/null 2>&1 ||:

%post
%post_service %name

%preun
%preun_service %name

%files
%_initdir/*
%config(noreplace) %_sysconfdir/sysconfig/%name
%attr(4710,root,%name) %_sbindir/%name
%_man8dir/*
%_datadir/%name
%attr(0775,root,%name) %_localstatedir/%name
%ghost %attr(0700,%name,%name) %_localstatedir/%name/tmp
%_docdir/%name-%version

%changelog
* Tue Dec 23 2008 Michael Shigorin <mike@altlinux.org> 1.0.0-alt1pre4
- forward-ported to Sisyphus
  + removed unneeded includes patch
- spec cleanup

* Thu Dec 01 2005 Alexey Borovskoy <alb@altlinux.ru> 1.0.0-alt0.M24.1
- Initial build for ALT Linux.
- Version: 1.0.0pre4.