File mirakc.spec of Package mirakc
#
# spec file for package mirakc
#
# Copyright (c) 2020 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments to lapis@ku-ten.net
#
Name: mirakc
#Version: 2.5.12+git20240108.8ea1c71
Version: 0
Release: 0
Summary: A Mirakurun clone written in Rust
License: MIT OR Apache-2.0
Group: Productivity/Multimedia/Video/Record
Url: https://github.com/mirakc/mirakc
#Source0: {name}-{version}.tar.zst
Source0: https://github.com/mirakc/mirakc/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.zst
Source1: vendor.tar.zst
#BuildRequires: rust-packaging
BuildRequires: cargo-packaging
BuildRequires: rust+cargo
BuildRequires: zstd
%if 0%{?suse_version} > 1500
BuildRequires: mandown
%endif
%description
mirakc is a Mirackurun clone written in Rust.
Mirakurun is one of popular DTV tuner servers in Japan. It's fast enough,
but consumes much memory. mirakc is more efficient than Mirakurun.
%prep
%autosetup -p1 -a1
cat >> .cargo/config.toml <<EOF
[source.vendored-sources]
directory = "vendor"
EOF
cat .cargo/config.toml
#%ifarch aarch64 ppc ppc64 ppc64l
# ref=/usr/lib/rpm
# for s in guess sub; do
# for c in $(find -maxdepth 8 -name "config.$s"); do
# oldhash=$(sha256sum $c | cut -d' ' -f1)
# grep -q config-patches@ $c || continue
# grep -q aarch64 $c || install -m 755 $ref/config.$s $c
# grep -q ppc64le $c || install -m 755 $ref/config.$s $c
# grep -q 'riscv64[-:]' $c || install -m 755 $ref/config.$s $c
# newhash=$(sha256sum $c | cut -d' ' -f1)
# if [ x"$oldhash" != x"$newhash" ]; then
# find . -type f -name .cargo-checksum.json -exec sed -ine "s/$oldhash/$newhash/g" '{}' ';'
# fi
# done
# done\
#%endif
%build
%{cargo_build}
%install
%{cargo_install}
%files
%license LICENSE-MIT LICENSE-APACHE
%doc README.md docs/*.md
%{_bindir}/mirakc
%changelog
* Wed Mar 11 2020 - lapis@ku-ten.net
- Initial package.