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