wok-next view firefox/receipt @ rev 21506
updated augeas (1.11.0 -> 1.12.0)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jun 19 08:02:39 2020 +0100 (2020-06-19) |
parents | 82b613cfd1e0 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="firefox"
4 VERSION="17.0.11esr"
5 CATEGORY="network"
6 SHORT_DESC="User friendly, secure and fast web browser"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="MPL2"
9 WEB_SITE="https://www.mozilla.org/en-US/firefox/"
11 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
12 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
14 BUILD_DEPENDS="alsa-lib-dev coreutils dbus-dev dbus-glib-dev findutils
15 glib-dev gtk2-dev gzip libevent-dev libffi-dev libidl
16 libjpeg-turbo-dev libvpx-dev mesa-dev nss-dev pango-dev perl
17 python sqlite3-dev tar wireless_tools-dev yasm zip"
18 SPLIT="$PACKAGE-dev libfirefox"
20 # A long compile time... dont forget to build libidl before and check the
21 # .mozconfig file from the stuff and the stuff/README document.
22 #
23 # WARNING: 1GB RAM minimum. Additional RAM will significantly decrease
24 # build time.
25 # At least 2.5 GB free disk space
27 compile_rules()
28 {
29 # load mozconfig
30 cp -a $stuff/mozconfig $src
32 # build firefox and create a firefox tarball
33 # reducing log size: hide c++, nsinstall, python msgs
34 # Exception... Component returned failure code: known bug #696763
35 make -f client.mk | egrep -v "c++|nsinstall|python" &&
36 make -C obj-firefox/browser/installer
38 # install
39 # locate tarball
40 local tarball tarpath fn1 fn2
41 tarpath=$src/obj-firefox/dist
42 fn1="$tarpath/firefox-${VERSION%esr}.en-US.linux-$ARCH.tar.bz2"
43 fn2="$tarpath/firefox-${VERSION%esr}.en-US.linux-$(uname -m).tar.bz2"
44 [ -e "$fn1" ] && tarball="$fn1" && echo "$ARCH tarball found"
45 [ -e "$fn2" ] && tarball="$fn2" && echo "$(uname -m) tarball found"
46 [ -z "$tarball" ] && echo "ERROR: tarball not found" && return 1
47 # extract tarball
48 mkdir -p $install/usr/lib/firefox-$VERSION &&
49 tar -xvf $tarball -C $install/usr/lib/firefox-$VERSION \
50 --strip-components=1 &&
51 chown -R -v root:root $install/usr/lib/firefox-$VERSION &&
52 chmod -v 755 $install/usr/lib/firefox-$VERSION/libxpcom.so &&
53 # install symlink in /usr/bin
54 mkdir -p $install/usr/bin &&
55 ln -sf ../lib/firefox-$VERSION/firefox $install/usr/bin &&
56 # install symlink for plugins
57 mkdir -p $install/usr/lib/mozilla/plugins &&
58 ln -sf ../mozilla/plugins $install/usr/lib/firefox-$VERSION
59 }
61 genpkg_rules()
62 {
63 case $PACKAGE in
64 firefox)
65 # program
66 mkdir -p $fs/usr/lib &&
67 cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib &&
68 cp -a $install/usr/lib/mozilla $fs/usr/lib &&
69 cp -a $install/usr/bin $fs/usr
71 # search Plugin (by: oddball)
72 cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION
74 # prefs
75 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution &&
76 cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution
78 # mozilla-common files
79 # dictionaries
80 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries &&
81 ln -sf ../mozilla-common-$VERSION/dictionaries \
82 $fs/usr/lib/$PACKAGE-$VERSION/dictionaries
83 # plugin-container
84 rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container &&
85 ln -sf ../mozilla-common-$VERSION/plugin-container \
86 $fs/usr/lib/$PACKAGE-$VERSION/plugin-container
87 # mozilla-xremote-client
88 rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client &&
89 ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \
90 $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client
91 # components/libdbusservice.so
92 # components/libmozgnome.so
93 for file in libdbusservice.so libmozgnome.so; do
94 rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file &&
95 ln -sf ../../mozilla-common-$VERSION/components/$file \
96 $fs/usr/lib/$PACKAGE-$VERSION/components/$file
97 done
98 # chrome.manifest
99 rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest &&
100 ln -sf ../mozilla-common-$VERSION/chrome.manifest \
101 $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest
103 # run-mozilla.sh
104 rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh &&
105 ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \
106 $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh
108 # libmozalloc.so
109 rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so &&
110 ln -sf ../mozilla-common-$VERSION/libmozalloc.so \
111 $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so
113 chown -R root.root $fs
114 DEPENDS="gtk2 sqlite3 dbus dbus-glib glib jpeg libx11 \
115 libxdamage alsa-lib libxt libevent libvpx pango nss \
116 libfirefox"
117 TAGS="web-browser"
118 ;;
119 *-dev)
120 DEPENDS="alsa-lib sqlite3 libcairo dbus-glib pango atk glib libxt \
121 libxinerama libxcursor libxcomposite libxext \
122 libxdamage libxcb libsm libice"
123 mkdir -p $fs/usr/include/$WANTED-$VERSION
124 cp -rL $src/obj-firefox/dist/include/* $fs/usr/include/$WANTED-$VERSION
126 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/bin/ply
127 cp -rL $src/obj-firefox/dist/sdk/bin/*.py \
128 $fs/usr/lib/$WANTED-devel/sdk/bin
129 cp -rL $src/obj-firefox/dist/sdk/bin/ply/*.py \
130 $fs/usr/lib/$WANTED-devel/sdk/bin/ply
131 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/lib
132 cp -rL $src/obj-firefox/dist/sdk/lib/* \
133 $fs/usr/lib/$WANTED-devel/sdk/lib
135 # mkdir -v $fs/usr/include/$WANTED-$VERSION/npapi
136 # cp -a $src/dom/plugins/base/*.h $fs/usr/include/$WANTED-$VERSION/npapi
138 # /usr/share/idl folder should also be in firefox-dev
139 mkdir -p $fs/usr/share/$WANTED-$VERSION/idl
140 cp -rL $src/obj-firefox/dist/idl/* $fs/usr/share/$WANTED-$VERSION/idl
142 # copy missing *.pc files
143 mkdir -p $fs/usr/lib/pkgconfig
144 cp -a $stuff/*.pc $fs/usr/lib/pkgconfig
145 # fix version
146 sed -i "s/VERSION/$VERSION/" $fs/usr/lib/pkgconfig/*
147 ;;
148 libfirefox)
149 CAT="network|firefox/thunderbird common files"
150 DEPENDS="gtk2 sqlite3 dbus dbus-glib glib jpeg libx11 \
151 libxdamage alsa-lib libxt"
152 # dictionaries/en-US.aff
153 # dictionaries/en-US.dic
154 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/dictionaries
155 # cp -a $install/usr/lib/firefox-$VERSION/dictionaries \
156 # $fs/usr/lib/mozilla-common-$VERSION
158 # plugin-container
159 cp -a $install/usr/lib/firefox-$VERSION/plugin-container \
160 $fs/usr/lib/mozilla-common-$VERSION
162 # mozilla-xremote-client
163 cp -a $install/usr/lib/firefox-$VERSION/mozilla-xremote-client \
164 $fs/usr/lib/mozilla-common-$VERSION
166 # components/libdbusservice.so
167 # components/libmozgnome.so
168 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/components
169 for file in libdbusservice.so libmozgnome.so; do
170 cp -a $install/usr/lib/firefox-$VERSION/components/$file \
171 $fs/usr/lib/mozilla-common-$VERSION/components
172 done
174 # chrome.manifest
175 cp -a $install/usr/lib/firefox-$VERSION/chrome.manifest \
176 $fs/usr/lib/mozilla-common-$VERSION
178 # run-mozilla.sh
179 cp -a $install/usr/lib/firefox-$VERSION/run-mozilla.sh \
180 $fs/usr/lib/mozilla-common-$VERSION
182 # libmozalloc.so
183 cp -a $install/usr/lib/firefox-$VERSION/libmozalloc.so \
184 $fs/usr/lib/mozilla-common-$VERSION
185 ;;
186 esac
187 }
189 post_install_firefox_dev()
190 {
191 for i in usr/share/idl/firefox- usr/include/firefox- usr/lib/firefox-devel-
192 do
193 for j in $(ls -d "$1"/$i* 2>/dev/null)
194 do
195 [ "${j##*-}" = "$VERSION" ] && continue
196 [ ! -d "$j" ] || rm -rf "$j"
197 done
198 done
199 }