Criando RPM para o cliente RunScape Unix: nada fornece perl (JSON: backportPP)

0

Eu tenho construído um arquivo RPM para este programa e enquanto a maior parte deste arquivo de especificações funciona:

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

na criação de um arquivo RPM sempre que eu tento instalar esse arquivo RPM, recebo o erro:

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)

a instalação com a opção --allowerasing falha ao corrigir esse erro. Eu pesquisei perl(JSON::backportPP) usando o Google antigo para descobrir que, para a Mageia, pelo menos, o perl-JSON fornece esse requisito (fonte: ftp://www.rpmfind.net/linux/RPM/mageia/cauldron/i586/media/core/ release / perl-JSON-2.900.0-5.mga6.noarch.html ), então eu corri sudo dnf install -y perl-JSON (se relevante eu estou operando no Fedora 25) apenas para descobrir que perl-JSON já estava instalado. .. Eu também tentei adicionar a perl-JSON dependency ao arquivo de especificação acima mencionado e reconstruir o pacote RPM, mas isso também falhou em corrigir este problema de dependência.

Eu instalei este cliente usando o instalador universal e ele roda bem, então sei que o perl (JSON: backportPP) não é realmente necessário para executá-lo ...

    
por Brenton Horne 02.01.2017 / 07:39

1 resposta

0

Eu encontrei a solução. Apenas adicionando a linha:

Provides: perl(JSON::backportPP)

para a especificação corrige o problema. Aqui está o meu arquivo de especificações atual:

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
    
por 02.01.2017 / 10:42