wok-next diff slitaz-dev-tools/receipt @ rev 21040

mariadb 10.3.10 (again)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 09 09:48:29 2018 +0200 (2018-11-09)
parents d5aab818505e
children aa1e58c82d61
line diff
     1.1 --- a/slitaz-dev-tools/receipt	Fri Nov 02 14:15:08 2018 +0200
     1.2 +++ b/slitaz-dev-tools/receipt	Fri Nov 09 09:48:29 2018 +0200
     1.3 @@ -1,15 +1,188 @@
     1.4 -# SliTaz package receipt
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="slitaz-dev-tools"
     1.8 -VERSION="266"
     1.9 +VERSION="306"
    1.10  CATEGORY="meta"
    1.11 -SHORT_DESC="SliTaz developers tools meta package"
    1.12 +SHORT_DESC="SliTaz developers tools"
    1.13  MAINTAINER="devel@slitaz.org"
    1.14 -LICENSE="GPL2"
    1.15 +LICENSE="GPL2 GPL3 BSD"
    1.16  WEB_SITE="http://www.slitaz.org/"
    1.17 +HOST_ARCH="any"
    1.18  REPOLOGY="-"
    1.19  
    1.20 -SIBLINGS="mirror-tools qemu-box slitaz-mercurial-style slitaz-mercurial-style \
    1.21 -tazchroot tazdev tazwikiss yaff"
    1.22 +TARBALL="slitaz-dev-tools-$VERSION.tar.bz2"
    1.23 +WGET_URL="http://hg.slitaz.org/slitaz-dev-tools/archive/$VERSION.tar.bz2"
    1.24  
    1.25 -DEPENDS="rsync tazdev mercurial"
    1.26 +SPLIT="mirror-tools:mt qemu-box:qb slitaz-mercurial-style:sms tazdev:td \
    1.27 +tazwikiss:tw yaff:ya"
    1.28 +
    1.29 +compile_rules() {
    1.30 +	case $SET in
    1.31 +		'')
    1.32 +			mkdir -p $install
    1.33 +			;;
    1.34 +		mt)
    1.35 +			mkdir -p $install/var/www/
    1.36 +			cp -r mirror-tools/rootfs/* $install
    1.37 +			cp -r mirror-tools/slitaz $install/var/www/
    1.38 +			chown -R 80.80 $install/var/www
    1.39 +			;;
    1.40 +		qb)
    1.41 +			cd qemu-box
    1.42 +			make DESTDIR=$install install
    1.43 +			;;
    1.44 +		sms)
    1.45 +			PYTHON_LIB=python$(. $WOK/python/receipt; echo ${VERSION%.*})
    1.46 +			mkdir -p $install/usr/lib/$PYTHON_LIB/site-packages/mercurial
    1.47 +			cp -a slitaz-mercurial-style/templates \
    1.48 +				$install/usr/lib/$PYTHON_LIB/site-packages/mercurial
    1.49 +			;;
    1.50 +		td)
    1.51 +			install -Dm755 tazdev/tazdev      $install/usr/bin/tazdev
    1.52 +			install -Dm644 tazdev/tazdev.conf $install/etc/slitaz/tazdev.conf
    1.53 +			;;
    1.54 +		tw)
    1.55 +			mkdir -p $install
    1.56 +			cp -r tazwikiss/rootfs/* $install
    1.57 +			chown -R 80.80 $install/var/www/
    1.58 +
    1.59 +			# escape '?'
    1.60 +			sed -i 's|\?|\\?|' $install/usr/share/applications/tazcalc.desktop
    1.61 +			;;
    1.62 +		ya)
    1.63 +			install -Dm755 baba-scripts/yaff          $install/usr/bin/yaff
    1.64 +			install -Dm644 baba-scripts/mozicon24.png $install/usr/share/icons/hicolor/24x24/apps/mozicon24.png
    1.65 +			install -Dm644 baba-scripts/yaff.png      $install/usr/share/icons/hicolor/128x128/apps/yaff.png
    1.66 +			;;
    1.67 +	esac
    1.68 +}
    1.69 +
    1.70 +genpkg_rules() {
    1.71 +	case $PACKAGE in
    1.72 +		slitaz-dev-tools)
    1.73 +			DEPENDS="rsync tazdev mercurial"
    1.74 +			CAT="meta|meta package"
    1.75 +			LICENSE="GPL2"
    1.76 +			;;
    1.77 +		mirror-tools)
    1.78 +			copy @std include/
    1.79 +			DEPENDS="rrdtool rgzip"
    1.80 +			CAT="misc|mirrors toolset"
    1.81 +			LICENSE="BSD"
    1.82 +			;;
    1.83 +		qemu-box)
    1.84 +			copy @std
    1.85 +			DEPENDS="qemu-light"
    1.86 +			CAT="development|Qemu frontend"
    1.87 +			LICENSE="BSD"
    1.88 +			;;
    1.89 +		slitaz-mercurial-style)
    1.90 +			copy @std
    1.91 +			DEPENDS="mercurial"
    1.92 +			CAT="misc|template for Mercurial Web repos"
    1.93 +			LICENSE="GPL3"
    1.94 +			;;
    1.95 +		tazdev)
    1.96 +			copy @std
    1.97 +			DEPENDS="rsync"
    1.98 +			CAT="development|developers tools"
    1.99 +			LICENSE="BSD"
   1.100 +			;;
   1.101 +		tazwikiss)
   1.102 +			copy @std
   1.103 +			DEPENDS="busybox slitaz-base-files"
   1.104 +			CAT="office|Tiny SliTaz Wiki"
   1.105 +			LICENSE="BSD"
   1.106 +			CONFIG_FILES="/var/www/wiki/config.sh /var/www/wiki/config-de.sh \
   1.107 +			/var/www/wiki/config-fr.sh"
   1.108 +			;;
   1.109 +		yaff)
   1.110 +			copy @std *.png # 24x24 & 128x128 icons only
   1.111 +			DEPENDS="gtkdialog"
   1.112 +			CAT="utilities|Mozilla Firefox multi-launcher"
   1.113 +			LICENSE="BSD"
   1.114 +			;;
   1.115 +	esac
   1.116 +}
   1.117 +
   1.118 +post_install_tazwikiss() {
   1.119 +	server="busybox"
   1.120 +
   1.121 +	# Configure lighttpd server
   1.122 +	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
   1.123 +		server="lighttpd"
   1.124 +		if ! grep -q '"/wiki/"' "$1/etc/lighttpd/lighttpd.conf"; then
   1.125 +			sed -e 's|# Fast CGI|$HTTP["url"] =~ "/wiki/" {\
   1.126 +  cgi.assign = (\
   1.127 +    ".sh" => "/bin/sh"\
   1.128 +  )\
   1.129 +  index-file.names = ( "index.sh" )\
   1.130 + }\n\n&|' -i "$1/etc/lighttpd/lighttpd.conf"
   1.131 +			if [ -z "$1" ]; then
   1.132 +				echo
   1.133 +				# Start Web server.
   1.134 +				/etc/init.d/lighttpd stop
   1.135 +				/etc/init.d/lighttpd start
   1.136 +			fi
   1.137 +		fi
   1.138 +	fi
   1.139 +
   1.140 +	# Configure apache server
   1.141 +	if [ -f "$1/etc/apache/httpd.conf" ]; then
   1.142 +		server="apache"
   1.143 +		if [ ! -f "$1/etc/apache/conf.d/tazwikiss" ]; then
   1.144 +			cat > "$1/etc/apache/conf.d/tazwikiss" <<EOT
   1.145 +<DirectoryMatch /var/www/wiki/>
   1.146 +    Options +ExecCGI
   1.147 +    AddHandler cgi-script .sh
   1.148 +    DirectoryIndex index.sh
   1.149 +    AllowOverride None
   1.150 +    Order allow,deny
   1.151 +    Allow from all
   1.152 +</DirectoryMatch>
   1.153 +EOT
   1.154 +			if [ -z "$1" ]; then
   1.155 +				echo
   1.156 +				# Start Web server.
   1.157 +				/etc/init.d/apache stop
   1.158 +				/etc/init.d/apache start
   1.159 +			fi
   1.160 +		fi
   1.161 +	fi
   1.162 +
   1.163 +	# Configure busybox/httpd server by default
   1.164 +	if [ "$server" == "busybox" ]; then
   1.165 +		sed -i 's/lighttpd/httpd/' "$1/etc/rcS.conf"
   1.166 +		if [ ! -s "$1/etc/httpd.conf" ]; then
   1.167 +			cat > "$1/etc/httpd.conf" <<EOT
   1.168 +H:/var/www
   1.169 +A:0.0.0.0/0
   1.170 +.xml:text/xml
   1.171 +.tgz:application/x-tgz
   1.172 +.tar.gz:application/x-tgz
   1.173 +.tazpkg:application/x-tazpkg
   1.174 +EOT
   1.175 +		fi
   1.176 +		while read line; do
   1.177 +			grep -q "$line" "$1/etc/httpd.conf" && continue
   1.178 +			echo "$line" >> "$1/etc/httpd.conf"
   1.179 +		done <<EOT
   1.180 +*.sh:/bin/sh
   1.181 +EOT
   1.182 +		grep -q ' httpd ' "$1/etc/rcS.conf" ||
   1.183 +		sed -i 's/ slim"/ httpd slim"/' "$1/etc/rcS.conf"
   1.184 +		if [ -z "$1" ]; then
   1.185 +			echo
   1.186 +			# Start Web server.
   1.187 +			/etc/init.d/httpd stop
   1.188 +			/etc/init.d/httpd start
   1.189 +		fi
   1.190 +	fi
   1.191 +
   1.192 +	[ -n "$quiet" ] || cat <<EOT
   1.193 +
   1.194 +	.----------------------------------------------.
   1.195 +	| The default password to edit pages is 'test' |
   1.196 +	'----------------------------------------------'
   1.197 +EOT
   1.198 +}