diff --git a/lua-lgi.spec b/lua-lgi.spec index afb2f82..52f9f5d 100644 --- a/lua-lgi.spec +++ b/lua-lgi.spec @@ -18,15 +18,14 @@ %define flavor @BUILD_FLAVOR@ -%define _name lgi -Name: %{flavor}-%{_name} +%define mod_name lgi Version: 0.9.1 Release: 0 Summary: Lua bindings to GObject libraries License: MIT Group: System/Libraries Url: https://github.com/pavouk/lgi -Source0: https://github.com/pavouk/%{_name}/archive/%{version}.tar.gz#/%{_name}-%{version}.tar.gz +Source0: https://github.com/pavouk/%{mod_name}/archive/%{version}.tar.gz#/%{mod_name}-%{version}.tar.gz BuildRequires: %{flavor}-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(gmodule-2.0) @@ -34,11 +33,14 @@ BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.10.8 BuildRequires: pkgconfig(libffi) Requires: %{flavor} %if "%{flavor}" == "lua53" -Provides: lua-%{_name} = %{version} -Obsoletes: lua-%{_name} < %{version} +Provides: lua-%{mod_name} = %{version} +Obsoletes: lua-%{mod_name} < %{version} %endif %if "%{flavor}" == "" +Name: lua-%{mod_name} ExclusiveArch: do_not_build +%else +Name: %{flavor}-%{mod_name} %endif %description @@ -56,7 +58,7 @@ using gobject-introspection. Allows using GObject-based libraries directly from Lua. %prep -%setup -q -n %{_name}-%{version} +%setup -q -n %{mod_name}-%{version} %build make %{?_smp_mflags} \ @@ -71,9 +73,9 @@ make %{?_smp_mflags} \ %files %doc LICENSE README.md -%{lua_archdir}/%{_name}/ -%{lua_noarchdir}/%{_name}.lua -%{lua_noarchdir}/%{_name}/ +%{lua_archdir}/%{mod_name}/ +%{lua_noarchdir}/%{mod_name}.lua +%{lua_noarchdir}/%{mod_name}/ %files doc %doc docs samples tools