summaryrefslogtreecommitdiff
path: root/pcr/kervalasquish-hg/PKGBUILD
diff options
context:
space:
mode:
authorShackra Sislock <none@none>2012-07-26 01:03:45 -0600
committerShackra Sislock <none@none>2012-07-26 01:03:45 -0600
commit8f4802b2d269869354619e783ec9be78f18c5c8a (patch)
tree7873801714907fd31c1ab5e558043c865595bf72 /pcr/kervalasquish-hg/PKGBUILD
parentdda5c8f94faac28a09ce78edd9999d1b022d24b6 (diff)
moving kervala_libsquish to kervalasquish and adding the common.cmake CMake module, see http://dev.ryzom.com/issues/1485#note-5
--HG-- rename : pcr/kervala_libsquish/PKGBUILD => pcr/kervalasquish-hg/PKGBUILD
Diffstat (limited to 'pcr/kervalasquish-hg/PKGBUILD')
-rw-r--r--pcr/kervalasquish-hg/PKGBUILD70
1 files changed, 70 insertions, 0 deletions
diff --git a/pcr/kervalasquish-hg/PKGBUILD b/pcr/kervalasquish-hg/PKGBUILD
new file mode 100644
index 000000000..c9ca2e7cd
--- /dev/null
+++ b/pcr/kervalasquish-hg/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: Jorge Araya <jorgean@lavabit.com>
+
+pkgname=kervalasquish-hg
+pkgver=220
+pkgrel=1
+pkgdesc="Free Software DXT compression library, kervala's version"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/libsquish/"
+license=('MIT')
+makedepends=('mercurial' 'gcc-libs')
+provides=('libsquish')
+conflicts=('libsquish' 'kervala_libsquish-hg')
+
+_hgroot="http://hg.kervala.net"
+_hgrepo="packaging"
+cmakerepo="cmake"
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to Kervala's Mercurial server for libsquish..."
+
+ if [[ -d "$_hgrepo" ]]; then
+ cd "$_hgrepo"
+ hg pull -u
+ msg "The local files are updated."
+ else
+ hg clone "${_hgroot}/${_hgrepo}"
+ fi
+
+ msg "Connecting to Kervala's Mercurial server for cmake modules..."
+
+ if [[ -d $srcdir/$cmakerepo ]]; then
+ cd $srcdir/$cmakerepo
+ hg pull -u
+ msg "The local files are updated."
+ else
+ cd $srcdir
+ hg clone ${_hgroot}/${cmakerepo}
+ fi
+
+ msg "Mercurial checkout done or server timeout"
+ msg "Starting build..."
+
+ if [[ -d $_hgrepo-build ]]; then
+ rm -rf "$srcdir/$_hgrepo-build"
+ fi
+
+ cp -r "$srcdir/$_hgrepo/squish" "$srcdir/$_hgrepo-build"
+
+ if [[ ! -d $_hgrepo-build/CMakeModules ]]; then
+ mkdir "$srcdir/$_hgrepo-build/CMakeModules"
+ cp $srcdir/cmake/modules/common.cmake $srcdir/$_hgrepo-build/CMakeModules/
+ fi
+
+ if [[ -d $srcdir/$_hgrepo-build/build ]]; then
+ rm -rf $srcdir/$_hgrepo-build/build
+ fi
+
+ mkdir "$srcdir/$_hgrepo-build/build"
+ cd "$srcdir/$_hgrepo-build/build"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
+ make
+}
+
+package() {
+ cd "$srcdir/$_hgrepo-build/build"
+ make DESTDIR="${pkgdir}" install
+}
+
+# vim:set ts=2 sw=2 et: