Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

Commit 1521f2c

Browse files
committed
Add script to build rpms
1 parent 9e9a860 commit 1521f2c

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

buildrpm.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash -eu
2+
3+
VERSION=$(awk '/Version:/ {print $2}' rpmspecs/opencattus.spec)
4+
cp rpmspecs/opencattus.spec ~/rpmbuild/SPECS/
5+
git archive -o ~/rpmbuild/SOURCES/opencattus-${VERSION}.tar.gz \
6+
--format tgz HEAD --prefix opencattus-${VERSION}/
7+
rpmbuild -ba ~/rpmbuild/SPECS/opencattus.spec
8+
echo "RPM Generated"
9+
ls -l ~/rpmbuild/RPMS/*/opencattus-installer*.rpm
10+

rpmspecs/opencattus.spec

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Name: opencattus-installer
2+
Version: 1.0
3+
Release: 1
4+
Summary: OpenCATTUS Installer
5+
License: Apache 2.0
6+
URL: https://versatushpc.com.br/opencattus/
7+
Source0: opencattus-%{VERSION}.tar.gz
8+
BuildRequires: make,cmake,cppcheck,ninja-build,newt-devel,gcc-toolset-14,gcc-toolset-14-libubsan-devel,gcc-toolset-14-libasan-devel
9+
Requires: newt
10+
11+
# Disable debug package for now
12+
%global _enable_debug_package 0
13+
%global debug_package %{nil}
14+
15+
%description
16+
Use OpenCATTUS installer to setup a HPC cluster from scratch.
17+
18+
%prep
19+
echo "PREP: $PWD"
20+
%autosetup -n opencattus-%{VERSION}
21+
bash -c '
22+
source rhel-gcc-toolset-14.sh;
23+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G Ninja
24+
'
25+
26+
%build
27+
echo "BUILD: $PWD"
28+
cmake --build build
29+
30+
%install
31+
echo "INSTALL: $PWD"
32+
mkdir -p %{buildroot}/usr/bin
33+
install -m 755 build/src/cloysterhpc %{buildroot}/usr/bin/cloysterhpc
34+
35+
%files
36+
/usr/bin/cloysterhpc
37+
38+
%changelog
39+
* Tue Feb 25 2025 Daniel Hilst <danielhilst@versatushpc.com> - 1.0-1
40+
- Initial release

0 commit comments

Comments
 (0)