wok-next view firefox/receipt @ rev 20690
add missing SHA256sums
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Mon May 21 19:36:47 2018 +0000 (2018-05-21) |
parents | 7639f09792cf |
children | f48456621a9d |
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 mkdir -p $fs/usr/lib &&
71 cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib &&
72 cp -a $install/usr/lib/mozilla $fs/usr/lib &&
73 cp -a $install/usr/bin $fs/usr
75 # search Plugin (by: oddball)
76 cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION
78 # prefs
79 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution &&
80 cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution
82 # mozilla-common files
83 # dictionaries
84 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries &&
85 ln -sf ../mozilla-common-$VERSION/dictionaries \
86 $fs/usr/lib/$PACKAGE-$VERSION/dictionaries
87 # plugin-container
88 rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container &&
89 ln -sf ../mozilla-common-$VERSION/plugin-container \
90 $fs/usr/lib/$PACKAGE-$VERSION/plugin-container
91 # mozilla-xremote-client
92 rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client &&
93 ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \
94 $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client
95 # components/libdbusservice.so
96 # components/libmozgnome.so
97 for file in libdbusservice.so libmozgnome.so; do
98 rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file &&
99 ln -sf ../../mozilla-common-$VERSION/components/$file \
100 $fs/usr/lib/$PACKAGE-$VERSION/components/$file
101 done
102 # chrome.manifest
103 rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest &&
104 ln -sf ../mozilla-common-$VERSION/chrome.manifest \
105 $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest
107 # run-mozilla.sh
108 rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh &&
109 ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \
110 $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh
112 # libmozalloc.so
113 rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so &&
114 ln -sf ../mozilla-common-$VERSION/libmozalloc.so \
115 $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so
117 chown -R root.root $fs
118 ;;
119 firefox-dev)
120 CAT="development|firefox devel files"
121 DEPENDS="alsa-lib sqlite3 cairo dbus-glib pango atk \
122 glib xorg-libXt xorg-libXinerama \
123 xorg-libXcursor xorg-libXcomposite xorg-libXext \
124 xorg-libXdamage xorg-libxcb xorg-libSM xorg-libICE"
125 mkdir -p $fs/usr/include/$WANTED-$VERSION &&
126 cp -rL $src/obj-firefox/dist/include/* $fs/usr/include/$WANTED-$VERSION
128 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/bin/ply &&
129 cp -rL $src/obj-firefox/dist/sdk/bin/*.py \
130 $fs/usr/lib/$WANTED-devel/sdk/bin &&
131 cp -rL $src/obj-firefox/dist/sdk/bin/ply/*.py \
132 $fs/usr/lib/$WANTED-devel/sdk/bin/ply &&
133 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/lib &&
134 cp -rL $src/obj-firefox/dist/sdk/lib/* \
135 $fs/usr/lib/$WANTED-devel/sdk/lib
137 # mkdir -v $fs/usr/include/$WANTED-$VERSION/npapi &&
138 # cp -a $src/dom/plugins/base/*.h $fs/usr/include/$WANTED-$VERSION/npapi
140 # /usr/share/idl folder should also be in firefox-dev
141 mkdir -p $fs/usr/share/$WANTED-$VERSION/idl &&
142 cp -rL $src/obj-firefox/dist/idl/* $fs/usr/share/$WANTED-$VERSION/idl
144 # copy missing *.pc files
145 mkdir -p $fs/usr/lib/pkgconfig &&
146 cp -a $stuff/*.pc $fs/usr/lib/pkgconfig &&
147 # fix version
148 sed -i "s/VERSION/$VERSION/" $fs/usr/lib/pkgconfig/*
149 ;;
150 libfirefox)
151 CAT="network|firefox/thunderbird common files"
152 DEPENDS="gtk+ sqlite3 dbus dbus-glib glib jpeg xorg-libX11 \
153 xorg-libXdamage alsa-lib xorg-libXt"
154 # dictionaries/en-US.aff
155 # dictionaries/en-US.dic
156 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/dictionaries
157 # cp -a $install/usr/lib/firefox-$VERSION/dictionaries \
158 # $fs/usr/lib/mozilla-common-$VERSION
160 # plugin-container
161 cp -a $install/usr/lib/firefox-$VERSION/plugin-container \
162 $fs/usr/lib/mozilla-common-$VERSION
164 # mozilla-xremote-client
165 cp -a $install/usr/lib/firefox-$VERSION/mozilla-xremote-client \
166 $fs/usr/lib/mozilla-common-$VERSION
168 # components/libdbusservice.so
169 # components/libmozgnome.so
170 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/components
171 for file in libdbusservice.so libmozgnome.so; do
172 cp -a $install/usr/lib/firefox-$VERSION/components/$file \
173 $fs/usr/lib/mozilla-common-$VERSION/components
174 done
176 # chrome.manifest
177 cp -a $install/usr/lib/firefox-$VERSION/chrome.manifest \
178 $fs/usr/lib/mozilla-common-$VERSION
180 # run-mozilla.sh
181 cp -a $install/usr/lib/firefox-$VERSION/run-mozilla.sh \
182 $fs/usr/lib/mozilla-common-$VERSION
184 # libmozalloc.so
185 cp -a $install/usr/lib/firefox-$VERSION/libmozalloc.so \
186 $fs/usr/lib/mozilla-common-$VERSION
187 ;;
188 esac
189 }
191 # Pre and post install commands for Tazpkg.
192 post_install_firefox_dev()
193 {
194 for i in usr/share/idl/firefox- usr/include/firefox- \
195 usr/lib/firefox-devel- ; do
196 for j in $(ls -d "$1"/$i* 2>/dev/null); do
197 [ "${j##*-}" = "$VERSION" ] && continue
198 [ ! -d "$j" ] || rm -rf "$j"
199 done
200 done
201 }