# $Id: PKGBUILD 108100 2014-03-22 17:06:48Z arodseth $ # Maintainer: Alexander Rødseth # Contributor: spambanane # Contributor: Matteo # Contributor: Matthew Zimmerman pkgname=liteide pkgver=21.1 pkgrel=1 pkgdesc='IDE for editing and building projects written in the Go programming language ("golangide")' license=('LGPL') arch=('x86_64' 'i686') url='https://github.com/visualfc/liteide' depends=('go' 'qt5-webkit') replaces=('golangide') conflicts=('golangide') makedepends=('gendesk' 'git' 'go') options=('!strip' '!emptydirs') source=("$pkgname-x$pkgver::git://github.com/visualfc/liteide.git#tag=x$pkgver" 'liteide.png') md5sums=('SKIP' '7f459be003d754a3a2c34be91b8c0b1f') prepare() { gendesk -f -n --name 'LiteIDE' --pkgname "$pkgname" --pkgdesc "$pkgdesc" chmod +x "liteide-x$pkgver/build/"*_*.sh } build() { cd "liteide-x$pkgver/build" export QTDIR=/usr mkdir -p go export GOPATH=`pwd`/go ./update_pkg.sh ./build_linux.sh # Fixing insecure RPATH, need to test if this is still needed cd ../liteidex find . -name "*.so" -type f -exec sed -i 's|/home/win|/usr/lib/|g' {} \; find . -name liteide -type f -exec sed -i 's|/home/win|/usr/lib/|g' {} \; } package() { cd "liteide-x$pkgver/build/liteide" msg2 'Creating directories...' mkdir -p \ "$pkgdir/usr/lib/liteide" \ "$pkgdir/usr/share/liteide" \ "$pkgdir/usr/share/doc/$pkgname" msg2 'Packaging executables...' for binary in gocode liteide; do # goimports liteide_stub install -Dm755 "bin/$binary" "$pkgdir/usr/bin/$binary" done ln -s /usr/bin/liteide "$pkgdir/usr/bin/golangide" cd "$srcdir/liteide-x$pkgver/liteidex" msg2 'Packaging resources...' cp -r deploy/* os_deploy/* "$pkgdir/usr/share/liteide" msg2 'Packaging libraries and plugins...' cp -r liteide/lib/liteide/* "$pkgdir/usr/lib/liteide" cp -r liteide/bin/libliteapp.* "$pkgdir/usr/lib/" chmod -x "$pkgdir/usr/lib/liteide/plugins/"* msg2 'Packaging license and license exception...' install -Dm644 LICENSE.LGPL \ "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 LGPL_EXCEPTION.TXT \ "$pkgdir/usr/share/licenses/$pkgname/LGPL_EXCEPTION" cd ../.. msg2 'Packaging menu entry and icon...' install -Dm644 "$pkgname.desktop" \ "$pkgdir/usr/share/applications/$pkgname.desktop" install -Dm644 "$pkgname.png" \ "$pkgdir/usr/share/pixmaps/$pkgname.png" msg2 'Cleaning up...' rm -rf "$pkgdir/usr/share/$pkgname/doc" # Fix for FS#38781 mv "$pkgdir/usr/share/liteide/linux/liteenv" "$pkgdir/usr/share/liteide/liteenv" } # vim:set ts=2 sw=2 et: