Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

  1. #1

    Question Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Any guide on how to go from a github page of qt5 game to a package in OpenSuse (and maybe other distros too), that anyone can download and install as easily as anything?

    What pieces of information need to be gathered and converted for a .spec file? How to format that information so that it works in a .spec file? What the conversion rules are? Does qt5 project's my_project.pro contain all except text titles and descriptions in english? If not, what other places to look for information that .spec needs? Does OBS need some type of machine processed information that a working qt5 software in github does not have, and therefore that information must be written by the packager? If so, what kind of information could that be and what questions need to be answered in order to make OBS work properly?

    Does OBS provide / show verification to end users that a package was built from github data and therefore the software works exactly like something compiled from github-loaded sources in qtCreator?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,883
    Blog Entries
    15

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Quote Originally Posted by miheslkivi View Post
    Any guide on how to go from a github page of qt5 game to a package in OpenSuse (and maybe other distros too), that anyone can download and install as easily as anything?

    What pieces of information need to be gathered and converted for a .spec file? How to format that information so that it works in a .spec file? What the conversion rules are? Does qt5 project's my_project.pro contain all except text titles and descriptions in english? If not, what other places to look for information that .spec needs? Does OBS need some type of machine processed information that a working qt5 software in github does not have, and therefore that information must be written by the packager? If so, what kind of information could that be and what questions need to be answered in order to make OBS work properly?

    Does OBS provide / show verification to end users that a package was built from github data and therefore the software works exactly like something compiled from github-loaded sources in qtCreator?
    Hi
    Have a look here;
    https://en.opensuse.org/Portal:Packaging

    Look at examples on OBS, eg here is one that uses a _service to grab the source;
    https://build.opensuse.org/package/s...STING/MultiMC5


    When you enable build repositories, it will pull any of the dependencies in from the default oss repo, sometimes you need to build supporting packages to add the the spec file BuildRequires.

    It's all in the spec file of where the source came from etc, there is a build log so you can see how it built.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Quote Originally Posted by malcolmlewis View Post
    I have seen that site and read a lot of it.

    On the front page, no mention of qt5, qt or even c++ in that page where lots of other, less used things are linked.

    Quote Originally Posted by malcolmlewis View Post

    Look at examples on OBS, eg here is one that uses a _service to grab the source;
    https://build.opensuse.org/package/s...STING/MultiMC5


    When you enable build repositories, it will pull any of the dependencies in from the default oss repo, sometimes you need to build supporting packages to add the the spec file BuildRequires.

    It's all in the spec file of where the source came from etc, there is a build log so you can see how it built.
    How can one know when supporting packages must be built? What those could be? Isn't this supposed to be automated?

    What spec file? build log, from where, qtCreator?

    Looks like, if this system were easier, that the needed .spec file could just contain title, description and name of the .pro type file? Or just giving github url on a box somewhere.

    This whole thing feels like a mysterious puzzle that I am on a quest to solve, with vague hints that may or may not be enough.

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,883
    Blog Entries
    15

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Quote Originally Posted by miheslkivi View Post
    I have seen that site and read a lot of it.

    On the front page, no mention of qt5, qt or even c++ in that page where lots of other, less used things are linked.



    How can one know when supporting packages must be built? What those could be? Isn't this supposed to be automated?

    What spec file? build log, from where, qtCreator?

    Looks like, if this system were easier, that the needed .spec file could just contain title, description and name of the .pro type file? Or just giving github url on a box somewhere.

    This whole thing feels like a mysterious puzzle that I am on a quest to solve, with vague hints that may or may not be enough.
    Hi
    So what is the project and source URL?

    Spec files are standard.. from the command line run;

    Code:
    vi hello.spec
    I'm on GNOME and just have a template setup so can right click anywhere and create a default spec to start with.

    Well supporting build packages called by the pro file if they don't exist in openSUSE.

    A lot of the hard work is done for you with macros, all depends on the source....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    So what is the project and source URL?
    .
    Project is:

    https://github.com/miheslkivi/pac-person-freespace

    Quote Originally Posted by malcolmlewis View Post

    Well supporting build packages called by the pro file if they don't exist in openSUSE.

    .
    I can't understand that sentence. Does that mean .pro file can be enough and this is easier than it seems?

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,883
    Blog Entries
    15

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Quote Originally Posted by miheslkivi View Post
    Project is:

    https://github.com/miheslkivi/pac-person-freespace


    I can't understand that sentence. Does that mean .pro file can be enough and this is easier than it seems?
    Hi
    As in the packages called for in the pro file don't exist in the distribution, you would need to provide these also, in your case it looks like just QT5 Network and OpenGL (widgets).

    So first step is the spec file based on the template, you can just create and save with vi if you want, then open in your favorite editor or just start one from scratch. You will need all the info requested in the template, not just a couple of lines....

    What to call your package, I see the binary is name is pacp, or pac-person-freespace (better I think) as per the tarball source (easier to use with the %setup macro).

    You need to add a short summary of the package < 80 Chars

    Package group select from here: https://en.opensuse.org/openSUSE:Pac...oup_guidelines
    The License, look in the source license file and use the format here: https://spdx.org/licenses/

    Version as per the download tarball (0.9.2), leave release at 0 this get incremented automatically on OBS build result if required

    For build requires, add pkgconfig and then your Qt5 development files Network and OpenGL via pkgconfig(Qt5<name>), easy to find the name via zypper se Qt5.

    Add a more detailed description in %description.

    The %setup -q will be fine

    Build, the fun part...
    Code:
    qmake-qt5 pacp.pro
    %make_build
    Install section needs to be a manual install as nothing in the pro file about installing.

    Use the install command, add creating a directory and file permissions...

    Code:
    install -Dm0755 pacp %{buildroot}%{_bindir}/pacp
    For the %files section, need to add the license and the binary;

    Code:
    %license LICENSE
    %{_bindir}/pacp
    The %license macro installs in the correct place and %{_bindir} macro expands to /usr/bin.

    See how that goes to start with, then can look at adding a service file to pull down the latest git version if you like.
    Last edited by malcolmlewis; 27-Mar-2019 at 14:25. Reason: Add build macro
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Made this:

    https://build.opensuse.org/package/s...heslkivi/PPFCU


    But when trying to upload from remote url, testing both of these url s and giving name as ppfcu, complicated and incomprehensible error message came few times.

    https://github.com/miheslkivi/pac-person-freespace.git

    https://github.com/miheslkivi/pac-pe...ive/master.zip

    That upload page required name with remote upload, but why require name when these files have name and project has name

    That .spec file I uploaded has some things from some example .spec file I started editing long time ago.

    Writing these .spec files is needlessy complicated. Seems that many of those lines could be guessed with good confidence if expertise is enough and then defaults would work, without needing to make packagers like me trying to figure out the magic words. There is no setting of preferences and configuring to ones liking, just solving a puzzle and finding the strings / words that - possibly for some unknown reason - make things work.


    EDIT: some error messages:

    Sources could not be expanded: service error: /usr/lib/obs/server/call-service-in-docker.sh: line 204: 10883 Killed docker inspect $CONTAINER_ID > /dev/null 2>&1


    AND:

    Files could not be expanded: service error: /usr/lib/obs/server/call-service-in-docker.sh: line 204: 10883 Killed docker inspect $CONTAINER_ID > /dev/null 2>&1

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,883
    Blog Entries
    15

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Hi
    Unfortunately never built as a container....

    Look at adding a _service

    Code:
    <services>
      <service name="tar_scm">
        <param name="url">git://github.com/miheslkivi/pac-person-freespace.git</param>
        <param name="scm">git</param>
        <param name="submodules">enable</param>
        <param name="revision">master</param>
        <param name="changesgenerate">enable</param>
        <param name="changesauthor">your.email@example.com</param>
        <param name="filename">pac-person-freespace</param>
        <param name="versionformat">0.9.2+git%cd.%h</param>
      </service>
      <service name="recompress">
        <param name="file">*.tar</param>
        <param name="compression">xz</param>
      </service>
      <service name="set_version"/>
    </services>
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,883
    Blog Entries
    15

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    Hi
    The following spec file and patch worked for me;

    Spec file: https://susepaste.org/view//33ad22c9
    Patch0: https://susepaste.org/view//bf1dbe96
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  10. #10

    Default Re: Any guide on how to go from a github page of qt5 game to a package in OpenSuse?

    That change puts the configuration file in " /usr/share/ " which makes it harder to change mid game. Editing that config file is the only way to alter most configs. While it is possible to copy that file to home directory and always use a command line argument that chooses that file instead of the default, it is difficult to do for end users.

    Users may want to change arena maps too, without sudo.

    What solution could there be for this?

    Also, that service file, so much needless text, why can't they have normal config file format ( like for example PPFCU uses ). Also lot of that information could be just guessed and only if guess is wrong or unpreferred, user needs to provide other answer. Compression is easiest to guess.

    I tried to build, assuming it would be wrong, hoping that error messages could bring closer to a solution, but nothing, not even error messages.

    Why these files just appeared from somewhere?:

    _service:set_versionpfcu.spec


    _service:tar_scm:_servicedata


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •