Building flightgear 2017.2.1

Hi,

Two doubts on building flightgear-2017.2.1:

I had to change Buildrequires to include qt5qml-devel but it seems the package lib64qt5qml-devel “does not know” it provides qt5qml-devel. Thus I had to write lib64qt5qml-devel in Buildrequires list(??).

I comment one source in the specfile:

#Source11: %{name}.16.png

But building failed: file not found.

Why? It was commented!

Thanks

1 Like

You can obtain a complete list of requires with urpmq:

$ urpmq --provides  lib64qt5qml-devel
cmake(Qt5Qml)
devel(libQt5Qml(64bit))
libchartsplugin.so()(64bit)
libqmlqtimeexampleplugin.so()(64bit)
pkgconfig(Qt5Qml)[== 5.9.1]
lib64qt5qml-devel[== 5.9.1-1:3001]

In this case you may use pkgconfig(Qt5Qml) or cmake(Qt5Qml). In general ‘%{_lib}qt5qml-devel’ it is only last chance and it will cause a warning.

In .spec file macro %{SOURCE11} refers to SOURCE11. If you remove Source11: you should also change/remove any lines containing %{SOURCE11} or it claims for a missing sources. Do you?

I thought # would make the line commented. In my last post I’ve written

#Source11

but I did not use a space and the editor wrote

#Source11

instead!

So, if it was commented, why it was an error?

In this forum please post pieces of code as code, which is here on purpose.
Also, not sure if QA is the proper category, maybe move your build attempts discussions to ABF for beginners?

1 Like

#Source11

Works for me, try again.

You commented out the Source11 field then you have to comment out or modify lines where Source 11 is used or it will claim for undefined source. Each SourceXX field are generate a macro named _%{SOURCEXX} so try to look for %{SOURCE11} macro in your spec.

I moved this to ABF for beginners. Hope that’s OK.

1 Like

Ben79, for me it’s OK.

I need help. In flightgear.spec I have files in macros like

%files

%{_miconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png

I guess _miconsdir refers to mini icons and _liconsdir to large icons. The point is that now I have 5 icons to handle as SOURCE11 to SOURCE15. How to define two more files for icons?

By now, building stops because it is not found the directories for mini, regular and large files. I intend to correct for that and include two more directories for extra files. The alternative would be commenting the lines to _miconsdir, _iconsdir, and _liconsdir above and not using extra sources.

Does the %makeinstall_std install some icons by itself?

You may create the missing directories

mkdir -p %{buildroot}%{_miconsdir}
mkdir -p %{buildroot}%{_iconsdir}
mkdir -p %{buildroot}%{_liconsdir}

or with with install -dm 0755 instead of mkdir -p. If you have several sized high color you should put them into %{buildroot}%{_iconsdir}/hicolor/${d}x${d}/apps where ${d} is the dimension of the icon.

That is the point, why do I have to use extra icons if the source itself have a directory named as you suggest with all of the required icons? The availability of these icons in the source made me try to ignore extra icons.

I now think that if I comment the references to the macros,

%{_miconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png

building would go fine.

Is there a reason to use extra icons, defining directories to put them, after all, given that the source have them?

Maybe they are here just for historical reason. If you already have icons in %{_iconsdir}/hicolor//apps/ you may safety remove them.

The source has icons at

flightgear-2017.2.1/icons/d X d/apps/

no “hicolor” subdirectory.

I’ve commented everything about extra icons and their directories.
Building went fine. Everything seems OK. Executables works fine.

But, on following,

Applauncher => apps => games => others => flightgear

no flightgear icon is shown.

Is there something I could do to remedy this? Should I care about this?

Thanks

And the flightgear directory,

/usr/share/flightgear

does not have the icons directory found at

~/rpmbuild/BUILD/flightgear-2017.2.1/

Don’t understand but it is clear that the rpm building did not reproduced the source directory.

I guess I have to create the icons directory as suggested by Mandian.

Yes, of course :wink:

Just install icons in properly path.

The rpm is packages starting from ~/rpmbuild/BUILDROOT/flightgear-2017.2.1/ directory. You may try to find if make install put icons in a not standard path otherwise you have to install the by hand.

I’ve built another flightgear package.

Buildrequires dependency on Qt5Qml was set by cmake(Qt5Qml).
The flightgear icon can now be seen upon launching flightgear via

applauncher => applications => games => others => flightgear

A directory called icons now can be seen with midnight commander in

flightgear-2017.2.1-1-omv2015.0.x86_64.rpm

in /usr/share/icons.

But(???) no icons directory at /usr/share/flightgear/ after installation with --replacepkgs --replacefiles. Where are those icons? Do I still have something to correct for in flightgear spec?

Icons were handled with

Source11:   %{name}.16.png
Source12:   %{name}.32.png
Source13:   %{name}.48.png
Source14:   %{name}.64.png
Source15:   %{name}.128.png

%files

%{_iconsdir}/hicolor/16x16/apps/%{name}.png
%{_iconsdir}/hicolor/32x32/apps/%{name}.png
%{_iconsdir}/hicolor/48x48/apps/%{name}.png
%{_iconsdir}/hicolor/64x64/apps/%{name}.png
%{_iconsdir}/hicolor/128x128/apps/%{name}.png

%make

%install
%makeinstall_std -C build

mkdir -p %{buildroot}%{_iconsdir}/hicolor/16x16/apps
mkdir -p %{buildroot}%{_iconsdir}/hicolor/32x32/apps
mkdir -p %{buildroot}%{_iconsdir}/hicolor/48x48/apps
mkdir -p %{buildroot}%{_iconsdir}/hicolor/64x64/apps
mkdir -p %{buildroot}%{_iconsdir}/hicolor/128x128/apps

install -m644 %{SOURCE11} -D %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png
install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png
install -m644 %{SOURCE13} -D %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png
install -m644 %{SOURCE14} -D %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png
install -m644 %{SOURCE15} -D %{buildroot}%{_iconsdir}/hicolor/128x128/apps/%{name}.png

If you refer to icons showed in menus they should be installed into /usr/share/icons/hicolor/*/apps, as you did. What other icons do you refer to?

They are there. Just thought they would appear in the flightgear tree:

/usr/share/flightgear

Then, I guess everything is fine now. I’ll test a little more and upload to the fork I’ve done.

In the upload step, I’ll be in trouble to upload FlightGear-data file because it is bigger than 1GB and my upload rate is low.

Thanks.

You may push the spec on github repo and report this in your update request on bugzilla.

it is available on 3.0

1 Like