Jump to content


Arch PKGBUILD ?

arch pkgbuild

  • Please log in to reply
6 replies to this topic

#1 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,396 posts

Posted 16 August 2017 - 11:45 AM

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.



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, 16 August 2017 - 01:57 PM.

Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#2 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,104 posts

Posted 16 August 2017 - 12:27 PM

I am not really 100% sure but have you read this entry: https://wiki.archlin...User_Repository
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#3 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,396 posts

Posted 16 August 2017 - 01:57 PM

View Postsecuritybreach, on 16 August 2017 - 12:27 PM, said:

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:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#4 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,104 posts

Posted 16 August 2017 - 04:17 PM

Yeah but why do you need these patches anyway?

Check this link out, specifically the prepare() function: https://wiki.archlin...eating_packages
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#5 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,396 posts

Posted 16 August 2017 - 06:39 PM

View Postsecuritybreach, on 16 August 2017 - 04:17 PM, said:

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.archlin...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, 16 August 2017 - 06:49 PM.

Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image

#6 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,104 posts

Posted 16 August 2017 - 06:46 PM

View Postabarbarian, on 16 August 2017 - 06:39 PM, said:

View Postsecuritybreach, on 16 August 2017 - 04:17 PM, said:

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:

Quote

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.


View Postabarbarian, on 16 August 2017 - 06:39 PM, said:

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.
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#7 OFFLINE   abarbarian

abarbarian

    Thread Kahuna

  • Forum MVP
  • 5,396 posts

Posted 16 August 2017 - 09:42 PM

View Postsecuritybreach, on 16 August 2017 - 06:46 PM, said:

View Postabarbarian, on 16 August 2017 - 06:39 PM, said:

View Postsecuritybreach, on 16 August 2017 - 04:17 PM, said:

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:

Quote

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.


View Postabarbarian, on 16 August 2017 - 06:39 PM, said:

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:
Install ARCH
You'll never need to install it again
"I did and I'm really happy"

Posted Image~~~~~~~~~~~~~Posted Image





Also tagged with one or more of these keywords: arch, pkgbuild

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users