wok rev 17834
Add: get-sublime-text-3.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Mar 23 04:43:23 2015 +0200 (2015-03-23) |
parents | 509885352232 |
children | 8ed808e48732 |
files | get-sublime-text-3/description.txt get-sublime-text-3/receipt get-sublime-text-3/stuff/get-sublime-text-3 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-sublime-text-3/description.txt Mon Mar 23 04:43:23 2015 +0200 1.3 @@ -0,0 +1,3 @@ 1.4 +Sublime Text is a sophisticated text editor for code, markup and prose. 1.5 +You'll love the slick user interface, extraordinary features and amazing 1.6 +performance.
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-sublime-text-3/receipt Mon Mar 23 04:43:23 2015 +0200 2.3 @@ -0,0 +1,18 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="get-sublime-text-3" 2.7 +VERSION="1" 2.8 +CATEGORY="non-free" 2.9 +SHORT_DESC="Sublime Text is a sophisticated text editor for code, markup and prose" 2.10 +MAINTAINER="al.bobylev@gmail.com" 2.11 +LICENSE="non-free" 2.12 +WEB_SITE="http://www.sublimetext.com/" 2.13 +TAGS="development text-editor IDE programming" 2.14 + 2.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.16 +genpkg_rules() 2.17 +{ 2.18 + mkdir -p $fs/usr/bin 2.19 + cp -a $stuff/$PACKAGE $fs/usr/bin 2.20 + chmod a+x $fs/usr/bin/$PACKAGE 2.21 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/get-sublime-text-3/stuff/get-sublime-text-3 Mon Mar 23 04:43:23 2015 +0200 3.3 @@ -0,0 +1,50 @@ 3.4 +#!/bin/sh 3.5 +# get Sublime Text 3 3.6 +WGET_URL="$(wget -O - http://www.sublimetext.com/3 | tr '"' '\n' | fgrep x32.tar)" 3.7 +VERSION=${WGET_URL%_x32*}; VERSION=${VERSION##*_} 3.8 + 3.9 +# download tarball and extract 3.10 +rm -rf $1/opt/sublime_text 2>/dev/null 3.11 +mkdir -p $1/opt; cd $1/opt; busybox wget -O - $WGET_URL | tar -xjf - 3.12 +cd $1/opt; mv sublime_text_3 sublime_text 3.13 + 3.14 +# move desktop file 3.15 +mv $1/opt/sublime_text/sublime_text.desktop $1/usr/share/applications 3.16 + 3.17 +# link icons 3.18 +for size in $(cd $1/opt/sublime_text/Icon; ls); do 3.19 + mkdir -p $1/usr/share/icons/hicolor/$size/apps 3.20 + ln -fs $1/opt/sublime_text/Icon/$size/sublime-text.png \ 3.21 + $1/usr/share/icons/hicolor/$size/apps/sublime-text.png 3.22 +done 3.23 + 3.24 +# make receipt 3.25 +PKGDIR="$1/var/lib/tazpkg/installed/sublime-text-3" 3.26 +mkdir -p "$PKGDIR" 3.27 +cat > "$PKGDIR/receipt" << EOR 3.28 +# SliTaz package receipt. 3.29 + 3.30 +PACKED_SIZE="6.1M" 3.31 +UNPACKED_SIZE="16.1M" 3.32 +PACKAGE="sublime-text-3" 3.33 +VERSION="$VERSION" 3.34 +CATEGORY="development" 3.35 +SHORT_DESC="Sophisticated text editor for code, markup and prose" 3.36 +MAINTAINER="al.bobylev@gmail.com" 3.37 +LICENSE="non-free" 3.38 +WEB_SITE="http://www.sublimetext.com/3" 3.39 + 3.40 +DEPENDS="" 3.41 +EOR 3.42 + 3.43 +# make files.list 3.44 +cd $1/ 3.45 +find opt/sublime_text -type f > "$PKGDIR/files.list" 3.46 +echo 'usr/share/applications/sublime_text.desktop' >> "$PKGDIR/files.list" 3.47 +find usr/share/icons/hicolor -name sublime-text.png >> "$PKGDIR/files.list" 3.48 +sed -i 's|.*|/\0|' $PKGDIR/files.list 3.49 + 3.50 +# make md5sum 3.51 +while read file; do 3.52 + md5sum "$1$file" >> $PKGDIR/md5sum 3.53 +done < $PKGDIR/files.list