x11/x11.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 83
02f650e4c5d8
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

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@90 89 /usr/openwin/share/include \
michael@82 90 /usr/[xX]/include \
michael@82 91 /usr/[xX]11*/include \
michael@82 92 /usr/[xX]386/include \
michael@82 93 /usr/[xX]ree86/include \
michael@82 94 /usr/include \
michael@82 95 /usr/include/[xX] \
michael@82 96 /usr/include/[xX]11* \
michael@82 97 /usr/include/[xX]386 \
michael@82 98 /usr/include/[xX]free86 \
michael@82 99 /usr/local/include \
michael@82 100 /usr/local/include/[xX] \
michael@82 101 /usr/local/include/[xX]11* \
michael@82 102 /usr/local/include/[xX]386 \
michael@82 103 /usr/local/include/[xX]free86 \
michael@82 104 /usr/local/[xX]/include \
michael@82 105 /usr/local/[xX]11*/include \
michael@82 106 /usr/local/[xX]386/include \
michael@82 107 /usr/local/[xX]ree86/include \
michael@82 108 /usr/athena/include \
michael@82 109 /usr/unsupported/include \
michael@82 110 ; do
michael@82 111 if [ -f "$incdir/X11/Intrinsic.h" ]; then
michael@82 112 x11_incdir="$incdir"
michael@90 113 if [ -d "/usr/X11/include" ]; then
michael@90 114 x11_incdir="$x11_incdir /usr/X11/include"
michael@83 115 fi
michael@82 116 break
michael@82 117 fi
michael@82 118 done
michael@82 119
michael@82 120 # search for library directory
michael@82 121 for libdir in \
michael@82 122 /usr/openwin/lib \
michael@82 123 /usr/openwin/share/lib \
michael@82 124 /usr/[xX]/lib64 \
michael@82 125 /usr/[xX]/lib \
michael@82 126 /usr/[xX]11*/lib64 \
michael@82 127 /usr/[xX]11*/lib \
michael@82 128 /usr/[xX]386/lib \
michael@82 129 /usr/[xX]ree86/lib \
michael@82 130 /usr/shlib \
michael@82 131 /lib64 \
michael@82 132 /lib \
michael@82 133 /usr/lib64 \
michael@82 134 /usr/lib \
michael@82 135 /usr/lib/[xX] \
michael@82 136 /usr/lib/[xX]11* \
michael@82 137 /usr/lib/[xX]386 \
michael@82 138 /usr/lib/[xX]free86 \
michael@82 139 /usr/local/lib \
michael@82 140 /usr/local/lib/[xX] \
michael@82 141 /usr/local/lib/[xX]11* \
michael@82 142 /usr/local/lib/[xX]386 \
michael@82 143 /usr/local/lib/[xX]free86 \
michael@82 144 /usr/local/[xX]/lib \
michael@82 145 /usr/local/[xX]11*/lib \
michael@82 146 /usr/local/[xX]386/lib \
michael@82 147 /usr/local/[xX]ree86/lib \
michael@82 148 /usr/athena/lib \
michael@82 149 /usr/unsupported/lib \
michael@82 150 ; do
michael@82 151 for ext in a so sl; do
michael@82 152 if [ -f "$libdir/libXt.$ext" ]; then
michael@82 153 x11_libdir="$libdir"
michael@82 154 break
michael@82 155 fi
michael@82 156 done
michael@82 157 if [ ".$x11_libdir" != . ]; then
michael@82 158 break
michael@82 159 fi
michael@82 160 done
michael@82 161
michael@82 162 # make sure everything was found
michael@82 163 if [ ".$x11_bindir" = . ] ||\
michael@82 164 [ ".$x11_incdir" = . ] ||\
michael@82 165 [ ".$x11_libdir" = . ]; then
michael@82 166 set +x
michael@82 167 ( echo "ERROR: SOME X11 INFORMATION COULD NOT BE DETERMINED!!"
michael@82 168 echo "ERROR: SOME X11 INFORMATION COULD NOT BE DETERMINED!!"
michael@82 169 echo ""
michael@82 170 echo "We found out:"
michael@82 171 echo ""
michael@82 172 echo " X11 Binary Directory: ${x11_bindir}"
michael@82 173 echo " X11 Include Directory: ${x11_incdir}"
michael@82 174 echo " X11 Library Directory: ${x11_libdir}"
michael@82 175 echo ""
michael@82 176 echo "Unfortunately, some information is missing here."
michael@82 177 echo ""
michael@82 178 echo "Be sure to have all system X11 components installed"
michael@82 179 echo "in standard locations before building this package!"
michael@82 180 echo ""
michael@82 181 echo "ERROR: SOME X11 INFORMATION COULD NOT BE DETERMINED!!"
michael@82 182 echo "ERROR: SOME X11 INFORMATION COULD NOT BE DETERMINED!!"
michael@82 183 ) | %{l_rpmtool} msg -b -t error
michael@82 184 exit 1
michael@82 185 fi
michael@82 186
michael@82 187 # install rc file
michael@82 188 %{l_shtool} mkdir -f -p -m 755 \
michael@82 189 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
michael@82 190 %{l_shtool} install -c -m 755 %{l_value -s -a} \
michael@82 191 -e "s;@x11_bindir@;${x11_bindir};g" \
michael@82 192 -e "s;@x11_incdir@;${x11_incdir};g" \
michael@82 193 -e "s;@x11_libdir@;${x11_libdir};g" \
michael@82 194 %{SOURCE rc.x11} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
michael@82 195
michael@82 196 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@82 197
michael@82 198 %files -f files
michael@82 199
michael@82 200 %clean
michael@82 201 rm -rf $RPM_BUILD_ROOT
michael@82 202

mercurial