mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
81 lines
2.3 KiB
Bash
81 lines
2.3 KiB
Bash
# Chakra Tools
|
|
|
|
pkgname=tribe
|
|
pkgver=2014.01.25
|
|
_rls_notes=20140125
|
|
pkgrel=1
|
|
_codename=Curie
|
|
branch="curie"
|
|
pkgdesc="Tribe - Chakra LiveCD Installer"
|
|
url="http://git.chakra-project.org/chakra/"
|
|
license="GPL"
|
|
arch=('x86_64')
|
|
depends=('kdelibs' 'kdeedu-marble>=4.10.0' 'squashfs-tools' 'tribe-partitionmanager'
|
|
'rsync' 'mkinitcpio-nfs-utils' 'ntfs-3g' 'libpwquality')
|
|
makedepends=('cmake' 'kde-workspace' 'automoc4')
|
|
options=('debug')
|
|
|
|
source=("http://chakra.sourceforge.net/sources/tribe/RELEASE_NOTES_${_rls_notes}.html"
|
|
"launch-tribe.sh")
|
|
md5sums=('723a26af9577aa9528ea32a978fd7868'
|
|
'e31855da237a2c8029774831b3c04685')
|
|
|
|
groups=('kde-uninstall')
|
|
categories=('system')
|
|
install=tools-tribe.install
|
|
|
|
_gitroot=git://gitorious.org//chakra/tribe.git
|
|
_gitname=tribe
|
|
_gitsha=2758cc87aeec8ef883cbd9689085afc7fa238593
|
|
|
|
prepare(){
|
|
cd "$srcdir"
|
|
msg "Connecting to GIT server...."
|
|
|
|
if [[ -d "$_gitname" ]]; then
|
|
cd "$_gitname" && git pull origin
|
|
msg "The local files are updated."
|
|
else
|
|
git clone "$_gitroot" "$_gitname"
|
|
fi
|
|
|
|
msg "GIT checkout done or server timeout"
|
|
msg "Starting build..."
|
|
|
|
rm -rf "$srcdir/$_gitname-build"
|
|
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
|
|
cd "$srcdir/$_gitname-build"
|
|
git reset --hard ${_gitsha}
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/$_gitname-build"
|
|
|
|
# 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" "scripts/postinstall-functions/01-job-initialize-target"
|
|
sed -i -e "s~chakra-version~${pkgver}~g" "scripts/postinstall-functions/01-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/$_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 {} +
|
|
}
|