From 436c50b88a70e453a5f8635d7dfbee308a4b65f1 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 28 Jun 2022 10:07:30 -0400 Subject: [PATCH] Initial import Resolves: rhbz#2072724 --- .gitignore | 1 + gating.yaml | 6 +++++ libi2cd.spec | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 70 insertions(+) create mode 100644 gating.yaml create mode 100644 libi2cd.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..097a1c5 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/libi2cd-1.0.3.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/libi2cd.spec b/libi2cd.spec new file mode 100644 index 0000000..45040de --- /dev/null +++ b/libi2cd.spec @@ -0,0 +1,62 @@ +#global candidate rc2 + +Name: libi2cd +Version: 1.0.3 +Release: 1%{?candidate:.%{candidate}}%{?dist} +Summary: C library for interacting with linux I2C devices + +License: LGPLv2+ +URL: https://github.com/sstallion/libi2cd/ +Source0: https://github.com/sstallion/libi2cd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildRequires: automake autoconf libtool +BuildRequires: gcc +BuildRequires: libcmocka-devel +BuildRequires: make + +%description +libi2cd provides a simple and straightforward API for accessing I2C devices from +userspace. It relies on the i2c-dev Linux kernel module and is intended to +complement existing tools and libraries, such as those provided by i2c-tools. +It provides both high- and low-level access to the underlying ioctl requests. + +%package devel +Summary: Development package for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Files for development with %{name}. + +%prep +%setup -q -n %{name}-%{version}%{?candidate:-%{candidate}} + +%build +autoreconf -vif +%configure --disable-static + +%make_build + +%install +%make_install + +#Remove libtool archives. +find %{buildroot} -name '*.la' -delete + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README.md +%{_libdir}/%{name}.so.* + +%files devel +%{_includedir}/i2cd.h +%{_libdir}/%{name}*.so +%{_libdir}/pkgconfig/libi2cd.pc + +%changelog +* Fri Jan 21 2022 Peter Robinson - 1.0.3-1 +- Update to 1.0.3 + +* Tue Sep 21 2021 Peter Robinson - 1.0-1 +- Iniital build diff --git a/sources b/sources new file mode 100644 index 0000000..72c58e5 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libi2cd-1.0.3.tar.gz) = 15c001e21f547b55800a57a6c7506f4adbcf86aeb77f40561b728484ae9ba595305bc9ed5452c9d25bd7b23e5c28e932c1ff9fd543e2351d03588a8eb049deef