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