lgi/lgi.spec

90 lines
2.4 KiB
RPMSpec

Name: lgi
Version: 0.9.2
Release: 1mamba
Summary: Dynamic Lua binding to GObject libraries using GObject-Introspection
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/lgi-devs/lgi
Source: https://github.com/lgi-devs/lgi.git/%{version}/lgi-%{version}.tar.bz2
Patch0: lgi-0.9.2-lua-5.4.patch
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: gobject-introspection-devel
BuildRequires: libffi-devel
BuildRequires: libglib-devel
## AUTOBUILDREQ-END
BuildRequires: liblua-devel
BuildRequires: liblua51-devel
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
Dynamic Lua binding to GObject libraries using GObject-Introspection.
%package -n lua-%{name}
Summary: Dynamic Lua binding to GObject libraries using GObject-Introspection
Group: System/Libraries
%description -n lua-%{name}
Dynamic Lua binding to GObject libraries using GObject-Introspection.
%package -n lua51-%{name}
Summary: Dynamic Lua binding to GObject libraries using GObject-Introspection
Group: System/Libraries
%description -n lua51-%{name}
Dynamic Lua binding to GObject libraries using GObject-Introspection.
%debug_package
%prep
%setup -q -c -a0
mv lgi-%{version} lgi
cd lgi
%patch 0 -p1 -b .lua-5.4
cd ..
cp -a lgi lgi-51
%build
CFLAGS="%{optflags} `pkg-config --cflags lua`" make -C lgi all
CFLAGS="%{optflags} `pkg-config --cflags lua51`" make -C lgi-51 all
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C lgi \
CFLAGS="%{optflags} `pkg-config --cflags lua`" \
LUA_LIBDIR=%{_libdir}/lua/5.4 \
LUA_SHAREDIR=%{_datadir}/lua/5.4
%makeinstall -C lgi-51 \
CFLAGS="%{optflags} `pkg-config --cflags lua51`" \
LUA_LIBDIR=%{_libdir}/lua/5.1 \
LUA_SHAREDIR=%{_datadir}/lua/5.1
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -n lua-%{name}
%defattr(-,root,root)
%{_libdir}/lua/5.4/lgi/corelgilua51.so
%{_datadir}/lua/5.4/lgi.lua
%dir %{_datadir}/lua/5.4/lgi
%{_datadir}/lua/5.4/lgi/*
%doc lgi/LICENSE
%files -n lua51-%{name}
%defattr(-,root,root)
%{_libdir}/lua/5.1/lgi/corelgilua51.so
%{_datadir}/lua/5.1/lgi.lua
%dir %{_datadir}/lua/5.1/lgi
%{_datadir}/lua/5.1/lgi/*
%doc lgi/LICENSE
%changelog
* Sat May 11 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.2-1mamba
- package created using the webbuild interface