Mail archive
alpine-devel

[alpine-devel] [PATCH 1/3] testing/irrlicht: new aport

From: Jeff Bilyk <jbilyk_at_gmail.com>
Date: Thu, 17 Mar 2011 21:49:19 +0000

---
 testing/irrlicht/APKBUILD |   74 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 74 insertions(+), 0 deletions(-)
 create mode 100644 testing/irrlicht/APKBUILD
diff --git a/testing/irrlicht/APKBUILD b/testing/irrlicht/APKBUILD
new file mode 100644
index 0000000..96442ac
--- /dev/null
+++ b/testing/irrlicht/APKBUILD
_at_@ -0,0 +1,74 @@
+# Maintainer: Jeff Bilyk <jbilyk_at_alpinelinux.org>
+pkgname=irrlicht
+pkgver=1.7.2
+pkgrel=0
+pkgdesc="3D graphics engine"
+url="http://irrlicht.sourceforge.net"
+arch="all"
+license="ZLIB"
+depends=
+depends_dev="mesa-dev jpeg-dev bzip2 libpng-dev zlib-dev"
+makedepends="$depends_dev"
+install=""
+source="http://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip"
+
+_builddir="$srcdir"/$pkgname-$pkgver/source/Irrlicht
+prepare() {
+       local i
+       cd "$_builddir"
+       for i in $source; do
+               case $i in
+               *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+               esac
+       done
+}
+
+build() {
+       cd "$_builddir"
+       make sharedlib || return 1
+       make || return 1
+
+       #from arch pkgbuild: example build helper
+       ln -s libIrrlicht.so.$pkgver "$srcdir"/$pkgname-$pkgver/lib/Linux/libIrrlicht.so
+
+       cd ../../examples
+       # Fix examples building
+       sed -i '/define USE_IRRKLANG/s:.*://&:' ./Demo/CDemo.h
+       make || return 1
+}
+
+package() {
+       cd "$_builddir"
+
+       mkdir -p "$pkgdir"/usr/lib
+       mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
+       mkdir -p "$pkgdir"/usr/share/$pkgname/examples/bin
+       mkdir -p "$pkgdir"/usr/share/doc/$pkgname
+       mkdir -p "$pkgdir"/usr/include/$pkgname/include
+
+       make INSTALL_DIR="$pkgdir" install || return 1
+
+       cd ../..
+       install -m644 readme.txt "$pkgdir"/usr/share/licenses/$pkgname
+
+       #from arch pkgbuild: install static library and fix perms
+       install -m644 lib/Linux/libIrrlicht.a "$pkgdir"/usr/lib
+
+       #from arch pkgbuild: install media file examples
+       cp -r media "$pkgdir"/usr/share/$pkgname
+
+       #from arch pkgbuild: install docs
+       cp -r doc/* "$pkgdir"/usr/share/doc/$pkgname
+       rm -f "$pkgdir"/usr/share/doc/$pkgname/*.txt
+
+       cd "$pkgdir"/usr/lib
+       mv ../../libIrrlicht* ./
+       ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1
+
+       mv "$pkgdir"/../include/* "$pkgdir"/usr/include/$pkgname/include/
+       rm -rf "$pkgdir"/../include/
+
+       install -m755 "$srcdir"/$pkgname-$pkgver/bin/Linux/* "$pkgdir"/usr/share/$pkgname/examples/bin/
+}
+
+md5sums="eb627d4c432bf73f12bc6d9ddc700b07  irrlicht-1.7.2.zip"
-- 
1.7.4.1
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Thu Mar 17 2011 - 21:49:19 UTC