-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.spec
45 lines (34 loc) · 1.2 KB
/
project.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
Name: purge-command
Version: 1.3
Release: 1%{?dist}
Summary: This is a plugin for DNF that is similar to the apt purge functionality
License: GPLv3+
URL: https://github.com/acidburnmonkey/dnf-purge-command
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
Requires: bash python3.12
BuildRequires: bash python3.12
%description
This is a plugin for DNF that aims to bring the apt purge functionality
to fedora. It calls for uninstall normally , then checks for leftover files on
user's home directory
%prep
%setup -c -T -q
tar -xzf %{SOURCE0}
%build
%install
# Remove any existing build root to start clean
rm -rf %{buildroot}
# Get Python 3 version
PYTHON_VERSION=$(python3 --version | awk '{print $2}' | awk -F. '{print $1"."$2}')
INSTALL_DIR="%{buildroot}/lib/python${PYTHON_VERSION}/site-packages/dnf-plugins"
# Create the necessary directory
mkdir -p ${INSTALL_DIR}
# Copy the script to the build root directory
cp -a the-purge.py ${INSTALL_DIR}/the-purge.py
%files
%defattr(-,root,root,-)
/lib/python*/site-packages/dnf-plugins/the-purge.py
%changelog
* Sat Jul 27 2024 acidburnmonkey [email protected] - 1.0-1
- Initial package