mozilla.spec 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. ##
  2. ## mozilla.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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 information
  26. Name: mozilla
  27. Summary: Graphical Internet Communication Frontend
  28. URL: http://www.mozilla.org/
  29. Vendor: The Mozilla Project
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Web
  33. License: MPL
  34. Version: 1.2.1
  35. Release: 20030103
  36. # package options
  37. %option with_mailnews no
  38. %option with_composer no
  39. # list of sources
  40. Source0: ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla%{version}/src/mozilla-source-%{version}.tar.bz2
  41. Source1: http://people.freebsd.org/~marcus/libart_lgpl-%{version}.tar.bz2
  42. Source2: mozilla.sh
  43. Source3: mozilla.pod
  44. Patch0: mozilla.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20030103, X11, glib, gtk, orbit, libiconv, infozip, openssl, freetype, make, gcc, perl
  49. PreReq: OpenPKG, openpkg >= 20030103, X11, glib, gtk, orbit, libiconv, infozip, openssl, freetype, xsel
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Mozilla is a full-featured Open Source Internet communication
  54. frontend derived from the popular Netscape Communicator. It provides
  55. Web, Mail, News and Chat client services and is designed for
  56. standards compliance, performance and portability.
  57. %prep
  58. # display a warning that this package is a beast
  59. ( echo "This package requires about 540 MB of free disk space, 200 MB of RAM"
  60. echo "and 70 minutes real-time to build on a Pentium-III 800Mhz class CPU."
  61. echo "So be prepared and patient, please... ;-)"
  62. ) | %{l_rpmtool} msg -b -t notice
  63. # extract source distribution
  64. %setup -q -n mozilla
  65. # add back the modified libart which is included in Mozilla CVS
  66. # but left out of the source distribution for licensing reasons.
  67. %{l_bzip2} -d -c %{SOURCE1} | %{l_tar} xf -
  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. MOZ_INTERNAL_LIBART_LGPL=1 \
  89. ./configure \
  90. --prefix=%{l_prefix} \
  91. --libdir=%{l_prefix}/lib/mozilla \
  92. --includedir=%{l_prefix}/include/mozilla \
  93. --with-x \
  94. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  95. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  96. --enable-toolkit-gtk \
  97. --enable-default-toolkit=gtk \
  98. --with-gtk-prefix=%{l_prefix} \
  99. --with-glib-prefix=%{l_prefix} \
  100. --with-libIDL-prefix=%{l_prefix} \
  101. --with-system-jpeg=%{l_prefix} \
  102. --with-system-png=%{l_prefix} \
  103. --with-system-zlib=%{l_prefix} \
  104. --with-ft-prefix=%{l_prefix} \
  105. --enable-freetype2 \
  106. --enable-jsd \
  107. --enable-crypto \
  108. --enable-chrome-format=jar \
  109. --enable-static \
  110. --enable-strip \
  111. %if "%{with_mailnews}" == "yes"
  112. --enable-mailnews \
  113. %else
  114. --disable-mailnews \
  115. %endif
  116. %if "%{with_composer}" == "yes"
  117. --enable-composer \
  118. %else
  119. --disable-composer \
  120. %endif
  121. --disable-xft \
  122. --disable-xinerama \
  123. --disable-shared \
  124. --disable-tests \
  125. --disable-svg \
  126. --disable-ldap \
  127. --disable-accessibility \
  128. --disable-debug \
  129. --disable-dtd-debug \
  130. --disable-pedantic \
  131. --disable-auto-deps \
  132. --disable-md \
  133. --disable-cpp-exceptions \
  134. --disable-cpp-rtti \
  135. --disable-optimize \
  136. --disable-xterm-updates \
  137. --with-pthreads
  138. # build program
  139. %{l_make} %{l_mflags}
  140. # post-adjustments to builded program
  141. ( cd dist/bin
  142. # prepare for multi-user usage
  143. LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH
  144. MOZILLA_FIVE_HOME=.; export MOZILLA_FIVE_HOME
  145. ./regxpcom || true
  146. ./regchrome || true
  147. touch chrome/user-skins.rdf chrome/user-locales.rdf
  148. # re-adjust paths to reflect final location
  149. %{l_shtool} subst \
  150. -e "s;`pwd`;%{l_prefix}/lib/mozilla;" \
  151. components/xpti.dat components/compreg.dat
  152. # strip down installation tree
  153. find . -type d -depth -print | xargs rmdir >/dev/null 2>&1 || true
  154. rm -f mozilla-config mkdepend nsinstall bloaturls.txt TestGtk* LICENSE README
  155. rm -rf res/samples
  156. # workaround run-time startup problems
  157. mkdir .autoreg
  158. )
  159. # generate manual page for startup convinience wrapper
  160. %{l_prefix}/bin/pod2man \
  161. --section=1 --quotes=none \
  162. --release="Mozilla %{version}" --center="%{packager}" \
  163. %{SOURCE mozilla.pod} >mozilla.1
  164. %install
  165. rm -rf $RPM_BUILD_ROOT
  166. # generate temporary installation tree
  167. %{l_shtool} mkdir -f -p -m 755 \
  168. $RPM_BUILD_ROOT%{l_prefix}/bin \
  169. $RPM_BUILD_ROOT%{l_prefix}/lib/mozilla \
  170. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  171. # move files into temporary installation tree
  172. (cd dist/bin && %{l_tar} -chf - . ) |\
  173. (cd $RPM_BUILD_ROOT%{l_prefix}/lib/mozilla && %{l_tar} -xf -)
  174. # add startup convinience wrapper
  175. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  176. %{SOURCE mozilla.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/mozilla
  177. %{l_shtool} install -c -m 644 \
  178. mozilla.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  179. # determine installation files
  180. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  181. %files -f files
  182. %clean
  183. rm -rf $RPM_BUILD_ROOT