You are not logged in.

#1 2016-07-22 15:10:32

WyRe
Member
Registered: 2015-09-26
Posts: 26

[SOLVED] Help to finish PKGBUILD from .deb/.rpm file

Hi all! I would appreciate so much some help to finish this PKGBUILD what I'm trying to do from Debian package:

https://github.com/WyRe/pokemmo/blob/master/PKGBUILD

If someone could take a look and help me to finish package() function would be so nice, I don't understand pretty well how should I install $srcdir content in $pkgdir, because folders as /usr/games or /usr/share/games in Arch do not exists and I don't know if I should create them or otherwise I should look for the equivalent in Arch.


Thank you so much guys! I'd like to learn do and maintain PKGBUILDs. big_smile

Last edited by WyRe (2016-07-25 10:33:27)

Offline

#2 2016-07-22 18:48:55

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

1. Never let pacman install anything into /usr/local. That's local for a reason.
2. According to the .desktop file in the package, the application is /usr/games/pokemmo-launcher. I see no reason, why this shouldn't go into /usr/bin.
3. There is also no /usr/share/games on Arch. I don't think anybody would mind, though.
4. If you took the rpm instead of the deb, you wouldn't be confronted with /usr/games. The rpm puts the launcher in /usr/bin/. Put the launcher in /usr/bin and be done with it.

Offline

#3 2016-07-23 15:43:24

WyRe
Member
Registered: 2015-09-26
Posts: 26

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

1. Then should I install those things in ~/.local?

3. Do you mind what I could create that folder?

4. Ok, I'll try with .rmp, However ... I don't know if I should install file by file or if there is anyway to install files by groups at least; do you know any similar PKGBUILD what I can use as example? Maybe something like this https://aur.archlinux.org/cgit/aur.git/ … rlinux-bin but with .rmp package?

Thank you! big_smile

Offline

#4 2016-07-23 15:52:40

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

1. Then should I install those things in ~/.local?

No, you should use the /usr prefix instead of /usr/local. Never touch /home in a package.

See https://wiki.archlinux.org/index.php/Ar … _standards

3. Do you mind what I could create that folder?

mkdir, install, or just mv/cp the directory form $srcdir.

4. Ok, I'll try with .rmp

It's rpm, not rmp.. however, once makepkg has downloaded the rpm, it extracts it for you using bsdtar, so it's the same as any other source once you get to build().


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2016-07-23 18:34:22

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 453

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

what about debtap?

ezik

Offline

#6 2016-07-24 07:45:46

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

WorMzy wrote:

It's rpm, not rmp.. however, once makepkg has downloaded the rpm, it extracts it for you using bsdtar, so it's the same as any other source once you get to build().

That's not correct. The deb and the rpm have different structures.

Offline

#7 2016-07-24 10:04:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

I would say that .deb files having tarballs within tarballs makes them the exception, not rpms. wink


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#8 2016-07-24 11:29:51

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

WorMzy wrote:

I would say that .deb files having tarballs within tarballs makes them the exception, not rpms. wink

Yes and no. Download the deb and the rpm and extract everything. The folder structure within the deb is different from the rpm, and although the difference is small, it was enough to confuse this user.

Offline

#9 2016-07-25 09:15:49

WyRe
Member
Registered: 2015-09-26
Posts: 26

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

Thank you all! I'm trying to learn how mach as I can smile However...

WorMzy wrote:

No, you should use the /usr prefix instead of /usr/local. Never touch /home in a package.

I'm not sure about what do you mean with /usr prefix ... could you be more specific? I was reading here https://wiki.archlinux.org/index.php/Ar … _etiquette but there is not any specification of how use that prefix; anyway /usr/local is not in the folder structure of this package and it's clear what /usr/games could it be in /usr/bin as a binary.

I still have difficulties to install /usr/share folders, above all using 'install' because this instruction is to copy single files, right? how could I copy all folder structure including files?

Btw, really .rpm is more clear Awebb, ty big_smile

Offline

#10 2016-07-25 09:39:31

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

WyRe wrote:

I'm not sure about what do you mean with /usr prefix

So instead of using /usr/local/games (which uses /usr/local as a prefix), you would instead use /usr/games (which uses /usr as a prefix).

WyRe wrote:

how could I copy all folder structure including files?

WorMzy wrote:

mkdir, install, or just mv/cp the directory form $srcdir.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#11 2016-07-25 09:53:43

WyRe
Member
Registered: 2015-09-26
Posts: 26

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

WorMzy wrote:

mkdir, install, or just mv/cp the directory form $srcdir.

I've thought do it with mv but is not more properly use install? I'm asking this because I've tried use install to copy folders (with their files) and doesn't work as I expected.

Thanks!

Offline

#12 2016-07-25 10:01:02

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

I've thought do it with mv but is not more properly use install?

No, use whichever tool fits the job you're trying to do. 'install' is good for installing individual files, but not so useful for moving large groups of files. Remember: keep it simple.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#13 2016-07-25 10:06:20

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

No, you don't use /usr/games, you use /usr/bin for the launcher in /usr/games in the deb file. /usr/games is a Debian anomaly.

Offline

#14 2016-07-25 10:17:13

WyRe
Member
Registered: 2015-09-26
Posts: 26

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

Ok, I think that's right:

https://github.com/WyRe/pokemmo/blob/master/PKGBUILD


Now ... I would like contribute with this to AUR xD
Thank you guys! big_smile

Last edited by WyRe (2016-07-25 10:20:34)

Offline

#15 2016-07-25 10:22:30

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: [SOLVED] Help to finish PKGBUILD from .deb/.rpm file

Looks great!

EDIT: Now you could mark the thread as solved by editing the thread title.

Last edited by Awebb (2016-07-25 10:23:16)

Offline

Board footer

Powered by FluxBB