Macros in OBS and how to use them properly

Hi…

I figured out how to use the webui finally in obs… very new still i like that it jut builds when you throw something at it lol.

Question is when building locally im trying to figure out how to use macros. I understand all the metadata in the first half but im having issues with

%build
%install
%prep

If i grab a package that opensuse dosen’t have and i want to build it. how do i know what goes in these macros. do i tar -tf the package and look for make files , configure and that should give me a hint ?

Been reading a lot, in fact i have a lot of bookmarks

i.e obs tutorial, rpm packaging guide. how to use osc etc…

Any help is appreciated

@oxbar25 Hi and welcome to the Forum :wink:
You would look upstream to see what tools are used to build, then head over to http://en.opensuse.org/Portal:Packaging and have a look there for build recipes and tips.

For the likes of python packages you can use py2pack to get the source (when hosted at https://pypi.org/) , generate the rpm spec file etc.

Thanks will do.

I feel like I’m cheating using ai and not understanding

I’ve built three apps already and it’s a learning experience but I want more.

Hehehe, joining you in the welcoming :slight_smile:

Thought you went to bed :sweat_smile:

I did. And I would still be there, if some allergy for the new formula washing detergent would not have revealed itself. :unamused:

So I’m getting familiar with rpmlint such a great tool… when it’s in the middle of a build and it errors out cause it’s missing something like <name.so> something do I zypper install it or should I use AI for a quick fix ? I was reading I should use osc shell go into the build and try to fix it there to test then apply when I’m out of the shell.

What are some good use cases?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.