kde-base.spec 6.9 KB

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