reset version number to 0.0.1; granting rights for root
[opensuse:yast-rest-service.git] / plugins / language / package / yast2-webservice-language.spec
1 #
2 # spec file for package yast2-webservice-language (Version 0.1)
3 #
4 # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
7 #
8 # Please submit bugfixes or comments via http://bugs.opensuse.org/
9 #
10
11
12 Name:           yast2-webservice-language
13 PreReq:         yast2-webservice
14 Provides:       yast2-webservice:/srv/www/yastws/app/controllers/language_controller.rb
15 License:        GPL
16 Group:          Productivity/Networking/Web/Utilities
17 Autoreqprov:    on
18 Version:        0.0.1
19 Release:        0
20 Summary:        YaST2 - Webservice - Language
21 Source:         www.tar.bz2
22 Source1:        org.opensuse.yast.system.language.policy
23 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
24 BuildArch:      noarch
25
26 #
27 %define pkg_user yastws
28 %define plugin_name language
29 #
30
31
32 %description
33 YaST2 - Webservice - REST based interface of YaST in order to handle language settings.
34 Authors:
35 --------
36     Stefan Schubert <schubi@opensuse.org>
37
38 %prep
39 %setup -q -n www
40
41 %build
42
43 %install
44
45 #
46 # Install all web and frontend parts.
47 #
48 mkdir -p $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
49 cp -a * $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
50
51 # Policies
52 mkdir -p $RPM_BUILD_ROOT/usr/share/PolicyKit/policy
53 install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/usr/share/PolicyKit/policy/
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 #
60 # granting all permissions for root 
61 #
62 /etc/yastws/tools/policyKit-rights.rb --user root --action grant >& /dev/null || :
63
64 %files 
65 %defattr(-,root,root)
66 %dir /srv/www/%{pkg_user}
67 %dir /srv/www/%{pkg_user}/vendor
68 %dir /srv/www/%{pkg_user}/vendor/plugins
69 %dir /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
70 %dir /usr/share/PolicyKit
71 %dir /usr/share/PolicyKit/policy
72 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/MIT-LICENSE
73 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/README
74 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/Rakefile
75 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/init.rb
76 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/install.rb
77 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/uninstall.rb
78 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/app
79 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/config
80 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/tasks
81 %config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/test
82 %attr(644,root,root) %config /usr/share/PolicyKit/policy/org.opensuse.yast.system.%{plugin_name}.policy
83