-
Notifications
You must be signed in to change notification settings - Fork 73
/
pegasus.spec.in
102 lines (80 loc) · 3.35 KB
/
pegasus.spec.in
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Name: pegasus
Version: @PEGASUS_VERSION@
Release: 1%{?dist}
Summary: Workflow management system for HTCondor, grids, and clouds
Group: Applications/System
License: ASL 2.0
URL: http://pegasus.isi.edu/
Packager: Pegasus Development Team <[email protected]>
Source: pegasus-%{version}.tar.gz
BuildRequires: gcc, gcc-c++, javapackages-tools, make, openssl-devel, ant, python3-devel, python3-pip, python3-setuptools
Requires: which, python3, condor >= 8.8, graphviz, %{?systemd_requires}
%global debug_package %{nil}
%if 0%{?rhel} == 8
BuildRequires: java-11-openjdk-devel, python3-setuptools_scm
Requires: java-11-openjdk-headless, python3-cryptography, python3-PyYAML, python3-GitPython, python3-dataclasses
%endif
%if 0%{?rhel} >= 9
BuildRequires: ant-apache-regexp, java-11-openjdk-devel
Requires: java-11-openjdk-headless, python3-cryptography, python3-PyYAML, python3-GitPython
%endif
%define sourcedir %{name}-%{version}
# Turn off automatic python bytecompilation
# Will bytecompile manually with Python 2 and 3 separately
%undefine __brp_python_bytecompile
%description
The Pegasus project encompasses a set of technologies that
help workflow-based applications execute in a number of
different environments including desktops, campus clusters,
grids, and now clouds. Scientific workflows allow users to
easily express multi-step computations. Once an application
is formalized as a workflow the Pegasus Workflow Management
Service can map it onto available compute resources and
execute the steps in appropriate order.
%prep
%setup -q -n %{sourcedir}
%build
ant dist-release
# strip executables
strip dist/pegasus-%{version}/bin/pegasus-cluster
strip dist/pegasus-%{version}/bin/pegasus-kickstart
strip dist/pegasus-%{version}/bin/pegasus-keg
%install
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_datadir}
mkdir -p %{buildroot}/%{_unitdir}
cp -aR dist/pegasus-%{version}/etc/* %{buildroot}/%{_sysconfdir}/%{name}/
cp -aR dist/pegasus-%{version}/bin/* %{buildroot}/%{_bindir}/
cp -aR dist/pegasus-%{version}/lib* %{buildroot}/usr/
cp -aR dist/pegasus-%{version}/share/* %{buildroot}/%{_datadir}/
install -m 0644 dist/%{name}-%{version}/share/pegasus/systemd-unit/pegasus-service.service %{buildroot}/%{_unitdir}/
# rm unwanted files
rm -f %{buildroot}/%{_bindir}/keg.condor
rm -f %{buildroot}/%{_datadir}/%{name}/java/COPYING.*
rm -f %{buildroot}/%{_datadir}/%{name}/java/EXCEPTIONS.*
rm -f %{buildroot}/%{_datadir}/%{name}/java/LICENSE.*
rm -f %{buildroot}/%{_datadir}/%{name}/java/NOTICE.*
rm -rf %{buildroot}/%{_datadir}/%{name}/systemd-unit
%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/
%{_bindir}/*
%{_libdir}/pegasus
%{_libdir}/python*
%{_datadir}/%{name}
%{_unitdir}/pegasus-service.service
%post
# Enable the systemd user service
systemctl daemon-reload
%preun
# Disable the service before uninstalling
systemctl stop pegasus-service.service
systemctl disable pegasus-service.service
systemctl daemon-reload
%changelog
* @DATE@ Pegasus Development Team <[email protected]> @PEGASUS_VERSION@
- @PEGASUS_VERSION@ automatic build
* Mon Dec 02 2013 Pegasus Development Team <[email protected]> 4.3.2cvs
- Relaxed the "java" requirements in order for the package to work on plan
CentOS machines