-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhstsparser.spec
57 lines (39 loc) · 1.27 KB
/
hstsparser.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
46
47
48
49
50
51
52
53
54
55
56
57
Name: hstsparser
Version: 1.2.1
Release: %autorelease
Summary: HSTS Digital Forensics parser
License: MIT
URL: https://github.com/thebeanogamer/hstsparser
Source: %{url}/archive/%{version}/hstsparser-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: help2man
%py_provides python3-hstsparser
%description
Parse Firefox and Chrome HSTS databases into Digital Forensics artifacts.
%prep
%autosetup -p1 -n hstsparser-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
# Fix command name in manpage
ln -s hstsparser.py hstsparser
# hstsparser finds the version number by checking the installed package
# The package isn't installed during the RPM build, so we override the version number on the man page with the one from the RPM
help2man -N ./hstsparser -o hstsparser.1 --version-string='%{version}'
rm -f hstsparser
%install
%pyproject_install
%pyproject_save_files hstsparser
mkdir -p %{buildroot}%{_mandir}/man1/
install -pm 0644 hstsparser.1 %{buildroot}%{_mandir}/man1/hstsparser.1
%check
%pyproject_check_import
%files -f %{pyproject_files}
%doc README.md
%license LICENSE
%{_bindir}/hstsparser
%{_mandir}/man1/hstsparser.1*
%changelog
%autochangelog