-
Notifications
You must be signed in to change notification settings - Fork 32
/
xsce-server.spec
47 lines (37 loc) · 1.36 KB
/
xsce-server.spec
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
%define git_version %(git describe --tags 2> /dev/null || echo 0.0-`git log --oneline | wc -l`-g`git describe --always`)
%define git_get_ver %(echo %{git_version} | sed 's/^v\\?\\(.*\\)-\\([0-9]\\+\\)-g.*$/\\1/;s/-//')
%define git_get_rel %(echo %{git_version} | sed 's/^v\\?\\(.*\\)-\\([0-9]\\+-g.*\\)$/\\2/;s/-/_/')
Name: xsce-server
Summary: XSCE deployment scripts
Version: %git_get_ver
Release: %git_get_rel
License: GPLv3
Group: Applications/System
Source: %{expand:%%(pwd)}
BuildArch: noarch
Requires: bash, python >= 2.7, ansible >= 1.3
URL: https://github.com/XSCE/xsce.git
Provides: xs-config
Provides: xsce-server
BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release}
%description
Ansible playbook collection for XSCE project.
%prep
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/var/local/xsce
mkdir -p $RPM_BUILD_ROOT/usr/local/share/doc/xsce/
mkdir -p $RPM_BUILD_ROOT/usr/share/ansible/xsce/
cd $RPM_BUILD_ROOT
cp -rf %{SOURCEURL0}/roles ./var/local/xsce/
cp -rf %{SOURCEURL0}/vars ./var/local/xsce/
cp -rf %{SOURCEURL0}/xsce.yml ./var/local/xsce
cp -rf %{SOURCEURL0}/ansible_hosts ./var/local/xsce
cp -rf %{SOURCEURL0}/docs/* ./usr/local/share/doc/xsce/
cp %{SOURCEURL0}/runansible ./usr/bin/
%clean
rm -r -f "$RPM_BUILD_ROOT"
%files
/usr/bin/runansible
/var/local/xsce
%doc /usr/local/share/doc/xsce