Created
February 19, 2022 00:16
-
-
Save jeanfrancoisgratton/71625e611ddab0f18332f841d8a9b3f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%define debug_package %{nil} | |
%define _name admintools | |
%define _prefix /opt | |
%define _homedir /opt/%{_name} | |
Name: admintools | |
Version: 1.111 | |
Release: 0 | |
Summary: admintools | |
Group: administrative tools | |
License: GPL2.0 | |
URL: ****** | |
Source0: %{name}-%{version}.tar.gz | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
BuildArchitectures: noarch | |
BuildRequires: gcc | |
Requires: python3,python3-devel,python3-pip | |
#PreReq: meme chose | |
%description | |
Administration tools | |
%prep | |
%setup -q | |
%build | |
%clean | |
rm -rf $RPM_BUILD_ROOT | |
%pre | |
%install | |
rm -rf $RPM_BUILD_ROOT | |
%{__mkdir_p} "$RPM_BUILD_ROOT/%{_homedir}/etc" | |
%{__mkdir_p} "$RPM_BUILD_ROOT/%{_homedir}/req" | |
%{__install} -D -m 755 source/backupTool.py "$RPM_BUILD_ROOT%{_homedir}" | |
%{__install} -D -m 755 source/requirements-backupTool.txt "$RPM_BUILD_ROOT%{_homedir}/req/backupTool.txt" | |
%{__install} -D -m 755 source/sample.yaml "$RPM_BUILD_ROOT%{_homedir}/etc/" | |
%post | |
echo "Installing requirements" | |
pip3 install --upgrade pip > /dev/null 2>&1 | |
pip3 install -r /opt/sbin/admintools/req/backupTool.txt > /dev/null 2>&1 | |
%preun | |
%postun | |
%files | |
%defattr(-,root,root,-) | |
%{_homedir}/etc | |
%{_homedir}/req | |
%{_homedir} | |
%changelog | |
* Fri Feb 18 2022 builder <builder@famillegratton.net> 1.110-0 | |
- directory refactoring, deb package (jean-francois@famillegratton.net) | |
* Fri Feb 18 2022 builder <builder@famillegratton.net> 1.100-0 | |
- new package built with tito | |
* Fri Feb 18 2022 builder <builder@famillegratton.net> 1.100-0 | |
- rev update (jean-francois@famillegratton.net) | |
- Completed crontab handling (jean-francois@famillegratton.net) | |
* Wed Feb 16 2022 builder <builder@famillegratton.net> 1.000-0 | |
- new package built with tito : first tool, backuptool | |
* Wed Feb 16 2022 builder <builder@famillegratton.net> | |
- new package built with tito : first tool, backuptool.py | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment