DeLi(cate) Forum
PKGBUILD files - Printable Version

+- DeLi(cate) Forum (http://delicate-linux.net/forum)
+-- Forum: DeLi(cate) Linux [english only] (/forumdisplay.php?fid=3)
+--- Forum: Development (/forumdisplay.php?fid=6)
+--- Thread: PKGBUILD files (/showthread.php?tid=74)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33


RE: PKGBUILD files - tavvva - 10-09-2011 11:10 AM

(10-02-2011 02:24 PM)nl2stk Wrote:  Bobobot a game in the 'MegamanStyle'.

pkgver=preview3

This is a great example of missing versioning concept. This often breaks possibility of later migration to proper versioning when upstream decides to do so. Different package systems can handle such version strings so that they are sorted in different order and updating can fail.
It's a role of maintainer to fix that or to cooperate with upstream in order to change the versioning.

Some package systems are equipped with a clever overriding mechanism called "Epoch". It's a number that works as a version prefix and has a higher priority than the whole version string. In such cases the version string can stay untouched.

Our version of pacman doesn't support epochs, therefore I had to change the version string to 0.0.0.3. Hopefully this depth is sufficient to avoid future conflicts with the official version strings.

Next thing ... architecture ...
This piece of software has no configure script and a simple CFLAGS passing breaks the build.
That means we have to force the i386 architecture by patching the makefile before calling the make command:

sed -i "s/CC=gcc/CC=gcc -march=i386/g" makefile

As You see the easiest way is to append the architecture definition to the compiler call :]


RE: PKGBUILD files - tavvva - 10-09-2011 12:19 PM

(10-02-2011 02:24 PM)nl2stk Wrote:  TTYtter, a console based twitter client.

Code:
pkgname=ttytter
pkgver=1.2.01
url="http://www.floodgap.com/software/ttytter/"
source=(http://www.floodgap.com/software/ttytter/dist1/1.2.01.txt)
...
  install -Dm755 1.2.01.txt "$pkgdir/usr/bin/$pkgname"

It's better to use the pkgver variable instead of retyping the particular version everywhere. Version updates are then easier ... You don't need to change the version string on several places.

And the result is ...

Code:
url="http://www.floodgap.com/software/$pkgname/"
source=(http://www.floodgap.com/software/$pkgname/dist1/$pkgver.txt)
...
   install -Dm755 $pkgver.txt "$pkgdir/usr/bin/$pkgname"



RE: PKGBUILD files - nl2stk - 10-09-2011 02:02 PM

That's usefull information, thank you :]
I didn't know how to force the 386 modus without './configure'.
I normally watched it during the compiling procedure.
Lucky enough was it raining '-march386' or something on the screen so assumed that there was no other option for that program. But with the 'sed' option I don't have to cross my fingers :]

Names are sometimes a pain in the... (place where the sun don't shine). Some packages uses a "_" instead of the "-" etc.
It makes it a bit messy. Not in the 'ttytter' case, but I'll keep that in mind :]


RE: PKGBUILD files - nl2stk - 10-09-2011 11:29 PM

3d Pong, the classic game in a 3d remake.

Code:
# Maintainer: theo - nl2stk
# Thanks to: Kevin Edmonds  
pkgname=3dpong
pkgver=0.5
pkgrel=1
pkgdesc="one- or two-player, three dimensional sports game, based on Pong"
url="http://www.newbreedsoftware.com/3dpong/index2.php3"
depends=(libX11)
source=(ftp://ftp.billsgames.com/unix/x/$pkgname/src/$pkgname-$pkgver.tar.gz)
md5sums=('91594c0fd5def93053d911e037f5a383')
license="GPL"

build() {  
cd $startdir/src/$pkgname-$pkgver
sed -i "s/CC=gcc/CC=gcc -march=i386/g" makefile  
make || return 1  
make PREFIX=$startdir/pkg/usr DESTDIR=$startdir/pkg install
}

I've checked it and it's an ELF 32BIT executable, Intel 80386.... etc.

EDIT on 11 October:
1- or 2-player "Pong," in 3D space, for X11.
Bounce the virtual ball between a friend on another X terminal or against a computer opponent. Or, play a twisted game of handball. Different viewing modes are available, including mouse controlled "freeview" mode as well as a "3d glasses" mode for a true 3D experience.


RE: PKGBUILD files - tavvva - 10-10-2011 08:48 PM

(10-09-2011 02:02 PM)nl2stk Wrote:  Names are sometimes a pain in the... (place where the sun don't shine). Some packages uses a "_" instead of the "-" etc.
It makes it a bit messy. Not in the 'ttytter' case, but I'll keep that in mind :]

Yes. Sometimes there could be a mess in the names. In such cases define Your own variable (for example sitename) and use it where pkgname can't be used. The same applies to sitever versus pkgver.


RE: PKGBUILD files - tavvva - 10-10-2011 10:13 PM

(10-02-2011 08:53 PM)nl2stk Wrote:  DuhDraw is an ANSI paintprogram, looks almost the same as TheDraw (MSDOS).

I think it doesn't work well with xterm.
At least the logo doesn't have correct characters.
Maybe depends on the locale settings ....

This needs some testing ...

The result PKGBUILD is here :
http://delicate.tavvva.net/0.1/src/duhdraw/2.8.13/PKGBUILD

Could You please test this and the previously reviewed packages (already in the repository) and add them in the PACKAGES section (if missing) with some comment and representative screenshots of the application window? -> If You wanna help me with that, please, cut the background out & attach the image directly to this forum (no external links).

Thanks in advance.

I'm slowly recovering ... feeling better now.


RE: PKGBUILD files - tavvva - 10-10-2011 10:37 PM

(10-03-2011 10:38 AM)nl2stk Wrote:  Gpaint 2, a simple paint program

The result PKGBUILD is here:
http://delicate.tavvva.net/0.1/src/gpaint/0.3.3/PKGBUILD


RE: PKGBUILD files - nl2stk - 10-11-2011 12:35 PM

(10-10-2011 10:13 PM)tavvva Wrote:  I think it doesn't work well with xterm.
At least the logo doesn't have correct characters.
Maybe depends on the locale settings ....

I believe I've build it on the toshiba without X started.
Without X, the Alt functions are working.
Not all fonts are available but I believe they can be obtained from DOSEMU (at least that's the way newdraw works).
To be complete sure I have to build DOSEMU first :]


RE: PKGBUILD files - tavvva - 10-11-2011 05:03 PM

(10-09-2011 11:29 PM)nl2stk Wrote:  I've checked it and it's an ELF 32BIT executable, Intel 80386.... etc.

Please, be very careful here! Intel 80386 in shown for i686 builds too!
Target instruction set unfortunately can't be checked like that Sad


RE: PKGBUILD files - tavvva - 10-11-2011 05:14 PM

It seems that gpaint is crashing when the bottom button is pressed. I will probably fill a bug against that.