File luakit.spec of Package luakit

# luakit SPEC File by Charadon
#
# To the extent possible under law, the person who associated CC0 with
# this spec file has waived all copyright and related or neighboring rights
# to this spec file.
#
# You should have received a copy of the CC0 legalcode along with this
# work.  If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

Name:    luakit
Version: 2.4.0
Release: 0
Summary: A fast, light and simple to use browser framework extensible by Lua
License: GPL-3.0
Group:   Productivity/Networking/Web/Browsers
URL:     https://luakit.github.io/
Source: %{name}-%{version}.tar.gz

BuildRequires: pkgconfig(luajit)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: luajit-luafilesystem
BuildRequires: pkgconfig(webkit2gtk-4.1)
BuildRequires: pkgconfig(javascriptcoregtk-4.1)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(gstreamer-1.0)
Requires:      lua51-luafilesystem

%description
luakit is a fast, light and simple to use micro-browser framework extensible by Lua using the WebKit web content engine and the GTK+ toolkit.

%prep
%setup
#LIBDIR environment variable doesn't work, we need to change Makefile manually.
sed -i '107s;$(DESTDIR)$(PREFIX)/lib/luakit;$(DESTDIR)$(LIBDIR)/luakit;' Makefile
sed -i '108s;$(DESTDIR)$(PREFIX)/lib/luakit/luakit.so;$(DESTDIR)$(LIBDIR)/luakit/luakit.so;' Makefile

%build
make \
DESTDIR=%{buildroot} \
PREFIX=%{_prefix} \
XDGPREFIX=%{_sysconfdir}/xdg \
LIBDIR=%{_libdir} \
USE_LUAJIT=1

%install
make \
DESTDIR=%{buildroot} \
PREFIX=%{_prefix} \
XDGPREFIX=%{_sysconfdir}/xdg \
LIBDIR=%{_libdir} \
install

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%dir %{_sysconfdir}/xdg/luakit
%config %{_sysconfdir}/xdg/luakit/*
%{_bindir}/luakit
%{_datadir}/applications/luakit.desktop
%{_datadir}/luakit
%{_datadir}/pixmaps/luakit.png
%{_datadir}/pixmaps/luakit.svg
%{_mandir}/man1/luakit.1.gz
%{_libdir}/luakit.so

%changelog
openSUSE Build Service is sponsored by