Blame view

obs/slapos/templates/slapos.spec.in 5.2 KB
Cédric Le Ninivin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
##############################################################################
Rafael Monnerat committed
27 28 29 30
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
 

Cédric Le Ninivin committed
31 32 33 34
%define slapversion %RECIPE_VERSION%
%define version %VERSION%
%define unmangled_version %VERSION%
%define unmangled_version %VERSION%
35
%define release_number %RELEASE%
Cédric Le Ninivin committed
36 37 38 39 40


Summary:Client-side to deploy applications with SlapOS
Name: slapos.node
Version:%{slapversion}
41
Release:%{release_number}
Cédric Le Ninivin committed
42 43
License:GPL
Group: Application/Network
44
Source0: slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}.tar.gz
Rafael Monnerat committed
45
URL: http://community.slapos.org/ 
Cédric Le Ninivin committed
46
Vendor: Vifib
Rafael Monnerat committed
47
Packager: Rafael Monnerat <rafael@nexedi.com>
Cédric Le Ninivin committed
48

Rafael Monnerat committed
49
%if 0%{?suse_version}
Cédric Le Ninivin committed
50
%if 0%{?suse_version} == 1210
Rafael Monnerat committed
51
BuildRequires: gcc-c++, make, patch, wget, python, python-devel, chrpath, openssl-devel, python-xml
Cédric Le Ninivin committed
52

Rafael Monnerat committed
53
Requires: bridge-utils, python, gcc-c++, make, patch, wget, python-xml
Rafael Monnerat committed
54
%else
Rafael Monnerat committed
55
BuildRequires: gcc-c++, make, patch, wget, python, python-devel, chrpath, openssl-devel, python-xml
Rafael Monnerat committed
56

Rafael Monnerat committed
57
Requires: bridge-utils, python, gcc-c++, make, patch, wget, python-xml
Rafael Monnerat committed
58
%endif
Cédric Le Ninivin committed
59
%else
Rafael Monnerat committed
60
BuildRequires: gcc-c++, make, patch, wget, python, python-devel, chrpath, openssl-devel
Cédric Le Ninivin committed
61

Rafael Monnerat committed
62
Requires: bridge-utils, python, gcc-c++, make, patch, wget
Cédric Le Ninivin committed
63 64 65 66
%endif

AutoReqProv: no

Rafael Monnerat committed
67 68
Conflicts: firewalld

Cédric Le Ninivin committed
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
%description
 Client-side to deploy applications with SlapOS 
 SlapOS allows one to turn any application into SaaS (Service as a System),
 PaaS (Platform as a Service) or IaaS (Infrastructure as a Service) without
 loosing your freedom. SlapOS defines two types of servers: SlapOS server and
 SlapOS node.
 .
 This package contains libraries and tools to deploy a node.
 .
 Slapformat prepares a SlapOS node before running slapgrid. It then generates
 a report and sends the information to the configured SlapOS master.
 .
 Slapgrid allows you to easily deploy instances of software based on buildout
 profiles.


%prep
86 87
rm -rf $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}
zcat $RPM_SOURCE_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}.tar.gz | tar -xvf -
Cédric Le Ninivin committed
88 89 90


%build
91
cd $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}
Cédric Le Ninivin committed
92 93 94
make

%install
95
cd $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/
Cédric Le Ninivin committed
96 97
make DESTDIR=$RPM_BUILD_ROOT install 
mkdir -p $RPM_BUILD_ROOT/etc/cron.d/
Rafael Monnerat committed
98
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/slapos-node.cron.d $RPM_BUILD_ROOT/etc/cron.d/slapos-node
99
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
Rafael Monnerat committed
100
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/slapos-node.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/slapos.logrotate.conf
Cédric Le Ninivin committed
101
mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/
Cédric de Saint Martin committed
102
mkdir -p $RPM_BUILD_ROOT/opt/slapos/log
Rafael Monnerat committed
103
rm -rf $RPM_BUILD_ROOT/opt/slapos/eggs/setuptools-*.egg/setuptools/tests/test_easy_install.py
Rafael Monnerat committed
104
rm -rf $RPM_BUILD_ROOT/opt/slapos/rebootstrap/parts/python2.7/lib/python2.7/test/test_httpservers.py
Rafael Monnerat committed
105 106 107 108 109 110 111
rm -rf $RPM_BUILD_ROOT/opt/slapos/rebootstrap/parts/python2.7/lib/python2.7/test/badsyntax_nocaret.py
rm -rf $RPM_BUILD_ROOT/opt/slapos/rebootstrap/parts/python2.7/lib/python2.7/test/badsyntax_future*.py
rm -rf $RPM_BUILD_ROOT/opt/slapos/rebootstrap/parts/python2.7/lib/python2.7/test/bad_*.py
rm -rf $RPM_BUILD_ROOT/opt/slapos/rebootstrap/parts/python2.7/lib/python2.7/lib2to3/tests/data/py3_test_grammar.py
rm -rf $RPM_BUILD_ROOT/opt/slapos/rebootstrap/parts/python2.7/lib/python2.7/test/test_grammar.py
rm -rf $RPM_BUILD_ROOT/opt/slapos/rebootstrap/parts/python2.7/lib/python2.7/test/test_compile.py
rm -rf $RPM_BUILD_ROOT/opt/slapos/rebootstrap/parts/python2.7/lib/python2.7/test/_mock_backport.py
Cédric Le Ninivin committed
112 113

%files
Rafael Monnerat committed
114 115 116 117 118 119
/opt/slapos
/etc/cron.d/slapos-node
/etc/logrotate.d/slapos.logrotate.conf
/etc/opt
/etc/systemd
/etc/systemd/system
Rafael Monnerat committed
120
/etc/firewalld
Rafael Monnerat committed
121 122
/usr/bin/slapos
/usr/sbin/slapos-tweak
Cédric Le Ninivin committed
123 124
%defattr(-,root,root)

Rafael Monnerat committed
125 126
%pre

Cédric Le Ninivin committed
127
%post
Rafael Monnerat committed
128
echo """To generate slapos configuration run 'slapos node register'"""
Cédric Le Ninivin committed
129 130 131 132

%preun

%postun