LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File webyast-language-ws.spec of Package webyast-language-ws (Project openSUSE:11.4)

# spec file for package webyast-language-ws
# 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 http://bugs.opensuse.org/

Name:           webyast-language-ws
Provides:       WebYaST(org.opensuse.yast.modules.yapi.language)
Provides:       yast2-webservice-language = %{version}
Obsoletes:      yast2-webservice-language < %{version}
PreReq:         yast2-webservice
License:        GPLv2
Group:          Productivity/Networking/Web/Utilities
AutoReqProv:    on
Version:        0.1.0
Release:        1
Summary:        YaST2 - Webservice - Language
Source:         www.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  rubygem-restility rubygem-yast2-webservice-tasks

BuildRequires:  webyast-base-ws-testsuite
BuildRequires:  rubygem-mocha rubygem-test-unit

%if 0%{?suse_version} == 0 || %suse_version > 1110
# 11.2 or newer
PreReq:         yast2-country >= 2.18.10
# 11.1 or SLES11
PreReq:         yast2-country >=

%define pkg_user yastws
%define plugin_name language

%package testsuite
License:        GPLv2
Group:          Productivity/Networking/Web/Utilities
Requires:       %{name} = %{version}
Requires:       webyast-base-ws-testsuite
Summary:        Testsuite for webyast-language-ws package

YaST2 - Webservice - REST based interface of YaST in order to handle language settings.
    Stefan Schubert <schubi@opensuse.org>
    Josef Reidinger <jreidinger@suse.cz>

%description testsuite
This package contains complete testsuite for webyast-language-ws webservice package.
It's only needed for verifying the functionality of the module and it's not
needed at runtime.

%setup -q -n www

# build restdoc documentation
mkdir -p public/language/restdoc

# do not package restdoc sources
rm -rf restdoc

# run the testsuite


# Install all web and frontend parts.
mkdir -p $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
cp -a * $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
rm -f $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/COPYING


# granting all permissions for root 
/usr/sbin/grantwebyastrights --user root --action grant > /dev/null
/usr/sbin/grantwebyastrights --user yastws --action grant > /dev/null

%dir /srv/www/%{pkg_user}
%dir /srv/www/%{pkg_user}/vendor
%dir /srv/www/%{pkg_user}/vendor/plugins
%dir /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
%dir /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/doc

%files testsuite