x11/x11.spec

Wed, 14 Jan 2009 15:59:12 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 14 Jan 2009 15:59:12 +0100
changeset 86
78e7deb1d6ab
parent 82
14e53a73c5a5
child 90
b53694687f42
permissions
-rw-r--r--

Correct and improve many buildconf and code logic blocks. In particular:
1. Document potential problems building with current binutils releases.
2. Document the flawed webkit and explain its temporary exclusion.
3. Document the edition of Qt which is built and installed.
4. Remove the Solaris x11_supdir logic as it is no longer found.
5. Correct several .pr[io] files including QMAKE_CXXFLAGS and INCPATH,
which previously caused preexisting Qt installations to deliver
erroneous old include and library logic instead of relying on
that of the currently building package. -I/opkg/include is now
placed at the end of the compile statements.
6. Don't trust the QMAKE_[INC|LIB]DIR_X11 identifiers in qmake.conf.
7. Allow more 64-bit builds and more properly identify the platform.
8. Place plugins (which are shared objects) in lib instead of share.
9. Build components as plugins when possible if with_shared is enabled.
10. Translate German text to English to be more consistent.
11. Instead of removing the pkgconfig directory of with_shared builds,
place it in a child directory useful for shared building.
12. Document the nonstandard shared build directory structure,
including using the hidden pkgconfig directory (PKG_CONFIG_PATH.)
13. Change %doc to specify files rather than directories in the RPM DB.

     1 ##
     2 ##  x11.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package information
    25 Name:         x11
    26 Summary:      Information Resource for X11
    27 URL:          -
    28 Vendor:       The OpenPKG Project
    29 Packager:     OpenPKG Foundation e.V.
    30 Distribution: OpenPKG Community
    31 Class:        BASE
    32 Group:        Meta
    33 License:      PD
    34 Version:      0
    35 Release:      20090106
    37 #   list of sources
    38 Source0:      rc.x11
    40 #   build information
    41 Prefix:       %{l_prefix}
    42 BuildRoot:    %{l_buildroot}
    43 BuildPreReq:  OpenPKG, openpkg >= 20060823
    44 PreReq:       OpenPKG, openpkg >= 20060823
    45 AutoReq:      no
    46 AutoReqProv:  no
    47 Provides:     X11
    49 %description
    50     This is the information resource package for X11.
    52 %track
    54 %prep
    56 %build
    58 %install
    59     rm -rf $RPM_BUILD_ROOT
    61     x11_bindir=""
    62     x11_incdir=""
    63     x11_libdir=""
    65     #   search for binary directory
    66     for bindir in \
    67         `echo $PATH | sed -e 's/:/ /g'` \
    68         /usr/openwin/bin \
    69         /usr/[xX]/bin \
    70         /usr/[xX]11*/bin \
    71         /usr/[xX]386/bin \
    72         /usr/[xX]ree86/bin \
    73         /usr/bin/[xX]11* \
    74         /usr/local/[xX]/bin \
    75         /usr/local/[xX]11*/bin \
    76         /usr/local/[xX]386/bin \
    77         /usr/local/[xX]ree86/bin \
    78         /usr/athena/bin \
    79     ; do
    80         if [ -f "$bindir/xmkmf" ]; then
    81             x11_bindir="$bindir"
    82             break
    83         fi
    84     done
    86     #   search for include directory
    87     for incdir in \
    88         /usr/openwin/include \
    89         /usr/[xX]/include \
    90         /usr/[xX]11*/include \
    91         /usr/[xX]386/include \
    92         /usr/[xX]ree86/include \
    93         /usr/include \
    94         /usr/include/[xX] \
    95         /usr/include/[xX]11* \
    96         /usr/include/[xX]386 \
    97         /usr/include/[xX]free86 \
    98         /usr/local/include \
    99         /usr/local/include/[xX] \
   100         /usr/local/include/[xX]11* \
   101         /usr/local/include/[xX]386 \
   102         /usr/local/include/[xX]free86 \
   103         /usr/local/[xX]/include \
   104         /usr/local/[xX]11*/include \
   105         /usr/local/[xX]386/include \
   106         /usr/local/[xX]ree86/include \
   107         /usr/athena/include \
   108         /usr/unsupported/include \
   109     ; do
   110         if [ -f "$incdir/X11/Intrinsic.h" ]; then
   111             x11_incdir="$incdir"
   112             if [ -d "/usr/openwin/share/include" ]; then
   113                 x11_incdir="$x11_incdir /usr/openwin/share/include"
   114             fi
   115             break
   116         fi
   117     done
   119     #   search for library directory
   120     for libdir in \
   121         /usr/openwin/lib \
   122         /usr/openwin/share/lib \
   123         /usr/[xX]/lib64 \
   124         /usr/[xX]/lib \
   125         /usr/[xX]11*/lib64 \
   126         /usr/[xX]11*/lib \
   127         /usr/[xX]386/lib \
   128         /usr/[xX]ree86/lib \
   129         /usr/shlib \
   130         /lib64 \
   131         /lib \
   132         /usr/lib64 \
   133         /usr/lib \
   134         /usr/lib/[xX] \
   135         /usr/lib/[xX]11* \
   136         /usr/lib/[xX]386 \
   137         /usr/lib/[xX]free86 \
   138         /usr/local/lib \
   139         /usr/local/lib/[xX] \
   140         /usr/local/lib/[xX]11* \
   141         /usr/local/lib/[xX]386 \
   142         /usr/local/lib/[xX]free86 \
   143         /usr/local/[xX]/lib \
   144         /usr/local/[xX]11*/lib \
   145         /usr/local/[xX]386/lib \
   146         /usr/local/[xX]ree86/lib \
   147         /usr/athena/lib \
   148         /usr/unsupported/lib \
   149     ; do
   150         for ext in a so sl; do
   151             if [ -f "$libdir/libXt.$ext" ]; then
   152                 x11_libdir="$libdir"
   153                 break
   154             fi
   155         done
   156         if [ ".$x11_libdir" != . ]; then
   157             break
   158         fi
   159     done
   161     #   make sure everything was found
   162     if [ ".$x11_bindir" = . ] ||\
   163        [ ".$x11_incdir" = . ] ||\
   164        [ ".$x11_libdir" = . ]; then
   165        set +x
   166        ( echo "ERROR: SOME X11 INFORMATION COULD NOT BE DETERMINED!!"
   167          echo "ERROR: SOME X11 INFORMATION COULD NOT BE DETERMINED!!"
   168          echo ""
   169          echo "We found out:"
   170          echo ""
   171          echo "    X11 Binary  Directory: ${x11_bindir}"
   172          echo "    X11 Include Directory: ${x11_incdir}"
   173          echo "    X11 Library Directory: ${x11_libdir}"
   174          echo ""
   175          echo "Unfortunately, some information is missing here."
   176          echo ""
   177          echo "Be sure to have all system X11 components installed"
   178          echo "in standard locations before building this package!"
   179          echo ""
   180          echo "ERROR: SOME X11 INFORMATION COULD NOT BE DETERMINED!!"
   181          echo "ERROR: SOME X11 INFORMATION COULD NOT BE DETERMINED!!"
   182        ) | %{l_rpmtool} msg -b -t error
   183        exit 1
   184     fi
   186     #   install rc file
   187     %{l_shtool} mkdir -f -p -m 755 \
   188         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
   189     %{l_shtool} install -c -m 755 %{l_value -s -a} \
   190         -e "s;@x11_bindir@;${x11_bindir};g" \
   191         -e "s;@x11_incdir@;${x11_incdir};g" \
   192         -e "s;@x11_libdir@;${x11_libdir};g" \
   193         %{SOURCE rc.x11} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   195     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   197 %files -f files
   199 %clean
   200     rm -rf $RPM_BUILD_ROOT

mercurial