mozilla.spec 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. ##
  2. ## mozilla.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package options
  26. %ifndef with_mailnews
  27. %define with_mailnews no
  28. %endif
  29. %ifndef with_composer
  30. %define with_composer no
  31. %endif
  32. # package information
  33. Name: mozilla
  34. Summary: Graphical Internet Communication Frontend
  35. URL: http://www.mozilla.org/
  36. Vendor: The Mozilla Project
  37. Packager: The OpenPKG Project
  38. Distribution: OpenPKG [EVAL]
  39. Group: Web
  40. License: MPL
  41. Version: 1.2.1
  42. Release: 20021214
  43. # list of sources
  44. Source0: ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla%{version}/src/mozilla-source-%{version}.tar.bz2
  45. Source1: mozilla.sh
  46. Source2: mozilla.pod
  47. Patch0: mozilla.patch
  48. # build information
  49. Prefix: %{l_prefix}
  50. BuildRoot: %{l_buildroot}
  51. BuildPreReq: OpenPKG, openpkg >= 20021204, X11, glib, gtk, orbit, infozip, openssl, freetype, make, gcc, perl
  52. PreReq: OpenPKG, openpkg >= 20021204, X11, glib, gtk, orbit, infozip, openssl, freetype, xsel
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. Mozilla is a full-featured Open Source Internet communication
  57. frontend derived from the popular Netscape Communicator. It provides
  58. Web, Mail, News and Chat client services and is designed for
  59. standards compliance, performance and portability.
  60. %prep
  61. # display a warning that this package is a beast
  62. ( echo "This package requires about FIXME MB of free disk space and about"
  63. echo "FIXME minutes real-time to build on a Pentium-III 800Mhz class CPU."
  64. echo "So please be prepared... ;-)"
  65. ) | %{l_rpmtool} msg -b -t notice
  66. # extract source distribution
  67. %setup -q -n mozilla
  68. # patch source distribution
  69. %patch -p0
  70. # strip down source distribution (save disk space)
  71. find . -type d -name "CVS" -print | xargs rm -rf
  72. find . -type d -name "macbuild" -print | xargs rm -rf
  73. find . -type f -name ".cvsignore" -print | xargs rm -f
  74. find . -type f -name "makefile.win" -print | xargs rm -f
  75. find . -type f -name "MANIFEST" -print | xargs rm -f
  76. rm -rf build/package
  77. %build
  78. # configure source
  79. CC="%{l_cc}" \
  80. CXX="%{l_cxx}" \
  81. CFLAGS="%{l_cflags} %{l_cppflags}" \
  82. CXXFLAGS="%{l_cxxflags} -Wno-deprecated %{l_cppflags}" \
  83. CPPFLAGS="%{l_cppflags}" \
  84. LDFLAGS="%{l_ldflags}" \
  85. GLIB_CONFIG="%{l_prefix}/bin/glib-config" \
  86. GTK_CONFIG="%{l_prefix}/bin/gtk-config" \
  87. LIBIDL_CONFIG="%{l_prefix}/bin/libIDL-config" \
  88. ./configure \
  89. --prefix=%{l_prefix} \
  90. --libdir=%{l_prefix}/lib/mozilla \
  91. --includedir=%{l_prefix}/include/mozilla \
  92. --with-x \
  93. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  94. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  95. --enable-toolkit-gtk \
  96. --enable-default-toolkit=gtk \
  97. --with-gtk-prefix=%{l_prefix} \
  98. --with-glib-prefix=%{l_prefix} \
  99. --with-libIDL-prefix=%{l_prefix} \
  100. --with-system-jpeg=%{l_prefix} \
  101. --with-system-png=%{l_prefix} \
  102. --with-system-zlib=%{l_prefix} \
  103. --with-ft-prefix=%{l_prefix} \
  104. --enable-freetype2 \
  105. --enable-jsd \
  106. --enable-crypto \
  107. --enable-chrome-format=jar \
  108. --enable-static \
  109. --enable-strip \
  110. %if "%{with_mailnews}" == "yes"
  111. --enable-mailnews \
  112. %else
  113. --disable-mailnews \
  114. %endif
  115. %if "%{with_composer}" == "yes"
  116. --enable-composer \
  117. %else
  118. --disable-composer \
  119. %endif
  120. --disable-xft \
  121. --disable-xinerama \
  122. --disable-shared \
  123. --disable-tests \
  124. --disable-svg \
  125. --disable-ldap \
  126. --disable-accessibility \
  127. --disable-debug \
  128. --disable-dtd-debug \
  129. --disable-pedantic \
  130. --disable-auto-deps \
  131. --disable-md \
  132. --disable-cpp-exceptions \
  133. --disable-cpp-rtti \
  134. --disable-optimize \
  135. --disable-xterm-updates \
  136. --with-pthreads
  137. # build program
  138. %{l_make} %{l_mflags}
  139. # post-adjustments to builded program
  140. ( cd dist/bin
  141. # prepare for multi-user usage
  142. LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH
  143. MOZILLA_FIVE_HOME=.; export MOZILLA_FIVE_HOME
  144. ./regxpcom || true
  145. ./regchrome || true
  146. touch chrome/user-skins.rdf chrome/user-locales.rdf
  147. # re-adjust paths to reflect final location
  148. %{l_shtool} subst \
  149. -e "s;`pwd`;%{l_prefix}/lib/mozilla;" \
  150. components/xpti.dat components/compreg.dat
  151. # strip down installation tree
  152. find . -type d -depth -print | xargs rmdir >/dev/null 2>&1 || true
  153. rm -f mozilla-config mkdepend nsinstall bloaturls.txt TestGtk* LICENSE README
  154. rm -rf res/samples
  155. # workaround run-time startup problems
  156. mkdir .autoreg
  157. )
  158. # generate manual page for startup convinience wrapper
  159. %{l_prefix}/bin/pod2man \
  160. --section=1 --quotes=none \
  161. --release="Mozilla %{version}" --center="%{packager}" \
  162. %{SOURCE mozilla.pod} >mozilla.1
  163. %install
  164. rm -rf $RPM_BUILD_ROOT
  165. # generate temporary installation tree
  166. %{l_shtool} mkdir -f -p -m 755 \
  167. $RPM_BUILD_ROOT%{l_prefix}/bin \
  168. $RPM_BUILD_ROOT%{l_prefix}/lib/mozilla \
  169. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  170. # move files into temporary installation tree
  171. (cd dist/bin && %{l_tar} -chf - . ) |\
  172. (cd $RPM_BUILD_ROOT%{l_prefix}/lib/mozilla && %{l_tar} -xf -)
  173. # add startup convinience wrapper
  174. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  175. %{SOURCE mozilla.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/mozilla
  176. %{l_shtool} install -c -m 644 \
  177. mozilla.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  178. # determine installation files
  179. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  180. %files -f files
  181. %clean
  182. rm -rf $RPM_BUILD_ROOT