wok-next view firefox/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents f48456621a9d
children 5669e8b3be70
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="zip libidl coreutils findutils wireless_tools-dev \
15 perl python yasm alsa-lib-dev mesa-dev libevent-dev libvpx-dev dbus-dev \
16 dbus-glib-dev gtk2-dev glib-dev pango-dev nss-dev sqlite3-dev tar gzip \
17 libjpeg-turbo-dev"
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 # load mozconfig
29 cp -a $stuff/mozconfig $src
31 # build firefox and create a firefox tarball
32 # reducing log size: hide c++, nsinstall, python msgs
33 # Exception... Component returned failure code: known bug #696763
34 make -f client.mk | egrep -v "c++|nsinstall|python" &&
35 make -C obj-firefox/browser/installer
37 # install
38 # locate tarball
39 local tarball tarpath fn1 fn2
40 tarpath=$src/obj-firefox/dist
41 fn1="$tarpath/firefox-${VERSION%esr}.en-US.linux-$ARCH.tar.bz2"
42 fn2="$tarpath/firefox-${VERSION%esr}.en-US.linux-$(uname -m).tar.bz2"
43 [ -e "$fn1" ] && tarball="$fn1" && echo "$ARCH tarball found"
44 [ -e "$fn2" ] && tarball="$fn2" && echo "$(uname -m) tarball found"
45 [ -z "$tarball" ] && echo "ERROR: tarball not found" && return 1
46 # extract tarball
47 mkdir -p $install/usr/lib/firefox-$VERSION &&
48 tar -xvf $tarball -C $install/usr/lib/firefox-$VERSION \
49 --strip-components=1 &&
50 chown -R -v root:root $install/usr/lib/firefox-$VERSION &&
51 chmod -v 755 $install/usr/lib/firefox-$VERSION/libxpcom.so &&
52 # install symlink in /usr/bin
53 mkdir -p $install/usr/bin &&
54 ln -sf ../lib/firefox-$VERSION/firefox $install/usr/bin &&
55 # install symlink for plugins
56 mkdir -p $install/usr/lib/mozilla/plugins &&
57 ln -sf ../mozilla/plugins $install/usr/lib/firefox-$VERSION
58 }
60 genpkg_rules() {
61 case $PACKAGE in
62 firefox)
63 # program
64 mkdir -p $fs/usr/lib &&
65 cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib &&
66 cp -a $install/usr/lib/mozilla $fs/usr/lib &&
67 cp -a $install/usr/bin $fs/usr
69 # search Plugin (by: oddball)
70 cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION
72 # prefs
73 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution &&
74 cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution
76 # mozilla-common files
77 # dictionaries
78 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries &&
79 ln -sf ../mozilla-common-$VERSION/dictionaries \
80 $fs/usr/lib/$PACKAGE-$VERSION/dictionaries
81 # plugin-container
82 rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container &&
83 ln -sf ../mozilla-common-$VERSION/plugin-container \
84 $fs/usr/lib/$PACKAGE-$VERSION/plugin-container
85 # mozilla-xremote-client
86 rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client &&
87 ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \
88 $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client
89 # components/libdbusservice.so
90 # components/libmozgnome.so
91 for file in libdbusservice.so libmozgnome.so; do
92 rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file &&
93 ln -sf ../../mozilla-common-$VERSION/components/$file \
94 $fs/usr/lib/$PACKAGE-$VERSION/components/$file
95 done
96 # chrome.manifest
97 rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest &&
98 ln -sf ../mozilla-common-$VERSION/chrome.manifest \
99 $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest
101 # run-mozilla.sh
102 rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh &&
103 ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \
104 $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh
106 # libmozalloc.so
107 rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so &&
108 ln -sf ../mozilla-common-$VERSION/libmozalloc.so \
109 $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so
111 chown -R root.root $fs
112 DEPENDS="gtk2 sqlite3 dbus dbus-glib glib jpeg xorg-libX11 \
113 xorg-libXdamage alsa-lib xorg-libXt libevent libvpx pango nss \
114 libfirefox"
115 TAGS="web-browser"
116 ;;
117 *-dev)
118 DEPENDS="alsa-lib sqlite3 cairo dbus-glib pango atk glib xorg-libXt \
119 xorg-libXinerama xorg-libXcursor xorg-libXcomposite xorg-libXext \
120 xorg-libXdamage xorg-libxcb xorg-libSM xorg-libICE"
121 mkdir -p $fs/usr/include/$WANTED-$VERSION
122 cp -rL $src/obj-firefox/dist/include/* $fs/usr/include/$WANTED-$VERSION
124 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/bin/ply
125 cp -rL $src/obj-firefox/dist/sdk/bin/*.py \
126 $fs/usr/lib/$WANTED-devel/sdk/bin
127 cp -rL $src/obj-firefox/dist/sdk/bin/ply/*.py \
128 $fs/usr/lib/$WANTED-devel/sdk/bin/ply
129 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/lib
130 cp -rL $src/obj-firefox/dist/sdk/lib/* \
131 $fs/usr/lib/$WANTED-devel/sdk/lib
133 # mkdir -v $fs/usr/include/$WANTED-$VERSION/npapi
134 # cp -a $src/dom/plugins/base/*.h $fs/usr/include/$WANTED-$VERSION/npapi
136 # /usr/share/idl folder should also be in firefox-dev
137 mkdir -p $fs/usr/share/$WANTED-$VERSION/idl
138 cp -rL $src/obj-firefox/dist/idl/* $fs/usr/share/$WANTED-$VERSION/idl
140 # copy missing *.pc files
141 mkdir -p $fs/usr/lib/pkgconfig
142 cp -a $stuff/*.pc $fs/usr/lib/pkgconfig
143 # fix version
144 sed -i "s/VERSION/$VERSION/" $fs/usr/lib/pkgconfig/*
145 ;;
146 libfirefox)
147 CAT="network|firefox/thunderbird common files"
148 DEPENDS="gtk2 sqlite3 dbus dbus-glib glib jpeg xorg-libX11 \
149 xorg-libXdamage alsa-lib xorg-libXt"
150 # dictionaries/en-US.aff
151 # dictionaries/en-US.dic
152 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/dictionaries
153 # cp -a $install/usr/lib/firefox-$VERSION/dictionaries \
154 # $fs/usr/lib/mozilla-common-$VERSION
156 # plugin-container
157 cp -a $install/usr/lib/firefox-$VERSION/plugin-container \
158 $fs/usr/lib/mozilla-common-$VERSION
160 # mozilla-xremote-client
161 cp -a $install/usr/lib/firefox-$VERSION/mozilla-xremote-client \
162 $fs/usr/lib/mozilla-common-$VERSION
164 # components/libdbusservice.so
165 # components/libmozgnome.so
166 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/components
167 for file in libdbusservice.so libmozgnome.so; do
168 cp -a $install/usr/lib/firefox-$VERSION/components/$file \
169 $fs/usr/lib/mozilla-common-$VERSION/components
170 done
172 # chrome.manifest
173 cp -a $install/usr/lib/firefox-$VERSION/chrome.manifest \
174 $fs/usr/lib/mozilla-common-$VERSION
176 # run-mozilla.sh
177 cp -a $install/usr/lib/firefox-$VERSION/run-mozilla.sh \
178 $fs/usr/lib/mozilla-common-$VERSION
180 # libmozalloc.so
181 cp -a $install/usr/lib/firefox-$VERSION/libmozalloc.so \
182 $fs/usr/lib/mozilla-common-$VERSION
183 ;;
184 esac
185 }
187 post_install_firefox_dev() {
188 for i in usr/share/idl/firefox- usr/include/firefox- usr/lib/firefox-devel-; do
189 for j in $(ls -d "$1"/$i* 2>/dev/null); do
190 [ "${j##*-}" = "$VERSION" ] && continue
191 [ ! -d "$j" ] || rm -rf "$j"
192 done
193 done
194 }