Skip to content

Commit

Permalink
packages: add grep to all variants
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaldo2792 committed May 6, 2021
1 parent f93f9fe commit 9404c0c
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/grep/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "grep"
version = "0.1.0"
edition = "2018"
publish = false
build = "build.rs"

[lib]
path = "pkg.rs"

[[package.metadata.build-package.external-files]]
url = "https://mirrors.kernel.org/gnu/grep/grep-3.6.tar.xz"
sha512 = "8934544a19ded61344d83ff2cab501e86f17f8ae338892e0c36c2d2d8e63c76817840a0071ef5e3fcbca9115eba8a1aae0e4c46b024e75cd9a2e3bd05f933d90"

[dependencies]
libpcre = { path = "../libpcre" }

[build-dependencies]
libpcre = { path = "../libpcre" }
glibc = { path = "../glibc" }
9 changes: 9 additions & 0 deletions packages/grep/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use std::process::{exit, Command};

fn main() -> Result<(), std::io::Error> {
let ret = Command::new("buildsys").arg("build-package").status()?;
if !ret.success() {
exit(1);
}
Ok(())
}
34 changes: 34 additions & 0 deletions packages/grep/grep.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Name: %{_cross_os}grep
Version: 3.6
Release: 1%{?dist}
Summary: GNU grep utility
URL: https://www.gnu.org/software/grep/
License: GPL-3.0-or-later
Source: https://mirrors.kernel.org/gnu/grep/grep-%{version}.tar.xz
BuildRequires: %{_cross_os}glibc-devel
BuildRequires: %{_cross_os}libpcre-devel
Requires: %{_cross_os}libpcre

%description
%{summary}.

%prep
%setup -n grep-%{version}

%build
%cross_configure --without-included-regex --disable-silent-rules
%make_build

%install
%make_install

%files
%license COPYING
%{_cross_bindir}/grep
%{_cross_attribution_file}
# Exclude fgrep and egrep because they are shell scripts
%exclude %{_cross_bindir}/fgrep
%exclude %{_cross_bindir}/egrep
%exclude %{_cross_infodir}
%exclude %{_cross_localedir}
%exclude %{_cross_mandir}
1 change: 1 addition & 0 deletions packages/grep/pkg.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// not used
1 change: 1 addition & 0 deletions packages/release/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dbus-broker = { path = "../dbus-broker" }
e2fsprogs = { path = "../e2fsprogs" }
filesystem = { path = "../filesystem" }
glibc = { path = "../glibc" }
grep = { path = "../grep" }
grub = { path = "../grub" }
iproute = { path = "../iproute" }
libaudit = { path = "../libaudit" }
Expand Down
1 change: 1 addition & 0 deletions packages/release/release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Requires: %{_cross_os}e2fsprogs
Requires: %{_cross_os}libgcc
Requires: %{_cross_os}libstd-rust
Requires: %{_cross_os}filesystem
Requires: %{_cross_os}grep
Requires: %{_cross_os}glibc
Requires: %{_cross_os}grub
Requires: %{_cross_os}iproute
Expand Down
9 changes: 9 additions & 0 deletions variants/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9404c0c

Please sign in to comment.