wok-next diff go/receipt @ rev 20234

Up linux-cloop (3.14)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 06 10:03:11 2017 +0100 (2017-11-06)
parents 14aaa769338b
children 8164c0612ccf
line diff
     1.1 --- a/go/receipt	Sun Mar 09 17:42:33 2014 +0100
     1.2 +++ b/go/receipt	Mon Nov 06 10:03:11 2017 +0100
     1.3 @@ -1,4 +1,4 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="go"
     1.8  VERSION="1.2.1"
     1.9 @@ -9,10 +9,9 @@
    1.10  WEB_SITE="http://www.golang.org"
    1.11  TARBALL="$PACKAGE$VERSION.src.tar.gz"
    1.12  WGET_URL="https://go.googlecode.com/files/$TARBALL"
    1.13 -TAGS="go"
    1.14  
    1.15 -DEPENDS=""
    1.16  BUILD_DEPENDS="bash bison make ed wget"
    1.17 +SPLIT="go emacs-pkg-go-mode go-sources"
    1.18  
    1.19  # Rules to configure and make the package.
    1.20  compile_rules()
    1.21 @@ -60,17 +59,68 @@
    1.22  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.23  genpkg_rules()
    1.24  {
    1.25 -	mkdir -p $fs/usr/lib/go/src
    1.26 -	# bin
    1.27 -	cp -a $src/bin $fs/usr
    1.28 -	# go tree
    1.29 -	cp -a $src/pkg $fs/usr/lib/go
    1.30 -	# lib
    1.31 -	cp -a $src/lib $fs/usr/lib/go
    1.32 -	# include
    1.33 -	cp -a $src/include $fs/usr/lib/go
    1.34 -	# pkg
    1.35 -	cp -a $src/src/pkg $fs/usr/lib/go/src
    1.36 -	cp -a $src/src/cmd $fs/usr/lib/go/src
    1.37 -	cp -a $src/src/lib9 $fs/usr/lib/go/src
    1.38 +	case $PACKAGE in
    1.39 +	go)
    1.40 +		TAGS="go"
    1.41 +		DEPENDS=""
    1.42 +		mkdir -p $fs/usr/lib/go/src
    1.43 +		# bin
    1.44 +		cp -a $src/bin $fs/usr
    1.45 +		# go tree
    1.46 +		cp -a $src/pkg $fs/usr/lib/go
    1.47 +		# lib
    1.48 +		cp -a $src/lib $fs/usr/lib/go
    1.49 +		# include
    1.50 +		cp -a $src/include $fs/usr/lib/go
    1.51 +		# pkg
    1.52 +		cp -a $src/src/pkg $fs/usr/lib/go/src
    1.53 +		cp -a $src/src/cmd $fs/usr/lib/go/src
    1.54 +		cp -a $src/src/lib9 $fs/usr/lib/go/src
    1.55 +		;;
    1.56 +	emacs-pkg-go-mode)
    1.57 +		CAT="development|An Emacs major mode for editing Go code."
    1.58 +		TAGS="emacs go"
    1.59 +		DEPENDS="emacs"
    1.60 +		echo -n "Installing start file"
    1.61 +		mkdir -p $fs/usr/share/emacs/site-lisp/site-start.d && \
    1.62 +		cp -a stuff/80-go-init.el $fs/usr/share/emacs/site-lisp/site-start.d
    1.63 +		status
    1.64 +
    1.65 +		echo -n "Installing go-mode"
    1.66 +		mkdir -p $fs/usr/share/emacs/site-lisp/go-mode && \
    1.67 +		cp -a $src/misc/emacs/* $fs/usr/share/emacs/site-lisp/go-mode
    1.68 +		status
    1.69 +		;;
    1.70 +	go-sources)
    1.71 +		CAT="development|The Go programming language - Sources files."
    1.72 +		TAGS="go"
    1.73 +		DEPENDS="go"
    1.74 +		# misc
    1.75 +		mkdir -p $fs/usr/lib/go/misc
    1.76 +		for dir in arm cgo goplay swig; do
    1.77 +			cp -a $src/misc/$dir $fs/usr/lib/go/misc
    1.78 +		done
    1.79 +
    1.80 +		# test
    1.81 +		cp -a $src/test/ $fs/usr/lib/go
    1.82 +
    1.83 +		# doc
    1.84 +		cp -a $src/doc/ $fs/usr/lib/go
    1.85 +
    1.86 +		# tools
    1.87 +		mkdir -p $fs/usr/lib/go/src
    1.88 +		cp -a $src/src/*.bash $fs/usr/lib/go/src
    1.89 +		cp -a $src/src/*.rc $fs/usr/lib/go/src
    1.90 +		;;
    1.91 +	esac
    1.92  }
    1.93 +
    1.94 +post_install_emacs_pkg_go_mode()
    1.95 +{
    1.96 +	chroot "$1/" tazpkg reconfigure emacs
    1.97 +}
    1.98 +
    1.99 +post_remove_emacs_pkg_go_mode()
   1.100 +{
   1.101 +	chroot "$1/" tazpkg reconfigure emacs
   1.102 +}