package whole doc directory
[opensuse:yast-rest-service.git] / plugins / services / package / yast2-webservice-services.spec
1 #
2 # spec file for package yast2-webservice-services (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-services
13 PreReq:         yast2-webservice
14 Provides:       yast2-webservice:/srv/www/yastws/app/controllers/services_controller.rb
15 License:        MIT
16 Group:          Productivity/Networking/Web/Utilities
17 Autoreqprov:    on
18 Version:        0.0.6
19 Release:        0
20 Summary:        YaST2 - Webservice - Services
21 Source:         www.tar.bz2
22 Source1:        org.opensuse.yast.modules.yapi.services.policy
23 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
24 BuildArch:      noarch
25
26 # YaPI/SERVICES.pm
27 %if 0%{?suse_version} == 0 || %suse_version > 1110
28 # 11.2 or newer
29 Requires:       yast2 >= 2.18.24
30 %else
31 # 11.1 or SLES11
32 Requires:       yast2 >= 2.17.72
33 %endif
34
35
36 #
37 %define pkg_user yastws
38 %define plugin_name services
39 #
40
41
42 %description
43 YaST2 - Webservice - REST based interface of YaST in order to handle services.
44 Authors:
45 --------
46     Stefan Schubert <schubi@opensuse.org>
47     Jiri Suchomel <jsuchome@suse.cz>
48     Ladislav Slezak <lslezak@suse.cz>
49
50 %prep
51 %setup -q -n www
52
53 %build
54
55 %install
56
57 #
58 # Install all web and frontend parts.
59 #
60 mkdir -p $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
61 cp -a * $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
62
63 # Policies
64 mkdir -p $RPM_BUILD_ROOT/usr/share/PolicyKit/policy
65 install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/usr/share/PolicyKit/policy/
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 #
72 # granting all permissions for root 
73 #
74 /etc/yastws/tools/policyKit-rights.rb --user root --action grant >& /dev/null || :
75 /etc/yastws/tools/policyKit-rights.rb --user yastws --action grant >& /dev/null || :
76
77 %files 
78 %defattr(-,root,root)
79 %dir /srv/www/%{pkg_user}
80 %dir /srv/www/%{pkg_user}/vendor
81 %dir /srv/www/%{pkg_user}/vendor/plugins
82 %dir /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
83 %dir /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/doc
84 %dir /usr/share/PolicyKit
85 %dir /usr/share/PolicyKit/policy
86 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/MIT-LICENSE
87 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/README
88 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/Rakefile
89 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/init.rb
90 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/install.rb
91 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/uninstall.rb
92 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/app
93 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/config
94 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/tasks
95 /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/doc
96
97 %attr(644,root,root) %config /usr/share/PolicyKit/policy/org.opensuse.yast.modules.yapi.%{plugin_name}.policy