%global moz_extensions %{_datadir}/mozilla/extensions %global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} %global src_ext_id nighttab@zombiefox %global firefox_inst_dir %{moz_extensions}/%{firefox_app_id} Name: mozilla-nighttab Version: 7.6.0 Release: 2%{?dist} Summary: A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab. License: GPL-3.0-only URL: https://github.com/zombieFox/nightTab/ Source0: https://gitlab.com/athenaos/packages/applications/mozilla-nighttab/-/archive/main/%{name}-main.tar.gz Source1: mozilla-nighttab.metainfo.xml Requires: mozilla-filesystem BuildArch: noarch BuildRequires: npm BuildRequires: nodejs BuildRequires: zip # GNOME Software Center not present on EL < 7 %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: libappstream-glib %endif %description A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab. %prep %autosetup -n %{name}-main %build npm install npm run build # Rename the built file to standard .xpi name cp dist/extension/nightTab_%{version}.zip nighttab-%{version}.xpi %install # Install the rebuilt .xpi to the correct Firefox system extension directory install -Dpm644 nighttab-%{version}.xpi \ %{buildroot}%{firefox_inst_dir}/%{src_ext_id}.xpi # Install AppStream metadata install -Dpm644 %{SOURCE1} \ %{buildroot}%{_metainfodir}/%{name}.metainfo.xml # Validate AppStream metadata (relaxed mode) appstream-util validate-relax --nonet \ %{buildroot}%{_metainfodir}/%{name}.metainfo.xml %files %{firefox_inst_dir}/%{src_ext_id}.xpi # GNOME Software Center metadata %if 0%{?fedora} || 0%{?rhel} >= 7 %{_metainfodir}/%{name}.metainfo.xml %endif %changelog %autochangelog