public
Created

  • Download Gist
gistfile1.bash
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
# Maintainer: Josh Kropf <josh@slashdev.ca>
# Contributor: Bartosz Chmura <chmurli at gmail dot com>
# Contributor: Mikkel Kroman <mk at maero dot dk>
 
LASTVER=`wget -q -O- http://www.sublimetext.com/dev | grep "<h2>Build " | head -n 1 | grep -Po '[0-9]+' | tail -n 2 | head -n 1`
 
pkgname=sublime-text-dev
pkgver=2.$LASTVER
pkgrel=1
_build=$LASTVER
pkgdesc="sophisticated text editor for code, html and prose"
arch=('i686' 'x86_64')
url="http://www.sublimetext.com/2"
license=('custom')
depends=(libpng12 gtk2)
conflicts=(sublime-text)
_arch=' x64'
_archurl='%20x64'
 
[[ "${CARCH}" = i686 ]] && _arch='' && _archurl=''
 
source=(
"http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202%20Build%20${_build}${_archurl}.tar.bz2"
sublime-text-dev.desktop
sublime-text-dev-icon.png
subl
)
md5sums=('d97341fa6cd13a46958ca8cf463d6977'
'a263a1c158d8a0cf00262f64e7953e41'
'd08225e4b82a9de9a8fcbbf2b4aa6c23'
'6e0b9c2332c1c1dc9e1e28fda391cf54')
 
[[ "${CARCH}" = i686 ]] && md5sums[0]=`md5sum "Sublime%20Text%202%20Build%20${_build}${_archurl}.tar.bz2" | cut -d " " -f1`
 
build () {
cd ${srcdir}
 
install -Dm644 ${pkgname}.desktop \
${pkgdir}/usr/share/applications/${pkgname}.desktop
install -Dm644 ${pkgname}-icon.png \
${pkgdir}/usr/share/pixmaps/${pkgname}-icon.png
 
install -dm755 ${pkgdir}/opt
cp -r "Sublime Text 2" ${pkgdir}/opt/${pkgname}
 
install -Dm755 subl ${pkgdir}/usr/bin/subl
#install -dm 755 ${pkgdir}/usr/bin
#ln -s /opt/${pkgname}/sublime_text ${pkgdir}/usr/bin/${pkgname}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.