updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / trinity-kdebase / PKGBUILD
blobb157fd4178534f2c55b649f1d0f2785e432e7f44
1 # Maintainer: Calvin Morrison <mutantturkey@gmail.com>
3 pkgname=trinity-kdebase
4 pkgver=3513
5 pkgrel=1
6 arch=('i686' 'x86_64')
7 url='http://www.trinitydesktop.org'
8 license=('GPL')
9 groups=('trinity-base')
10 pkgdesc="Trinity - kdebase"
11 depends=('hal' 'libltdl' 'trinity-dbus-1-qt3' 'trinity-arts' 'trinity-qt3' 'trinity-pyqt3' 'trinity-dbus-tqt-1' 'trinity-dbus-tqt' 'trinity-kdelibs' 'openexr')
12 makedepends=('pkgconfig' 'cmake' 'autoconf' 'imake' 'xorg-bdftopcf')
13 optdepends=('desktop-file-utils: Command line utilities for working with desktop entries'
14         'pciutils: PCI bus configuration space access library and tools'
15         'xscreensaver: Screen saver and locker for the X Window System')
16 options=('libtool' '!strip')
17 source=('http://mirror.its.uidaho.edu/pub/trinity/releases/3.5.13/kdebase-3.5.13.tar.gz' 'dbusfix.diff' 'kdm-trinity')
18 md5sums=('d1f7e1f94eeb46b981fe1ba144179840'
19          'c9ce810c281002440a6de8cfd8735d07'
20          '523838d16b38fc62445863ca762c17f8')
22 _qtdir=/opt/qt
23 _prefix="/opt/trinity"
25 _tdesktop() {
26     # create/install desktop
27     install -d -m755 ${pkgdir}/etc/X11/sessions
28     echo '[Desktop Entry]' > ${pkgdir}/etc/X11/sessions/trinity.desktop
29     echo 'Encoding=UTF-8' >> ${pkgdir}/etc/X11/sessions/trinity.desktop
30     echo 'Type=XSession' >> ${pkgdir}/etc/X11/sessions/trinity.desktop
31     echo "Exec=${_prefix}/bin/startkde" >> ${pkgdir}/etc/X11/sessions/trinity.desktop
32     echo "TryExec=${_prefix}/bin/startkde" >> ${pkgdir}/etc/X11/sessions/trinity.desktop
33     echo 'Name=Trinity' >> ${pkgdir}/etc/X11/sessions/trinity.desktop
34     echo 'Comment=The Trinity Desktop Environment. A powerful Open Source graphical desktop environment' >> ${pkgdir}/etc/X11/sessions/trinity.desktop
35     chmod 0755 ${pkgdir}/etc/X11/sessions/trinity.desktop
38 build() {
40   msg "Setting PATH, CMAKE and Trinity Environment variables"
41   if [[ -r /etc/profile.d/qt3.sh ]]; then
42     . /etc/profile.d/qt3.sh
43     [[ -n $QTDIR ]] && _qtdir=$QTDIR
44   else
45     [[ ${PATH%%:*} =~ ${_qtdir}/bin ]] || export PATH=${_qtdir}/bin:$PATH
46   fi
47   export CMAKE_PREFIX_PATH=/opt/qt:/opt/trinity
48   export CMAKE_INCLUDE_PATH=/opt/trinity/include/dbus-1-tqt/:/opt/trinity/include/dbus-1.0/:/opt/trinity/include:/opt/trinity/include/libkrandr
49   export LD_LIBRARY_PATH=/opt/trinity/lib:/opt/trinity/lib/kde3:/opt/qt/lib:$LD_LIBRARY_PATH
50   export PKG_CONFIG_PATH=/opt/trinity/lib/pkgconfig:/opt/qt/lib/pkgconfig:$PKG_CONFIG_PATH
51   echo $PKG_CONFIG_PATH
53   patch -N ${srcdir}/kdebase/kioslave/media/mediamanager/halbackend.h < ${srcdir}/dbusfix.diff 
54   cd $srcdir
56   msg "Creating out-of-source build directory: ${srcdir}/build"
57   mkdir -p build
58   cd build
60   msg "Starting cmake..."
61   cmake ${srcdir}/kdebase --debug-output \
62     -DCMAKE_INSTALL_PREFIX=${_prefix} \
63     -DCMAKE_VERBOSE_MAKEFILE=ON \
64     -DQT_VERSION=3 \
65         -DSYSCONF_INSTALL_DIR=/etc \
66         -DWITH_XFIXES=ON \
67         -DWITH_HAL=ON \
68         -DWITH_ARTS=ON \
69         -DWITH_SASL=ON \
70         -DWITH_OPENEXR=ON \
71         -DWITH_XCOMPOSITE=ON \
72         -DWITH_XCURSOR=ON \
73         -DWITH_XRANDR=ON \
74         -DWITH_XRENDER=ON \
75         -DWITH_XDAMAGE=ON \
76         -DWITH_SHADOW=ON \
77         -DWITH_XDMCP=ON \
78         -DWITH_XINERAMA=ON \
79         -DWITH_XEXT=ON \
80     -DWITH_PAM=ON \
81     -DBUILD_ALL=ON \
82     -DCMAKE_INCLUDE_DIR=/opt/trinity/include/dbus-1.0:/opt/qt/include/tqt:/opt/trinity/include/dbus-1.0
83   make
84 #     -DWITH_QT3=ON \
85 #     -DQTDIR=/opt/qt \
86 #     -DQT_LIBRARY_DIRS=/opt/qt/lib \
89 package() {
90   msg "Packaging - $pkgname-$pkgver"
91 #   cd ${srcdir}/${_svnmod}
92   cd ${srcdir}/build
94   make DESTDIR="$pkgdir/" install
96   cd ${startdir}
98   # install desktop and update kdmrc and Xsession
99 #   [[ -f trinity.desktop ]] && {
100 #     install -d -m755 ${pkgdir}/etc/X11/sessions
101 #     install -m644 trinity.desktop ${pkgdir}/etc/X11/sessions
102 #   }
103   _tdesktop
104   [[ -f ${pkgdir}/etc/X11/sessions/trinity.desktop ]] || msg "ERROR - Install Failure: ${pkgdir}/etc/X11/sessions/trinity.desktop"
106   # set kdm directory
107   _kdmdir=${_prefix}/share/config/kdm
108   [[ -d ${pkgdir}/${_kdmdir} ]] || install -d -m755 ${pkgdir}/${_kdmdir}
110   # install kdmrc
111   [[ -f kdmrc ]] && install -m644 kdmrc ${pkgdir}/${_kdmdir}
113   # update the Xsession file
114   [[ -f Xsession ]] && install -m755 Xsession ${pkgdir}/${_kdmdir}
116   # create the starttrinity link
117   [[ -d ${pkgdir}/usr/bin ]] || mkdir -p ${pkgdir}/usr/bin
118   cd ${pkgdir}/usr/bin
119   ln -sf /opt/trinity/bin/startkde starttrinity
121   cd ${startdir}
122   install -D -m755 ./kdm-trinity "${pkgdir}"/etc/rc.d/kdm-trinity