From 481c75fd043e7fdb98d0e2e95ee7006c6b692599 Mon Sep 17 00:00:00 2001 From: Damian Wrobel Date: Jan 03 2018 10:10:21 +0000 Subject: Initial import (rhbz#1528612) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a021f38 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/librs232-1.0.3-20171229git21ecc3c.tar.gz diff --git a/librs232-1.0.3-configure-warning.patch b/librs232-1.0.3-configure-warning.patch new file mode 100644 index 0000000..5801639 --- /dev/null +++ b/librs232-1.0.3-configure-warning.patch @@ -0,0 +1,15 @@ +From 128a94a4f82981686a30b9cca0d40c7be37264b3 Mon Sep 17 00:00:00 2001 +From: Damian Wrobel +Date: Wed, 27 Sep 2017 23:15:28 +0200 +Subject: [PATCH] Fix for warning: autoconf input should be named + 'configure.ac', not 'configure.in' + +--- + configure.in => configure.ac | 0 + 1 file changed, 0 insertions(+), 0 deletions(-) + rename configure.in => configure.ac (100%) + +diff --git a/configure.in b/configure.ac +similarity index 100% +rename from configure.in +rename to configure.ac diff --git a/librs232.spec b/librs232.spec new file mode 100644 index 0000000..09dac61 --- /dev/null +++ b/librs232.spec @@ -0,0 +1,102 @@ +%global date 20171229 +%global commit0 21ecc3c65da37731526ab01b3e834acfb8560112 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global the_owner srdgame + +Name: librs232 +Version: 1.0.3 +Release: 3.%{date}git%{shortcommit0}%{?dist} +Summary: Library for serial communications over RS-232 with Lua bindings +License: MIT +Url: https://github.com/%{the_owner}/%{name}/ +Source: https://github.com/%{the_owner}/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{version}-%{date}git%{shortcommit0}.tar.gz +# Rename configure.in -> configure.ac +# Upstrem reference: https://github.com/srdgame/librs232/pull/4 +Patch0: https://github.com/%{the_owner}/%{name}/commit/128a94a4f82981686a30b9cca0d40c7be37264b3.patch#/%{name}-%{version}-configure-warning.patch + +BuildRequires: /usr/bin/git +BuildRequires: gcc +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: lua >= 5.1 +BuildRequires: lua-devel >= 5.1 + + +%description +%{name} is a multi-platform library that provides support for communicating +over serial ports (e.g. RS-232). It also provides Lua bindings. + + +%package devel +Summary: Development files for %{name} +License: MIT +Requires: %{name}%{?_isa} = %{version}-%{release} + + +%description devel +The %{name}-devel package contains C header files for developing +applications that use %{name} library. + + +%package -n lua-%{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Lua bindings for %{name} +License: MIT +Requires: lua(abi) = %{lua_version} + + +%description -n lua-%{name} +The lua-%{name} package provides Lua binding for %{name} library. +It allows Lua programs to communicate over serial ports. + + +%prep +%autosetup -S git -n %{name}-%{commit0} +export LUA_INCLUDE= +./autogen.sh +%configure --disable-static + + +%build +%make_build + + +%install +%make_install +# Remove unneeded .la files +find %{buildroot} -name '*.la' -exec rm {} \; + + +%files +%license COPYING +%doc AUTHORS doc/example.lua +%{_libdir}/*.so.* + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files devel +%{_libdir}/*.so +%{_includedir}/%{name} +%{_libdir}/pkgconfig/%{name}*.pc + + +%files -n lua-%{name} +%{lua_libdir}/*.so + + +%changelog +* Wed Jan 03 2018 Damian Wrobel - 1.0.3-3.20171229git21ecc3c +- Drop patch upstream merged +- Configure warning patch added + +* Thu Dec 21 2017 Damian Wrobel - 1.0.3-2.20171219gitc0a3c75 +- Drop patch upstream merged + +* Tue Sep 26 2017 Damian Wrobel - 1.0.3-1.20160327git4de45dd +- Initial RPM release. diff --git a/sources b/sources new file mode 100644 index 0000000..689e778 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (librs232-1.0.3-20171229git21ecc3c.tar.gz) = 3ad167f85e1fd4521ee448ab5111c0235f19d46fde1376a68443a8b347c70b1b70223341f8b3636853557dabf5ed31474522c433300f6386c44b419a4a58b1f9