- Add zsh completion subpackage

- Fixup rpmlintrc
- Document that we are using lua51 includes because luajit includes
  are missing from the openSUSE package
  * boo#1226307

OBS-URL: https://build.opensuse.org/package/show/Publishing/sile?expand=0&rev=41
This commit is contained in:
Gordon Leung 2024-06-14 16:51:49 +00:00 committed by Git OBS Bridge
parent 8cf278c784
commit ae8b6d3f9c
3 changed files with 47 additions and 24 deletions

View File

@ -1,2 +1,2 @@
# Without the Requires, lua54-zlib module isn't counted as a dependency # Without the Requires, lua51-zlib module isn't counted as a dependency
addFilter("explicit-lib-dependency lua54-zlib") addFilter("explicit-lib-dependency lua51-zlib")

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Jun 14 16:42:20 UTC 2024 - Gordon Leung <pirateclip@protonmail.com>
- Add zsh completion subpackage
- Fixup rpmlintrc
- Document that we are using lua51 includes because luajit includes
are missing from the openSUSE package
* boo#1226307
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jun 14 10:20:53 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl> Fri Jun 14 10:20:53 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl>

View File

@ -21,7 +21,6 @@ Name: sile
Version: 0.15.3 Version: 0.15.3
Release: 0 Release: 0
Summary: Simons Improved Layout Engine Summary: Simons Improved Layout Engine
Group: Productivity/Publishing
License: MIT License: MIT
URL: https://sile-typesetter.org/ URL: https://sile-typesetter.org/
Source0: sile-%{version}.tar.zst Source0: sile-%{version}.tar.zst
@ -30,15 +29,18 @@ Source2: sile-rpmlintrc
Source3: LICENSE Source3: LICENSE
# Lua modules # Lua modules
Requires: lua51 BuildRequires: luajit
BuildRequires: lua51-bit32 BuildRequires: lua51-bit32
# boo#1226307
BuildRequires: lua51-devel BuildRequires: lua51-devel
BuildRequires: luajit-devel
Requires: lua51-bit32 Requires: lua51-bit32
BuildRequires: lua51-cassowary BuildRequires: lua51-cassowary
Requires: lua51-cassowary Requires: lua51-cassowary
Requires: lua51-cldr Requires: lua51-cldr
BuildRequires: lua51-cliargs BuildRequires: lua51-cliargs
Requires: lua51-cliargs Requires: lua51-cliargs
BuildRequires: lua51-compat-5.3
BuildRequires: lua51-cosmo BuildRequires: lua51-cosmo
Requires: lua51-cosmo Requires: lua51-cosmo
BuildRequires: lua51-luaexpat BuildRequires: lua51-luaexpat
@ -74,7 +76,6 @@ BuildRequires: sil-gentium-fonts
%endif %endif
BuildRequires: automake BuildRequires: automake
BuildRequires: fontconfig-devel BuildRequires: fontconfig-devel
BuildRequires: libtool
Requires: fontconfig Requires: fontconfig
BuildRequires: freetype2-devel BuildRequires: freetype2-devel
Requires: freetype2 Requires: freetype2
@ -86,9 +87,12 @@ BuildRequires: glibc-devel
Requires: glibc Requires: glibc
# Harfbuzz's minimum version is now 6 https://github.com/sile-typesetter/sile/releases/tag/v0.14.8 # Harfbuzz's minimum version is now 6 https://github.com/sile-typesetter/sile/releases/tag/v0.14.8
BuildRequires: harfbuzz-devel >= 6.0.0 BuildRequires: harfbuzz-devel >= 6.0.0
BuildRequires: jq
BuildRequires: libicu-devel BuildRequires: libicu-devel
Requires: icu Requires: icu
BuildRequires: libpng16-compat-devel BuildRequires: libpng16-compat-devel
BuildRequires: libtool
BuildRequires: pkgconf-pkg-config
BuildRequires: zlib-devel BuildRequires: zlib-devel
# Default font for SILE # Default font for SILE
# Without this, you have to specify the font every time you write a new .sil # Without this, you have to specify the font every time you write a new .sil
@ -108,12 +112,6 @@ BuildRequires: clang
BuildRequires: clang-devel BuildRequires: clang-devel
# For tar scm lol # For tar scm lol
BuildRequires: zstd BuildRequires: zstd
# Also additional dep
BuildRequires: jq
BuildRequires: lua51-compat-5.3
BuildRequires: luajit
BuildRequires: luajit-devel
BuildRequires: pkgconf-pkg-config
%description %description
SILE is a typesetting system; its job is to produce beautiful printed documents. SILE is a typesetting system; its job is to produce beautiful printed documents.
@ -134,7 +132,6 @@ This package contains the shared library for libtexpdf.
%package -n libtexpdf-devel %package -n libtexpdf-devel
Summary: Development files for libtexpdf Summary: Development files for libtexpdf
Group: Productivity/Publishing
License: GPL-2.0-or-later License: GPL-2.0-or-later
Requires: libtexpdf0 = %{version} Requires: libtexpdf0 = %{version}
@ -142,9 +139,17 @@ Requires: libtexpdf0 = %{version}
A PDF library extracted from TeX's dvipdfmx. Used in software such as SILE. A PDF library extracted from TeX's dvipdfmx. Used in software such as SILE.
This package contains the development files for libtexpdf. This package contains the development files for libtexpdf.
%package bash-completion
Summary: Bash Completion for %{name}
Supplements: (%{name} and bash-completion)
Requires: bash-completion
BuildArch: noarch
%description bash-completion
Bash command-line completion support for %{name}.
%package fish-completion %package fish-completion
Summary: Fish Completion for %{name} Summary: Fish Completion for %{name}
Group: System/Shells
Supplements: (%{name} and fish) Supplements: (%{name} and fish)
Requires: fish Requires: fish
BuildArch: noarch BuildArch: noarch
@ -152,15 +157,14 @@ BuildArch: noarch
%description fish-completion %description fish-completion
Fish command-line completion support for %{name}. Fish command-line completion support for %{name}.
%package bash-completion %package zsh-completion
Summary: Bash Completion for %{name} Summary: Zsh Completion for %{name}
Group: System/Shells Supplements: (%{name} and zsh)
Supplements: (%{name} and bash-completion) Requires: zsh
Requires: bash-completion
BuildArch: noarch BuildArch: noarch
%description bash-completion %description zsh-completion
Bash command-line completion support for %{name}. Zsh command-line completion support for %{name}.
%prep %prep
%autosetup -p1 -a1 %autosetup -p1 -a1
@ -175,7 +179,8 @@ export CARGO_AUDITABLE=auditable
export CARGO_FEATURE_VENDORED=1 export CARGO_FEATURE_VENDORED=1
export CXX=/usr/bin/clang++ export CXX=/usr/bin/clang++
export CC=/usr/bin/clang export CC=/usr/bin/clang
export AX_PROG_LUA=/usr/bin/lua5.1 # boo#1226307
# Force configure file to use lua5.1 includes rather than luajit includes
export LUA_INCLUDE="-I/usr/include/lua5.1" export LUA_INCLUDE="-I/usr/include/lua5.1"
export CFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)" export CFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)"
export CXXFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)" export CXXFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)"
@ -183,8 +188,7 @@ export CXXFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)"
--disable-static \ --disable-static \
--disable-embeded-resources \ --disable-embeded-resources \
--with-system-lua-sources \ --with-system-lua-sources \
--with-system-luarocks \ --with-system-luarocks
--with-luajit
%make_build all %make_build all
@ -197,7 +201,8 @@ export CARGO_AUDITABLE=auditable
export CARGO_FEATURE_VENDORED=1 export CARGO_FEATURE_VENDORED=1
export CXX=/usr/bin/clang++ export CXX=/usr/bin/clang++
export CC=/usr/bin/clang export CC=/usr/bin/clang
export AX_PROG_LUA=/usr/bin/lua5.1 # boo#1226307
# Force configure file to use lua5.1 includes rather than luajit includes
export LUA_INCLUDE="-I/usr/include/lua5.1" export LUA_INCLUDE="-I/usr/include/lua5.1"
export CFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)" export CFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)"
export CXXFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)" export CXXFLAGS="%optflags $(pkg-config --cflags-only-I lua5.1 luaji)"
@ -223,6 +228,7 @@ make check
%{_datadir}/sile %{_datadir}/sile
%{_libdir}/sile %{_libdir}/sile
%{_mandir}/man1/sile.1%{?ext_man} %{_mandir}/man1/sile.1%{?ext_man}
%{_mandir}/man1/sile-lua.1%{?ext_man}
%files -n libtexpdf0 %files -n libtexpdf0
%license LICENSE %license LICENSE
@ -233,13 +239,21 @@ make check
%{_libdir}/libtexpdf.so %{_libdir}/libtexpdf.so
%files bash-completion %files bash-completion
%license LICENSE.md
%dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions %dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/%{name} %{_datadir}/bash-completion/completions/%{name}
%files fish-completion %files fish-completion
%license LICENSE.md
%dir %{_datadir}/fish %dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d %dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/%{name}.fish %{_datadir}/fish/vendor_completions.d/%{name}.fish
%files zsh-completion
%license LICENSE.md
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}
%changelog %changelog