desktop/tribe/PKGBUILD
2015-03-02 21:55:38 +01:00

73 lines
2.2 KiB
Bash

pkgname=tribe
pkgver=2015.03
_rls_notes=20150302
pkgrel=2
_codename=Euler
pkgdesc="Tribe - Chakra LiveCD Installer"
url="http://gitorious.org/chakra/tribe/"
license="GPL"
arch=('x86_64')
depends=('kdelibs' 'kdeedu-marble' 'squashfs-tools' 'partitionmanager>=1:1.1.0' 'grub>=2.02.beta2'
'rsync' 'mkinitcpio-nfs-utils' 'ntfs-3g' 'libpwquality')
makedepends=('cmake' 'kde-workspace' 'automoc4')
options=('debug')
_gitname=tribe
_gitsha=6dbdb8b
source=("$pkgname"::"git://gitorious.org/chakra/${_gitname}.git#commit=${_gitsha}"
"http://chakra.sourceforge.net/sources/tribe/RELEASE_NOTES_${_rls_notes}.html"
"launch-tribe.sh"
"fix-for-testing.patch")
md5sums=('SKIP'
'65fad7c4077fe36fd466500e591c1ebc'
'e31855da237a2c8029774831b3c04685'
'42b862a91b7d0c3708faca32926252ce')
groups=('kde-uninstall')
categories=('system')
install=tools-tribe.install
prepare() {
cd "$srcdir/$_gitname"
# not yet upstream'ed patch
patch -Np1 -i ../fix-for-testing.patch
}
build() {
cd "$srcdir/$_gitname"
# proper bootmnt folder
sed -i -e "s/@ARCH@/${CARCH}/g" "src/config-tribe.h.cmake"
# add pkgver to tribe
sed -i -e "s~source build/from git~Build: ${pkgver} ($_codename)~g" "src/config-tribe.h.cmake"
sed -i -e "s~code-name~$_codename~g" "scripts/postinstall-functions/01-job-initialize-target"
sed -i -e "s~chakra-version~${pkgver}~g" "scripts/postinstall-functions/01-job-initialize-target"
# temporarily hack on grub, need to merge upstream
sed -i -e "s~--skip-resume~~g" "scripts/postinstall-functions/20-job-install-grub2"
mkdir "$_gitname-build"
cd "$_gitname-build"
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/$_gitname/$_gitname-build"
msg "Make successful, installing..."
make DESTDIR=${pkgdir} install
install -Dm755 ${srcdir}/launch-tribe.sh \
${pkgdir}/usr/bin/launch-tribe.sh
cp -vf ${srcdir}/RELEASE_NOTES_${_rls_notes}.html $pkgdir/usr/share/tribe/config/RELEASE_NOTES.html
# remove nasty files
find ${pkgdir}/ -name ".git" -type d -exec rm -fr {} +
}