summaryrefslogtreecommitdiffstats
path: root/arch/extras/cmake_PKGBUILD
blob: bf2583449118fef0c218ef562fb57d86921ae89e (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: Calvin Morrison <mutantturkey@gmail.com>

pkgname=trinity-pkname
pkgver=3513
pkgrel=1
arch=('i686' 'x86_64')
url='http://www.trinitydesktop.org'
license=('GPL')
groups=('trinity-extras')
pkgdesc="Trinity - pkgdesc"
depends=('trinity-kdelibs')
makedepends=('pkgconfig' 'cmake' 'imake')
optdepends=()
provides=($pkgname)
confilcts=()
replaces=()
options=('libtool' '!strip')
source=(http://mirror.its.uidaho.edu/pub/trinity/releases/3.5.13/applications/pkname-3.5.13.tar.gz)
md5sums=('')

_svnmod=applications/kpowersave
_builddir=build
_prefix="/opt/trinity"

build() {
   msg "Setting PATH, CMAKE and Trinity Environment variables"
   export CMAKE_PREFIX_PATH=${QTDIR}:${_prefix}
   export CMAKE_INCLUDE_PATH=${QTDIR}/include:${QTDIR}/include/tqt:/usr/include/dbus-1.0:${_prefix}/include:${_prefix}/include/libkrandr
   export LD_LIBRARY_PATH=${_prefix}/lib:${_prefix}/lib/trinity:$LD_LIBRARY_PATH
   export PKG_CONFIG_PATH=${_prefix}/lib/pkgconfig:${QTDIR}/lib/pkgconfig

# patch
# msg "Patching..."
# patch -N -d ${srcdir} -p0 < ${srcdir}/pkname.patch

   cd $srcdir
   msg "Creating out-of-source build directory: ${srcdir}/${_builddir}"
   mkdir -p ${_builddir}
   cd ${_builddir}

   msg "Starting cmake..."
   cmake ${srcdir}/${_svnmod} \
    -DCMAKE_INSTALL_PREFIX=${_prefix} \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DQT_VERSION=3 \
    -DWITH_QT3=ON \
    -DQTDIR=${QTDIR} \
    -DQT_DOCDIR=${QTDIR}/man \
    -DQT_LIBRARY_DIRS=${QTDIR}/lib \
    -DBUILD_ALL=ON

   msg "Building - $pkgname..."
   make
}

package() {
   msg "Packaging - $pkgname-$pkgver"
   cd ${srcdir}/${_builddir}
   make DESTDIR="${pkgdir}" install
}