abarbarian Posted August 16, 2017 Share Posted August 16, 2017 (edited) 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 ? Edited August 16, 2017 by abarbarian Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 16, 2017 Share Posted August 16, 2017 I am not really 100% sure but have you read this entry: https://wiki.archlinux.org/index.php/Arch_User_Repository Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 16, 2017 Author Share Posted August 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 16, 2017 Share Posted August 16, 2017 Yeah but why do you need these patches anyway? Check this link out, specifically the prepare() function: https://wiki.archlinux.org/index.php/creating_packages Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 16, 2017 Author Share Posted August 16, 2017 (edited) 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. Edited August 16, 2017 by abarbarian Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 16, 2017 Share Posted August 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 17, 2017 Author Share Posted August 17, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.