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 - nl2stk - 09-11-2011 08:41 AM

A small ncurse/terminal game called Ninvaders, a Space-Invaders clone

Code:
#Maintainer: unknown, changed for Delicate by theo - nl2stk
pkgname=ninvaders
pkgver=0.1.1
pkgrel=1
pkgdesc='Ncurses based space invaders clone'
url='http://ninvaders.sourceforge.net/'
license=('GPL')
depends=('ncurses')
source=(http://downloads.sourceforge.net/sourceforge/ninvaders/$pkgname-$pkgver.tar.gz)
md5sums=('97b2c3fb082241ab5c56ab728522622b')

build() {
    cd $pkgname-$pkgver

    make CFLAGS="${CFLAGS}" || return 1
    install -m755 -D nInvaders $pkgdir/usr/bin/$pkgname
}

Compilingtime: not long just a couple of minutes.


RE: PKGBUILD files - tavvva - 09-11-2011 10:56 PM

Gonna look at that tomorrow Smile


RE: PKGBUILD files - nl2stk - 09-12-2011 08:31 AM

(09-11-2011 10:56 PM)tavvva Wrote:  Gonna look at that tomorrow Smile

Here is a sneak preview Tongue


[attachment=33]


RE: PKGBUILD files - nl2stk - 09-12-2011 01:20 PM

Another gamecollection - Ace of Penguins
Several solitaire games and other games like minesweeper and mastermind.

Code:
#contributor: Theo - nl2stk
pkgname=ace-of-penguins
pkgver=1.3
pkgrel=1
pkgdesc="A set of Unix/X solitaire games."
url="http://www.delorie.com/store/ace/"
license=('GPL')
depends=('libX11' 'libxpm' 'libpng' 'zlib')
source=(http://www.delorie.com/store/ace/ace-$pkgver.tar.gz)
md5sums=('1bd11ed270342ad78ff4822c06c6a762')

build()
{
  cd "$srcdir/ace-$pkgver"

  ./configure --prefix=/usr --build=$HOST --host=$HOST
  make || return 1
  make DESTDIR="$pkgdir/" install
}

Compiling time: not much, just a couple of minutes


RE: PKGBUILD files - nl2stk - 09-12-2011 04:42 PM

Cavez-of-phear, a CLI (ncurses) Boulderdash-clone.

Code:
# Org. contributor: sp42b changed for Delicate by Theo nl2stk

pkgname=cavez-of-phear
pkgver=0.5
pkgrel=1
pkgdesc="A Boulder Dash like game for consoles/terminals. Level editor included."
url="http://www.x86.no/cavezofphear/"
license=('GPL')
depends=('ncurses')
source=(http://www.x86.no/cavezofphear/phear-$pkgver.tar.bz2)
md5sums=('232f6f34d2a5aede7af70eb6e3d8d49f')

build() {
  cd ${startdir}/src/phear-$pkgver
  make || return 1
  make DESTDIR_BIN=${startdir}/pkg/usr/bin DESTDIR_DATA=${startdir}/pkg/usr/share install
}



RE: PKGBUILD files - tavvva - 09-12-2011 05:36 PM

ninvaders added .... just some NEWS ... I decided to supply all the console games with a start script having an -xterm suffix (for example ninvaders-xterm) ... and the script should contain the following ....

Code:
#!/bin/bash
xterm -fg white -bg black -e ninvaders

And such script needs to be included in the game package ...
This is needed because of the icewm menu ... it detects a presence of the application and displays the menu entry accordingly. All console applications were executed in xterm and therefore the menu entries were always visible (because of the xterm presence). The mentioned approach should prevent that .... I'll rebuild all the console games with this approach.

I was also thinking about the header and a simple "Thanks to:" separated by empty comment should be sufficient ....

The final PKGBUILD then looks like this .... in this case the original PKGBUILD author is not known, sooo .... we could use "unknown contributor" in this and similar cases

Code:
# Maintainer: theo - nl2stk
#
# Thanks to:
# unknown contributor

pkgname=ninvaders
pkgver=0.1.1
pkgrel=1
pkgdesc='Ncurses based space invaders clone'
url='http://ninvaders.sourceforge.net/'
license=('GPL')
depends=('ncurses')
source=(http://downloads.sourceforge.net/sourceforge/ninvaders/$pkgname-$pkgver.tar.gz
        ninvaders-xterm)
md5sums=('97b2c3fb082241ab5c56ab728522622b' '7e1509af8a1f8cc3dca7ffd13cf2f5ea')

build() {
    cd $pkgname-$pkgver

    make CFLAGS="${CFLAGS}" || return 1
    install -m755 -D nInvaders $pkgdir/usr/bin/$pkgname
    install -m755 ../ninvaders-xterm $pkgdir/usr/bin/
}



RE: PKGBUILD files - tavvva - 09-12-2011 05:41 PM

(09-12-2011 08:31 AM)nl2stk Wrote:  
(09-11-2011 10:56 PM)tavvva Wrote:  Gonna look at that tomorrow Smile
Here is a sneak preview Tongue

I'm sure You wanted to show us Your amazing wallpaper Cool Big Grin Big Grin What is it btw. ? Wuuf the Bika? :] Or just "some" unknown wolf?


RE: PKGBUILD files - tavvva - 09-12-2011 06:47 PM

Carefully :] the PKGBUILD file for caves-of-phear was missing an architecture enforcement Wink
and I also altered it to follow the new approach ...

The result's here:
Code:
# Maintainer : Theo - nl2stk
#
# Thanks to:
# sp42b

pkgname=cavez-of-phear
pkgver=0.5
pkgrel=2
pkgdesc="A Boulder Dash like game for consoles/terminals. Level editor included."
url="http://www.x86.no/cavezofphear/"
license=('GPL')
depends=('ncurses')
source=(http://www.x86.no/cavezofphear/phear-$pkgver.tar.bz2
        phear-xterm)
md5sums=('232f6f34d2a5aede7af70eb6e3d8d49f' '73aedb694398a3251e6d3d3be4c10fe7')

build() {
  cd ${startdir}/src/phear-$pkgver

  make CFLAGS="${CFLAGS}" || return 1
  make DESTDIR_BIN=${startdir}/pkg/usr/bin DESTDIR_DATA=${startdir}/pkg/usr/share install

  install -m755 ../phear-xterm $pkgdir/usr/bin/
}

And the phear-xterm script is here:
Code:
#!/bin/bash
xterm -fg white -bg black -geometry 80x25 -e phear



RE: PKGBUILD files - nl2stk - 09-12-2011 07:57 PM

Haha I don't know what it is. Just a wallpaper with a wolf I think, and it sure ain't one of my two Frisian Stabijhouns Tongue A couple of weeks it was news overhere, the first wolf was seen in the Netherlands after hundred years or so. Normally I cut the screenshot, but it was a kind of late yesterday.

The 'Thanks to:' is a good idea, I'm gonna use it in the next PKGBUILD files.

About the xterm issue, I was getting used to put them manually in the 'menu', and not only games but htop, midnight commander, etc too. Just kidding :]
But a pratical thing, is it a good idea to put the xxx-xterm between code-brackets? Just to be sure (the second md5sum).


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

(09-12-2011 07:57 PM)nl2stk Wrote:  But a pratical thing, is it a good idea to put the xxx-xterm between code-brackets? Just to be sure (the second md5sum).

Yes it is :] The file will be separately downloadable once I create the previously mentioned source repository.