Jump to content

Arch PKGBUILD ?


abarbarian

Recommended Posts

Hi I am having a go at making a PKGBUILD on my Arch.

At the moment my aim is to make a proper pkgbuild so that I can install the program with pacman on my pc.

Yes I know I can try to install the program without doing this but I want to try building a basic package for some experience.

 

I have a few questions and will seek answers on a one by one basis to keep things nice and simple.

 

I have found a .rpm of the program I want to archify. At the .rpm page I can also see a link to the source code and a link to some patches.

Here are the links,

 

https://packages.alt.../wmbday/sources

 

https://packages.alt.../wmbday/patches

 

Bear in mind when I say I will ask one question at a time I am a long term Python fan.

 

http://youtu.be/jLKD0Ve8AFw

 

First question,

 

Will the source file contain the patches or will I have to add the patches to the source file to create the pkgbuild ?

 

:breakfast:

Edited by abarbarian
Link to comment
Share on other sites

I am not really 100% sure but have you read this entry: https://wiki.archlin...User_Repository

 

I have read the page as well as any I could find relating to building packages. The page is not really relevant to my question.

 

I came across mention of patches looking through a actual pkgbuild file. I did not know if the patches were ones that the developer had added to his original pkgbuild ie: he had updated his build or if they were original patches used with the original source to make his first build.

 

:breakfast:

Link to comment
Share on other sites

Yeah but why do you need these patches anyway?

 

Check this link out, specifically the prepare() function: https://wiki.archlin...eating_packages

 

I have read all the Arch Wiki pages on creating packages as I said earlier.

 

My question concerns the original source and the patches mentioned. I an trying to ascertain if the source contains the patches or if I need to add the patches to the source to make it an up to date source file.

I have a feeling that the patches have already been included in the source file but am not 100 % sure so am seeking clarification on this point.

 

There is a page in the wiki all about patching,

 

https://wiki.archlinux.org/index.php/Patching_in_ABS

 

however if the patches I linked to are already in the source file I will not have to follow the instructions at the wiki. This would save me further research and effort.

 

:breakfast:

Edited by abarbarian
Link to comment
Share on other sites

securitybreach

Yeah but why do you need these patches anyway?

 

Check this link out, specifically the prepare() function: https://wiki.archlin...eating_packages

 

I have read all the Arch Wiki pages on creating packages as I said earlier

 

I thought you said that you seen the wiki entry I posted earlier, that is why I posted the last one. The first link was for creating aur packages only and the second one spoke about creating them like a ports system with abs and such. The main reason I posted it was this part about the patches you mentioned:

 

prepare()

 

This function, commands that are used to prepare sources for building are run, such as patching. This function runs right after package extraction, before pkgver() and the build function. If extraction is skipped (makepkg -e), then prepare() is not run.

Note: (From man PKGBUILD) The function is run in bash -e mode, meaning any command that exits with a non-zero status will cause the function to exit.

 

 

My question concerns the original source and the patches mentioned. I an trying to ascertain if the source contains the patches or if I need to add the patches to the source to make it an up to date source file.

I have a feeling that the patches have already been included in the source file but am not 100 % sure so am seeking clarification on this point.

 

Well that would be specific to the package source you are getting. Sometimes patches are included and sometimes they are not. For instance if the patch came later, it may not be included in the source file.

Link to comment
Share on other sites

Yeah but why do you need these patches anyway?

 

Check this link out, specifically the prepare() function: https://wiki.archlin...eating_packages

 

I have read all the Arch Wiki pages on creating packages as I said earlier

 

I thought you said that you seen the wiki entry I posted earlier, that is why I posted the last one. The first link was for creating aur packages only and the second one spoke about creating them like a ports system with abs and such. The main reason I posted it was this part about the patches you mentioned:

 

prepare()

 

This function, commands that are used to prepare sources for building are run, such as patching. This function runs right after package extraction, before pkgver() and the build function. If extraction is skipped (makepkg -e), then prepare() is not run.

Note: (From man PKGBUILD) The function is run in bash -e mode, meaning any command that exits with a non-zero status will cause the function to exit.

 

 

My question concerns the original source and the patches mentioned. I an trying to ascertain if the source contains the patches or if I need to add the patches to the source to make it an up to date source file.

I have a feeling that the patches have already been included in the source file but am not 100 % sure so am seeking clarification on this point.

 

Well that would be specific to the package source you are getting. Sometimes patches are included and sometimes they are not. For instance if the patch came later, it may not be included in the source file.

 

Thanks for the help.

 

:breakfast:

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...