From 9404c0cf9cc0015cd0ec421651ebb51c8eeb5ad5 Mon Sep 17 00:00:00 2001 From: Arnaldo Garcia Rincon Date: Wed, 5 May 2021 19:29:16 +0000 Subject: [PATCH] packages: add grep to all variants --- packages/grep/Cargo.toml | 20 ++++++++++++++++++++ packages/grep/build.rs | 9 +++++++++ packages/grep/grep.spec | 34 ++++++++++++++++++++++++++++++++++ packages/grep/pkg.rs | 1 + packages/release/Cargo.toml | 1 + packages/release/release.spec | 1 + variants/Cargo.lock | 9 +++++++++ 7 files changed, 75 insertions(+) create mode 100644 packages/grep/Cargo.toml create mode 100644 packages/grep/build.rs create mode 100644 packages/grep/grep.spec create mode 100644 packages/grep/pkg.rs diff --git a/packages/grep/Cargo.toml b/packages/grep/Cargo.toml new file mode 100644 index 00000000000..0bb325a4b84 --- /dev/null +++ b/packages/grep/Cargo.toml @@ -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" } diff --git a/packages/grep/build.rs b/packages/grep/build.rs new file mode 100644 index 00000000000..cad8999af53 --- /dev/null +++ b/packages/grep/build.rs @@ -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(()) +} diff --git a/packages/grep/grep.spec b/packages/grep/grep.spec new file mode 100644 index 00000000000..4a660ea6234 --- /dev/null +++ b/packages/grep/grep.spec @@ -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} diff --git a/packages/grep/pkg.rs b/packages/grep/pkg.rs new file mode 100644 index 00000000000..d799fb2d44c --- /dev/null +++ b/packages/grep/pkg.rs @@ -0,0 +1 @@ +// not used diff --git a/packages/release/Cargo.toml b/packages/release/Cargo.toml index 33733d5101f..3b05a161b89 100644 --- a/packages/release/Cargo.toml +++ b/packages/release/Cargo.toml @@ -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" } diff --git a/packages/release/release.spec b/packages/release/release.spec index df49da30a49..e78c723ad01 100644 --- a/packages/release/release.spec +++ b/packages/release/release.spec @@ -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 diff --git a/variants/Cargo.lock b/variants/Cargo.lock index efe50063fbd..0e46424687d 100644 --- a/variants/Cargo.lock +++ b/variants/Cargo.lock @@ -258,6 +258,14 @@ dependencies = [ name = "glibc" version = "0.1.0" +[[package]] +name = "grep" +version = "0.1.0" +dependencies = [ + "glibc", + "libpcre", +] + [[package]] name = "grub" version = "0.1.0" @@ -659,6 +667,7 @@ dependencies = [ "e2fsprogs", "filesystem", "glibc", + "grep", "grub", "iproute", "libaudit",