forked from log2timeline/l2tdevtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes for building artifacts rpm (log2timeline#1223)
- Loading branch information
1 parent
11c69fe
commit e0f843c
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
%define name artifacts | ||
%define version {version} | ||
%define release 1 | ||
|
||
Summary: ForensicArtifacts.com Artifact Repository. | ||
Name: %{{name}} | ||
Version: %{{version}} | ||
Release: %{{release}} | ||
Source0: %{{name}}-%{{version}}.tar.gz | ||
License: Apache License, Version 2.0 | ||
Group: Development/Libraries | ||
BuildRoot: %{{_tmppath}}/%{{name}}-%{{version}}-%{{release}}-buildroot | ||
Prefix: %{{_prefix}} | ||
BuildArch: noarch | ||
Vendor: Forensic artifacts <[email protected]> | ||
Packager: Forensic artifacts <[email protected]> | ||
Url: https://github.com/ForensicArtifacts/artifacts | ||
BuildRequires: python3-devel, python3-setuptools | ||
|
||
%description | ||
A free, community-sourced, machine-readable knowledge base of forensic artifacts that the world can use both as an information source and within other tools. | ||
|
||
%package -n %{{name}}-data | ||
Summary: Data files for ForensicArtifacts.com Artifact Repository. | ||
|
||
%description -n %{{name}}-data | ||
A free, community-sourced, machine-readable knowledge base of forensic artifacts that the world can use both as an information source and within other tools. | ||
|
||
%package -n python3-%{{name}} | ||
Requires: artifacts-data == %{{version}}, {rpm_requires} | ||
Summary: Python 3 module of ForensicArtifacts.com Artifact Repository. | ||
|
||
%description -n python3-%{{name}} | ||
A free, community-sourced, machine-readable knowledge base of forensic artifacts that the world can use both as an information source and within other tools. | ||
|
||
%package -n %{{name}}-tools | ||
Requires: python3-artifacts >= %{{version}} | ||
Summary: Tools for ForensicArtifacts.com Artifact Repository. | ||
|
||
%description -n %{{name}}-tools | ||
A free, community-sourced, machine-readable knowledge base of forensic artifacts that the world can use both as an information source and within other tools. | ||
|
||
%prep | ||
%autosetup -n %{{name}}-%{{version}} | ||
|
||
%build | ||
%py3_build | ||
|
||
%install | ||
%py3_install | ||
rm -rf %{{buildroot}}/usr/lib/python*/site-packages/*.egg-info/requires.txt | ||
rm -rf %{{buildroot}}/usr/share/doc/%{{name}}/ | ||
mkdir -p %{{buildroot}}/usr/share/artifacts/ | ||
mv %{{buildroot}}/usr/lib/python*/site-packages/artifacts/data/* %{{buildroot}}/usr/share/artifacts/ | ||
rmdir %{{buildroot}}/usr/lib/python*/site-packages/artifacts/data | ||
for FILENAME in %{{buildroot}}/usr/bin/*; do mv ${{FILENAME}} ${{FILENAME}}.py; done | ||
|
||
%clean | ||
rm -rf %{{buildroot}} | ||
|
||
%files -n %{{name}}-data | ||
%license LICENSE | ||
%doc ACKNOWLEDGEMENTS AUTHORS README | ||
%{{_datadir}}/%{{name}}/* | ||
|
||
%files -n python3-%{{name}} | ||
%license LICENSE | ||
%doc README | ||
%{{python3_sitelib}}/artifacts | ||
%{{python3_sitelib}}/artifacts*.egg-info | ||
|
||
%files -n %{{name}}-tools | ||
%{{_bindir}}/* | ||
|
||
%changelog | ||
* {date_time} log2timeline development team <[email protected]> {version}-1 | ||
- Auto-generated |