## ## kde-base.spec -- OpenPKG RPM Specification ## Copyright (c) 2000-2004 The OpenPKG Project ## Copyright (c) 2000-2004 Ralf S. Engelschall ## Copyright (c) 2000-2004 Cable & Wireless ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # package version %define V_kde 3.1.4 %define V_base 3.1.4 # package information Name: kde-base Summary: K Desktop Environment (Base Components) URL: http://www.kde.org/ Vendor: KDE Project Packager: The OpenPKG Project Distribution: OpenPKG Class: EVAL Group: KDE License: GPL Version: %{V_base} Release: 20040203 # list of sources Source0: ftp://ftp.kde.org/pub/kde/stable/%{V_kde}/src/kdebase-%{V_base}.tar.bz2 Patch0: kde-base.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig PreReq: OpenPKG, openpkg >= 20040130 BuildPreReq: X11, kde-qt, kde-arts, kde-libs, openssl, gettext PreReq: X11, kde-qt, kde-arts, kde-libs, openssl, gettext AutoReq: no AutoReqProv: no %description KDE is a powerful Open Source graphical desktop environment for Unix workstations. It combines ease of use, contemporary functionality, and outstanding graphical design with the technological superiority of the Unix operating system. This part is the KDE Base Components. %track prog kde-base = { version = 3.1.4 url = ftp://ftp.kde.org/pub/kde/stable/ regex = (\d+\.\d+\.\d+) url = ftp://ftp.kde.org/pub/kde/stable/__NEWVER__/src/ regex = kdebase-(__VER__)\.tar\.bz2 } %prep %setup -q -n kdebase-%{V_base} %patch -p0 # GCC 3.3 with -pedantic is too restrictive for most vendor system headers. %{l_shtool} subst \ -e 's;-pedantic;;' \ configure # adjust hard-coded paths %{l_shtool} subst \ -e 's;kde3\(/plugins/designer\);kde\1;g' \ configure # fix UIC check %{l_shtool} subst \ -e 's;grep klineedit;grep -i klineedit;g' \ configure # deactivate direct chown operations %{l_shtool} subst \ -e 's;-m 4755 -o root;-m 4755;g' \ configure # redirect back datadir based locations %{l_shtool} subst -s \ -e 's;${prefix}/share/;${datadir};' \ `find . -name Makefile.in -type f -print` # make sure KDE does search for binaries inside OpenPKG first %{l_shtool} subst -s \ -e 's;\(kde_default_bindirs\)="[^"]*";\1="%{l_prefix}/libexec/kde %{l_prefix}/bin /bin /sbin /usr/bin /usr/sbin";' \ configure %build # set standard KDE/Qt build environment export CC="%{l_cc} `%{l_prefix}/bin/pkg-config --libs-only-L kde-qt`" export CXX="%{l_cxx} `%{l_prefix}/bin/pkg-config --libs-only-L kde-qt`" export CFLAGS="`%{l_prefix}/bin/pkg-config --cflags-only-other kde-qt` %{l_cflags -O}" export CXXFLAGS="`%{l_prefix}/bin/pkg-config --cflags-only-other kde-qt` %{l_cxxflags -O}" export CPPFLAGS="`%{l_prefix}/bin/pkg-config --cflags-only-I kde-qt` %{l_cppflags}" export LDFLAGS="`%{l_prefix}/bin/pkg-config --libs-only-L kde-qt` %{l_ldflags}" export LIBS="`%{l_prefix}/bin/pkg-config --libs-only-l --libs-only-other kde-qt`" export PATH="%{l_prefix}/libexec/kde:`%{l_prefix}/etc/rc --query x11_bindir`:$PATH" export LD_LIBRARY_PATH="%{l_prefix}/lib/kde:${LD_LIBRARY_PATH-/usr/lib}" export MOC="%{l_prefix}/libexec/kde/moc" export UIC_PATH="%{l_prefix}/libexec/kde/uic" export HOME="`pwd`" # set KDE/Qt installation paths export KDEDIR="%{l_prefix}" export kde_htmldir='%{l_prefix}/share/kde/doc/HTML' export kde_appsdir='%{l_prefix}/share/kde/applnk' export kde_icondir='%{l_prefix}/share/kde/icons' export kde_sounddir='%{l_prefix}/share/kde/sounds' export kde_datadir='%{l_prefix}/share/kde/apps' export kde_locale='%{l_prefix}/share/kde/locale' export kde_confdir='%{l_prefix}/share/kde/config' export kde_mimedir='%{l_prefix}/share/kde/mimelnk' export kde_toolbardir='%{l_prefix}/share/kde/toolbar' export kde_wallpaperdir='%{l_prefix}/share/kde/wallpapers' export kde_templatesdir='%{l_prefix}/share/kde/templates' export kde_servicesdir='%{l_prefix}/share/kde/services' export kde_servicetypesdir='%{l_prefix}/share/kde/servicetypes' export kde_bindir='%{l_prefix}/libexec/kde' export kde_cgidir='%{l_prefix}/lib/kde/cgi' export kde_moduledir='%{l_prefix}/lib/kde/modules' export kde_styledir='%{l_prefix}/lib/kde/plugins/styles' export kde_widgetdir='%{l_prefix}/lib/kde/plugins/designer' # configure package export DO_NOT_COMPILE="kdm" ./configure \ --prefix=%{l_prefix} \ --bindir=%{l_prefix}/libexec/kde \ --includedir=%{l_prefix}/include/kde \ --libdir=%{l_prefix}/lib/kde \ --datadir=%{l_prefix}/share/kde \ --localstatedir=%{l_prefix}/var/kde \ --with-x \ --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \ --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \ --with-qt-dir=%{l_prefix} \ --with-qt-includes=%{l_prefix}/include/kde/qt \ --with-qt-libraries=%{l_prefix}/lib/kde \ --with-extra-includes=%{l_prefix}/include \ --with-extra-libs=%{l_prefix}/lib \ --with-ssl-dir=%{l_prefix} \ --without-java \ --without-motif \ --disable-debug \ --enable-rpath \ --disable-static \ --enable-shared # build package %{l_make} %{l_mflags -O} %install # set minimal KDE/Qt run-time environment export PATH="%{l_prefix}/libexec/kde:`%{l_prefix}/etc/rc --query x11_bindir`:$PATH" export LD_LIBRARY_PATH="%{l_prefix}/lib/kde:${LD_LIBRARY_PATH-/usr/lib}" # install package rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" # strip down installation strip $RPM_BUILD_ROOT%{l_prefix}/libexec/kde/* >/dev/null 2>&1 || true # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} %files -f files %clean rm -rf $RPM_BUILD_ROOT