kde-base.spec 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. ##
  2. ## kde-base.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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 version
  26. %define V_kde 3.1.4
  27. %define V_base 3.1.4
  28. # package information
  29. Name: kde-base
  30. Summary: K Desktop Environment (Base Components)
  31. URL: http://www.kde.org/
  32. Vendor: KDE Project
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG
  35. Class: EVAL
  36. Group: KDE
  37. License: GPL
  38. Version: %{V_base}
  39. Release: 20040203
  40. # list of sources
  41. Source0: ftp://ftp.kde.org/pub/kde/stable/%{V_kde}/src/kdebase-%{V_base}.tar.bz2
  42. Patch0: kde-base.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. BuildPreReq: X11, kde-qt, kde-arts, kde-libs, openssl, gettext
  49. PreReq: X11, kde-qt, kde-arts, kde-libs, openssl, gettext
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. KDE is a powerful Open Source graphical desktop environment for Unix
  54. workstations. It combines ease of use, contemporary functionality,
  55. and outstanding graphical design with the technological superiority
  56. of the Unix operating system.
  57. This part is the KDE Base Components.
  58. %track
  59. prog kde-base = {
  60. version = 3.1.4
  61. url = ftp://ftp.kde.org/pub/kde/stable/
  62. regex = (\d+\.\d+\.\d+)
  63. url = ftp://ftp.kde.org/pub/kde/stable/__NEWVER__/src/
  64. regex = kdebase-(__VER__)\.tar\.bz2
  65. }
  66. %prep
  67. %setup -q -n kdebase-%{V_base}
  68. %patch -p0
  69. # GCC 3.3 with -pedantic is too restrictive for most vendor system headers.
  70. %{l_shtool} subst \
  71. -e 's;-pedantic;;' \
  72. configure
  73. # adjust hard-coded paths
  74. %{l_shtool} subst \
  75. -e 's;kde3\(/plugins/designer\);kde\1;g' \
  76. configure
  77. # fix UIC check
  78. %{l_shtool} subst \
  79. -e 's;grep klineedit;grep -i klineedit;g' \
  80. configure
  81. # deactivate direct chown operations
  82. %{l_shtool} subst \
  83. -e 's;-m 4755 -o root;-m 4755;g' \
  84. configure
  85. # redirect back datadir based locations
  86. %{l_shtool} subst -s \
  87. -e 's;${prefix}/share/;${datadir};' \
  88. `find . -name Makefile.in -type f -print`
  89. # make sure KDE does search for binaries inside OpenPKG first
  90. %{l_shtool} subst -s \
  91. -e 's;\(kde_default_bindirs\)="[^"]*";\1="%{l_prefix}/libexec/kde %{l_prefix}/bin /bin /sbin /usr/bin /usr/sbin";' \
  92. configure
  93. %build
  94. # set standard KDE/Qt build environment
  95. export CC="%{l_cc} `%{l_prefix}/bin/pkg-config --libs-only-L kde-qt`"
  96. export CXX="%{l_cxx} `%{l_prefix}/bin/pkg-config --libs-only-L kde-qt`"
  97. export CFLAGS="`%{l_prefix}/bin/pkg-config --cflags-only-other kde-qt` %{l_cflags -O}"
  98. export CXXFLAGS="`%{l_prefix}/bin/pkg-config --cflags-only-other kde-qt` %{l_cxxflags -O}"
  99. export CPPFLAGS="`%{l_prefix}/bin/pkg-config --cflags-only-I kde-qt` %{l_cppflags}"
  100. export LDFLAGS="`%{l_prefix}/bin/pkg-config --libs-only-L kde-qt` %{l_ldflags}"
  101. export LIBS="`%{l_prefix}/bin/pkg-config --libs-only-l --libs-only-other kde-qt`"
  102. export PATH="%{l_prefix}/libexec/kde:`%{l_prefix}/etc/rc --query x11_bindir`:$PATH"
  103. export LD_LIBRARY_PATH="%{l_prefix}/lib/kde:${LD_LIBRARY_PATH-/usr/lib}"
  104. export MOC="%{l_prefix}/libexec/kde/moc"
  105. export UIC_PATH="%{l_prefix}/libexec/kde/uic"
  106. export HOME="`pwd`"
  107. # set KDE/Qt installation paths
  108. export KDEDIR="%{l_prefix}"
  109. export kde_htmldir='%{l_prefix}/share/kde/doc/HTML'
  110. export kde_appsdir='%{l_prefix}/share/kde/applnk'
  111. export kde_icondir='%{l_prefix}/share/kde/icons'
  112. export kde_sounddir='%{l_prefix}/share/kde/sounds'
  113. export kde_datadir='%{l_prefix}/share/kde/apps'
  114. export kde_locale='%{l_prefix}/share/kde/locale'
  115. export kde_confdir='%{l_prefix}/share/kde/config'
  116. export kde_mimedir='%{l_prefix}/share/kde/mimelnk'
  117. export kde_toolbardir='%{l_prefix}/share/kde/toolbar'
  118. export kde_wallpaperdir='%{l_prefix}/share/kde/wallpapers'
  119. export kde_templatesdir='%{l_prefix}/share/kde/templates'
  120. export kde_servicesdir='%{l_prefix}/share/kde/services'
  121. export kde_servicetypesdir='%{l_prefix}/share/kde/servicetypes'
  122. export kde_bindir='%{l_prefix}/libexec/kde'
  123. export kde_cgidir='%{l_prefix}/lib/kde/cgi'
  124. export kde_moduledir='%{l_prefix}/lib/kde/modules'
  125. export kde_styledir='%{l_prefix}/lib/kde/plugins/styles'
  126. export kde_widgetdir='%{l_prefix}/lib/kde/plugins/designer'
  127. # configure package
  128. export DO_NOT_COMPILE="kdm"
  129. ./configure \
  130. --prefix=%{l_prefix} \
  131. --bindir=%{l_prefix}/libexec/kde \
  132. --includedir=%{l_prefix}/include/kde \
  133. --libdir=%{l_prefix}/lib/kde \
  134. --datadir=%{l_prefix}/share/kde \
  135. --localstatedir=%{l_prefix}/var/kde \
  136. --with-x \
  137. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  138. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  139. --with-qt-dir=%{l_prefix} \
  140. --with-qt-includes=%{l_prefix}/include/kde/qt \
  141. --with-qt-libraries=%{l_prefix}/lib/kde \
  142. --with-extra-includes=%{l_prefix}/include \
  143. --with-extra-libs=%{l_prefix}/lib \
  144. --with-ssl-dir=%{l_prefix} \
  145. --without-java \
  146. --without-motif \
  147. --disable-debug \
  148. --enable-rpath \
  149. --disable-static \
  150. --enable-shared
  151. # build package
  152. %{l_make} %{l_mflags -O}
  153. %install
  154. # set minimal KDE/Qt run-time environment
  155. export PATH="%{l_prefix}/libexec/kde:`%{l_prefix}/etc/rc --query x11_bindir`:$PATH"
  156. export LD_LIBRARY_PATH="%{l_prefix}/lib/kde:${LD_LIBRARY_PATH-/usr/lib}"
  157. # install package
  158. rm -rf $RPM_BUILD_ROOT
  159. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  160. # strip down installation
  161. strip $RPM_BUILD_ROOT%{l_prefix}/libexec/kde/* >/dev/null 2>&1 || true
  162. # determine installation files
  163. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  164. %files -f files
  165. %clean
  166. rm -rf $RPM_BUILD_ROOT