wok-next diff firefox/receipt @ rev 20170
firefox: receipt v2
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 01 20:21:41 2017 +0100 (2017-11-01) |
parents | 2809ecb8c754 |
children | 48817c16eab3 |
line diff
1.1 --- a/firefox/receipt Sun Oct 29 09:27:29 2017 +0100 1.2 +++ b/firefox/receipt Wed Nov 01 20:21:41 2017 +0100 1.3 @@ -1,4 +1,4 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="firefox" 1.8 VERSION="17.0.11esr" 1.9 @@ -16,6 +16,7 @@ 1.10 BUILD_DEPENDS="zip libIDL coreutils findutils wireless_tools-dev \ 1.11 perl python yasm alsa-lib-dev mesa-dev libevent-dev libvpx-dev dbus-dev \ 1.12 dbus-glib-dev gtk+-dev glib-dev pango-dev nss-dev sqlite3-dev tar gzip" 1.13 +SPLIT="firefox firefox-dev libfirefox" 1.14 1.15 # Rules to configure and make the package. 1.16 # 1.17 @@ -28,7 +29,6 @@ 1.18 1.19 compile_rules() 1.20 { 1.21 - cd $src 1.22 # load mozconfig 1.23 cp -a $stuff/mozconfig $src 1.24 1.25 @@ -64,73 +64,182 @@ 1.26 # Rules to gen a SliTaz package suitable for Tazpkg. 1.27 genpkg_rules() 1.28 { 1.29 - # program 1.30 - printf "Installing program.." 1.31 - mkdir -p $fs/usr/lib && 1.32 - cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib && 1.33 - cp -a $install/usr/lib/mozilla $fs/usr/lib && 1.34 - cp -a $install/usr/bin $fs/usr 1.35 - status 1.36 + case $PACKAGE in 1.37 + firefox) 1.38 + # program 1.39 + printf "Installing program.." 1.40 + mkdir -p $fs/usr/lib && 1.41 + cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib && 1.42 + cp -a $install/usr/lib/mozilla $fs/usr/lib && 1.43 + cp -a $install/usr/bin $fs/usr 1.44 + status 1.45 1.46 - # search Plugin (by: oddball) 1.47 - printf "Installing SliTaz search plugins.." 1.48 - cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION 1.49 - status 1.50 + # search Plugin (by: oddball) 1.51 + printf "Installing SliTaz search plugins.." 1.52 + cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION 1.53 + status 1.54 1.55 - # prefs 1.56 - printf "Installing SliTaz preferences.." 1.57 - mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution && 1.58 - cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution 1.59 - status 1.60 + # prefs 1.61 + printf "Installing SliTaz preferences.." 1.62 + mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution && 1.63 + cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution 1.64 + status 1.65 1.66 - # mozilla-common files 1.67 - # dictionaries 1.68 - printf "Installing common dictionnaries.." 1.69 - rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries && 1.70 - ln -sf ../mozilla-common-$VERSION/dictionaries \ 1.71 - $fs/usr/lib/$PACKAGE-$VERSION/dictionaries 1.72 - status 1.73 - # plugin-container 1.74 - printf "Installing common plugin-container" 1.75 - rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container && 1.76 - ln -sf ../mozilla-common-$VERSION/plugin-container \ 1.77 - $fs/usr/lib/$PACKAGE-$VERSION/plugin-container 1.78 - status 1.79 - # mozilla-xremote-client 1.80 - printf "Installing common mozilla-xremote-client" 1.81 - rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client && 1.82 - ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \ 1.83 - $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client 1.84 - status 1.85 - # components/libdbusservice.so 1.86 - # components/libmozgnome.so 1.87 - for file in libdbusservice.so libmozgnome.so; do 1.88 - printf "Installing common components/$file" 1.89 - rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file && 1.90 - ln -sf ../../mozilla-common-$VERSION/components/$file \ 1.91 - $fs/usr/lib/$PACKAGE-$VERSION/components/$file 1.92 + # mozilla-common files 1.93 + # dictionaries 1.94 + printf "Installing common dictionnaries.." 1.95 + rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries && 1.96 + ln -sf ../mozilla-common-$VERSION/dictionaries \ 1.97 + $fs/usr/lib/$PACKAGE-$VERSION/dictionaries 1.98 status 1.99 + # plugin-container 1.100 + printf "Installing common plugin-container" 1.101 + rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container && 1.102 + ln -sf ../mozilla-common-$VERSION/plugin-container \ 1.103 + $fs/usr/lib/$PACKAGE-$VERSION/plugin-container 1.104 + status 1.105 + # mozilla-xremote-client 1.106 + printf "Installing common mozilla-xremote-client" 1.107 + rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client && 1.108 + ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \ 1.109 + $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client 1.110 + status 1.111 + # components/libdbusservice.so 1.112 + # components/libmozgnome.so 1.113 + for file in libdbusservice.so libmozgnome.so; do 1.114 + printf "Installing common components/$file" 1.115 + rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file && 1.116 + ln -sf ../../mozilla-common-$VERSION/components/$file \ 1.117 + $fs/usr/lib/$PACKAGE-$VERSION/components/$file 1.118 + status 1.119 + done 1.120 + # chrome.manifest 1.121 + printf "Installing common chrome.manifest" 1.122 + rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest && 1.123 + ln -sf ../mozilla-common-$VERSION/chrome.manifest \ 1.124 + $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest 1.125 + status 1.126 + 1.127 + # run-mozilla.sh 1.128 + printf "Installing common run-mozilla.sh" 1.129 + rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh && 1.130 + ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \ 1.131 + $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh 1.132 + status 1.133 + 1.134 + # libmozalloc.so 1.135 + printf "Installing common libmozalloc.so" 1.136 + rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so && 1.137 + ln -sf ../mozilla-common-$VERSION/libmozalloc.so \ 1.138 + $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so 1.139 + status 1.140 + 1.141 + chown -R root.root $fs 1.142 + ;; 1.143 + firefox-dev) 1.144 + CAT="development|firefox devel files" 1.145 + DEPENDS="alsa-lib sqlite3 cairo dbus-glib pango atk \ 1.146 + glib xorg-libXt xorg-libXinerama \ 1.147 + xorg-libXcursor xorg-libXcomposite xorg-libXext \ 1.148 + xorg-libXdamage libxcb xorg-libSM xorg-libICE pkg-config" 1.149 + printf "Installing include files.." 1.150 + mkdir -p $fs/usr/include/$WANTED-$VERSION && 1.151 + cp -rL $src/obj-firefox/dist/include/* $fs/usr/include/$WANTED-$VERSION 1.152 + status 1.153 + 1.154 + printf "Installing libs files.." 1.155 + mkdir -p $fs/usr/lib/$WANTED-devel/sdk/bin/ply && 1.156 + cp -rL $src/obj-firefox/dist/sdk/bin/*.py \ 1.157 + $fs/usr/lib/$WANTED-devel/sdk/bin && 1.158 + cp -rL $src/obj-firefox/dist/sdk/bin/ply/*.py \ 1.159 + $fs/usr/lib/$WANTED-devel/sdk/bin/ply && 1.160 + mkdir -p $fs/usr/lib/$WANTED-devel/sdk/lib && 1.161 + cp -rL $src/obj-firefox/dist/sdk/lib/* \ 1.162 + $fs/usr/lib/$WANTED-devel/sdk/lib 1.163 + status 1.164 + 1.165 +# printf "Installing npapi files.." 1.166 +# mkdir -v $fs/usr/include/$WANTED-$VERSION/npapi && 1.167 +# cp -a $src/dom/plugins/base/*.h $fs/usr/include/$WANTED-$VERSION/npapi 1.168 +# status 1.169 + 1.170 + # /usr/share/idl folder should also be in firefox-dev 1.171 + printf "Installing idl files.." 1.172 + mkdir -p $fs/usr/share/$WANTED-$VERSION/idl && 1.173 + cp -rL $src/obj-firefox/dist/idl/* $fs/usr/share/$WANTED-$VERSION/idl 1.174 + status 1.175 + 1.176 + # copy missing *.pc files 1.177 + printf "Installing pkgconfig files.." 1.178 + mkdir -p $fs/usr/lib/pkgconfig && 1.179 + cp -a $stuff/*.pc $fs/usr/lib/pkgconfig && 1.180 + # fix version 1.181 + sed -i "s/VERSION/$VERSION/" $fs/usr/lib/pkgconfig/* 1.182 + status 1.183 + ;; 1.184 + libfirefox) 1.185 + CAT="network|firefox/thunderbird common files" 1.186 + DEPENDS="gtk+ sqlite3 dbus dbus-glib glib jpeg xorg-libX11 \ 1.187 + xorg-libXdamage alsa-lib xorg-libXt" 1.188 + # dictionaries/en-US.aff 1.189 + # dictionaries/en-US.dic 1.190 + printf "Installing dictionaries" 1.191 + mkdir -p $fs/usr/lib/mozilla-common-$VERSION/dictionaries 1.192 +# cp -a $install/usr/lib/firefox-$VERSION/dictionaries \ 1.193 +# $fs/usr/lib/mozilla-common-$VERSION 1.194 + status 1.195 + 1.196 + # plugin-container 1.197 + printf "Installing common plugin-container" 1.198 + cp -a $install/usr/lib/firefox-$VERSION/plugin-container \ 1.199 + $fs/usr/lib/mozilla-common-$VERSION 1.200 + status 1.201 + 1.202 + # mozilla-xremote-client 1.203 + printf "Installing common mozilla-xremote-client" 1.204 + cp -a $install/usr/lib/firefox-$VERSION/mozilla-xremote-client \ 1.205 + $fs/usr/lib/mozilla-common-$VERSION 1.206 + status 1.207 + 1.208 + # components/libdbusservice.so 1.209 + # components/libmozgnome.so 1.210 + mkdir -p $fs/usr/lib/mozilla-common-$VERSION/components 1.211 + for file in libdbusservice.so libmozgnome.so; do 1.212 + printf "Installing common components/$file" 1.213 + cp -a $install/usr/lib/firefox-$VERSION/components/$file \ 1.214 + $fs/usr/lib/mozilla-common-$VERSION/components 1.215 + status 1.216 + done 1.217 + 1.218 + # chrome.manifest 1.219 + printf "Installing common chrome.manifest" 1.220 + cp -a $install/usr/lib/firefox-$VERSION/chrome.manifest \ 1.221 + $fs/usr/lib/mozilla-common-$VERSION 1.222 + status 1.223 + 1.224 + # run-mozilla.sh 1.225 + printf "Installing common run-mozilla.sh" 1.226 + cp -a $install/usr/lib/firefox-$VERSION/run-mozilla.sh \ 1.227 + $fs/usr/lib/mozilla-common-$VERSION 1.228 + status 1.229 + 1.230 + # libmozalloc.so 1.231 + printf "Installing common libmozalloc.so" 1.232 + cp -a $install/usr/lib/firefox-$VERSION/libmozalloc.so \ 1.233 + $fs/usr/lib/mozilla-common-$VERSION 1.234 + status 1.235 + ;; 1.236 + esac 1.237 +} 1.238 + 1.239 +# Pre and post install commands for Tazpkg. 1.240 +post_install_firefox_dev() 1.241 +{ 1.242 + for i in usr/share/idl/firefox- usr/include/firefox- \ 1.243 + usr/lib/firefox-devel- ; do 1.244 + for j in $(ls -d "$1"/$i* 2>/dev/null); do 1.245 + [ "${j##*-}" = "$VERSION" ] && continue 1.246 + [ ! -d "$j" ] || rm -rf "$j" 1.247 + done 1.248 done 1.249 - # chrome.manifest 1.250 - printf "Installing common chrome.manifest" 1.251 - rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest && 1.252 - ln -sf ../mozilla-common-$VERSION/chrome.manifest \ 1.253 - $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest 1.254 - status 1.255 - 1.256 - # run-mozilla.sh 1.257 - printf "Installing common run-mozilla.sh" 1.258 - rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh && 1.259 - ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \ 1.260 - $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh 1.261 - status 1.262 - 1.263 - # libmozalloc.so 1.264 - printf "Installing common libmozalloc.so" 1.265 - rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so && 1.266 - ln -sf ../mozilla-common-$VERSION/libmozalloc.so \ 1.267 - $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so 1.268 - status 1.269 - 1.270 - chown -R root.root $fs 1.271 }