diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a5eaa34 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/v0.3.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 832d049..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# libgpiod - -The libgpiod package \ No newline at end of file diff --git a/libgpiod.spec b/libgpiod.spec new file mode 100644 index 0000000..33af898 --- /dev/null +++ b/libgpiod.spec @@ -0,0 +1,76 @@ +Name: libgpiod +Version: 0.3 +Release: 2%{?dist} +Summary: C library and tools for interacting with linux GPIO char device + +License: LGPLv2+ +URL: https://github.com/brgl/libgpiod +Source0: https://github.com/brgl/libgpiod/archive/v%{version}.tar.gz + +BuildRequires: automake autoconf libtool +BuildRequires: gcc +BuildRequires: kernel-headers +BuildRequires: kmod-devel +BuildRequires: systemd-devel +BuildRequires: doxygen + +%description +libgpiod is a C library and tools for interacting with the linux GPIO character +device (gpiod stands for GPIO device) The new character device interface +guarantees all allocated resources are freed after closing the device file +descriptor and adds several new features that are not present in the obsolete +sysfs interface (like event polling, setting/reading multiple values at once or +open-source and open-drain GPIOs). + +%package utils +Summary: Utilities for GPIO +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description utils +Utilities for interacting with GPIO character devices. + +%package devel +Summary: Development package for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Files for development with %{name}. + +%prep +%autosetup + +%build +autoreconf -vif +%configure --enable-tools=yes --disable-static --enable-tests + +%make_build + +%install +%make_install + +#Remove libtool archives. +find %{buildroot} -name '*.la' -delete + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%license COPYING +%doc README.md +%{_libdir}/%{name}.so.* + +%files utils +%{_bindir}/gpio* + +%files devel +%{_includedir}/gpiod.h +%{_libdir}/%{name}.so + +%changelog +* Tue Aug 22 2017 Peter Robinson 0.3-2 +- Minor review updates + +* Sat Jul 1 2017 Peter Robinson 0.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..42f9cfc --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (v0.3.tar.gz) = 19e97fdae37483ab9c1f756dc7fe6eb01d41d962173738bcd538966796fb941cf51648a918bbb4dbfc9b4104489a123ca4c581388510b99a964620adb7c7577d