Unix RuneScapeクライアント用のRPMの構築:Perlは提供されていません(JSON:backportPP)

Unix RuneScapeクライアント用のRPMの構築:Perlは提供されていません(JSON:backportPP)

私はこのプログラム用のRPMファイルを構築してきましたが、この仕様ファイルはほとんどの場合動作します。

Name:          unix-runescape-client
Version:       4.3.5
Release:       1
License:       GPL-2.0
Summary:       A lightweight wrapper for the legacy Java client of RuneScape
Group:         Amusements/Games
Packager:      Brenton Horne
Source:        https://github.com/HikariKnight/rsu-client/archive/v%{version}.tar.gz
Requires:      perl perl(List::MoreUtils) perl(Config::IniFiles) perl(Archive::Extract) perl-Wx java-1.8.0-openjdk

%description
The Unix RuneScape Client developed by HikariKnight on GitHub. It is an
open-source wrapper for the old legacy Java client of RuneScape.

%prep
%setup -q -n rsu-client-%{version}

%install
_instdir=%{buildroot}/usr/share/runescape
cd runescape

mkdir -p "$_instdir" "%{buildroot}"/usr/{bin,share/applications}

# copy the stuff
cp -t "$_instdir" *.txt runescape updater rsu-settings AUTHORS
cp -Rt "$_instdir" share rsu
cp -Rt %{buildroot}/usr/bin templates/packaging/usr/games/*
cp -Rt %{buildroot}/usr templates/packaging/usr/share

# these libraries are old, and they are not needed anymore with current cairo
rm -rf "$_instdir"/rsu/3rdParty/linux/cairo-nogl

%files
%{_datadir}/applications/runescape*.desktop
%{_datadir}/runescape/*
%{_datadir}/kde4/services/jagex-jav.protocol
%{_bindir}/runescape*
%{_bindir}/rsu-settings
%{_bindir}/update-runescape-client

RPMファイルの構築中にこのRPMファイルをインストールしようとすると、エラーが発生します。

Last metadata expiration check: 0:35:12 ago on Mon Jan  2 15:10:06 2017.
Error: nothing provides perl(JSON::backportPP) needed by unix-runescape-client-4.3.5-1.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages)

この--allowerasingオプションを使用してインストールしても、このエラーは解決されません。私は良い古いGoogle検索を実行し、perl(JSON::backportPP)少なくともMageiaの場合、perl-JSONがこの要件を提供していることを発見しました(出典:ftp://www.rpmfind.net/linux/RPM/mageia/cauldron/i586/media/core/release/perl-JSON-2.900.0-5.mga6.noarch.html)ので、実行sudo dnf install -y perl-JSON(該当する場合はFedora 25で実行中)がすでにインストールされていることperl-JSONを確認しました... また、上記の仕様ファイルに依存関係を追加してRPMパッケージを再構築しようとしましたが、失敗しperl-JSONました。この依存関係の問題を解決してください。

ユニバーサルインストーラを使用してこのクライアントをインストールしましたが、それはうまく動作するので、実際に実行するためにperl(JSON:backportPP)が必要ないことがわかります。

ベストアンサー1

解決策が見つかりました。次の行を追加するだけです。

Provides: perl(JSON::backportPP)

仕様に従って問題を解決しました。これは私の現在の仕様ファイルです。

Name:          unix-runescape-client
Version:       4.3.5
Release:       1
License:       GPL-2.0
Summary:       A lightweight wrapper for the legacy Java client of RuneScape
Group:         Amusements/Games
Packager:      Brenton Horne
Url:           https://github.com/HikariKnight/rsu-client
Source:        https://github.com/HikariKnight/rsu-client/archive/v%{version}.tar.gz
Requires:      perl perl(List::MoreUtils) perl(Config::IniFiles) perl(Archive::Extract) perl-Wx java-1.8.0-openjdk
Provides:      unix-runescape-client
Provides:      perl(JSON::backportPP)

%description
The Unix RuneScape Client developed by HikariKnight on GitHub. It is an
open-source wrapper for the old legacy Java client of RuneScape.

%prep
%setup -q -n rsu-client-%{version}

%install
_instdir=%{buildroot}/usr/share/runescape
cd runescape

mkdir -p "$_instdir" "%{buildroot}"/usr/{bin,share/{applications,pixmaps}}

# copy the stuff
cp -t "$_instdir" *.txt runescape updater rsu-settings AUTHORS
cp -Rt "$_instdir" share rsu
cp -Rt %{buildroot}/usr/bin templates/packaging/usr/games/*
cp -Rt %{buildroot}/usr templates/packaging/usr/share

# these libraries are old, and they are not needed anymore with current cairo
rm -rf "$_instdir"/rsu/3rdParty/linux/cairo-nogl

sed -i -e 's|/opt/runescape/share/img/runescape.png|runescape|g' %{buildroot}/usr/share/applications/*.desktop
sed -i -e 's|/opt/runescape||g' %{buildroot}/usr/{bin/*,share/applications/*.desktop,share/runescape/*.txt}
mv %{buildroot}/usr/share/runescape/share/img/runescape* %{buildroot}/usr/share/pixmaps
rm -rf %{buildroot}/usr/share/runescape/share/img/

%files
%{_datadir}/applications/runescape*.desktop
%{_datadir}/runescape/*
%{_datadir}/kde4/services/jagex-jav.protocol
%{_datadir}/pixmaps/*
%{_bindir}/runescape*
%{_bindir}/rsu-settings
%{_bindir}/update-runescape-client

おすすめ記事