Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packages: add grep to all variants #1562

Merged
merged 1 commit into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
bcressey marked this conversation as resolved.
Show resolved Hide resolved
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.