diff --git a/fish.spec b/fish.spec index e9364e2..37ea497 100644 --- a/fish.spec +++ b/fish.spec @@ -1,16 +1,24 @@ +%global version_base 3.3.1 +%global gitnum 803 +%global githash 76a336d647ea274ffe6ceaf48a696af855b524f5 +%global githashshort %{lua:print(string.sub(rpm.expand('%{githash}'), 1, 11))} + Name: fish -Version: 3.3.1 +Version: %{version_base}%{?gitnum:^%{gitnum}g%{githashshort}} Release: %autorelease Summary: Friendly interactive shell - # GPLv2 # - src/fish.cpp -# and rest.. +# and rest… # GPLv2+ # - src/builtin_printf.cpp +# - src/wgetopt.cpp +# - src/wgetopt.h # BSD +# - src/fallback.cpp # - share/tools/create_manpage_completions.py # ISC +# - src/env.cpp # - src/utf8.cpp # - src/utf8.h # LGPLv2+ @@ -18,15 +26,18 @@ Summary: Friendly interactive shell # - src/wgetopt.h # MIT # - share/completions/grunt.fish +# - share/tools/web_config/js/angular-route.js # - share/tools/web_config/js/angular-sanitize.js # - share/tools/web_config/js/angular.js -# - user_doc/html/_static/jquery.js -# - user_doc/html/_static/underscore.js License: GPLv2 and BSD and ISC and LGPLv2+ and MIT URL: https://fishshell.com +%if %{undefined gitnum} Source0: https://github.com/fish-shell/fish-shell/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/fish-shell/fish-shell/releases/download/%{version}/%{name}-%{version}.tar.xz.asc Source2: gpgkey-003837986104878835FA516D7A67D962D88A709A.gpg +%else +Source0: https://github.com/fish-shell/fish-shell/archive/%{githash}/%{name}-%{githash}.tar.gz +%endif BuildRequires: cmake >= 3.2 BuildRequires: ninja-build @@ -38,6 +49,7 @@ BuildRequires: pcre2-devel BuildRequires: gnupg2 BuildRequires: python3-devel %global __python %{__python3} +BuildRequires: /usr/bin/sphinx-build BuildRequires: /usr/bin/desktop-file-validate # tab completion wants man-db @@ -45,9 +57,7 @@ Recommends: man-db Recommends: man-pages Recommends: groff-base -Provides: bundled(js-angular) = 1.0.8 -Provides: bundled(js-jquery) = 3.3.1 -Provides: bundled(js-underscore) = 1.9.1 +Provides: bundled(js-angular) = 1.8.2 %description fish is a fully-equipped command line shell (like bash or zsh) that is @@ -56,9 +66,14 @@ highlighting, autosuggestions, and tab completions that just work, with nothing to learn or configure. %prep +%if %{undefined gitnum} %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -p1 -rm -vrf pcre2-* +%endif +%autosetup -p1 %{?gitnum:-n fish-shell-%{githash}} +%if %{defined gitnum} +echo "%{version_base}-%{gitnum}g%{githashshort}" > version +%endif +rm -vr pcre2* # Change the bundled scripts to invoke the python binary directly. for f in $(find share/tools -type f -name '*.py'); do @@ -66,20 +81,21 @@ for f in $(find share/tools -type f -name '*.py'); do done %build -%cmake . -B%{_vpath_builddir} -GNinja \ +%cmake -GNinja \ + -DBUILD_DOCS=ON \ -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ -Dextra_completionsdir=%{_datadir}/%{name}/vendor_completions.d \ -Dextra_functionsdir=%{_datadir}/%{name}/vendor_functions.d \ -Dextra_confdir=%{_datadir}/%{name}/vendor_conf.d -%ninja_build -C %{_vpath_builddir} all fish_tests +%cmake_build -t all doc fish_tests # We still need to slightly manually adapt the pkgconfig file and remove # some /usr/local/ references (RHBZ#1869376) sed -i 's^/usr/local/^/usr/^g' %{_vpath_builddir}/*.pc %install -%ninja_install -C %{_vpath_builddir} +%cmake_install # No more automagic Python bytecompilation phase 3 # * https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3 @@ -92,7 +108,8 @@ cp -a CONTRIBUTING.rst %{buildroot}%{_pkgdocdir} %find_lang %{name} %check -%{_vpath_builddir}/fish_tests +# Sadly, ctest is broken +%ninja_build -C %{_vpath_builddir} test desktop-file-validate %{buildroot}%{_datadir}/applications/fish.desktop %post diff --git a/sources b/sources index 04eb856..36c4a71 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (fish-3.3.1.tar.xz) = fc50ca44fab3f2d942284d4f714150f7ccf1e49c73da36f8d4ae4a33a9b3280f98bed15848839f5d443b4274fd0ff90174bafa6a8e9a4da226dda63d7766a660 -SHA512 (fish-3.3.1.tar.xz.asc) = 1757ef4c93b302fe86f669d3549884d9e6f265b45be1945ec1c7551d2d0489b5f51dfe5c288f5b415f905f0ad1d9d0d1d304f08682459b171ac72a293651cc8a +SHA512 (fish-76a336d647ea274ffe6ceaf48a696af855b524f5.tar.gz) = db16f55f2adb4d52970b2abd247097270dcee02ae08a732058a57cd665f3fc3533b8c18a745caf2f4abafed135fa0d9127d1a15b0f647eb7f28ae938d82a949a