wok-next annotate 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 |
rev | line source |
---|---|
al@21021 | 1 # SliTaz package receipt v2. |
pankso@3440 | 2 |
pankso@3440 | 3 PACKAGE="slitaz-dev-tools" |
al@21021 | 4 VERSION="306" |
pankso@8832 | 5 CATEGORY="meta" |
al@21021 | 6 SHORT_DESC="SliTaz developers tools" |
al@21020 | 7 MAINTAINER="devel@slitaz.org" |
al@21021 | 8 LICENSE="GPL2 GPL3 BSD" |
pankso@3440 | 9 WEB_SITE="http://www.slitaz.org/" |
al@21021 | 10 HOST_ARCH="any" |
al@20888 | 11 REPOLOGY="-" |
pankso@3440 | 12 |
al@21021 | 13 TARBALL="slitaz-dev-tools-$VERSION.tar.bz2" |
al@21021 | 14 WGET_URL="http://hg.slitaz.org/slitaz-dev-tools/archive/$VERSION.tar.bz2" |
al@19588 | 15 |
al@21021 | 16 SPLIT="mirror-tools:mt qemu-box:qb slitaz-mercurial-style:sms tazdev:td \ |
al@21021 | 17 tazwikiss:tw yaff:ya" |
al@21021 | 18 |
al@21021 | 19 compile_rules() { |
al@21021 | 20 case $SET in |
al@21021 | 21 '') |
al@21021 | 22 mkdir -p $install |
al@21021 | 23 ;; |
al@21021 | 24 mt) |
al@21021 | 25 mkdir -p $install/var/www/ |
al@21021 | 26 cp -r mirror-tools/rootfs/* $install |
al@21021 | 27 cp -r mirror-tools/slitaz $install/var/www/ |
al@21021 | 28 chown -R 80.80 $install/var/www |
al@21021 | 29 ;; |
al@21021 | 30 qb) |
al@21021 | 31 cd qemu-box |
al@21021 | 32 make DESTDIR=$install install |
al@21021 | 33 ;; |
al@21021 | 34 sms) |
al@21021 | 35 PYTHON_LIB=python$(. $WOK/python/receipt; echo ${VERSION%.*}) |
al@21021 | 36 mkdir -p $install/usr/lib/$PYTHON_LIB/site-packages/mercurial |
al@21021 | 37 cp -a slitaz-mercurial-style/templates \ |
al@21021 | 38 $install/usr/lib/$PYTHON_LIB/site-packages/mercurial |
al@21021 | 39 ;; |
al@21021 | 40 td) |
al@21021 | 41 install -Dm755 tazdev/tazdev $install/usr/bin/tazdev |
al@21021 | 42 install -Dm644 tazdev/tazdev.conf $install/etc/slitaz/tazdev.conf |
al@21021 | 43 ;; |
al@21021 | 44 tw) |
al@21021 | 45 mkdir -p $install |
al@21021 | 46 cp -r tazwikiss/rootfs/* $install |
al@21021 | 47 chown -R 80.80 $install/var/www/ |
al@21021 | 48 |
al@21021 | 49 # escape '?' |
al@21021 | 50 sed -i 's|\?|\\?|' $install/usr/share/applications/tazcalc.desktop |
al@21021 | 51 ;; |
al@21021 | 52 ya) |
al@21021 | 53 install -Dm755 baba-scripts/yaff $install/usr/bin/yaff |
al@21021 | 54 install -Dm644 baba-scripts/mozicon24.png $install/usr/share/icons/hicolor/24x24/apps/mozicon24.png |
al@21021 | 55 install -Dm644 baba-scripts/yaff.png $install/usr/share/icons/hicolor/128x128/apps/yaff.png |
al@21021 | 56 ;; |
al@21021 | 57 esac |
al@21021 | 58 } |
al@21021 | 59 |
al@21021 | 60 genpkg_rules() { |
al@21021 | 61 case $PACKAGE in |
al@21021 | 62 slitaz-dev-tools) |
al@21021 | 63 DEPENDS="rsync tazdev mercurial" |
al@21021 | 64 CAT="meta|meta package" |
al@21021 | 65 LICENSE="GPL2" |
al@21021 | 66 ;; |
al@21021 | 67 mirror-tools) |
al@21021 | 68 copy @std include/ |
al@21021 | 69 DEPENDS="rrdtool rgzip" |
al@21021 | 70 CAT="misc|mirrors toolset" |
al@21021 | 71 LICENSE="BSD" |
al@21021 | 72 ;; |
al@21021 | 73 qemu-box) |
al@21021 | 74 copy @std |
al@21021 | 75 DEPENDS="qemu-light" |
al@21021 | 76 CAT="development|Qemu frontend" |
al@21021 | 77 LICENSE="BSD" |
al@21021 | 78 ;; |
al@21021 | 79 slitaz-mercurial-style) |
al@21021 | 80 copy @std |
al@21021 | 81 DEPENDS="mercurial" |
al@21021 | 82 CAT="misc|template for Mercurial Web repos" |
al@21021 | 83 LICENSE="GPL3" |
al@21021 | 84 ;; |
al@21021 | 85 tazdev) |
al@21021 | 86 copy @std |
al@21021 | 87 DEPENDS="rsync" |
al@21021 | 88 CAT="development|developers tools" |
al@21021 | 89 LICENSE="BSD" |
al@21021 | 90 ;; |
al@21021 | 91 tazwikiss) |
al@21021 | 92 copy @std |
al@21021 | 93 DEPENDS="busybox slitaz-base-files" |
al@21021 | 94 CAT="office|Tiny SliTaz Wiki" |
al@21021 | 95 LICENSE="BSD" |
al@21021 | 96 CONFIG_FILES="/var/www/wiki/config.sh /var/www/wiki/config-de.sh \ |
al@21021 | 97 /var/www/wiki/config-fr.sh" |
al@21021 | 98 ;; |
al@21021 | 99 yaff) |
al@21021 | 100 copy @std *.png # 24x24 & 128x128 icons only |
al@21021 | 101 DEPENDS="gtkdialog" |
al@21021 | 102 CAT="utilities|Mozilla Firefox multi-launcher" |
al@21021 | 103 LICENSE="BSD" |
al@21021 | 104 ;; |
al@21021 | 105 esac |
al@21021 | 106 } |
al@21021 | 107 |
al@21021 | 108 post_install_tazwikiss() { |
al@21021 | 109 server="busybox" |
al@21021 | 110 |
al@21021 | 111 # Configure lighttpd server |
al@21021 | 112 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
al@21021 | 113 server="lighttpd" |
al@21021 | 114 if ! grep -q '"/wiki/"' "$1/etc/lighttpd/lighttpd.conf"; then |
al@21021 | 115 sed -e 's|# Fast CGI|$HTTP["url"] =~ "/wiki/" {\ |
al@21021 | 116 cgi.assign = (\ |
al@21021 | 117 ".sh" => "/bin/sh"\ |
al@21021 | 118 )\ |
al@21021 | 119 index-file.names = ( "index.sh" )\ |
al@21021 | 120 }\n\n&|' -i "$1/etc/lighttpd/lighttpd.conf" |
al@21021 | 121 if [ -z "$1" ]; then |
al@21021 | 122 echo |
al@21021 | 123 # Start Web server. |
al@21021 | 124 /etc/init.d/lighttpd stop |
al@21021 | 125 /etc/init.d/lighttpd start |
al@21021 | 126 fi |
al@21021 | 127 fi |
al@21021 | 128 fi |
al@21021 | 129 |
al@21021 | 130 # Configure apache server |
al@21021 | 131 if [ -f "$1/etc/apache/httpd.conf" ]; then |
al@21021 | 132 server="apache" |
al@21021 | 133 if [ ! -f "$1/etc/apache/conf.d/tazwikiss" ]; then |
al@21021 | 134 cat > "$1/etc/apache/conf.d/tazwikiss" <<EOT |
al@21021 | 135 <DirectoryMatch /var/www/wiki/> |
al@21021 | 136 Options +ExecCGI |
al@21021 | 137 AddHandler cgi-script .sh |
al@21021 | 138 DirectoryIndex index.sh |
al@21021 | 139 AllowOverride None |
al@21021 | 140 Order allow,deny |
al@21021 | 141 Allow from all |
al@21021 | 142 </DirectoryMatch> |
al@21021 | 143 EOT |
al@21021 | 144 if [ -z "$1" ]; then |
al@21021 | 145 echo |
al@21021 | 146 # Start Web server. |
al@21021 | 147 /etc/init.d/apache stop |
al@21021 | 148 /etc/init.d/apache start |
al@21021 | 149 fi |
al@21021 | 150 fi |
al@21021 | 151 fi |
al@21021 | 152 |
al@21021 | 153 # Configure busybox/httpd server by default |
al@21021 | 154 if [ "$server" == "busybox" ]; then |
al@21021 | 155 sed -i 's/lighttpd/httpd/' "$1/etc/rcS.conf" |
al@21021 | 156 if [ ! -s "$1/etc/httpd.conf" ]; then |
al@21021 | 157 cat > "$1/etc/httpd.conf" <<EOT |
al@21021 | 158 H:/var/www |
al@21021 | 159 A:0.0.0.0/0 |
al@21021 | 160 .xml:text/xml |
al@21021 | 161 .tgz:application/x-tgz |
al@21021 | 162 .tar.gz:application/x-tgz |
al@21021 | 163 .tazpkg:application/x-tazpkg |
al@21021 | 164 EOT |
al@21021 | 165 fi |
al@21021 | 166 while read line; do |
al@21021 | 167 grep -q "$line" "$1/etc/httpd.conf" && continue |
al@21021 | 168 echo "$line" >> "$1/etc/httpd.conf" |
al@21021 | 169 done <<EOT |
al@21021 | 170 *.sh:/bin/sh |
al@21021 | 171 EOT |
al@21021 | 172 grep -q ' httpd ' "$1/etc/rcS.conf" || |
al@21021 | 173 sed -i 's/ slim"/ httpd slim"/' "$1/etc/rcS.conf" |
al@21021 | 174 if [ -z "$1" ]; then |
al@21021 | 175 echo |
al@21021 | 176 # Start Web server. |
al@21021 | 177 /etc/init.d/httpd stop |
al@21021 | 178 /etc/init.d/httpd start |
al@21021 | 179 fi |
al@21021 | 180 fi |
al@21021 | 181 |
al@21021 | 182 [ -n "$quiet" ] || cat <<EOT |
al@21021 | 183 |
al@21021 | 184 .----------------------------------------------. |
al@21021 | 185 | The default password to edit pages is 'test' | |
al@21021 | 186 '----------------------------------------------' |
al@21021 | 187 EOT |
al@21021 | 188 } |