Skip to content

Commit

Permalink
Merge pull request #55 from pafernanr/devel
Browse files Browse the repository at this point in the history
rpm build
  • Loading branch information
pafernanr authored Mar 8, 2025
2 parents 8457637 + 1396f17 commit c197aef
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
Expand Down
48 changes: 48 additions & 0 deletions sarcharts.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Name: sarcharts
Version: 0.0.0
Release: py3
Summary: SarCharts gets sysstat files from provided sarfilespaths and generates dynamic HTML Charts.

License: GPLv3
URL: https://github.com/pafernanr/sarcharts
Source0: https://github.com/pafernanr/%{name}-%{version}.tar.gz
Group: Applications/System
BuildArch: noarch

BuildRoot: %{_tmppath}/%{name}-buildroot
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python3-jinja2

%description
SarCharts gets sysstat files from provided sarfilespaths and generates dynamic HTML Charts

%prep
%setup -qn %{name}-%{version}

%build

%install
rm -rf ${RPM_BUILD_ROOT}

mkdir -p ${RPM_BUILD_ROOT}/usr/lib/tools/sarcharts/bin
install -D -m 755 sarcharts/bin/__init__.py ${RPM_BUILD_ROOT}/usr/lib/tools/sarcharts/bin/__init__.py
cp -rp sarcharts ${RPM_BUILD_ROOT}/usr/lib/tools/

rm -rf ${RPM_BUILD_ROOT}/usr/lib/tools/%{name}/lib/__pycache__
rm -rf ${RPM_BUILD_ROOT}/usr/lib/tools/%{name}/html/images

%post
ln -s -f /usr/lib/tools/sarcharts/bin/__init__.py /usr/bin/sarcharts

%postun
if [ $1 -eq 0 ] ; then
rm -f /usr/bin/%{name}
fi

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root,-)
/usr/lib/tools/sarcharts

0 comments on commit c197aef

Please sign in to comment.