desktop/tools-pkg-tribe/PKGBUILD
2012-02-08 22:49:27 +01:00

84 lines
2.6 KiB
Bash

#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
#
# package info
#
pkgname=tribe
pkgver=2012.02.08
pkgrel=4
_codename=Archimedes
pkgdesc="Tribe - Chakra LiveCD Installer"
url="http://git.chakra-project.org/chakra/"
license="GPL"
arch=('i686' 'x86_64')
depends=('kdelibs' 'kdeedu-marble>=4.8.0' 'squashfs-tools' 'tribe-partitionmanager'
'cinstall>=0.4.6.10' 'rsync' 'mkinitcpio-nfs-utils' 'ntfs-3g')
makedepends=('cmake' 'kde-workspace' 'automoc4')
options=('!splithdr' '!splitdbg' 'sign')
source=("http://chakra.sourceforge.net/sources/tribe/tribe-${pkgver}.tar.xz"
"http://chakra.sourceforge.net/sources/tribe/RELEASE_NOTES_20120212.html"
'launch-tribe.sh')
md5sums=('27e7d7039e945013a25d11550a623420'
'b51a10a8c7bce515a2d3e3c81a7fa0a4'
'e31855da237a2c8029774831b3c04685')
groups=('kde-uninstall')
install=tools-tribe.install
# create tarball: source PKGBUILD && mksource
mksource() {
rm -vRf ${pkgname}-${pkgver}
git clone git://gitorious.org/chakra/${pkgname}.git ${pkgname}-${pkgver}
rm -vRf ${pkgname}-${pkgver}/.git
pushd ${pkgname}-${pkgver}
popd
tar -cvJf ${pkgname}-${pkgver}.tar.xz ${pkgname}-${pkgver}/*
md5sum ${pkgname}-${pkgver}.tar.xz
}
#
# build function
#
build()
{
cd "${srcdir}/${pkgname}-${pkgver}"
# replace rekonq screenshot with konqueror
#rm -v ui/images/screenshot04.png
#mv -v ui/images/screenshot04-konqueror.png ui/images/screenshot04.png
# proper bootmnt folder
sed -i -e "s/@ARCH@/${CARCH}/g" config-tribe.h.cmake
# add pkgver to tribe
sed -i -e "s~source build/from git~Build: ${pkgver} ($_codename)~g" config-tribe.h.cmake
sed -i -e "s~code-name~$_codename~g" "${srcdir}/${pkgname}-${pkgver}/scripts/postinstall-functions/job-initialize-target"
sed -i -e "s~chakra-version~${pkgver}~g" "${srcdir}/${pkgname}-${pkgver}/scripts/postinstall-functions/job-initialize-target"
cmake . -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
msg "Starting make..."
make
}
package()
{
cd "${srcdir}/${pkgname}-${pkgver}"
msg "Make successful, installing..."
make DESTDIR=$startdir/pkg install
install -Dm755 ${srcdir}/launch-tribe.sh \
${pkgdir}/usr/bin/launch-tribe.sh
cp -vf ${srcdir}/RELEASE_NOTES_20120212.html $pkgdir/usr/share/tribe/config/RELEASE_NOTES.html
# remove nasty files
find $startdir/pkg/ -name ".git" -type d -exec rm -fr {} +
}