You are not logged in.

#1 2011-10-30 16:12:59

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

[SOLVED] Creating binary packages

Hello

I'm trying to create an arch package of my software. I have just three files needed to be copied in /usr/bin and /etc/. can't find how should I tell makepkg where are them.... There is only source variable in PKGBUILD and i don't want to add any source. just binaries are here.
   
AND before you ask I should say I already read the wiki things :-/

Last edited by soroush (2011-10-30 17:52:37)

Offline

#2 2011-10-30 16:21:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Creating binary packages

'Source' means what files are going to be used: binaries, scripts, patches, local or from some internet location - doesn't matter. Put those files in the same folder as the PKGBUILD and put their names in the 'source' array.
Have a look at some PKGBUILD if you are still lost.

Offline

#3 2011-10-30 16:38:29

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: [SOLVED] Creating binary packages

Ok I looked at some PKGBUILD in AUR. There are all usually sourceforge links to source tarballs in source array. So makepkg downloads and compiles them... I can't manage to do that for local files. Could you give an example please? I want to copy the file 'a' to /usr/bin/a and the file 'b' to /etc/a/b ? What should I do now?

Offline

#4 2011-10-30 16:50:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Creating binary packages

https://aur.archlinux.org/packages/do/d … e/PKGBUILD
Not sure about e.g. the 'return 1' part, I think it's deprecated, but this is how you just copy the files w/o compiling.

Offline

#5 2011-10-30 17:08:04

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: [SOLVED] Creating binary packages

karol wrote:

https://aur.archlinux.org/packages/do/d … e/PKGBUILD
Not sure about e.g. the 'return 1' part, I think it's deprecated, but this is how you just copy the files w/o compiling.

install -D -755 $pkgdir/usr/bin/a /usr/bin/a

Not working. I think there should be a better way like debian!

Offline

#6 2011-10-30 17:10:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Creating binary packages

soroush wrote:
karol wrote:

https://aur.archlinux.org/packages/do/d … e/PKGBUILD
Not sure about e.g. the 'return 1' part, I think it's deprecated, but this is how you just copy the files w/o compiling.

install -D -755 $pkgdir/usr/bin/a /usr/bin/a

Not working. I think there should be a better way like debian!

' /usr/bin/a'? You're not installing them now, you just create a package. Pacman will install them if you run ',makepkg -i'.

Offline

#7 2011-10-30 17:20:16

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: [SOLVED] Creating binary packages

karol wrote:
soroush wrote:
karol wrote:

https://aur.archlinux.org/packages/do/d … e/PKGBUILD
Not sure about e.g. the 'return 1' part, I think it's deprecated, but this is how you just copy the files w/o compiling.

install -D -755 $pkgdir/usr/bin/a /usr/bin/a

Not working. I think there should be a better way like debian!

' /usr/bin/a'? You're not installing them now, you just create a package. Pacman will install them if you run ',makepkg -i'.

Sorry I don't understand! How should I add files to my package??!!! I think it's a clearly declared and rational desire. how should I do that? How packagers add files to their packages? I'm really confused and don't know how to ask this simple question :-/

Offline

#8 2011-10-30 17:24:12

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,557

Re: [SOLVED] Creating binary packages

it should be something like
install -D -m 755 "${srcdir}/awesome_binary" "${pkgdir}/usr/bin/awesome_binary"

Offline

#9 2011-10-30 17:33:10

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: [SOLVED] Creating binary packages

bangkok_manouel wrote:

it should be something like
install -D -m 755 "${srcdir}/awesome_binary" "${pkgdir}/usr/bin/awesome_binary"

Finally! now I can understand what are ${pkgdir} and ${srcdir}

Thank you :-)

Offline

#10 2011-10-30 17:46:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Creating binary packages

$pkgdir/usr/bin/$pkgname will get installed into the proper location - /usr/bin/$pkgname - when you install the package via 'pacman -U $pkgname'. That's the point of having pacman :-)


Please remember to mark the thread as solved.

Offline

Board footer

Powered by FluxBB