wok-next view firefox/receipt @ rev 20447

libxcb is obsolete -> xorg-libxcb
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Feb 28 13:56:24 2018 +0200 (2018-02-28)
parents 48817c16eab3
children d43bf7aae921
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="pankso@slitaz.org"
8 LICENSE="MPL2"
9 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
10 WEB_SITE="http://www.mozilla.org/firefox"
11 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
12 TAGS="web-browser"
14 DEPENDS="gtk+ sqlite3 dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage \
15 alsa-lib xorg-libXt libevent libvpx pango nss libfirefox"
16 BUILD_DEPENDS="zip libidl coreutils findutils wireless_tools-dev \
17 perl python yasm alsa-lib-dev mesa-dev libevent-dev libvpx-dev dbus-dev \
18 dbus-glib-dev gtk+-dev glib-dev pango-dev nss-dev sqlite3-dev tar gzip"
19 SPLIT="firefox firefox-dev libfirefox"
21 # Rules to configure and make the package.
22 #
23 # A long compile time... dont forget to build libidl before and check the
24 # .mozconfig file from the stuff and the stuff/README document.
25 #
26 # WARNING: 1GB RAM minimum. Additional RAM will significantly decrease
27 # build time.
28 # At least 2.5 GB free disk space
30 compile_rules()
31 {
32 # load mozconfig
33 cp -a $stuff/mozconfig $src
35 # build firefox and create a firefox tarball
36 # reducing log size: hide c++, nsinstall, python msgs
37 # Exception... Component returned failure code: known bug #696763
38 make -f client.mk | egrep -v "c++|nsinstall|python" &&
39 make -C obj-firefox/browser/installer
41 # install
42 # locate tarball
43 local tarball tarpath fn1 fn2
44 tarpath=$src/obj-firefox/dist
45 fn1="$tarpath/firefox-${VERSION%esr}.en-US.linux-$ARCH.tar.bz2"
46 fn2="$tarpath/firefox-${VERSION%esr}.en-US.linux-$(uname -m).tar.bz2"
47 [ -e "$fn1" ] && tarball="$fn1" && echo "$ARCH tarball found"
48 [ -e "$fn2" ] && tarball="$fn2" && echo "$(uname -m) tarball found"
49 [ -z "$tarball" ] && echo "ERROR: tarball not found" && exit 1
50 # extract tarball
51 mkdir -p $install/usr/lib/firefox-$VERSION &&
52 tar -xvf $tarball -C $install/usr/lib/firefox-$VERSION \
53 --strip-components=1 &&
54 chown -R -v root:root $install/usr/lib/firefox-$VERSION &&
55 chmod -v 755 $install/usr/lib/firefox-$VERSION/libxpcom.so &&
56 # install symlink in /usr/bin
57 mkdir -p $install/usr/bin &&
58 ln -sf ../lib/firefox-$VERSION/firefox $install/usr/bin &&
59 # install symlink for plugins
60 mkdir -p $install/usr/lib/mozilla/plugins &&
61 ln -sf ../mozilla/plugins $install/usr/lib/firefox-$VERSION
62 }
64 # Rules to gen a SliTaz package suitable for Tazpkg.
65 genpkg_rules()
66 {
67 case $PACKAGE in
68 firefox)
69 # program
70 printf "Installing program.."
71 mkdir -p $fs/usr/lib &&
72 cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib &&
73 cp -a $install/usr/lib/mozilla $fs/usr/lib &&
74 cp -a $install/usr/bin $fs/usr
75 status
77 # search Plugin (by: oddball)
78 printf "Installing SliTaz search plugins.."
79 cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION
80 status
82 # prefs
83 printf "Installing SliTaz preferences.."
84 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution &&
85 cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution
86 status
88 # mozilla-common files
89 # dictionaries
90 printf "Installing common dictionnaries.."
91 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries &&
92 ln -sf ../mozilla-common-$VERSION/dictionaries \
93 $fs/usr/lib/$PACKAGE-$VERSION/dictionaries
94 status
95 # plugin-container
96 printf "Installing common plugin-container"
97 rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container &&
98 ln -sf ../mozilla-common-$VERSION/plugin-container \
99 $fs/usr/lib/$PACKAGE-$VERSION/plugin-container
100 status
101 # mozilla-xremote-client
102 printf "Installing common mozilla-xremote-client"
103 rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client &&
104 ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \
105 $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client
106 status
107 # components/libdbusservice.so
108 # components/libmozgnome.so
109 for file in libdbusservice.so libmozgnome.so; do
110 printf "Installing common components/$file"
111 rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file &&
112 ln -sf ../../mozilla-common-$VERSION/components/$file \
113 $fs/usr/lib/$PACKAGE-$VERSION/components/$file
114 status
115 done
116 # chrome.manifest
117 printf "Installing common chrome.manifest"
118 rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest &&
119 ln -sf ../mozilla-common-$VERSION/chrome.manifest \
120 $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest
121 status
123 # run-mozilla.sh
124 printf "Installing common run-mozilla.sh"
125 rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh &&
126 ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \
127 $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh
128 status
130 # libmozalloc.so
131 printf "Installing common libmozalloc.so"
132 rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so &&
133 ln -sf ../mozilla-common-$VERSION/libmozalloc.so \
134 $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so
135 status
137 chown -R root.root $fs
138 ;;
139 firefox-dev)
140 CAT="development|firefox devel files"
141 DEPENDS="alsa-lib sqlite3 cairo dbus-glib pango atk \
142 glib xorg-libXt xorg-libXinerama \
143 xorg-libXcursor xorg-libXcomposite xorg-libXext \
144 xorg-libXdamage xorg-libxcb xorg-libSM xorg-libICE pkg-config"
145 printf "Installing include files.."
146 mkdir -p $fs/usr/include/$WANTED-$VERSION &&
147 cp -rL $src/obj-firefox/dist/include/* $fs/usr/include/$WANTED-$VERSION
148 status
150 printf "Installing libs files.."
151 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/bin/ply &&
152 cp -rL $src/obj-firefox/dist/sdk/bin/*.py \
153 $fs/usr/lib/$WANTED-devel/sdk/bin &&
154 cp -rL $src/obj-firefox/dist/sdk/bin/ply/*.py \
155 $fs/usr/lib/$WANTED-devel/sdk/bin/ply &&
156 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/lib &&
157 cp -rL $src/obj-firefox/dist/sdk/lib/* \
158 $fs/usr/lib/$WANTED-devel/sdk/lib
159 status
161 # printf "Installing npapi files.."
162 # mkdir -v $fs/usr/include/$WANTED-$VERSION/npapi &&
163 # cp -a $src/dom/plugins/base/*.h $fs/usr/include/$WANTED-$VERSION/npapi
164 # status
166 # /usr/share/idl folder should also be in firefox-dev
167 printf "Installing idl files.."
168 mkdir -p $fs/usr/share/$WANTED-$VERSION/idl &&
169 cp -rL $src/obj-firefox/dist/idl/* $fs/usr/share/$WANTED-$VERSION/idl
170 status
172 # copy missing *.pc files
173 printf "Installing pkgconfig files.."
174 mkdir -p $fs/usr/lib/pkgconfig &&
175 cp -a $stuff/*.pc $fs/usr/lib/pkgconfig &&
176 # fix version
177 sed -i "s/VERSION/$VERSION/" $fs/usr/lib/pkgconfig/*
178 status
179 ;;
180 libfirefox)
181 CAT="network|firefox/thunderbird common files"
182 DEPENDS="gtk+ sqlite3 dbus dbus-glib glib jpeg xorg-libX11 \
183 xorg-libXdamage alsa-lib xorg-libXt"
184 # dictionaries/en-US.aff
185 # dictionaries/en-US.dic
186 printf "Installing dictionaries"
187 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/dictionaries
188 # cp -a $install/usr/lib/firefox-$VERSION/dictionaries \
189 # $fs/usr/lib/mozilla-common-$VERSION
190 status
192 # plugin-container
193 printf "Installing common plugin-container"
194 cp -a $install/usr/lib/firefox-$VERSION/plugin-container \
195 $fs/usr/lib/mozilla-common-$VERSION
196 status
198 # mozilla-xremote-client
199 printf "Installing common mozilla-xremote-client"
200 cp -a $install/usr/lib/firefox-$VERSION/mozilla-xremote-client \
201 $fs/usr/lib/mozilla-common-$VERSION
202 status
204 # components/libdbusservice.so
205 # components/libmozgnome.so
206 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/components
207 for file in libdbusservice.so libmozgnome.so; do
208 printf "Installing common components/$file"
209 cp -a $install/usr/lib/firefox-$VERSION/components/$file \
210 $fs/usr/lib/mozilla-common-$VERSION/components
211 status
212 done
214 # chrome.manifest
215 printf "Installing common chrome.manifest"
216 cp -a $install/usr/lib/firefox-$VERSION/chrome.manifest \
217 $fs/usr/lib/mozilla-common-$VERSION
218 status
220 # run-mozilla.sh
221 printf "Installing common run-mozilla.sh"
222 cp -a $install/usr/lib/firefox-$VERSION/run-mozilla.sh \
223 $fs/usr/lib/mozilla-common-$VERSION
224 status
226 # libmozalloc.so
227 printf "Installing common libmozalloc.so"
228 cp -a $install/usr/lib/firefox-$VERSION/libmozalloc.so \
229 $fs/usr/lib/mozilla-common-$VERSION
230 status
231 ;;
232 esac
233 }
235 # Pre and post install commands for Tazpkg.
236 post_install_firefox_dev()
237 {
238 for i in usr/share/idl/firefox- usr/include/firefox- \
239 usr/lib/firefox-devel- ; do
240 for j in $(ls -d "$1"/$i* 2>/dev/null); do
241 [ "${j##*-}" = "$VERSION" ] && continue
242 [ ! -d "$j" ] || rm -rf "$j"
243 done
244 done
245 }