https://bugzilla.rpmfusion.org/show_bug.cgi?id=4041

--- Comment #33 from Dominik 'Rathann' Mierzejewski <domi...@greysector.net> ---
(In reply to Luya Tshimbalanga from comment #32)
> (In reply to Dominik 'Rathann' Mierzejewski from comment #30)
[...]
> > 2. The application is available for i686 as well:
> > https://www.mendeley.com/download-desktop/
> > ->mendeleydesktop-1.19.3-1.fc29.src.rpm
> > https://desktop-download.mendeley.com/download/linux/mendeleydesktop-1.19.3-
> > linux-i486.tar.bz2
> 
> Is there a better method to use a single tarball for both x86 and x86_64
> other than conditional statemetn? Suggestion welcome

Actually you can't even do that. Making the Source: conditional is wrong and
leads to non-reproducible SRPMs (i.e. if you rpmbuild -bs on x86_64 you'll only
get the x86_64 tarball which won't work on i686). You have to include all
tarballs in the SRPM unconditionally.

I'd suggest something like:
%prep
%ifarch i686
%setup -q -n mendeleydesktop-%{version}-linux-i486
%else
%setup -q -b 1 -T -n mendeleydesktop-%{version}-linux-%{_target_cpu}
%endif

> > 3. You're missing ExcludeArch: i686 x86_64
> 
> Do you mean ExclusiveArch?

Yes.

> > 4. Why do you think you need this?
> > 
> > # seems like the executable is looking for this variable
> > # so I had to set it.
> > cat > bin/%{name} <<EOF
> > #!/bin/sh
> > export MENDELEY_BUNDLED_QT_PLUGIN_PATH=%{_libdir}/qt5/plugins
> > %{_libexecdir}/%{name} "$@"
> > EOF
> > chmod +x bin/%{name}
> > 
> > -> Is something not working without the above? In my testing, this is not
> > required and you can install the binary directly in %{_bindir}:
> > install -Dpm755 lib/mendeleydesktop/libexec/%{name}.%{_target_cpu}
> > %{buildroot}%{_bindir}/%{name}
> 
> Now the executable mendeleydesktop resulted:
> mendeleydesktop 
> Can't find Mendeley Desktop binary. Expected:
> /usr/bin/../../opt/mendeleydesktop/bin/mendeleydesktop
> Unable to start Mendeley Desktop, the software may not be installed
> correctly.

Hm. Works for me:
https://gitlab.com/greysector/mendeleydesktop/blob/master/mendeleydesktop.spec
.

I can see you're including the python launcher:
install -Dpm755 bin/%{name} %{buildroot}%{_bindir}/%{name}
install -Dpm755 lib/mendeleydesktop/libexec/%{name}.%{_target_cpu}
%{buildroot}%{_libexecdir}/%{name}

I used to do that in my package as well, but as of 1.16.1 I dropped the
launcher, moved the binary to %{_bindir} and it works.

Why do you have this?
Requires: qt5-qtstyleplugins

Also,
# Needed to resolve shebang issue
BuildRequires: python3-devel
BuildRequires: /usr/bin/pathfix.py

python3-devel includes /usr/bin/pathfix.py (use %{_bindir}, by the way), so
it's redundant.

Thanks for writing the appdata files.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
rpmfusion-developers mailing list -- rpmfusion-developers@lists.rpmfusion.org
To unsubscribe send an email to rpmfusion-developers-le...@lists.rpmfusion.org

Reply via email to