Created
December 28, 2013 20:27
-
-
Save mzimmerman/8163841 to your computer and use it in GitHub Desktop.
liteide PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id$ | |
# Maintainer: Alexander Rødseth <rodseth@gmail.com> | |
# Contributor: spambanane <happy.house@gmx.de> | |
# Contributor: Matteo <matteo.dek@gmail.com> | |
pkgname=liteide | |
pkgver=20 | |
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') | |
options=('!strip' '!emptydirs') | |
source=("$pkgname.zip::https://github.com/visualfc/liteide/archive/x$pkgver.zip" | |
'liteide.png' | |
'liteide.sh') | |
sha256sums=('b749bec15a70e3c4a851afcd0fc5c625c5654b4a56907482c8fac8193a8ccb1d' | |
'47c52b22326034bd3d6a7b11b05a53c8b3838c08e145171cf5cad2ca00260697' | |
'5d6f05b072586c31e3a4a08ea2d7332dd0a78f5db6b2d088fb76e8cb032672f0') | |
prepare() { | |
gendesk -f -n --name 'Golang IDE' --pkgname "$pkgname" --pkgdesc "$pkgdesc" | |
cd "liteide-x$pkgver/build" | |
chmod +x update_pkg.sh | |
chmod +x build_linux.sh | |
} | |
build() { | |
cd "liteide-x$pkgver/build" | |
QTDIR=/usr ./update_pkg.sh | |
QTDIR=/usr ./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 goastview goapi goexec godocview; do | |
install -Dm755 "bin/$binary" "$pkgdir/usr/bin/$binary" | |
done | |
install -Dm755 bin/liteide "$pkgdir/usr/bin/liteide.elf" | |
install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname" | |
install -Dm755 "$srcdir/$pkgname.sh" "$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" | |
} | |
# vim:set ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment