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.

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

mercurial