%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))" || echo 0)} %global lualibdir %{_libdir}/lua/%{luaver} %global luapkgdir %{_datadir}/lua/%{luaver} %global luacompatver 5.1 %global luacompatlibdir %{_libdir}/lua/%{luacompatver} %global luacompatpkgdir %{_datadir}/lua/%{luacompatver} Name: lua-luaossl Version: 20181207 Release: 1%{?dist} Summary: Most comprehensive OpenSSL module in the Lua universe License: MIT URL: https://github.com/wahern/luaossl Source0: https://github.com/wahern/luaossl/archive/rel-%{version}.tar.gz BuildRequires: gcc BuildRequires: make BuildRequires: openssl-devel BuildRequires: lua-devel >= %{luaver} Requires: lua(abi) = %{luaver} %description luaossl is a comprehensive binding to OpenSSL for Lua 5.1, 5.2, and later. %if 0%{?fedora} || 0%{?rhel} >= 7 %package -n compat-%{name} Summary: Most comprehensive OpenSSL module in the Lua universe Requires: compat-lua %description -n compat-%{name} luaossl is a comprehensive binding to OpenSSL for Lua 5.1, 5.2, and later. %endif %package doc Summary: Documentation for OpenSSL Lua module BuildArch: noarch Requires: %{name} == %{version} %if 0%{?fedora} || 0%{?rhel} >= 7 Requires: compat-%{name} == %{version} %endif %description doc Documentation for the Stackable Continuation Queues library for the Lua Programming Language %prep %setup -q -n luaossl-rel-%{version} %build make %{?_smp_mflags} prefix=%{_prefix} libdir=%{_libdir} CFLAGS="%{optflags} -fPIC" %install make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} install%{luaver} install -Dm 644 doc/luaossl.pdf %{buildroot}%{_pkgdocdir}/luaossl.pdf %if 0%{?fedora} || 0%{?rhel} >= 7 make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} install%{luacompatver} %endif %files %{luapkgdir}/* %{lualibdir}/* %license LICENSE %if 0%{?fedora} || 0%{?rhel} >= 7 %files -n compat-%{name} %{luacompatpkgdir}/* %{luacompatlibdir}/* %license LICENSE %endif %files doc %doc %{_pkgdocdir}/luaossl.pdf %changelog * Mon Apr 08 2019 Tomas Krizek - 20181207-1 - Initial package for F28+ and EPEL 7+