Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@485 | 1 | ## |
michael@485 | 2 | ## apr.spec -- OpenPKG RPM Package Specification |
michael@485 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@485 | 4 | ## |
michael@485 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@485 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@485 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@485 | 8 | ## copies. |
michael@485 | 9 | ## |
michael@485 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@485 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@485 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@485 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@485 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@485 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@485 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@485 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@485 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@485 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@485 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@485 | 21 | ## SUCH DAMAGE. |
michael@485 | 22 | ## |
michael@485 | 23 | |
michael@485 | 24 | # package version |
michael@485 | 25 | %define V_apr 1.4.6 |
michael@485 | 26 | %define V_apr_util 1.4.1 |
michael@485 | 27 | |
michael@485 | 28 | # package information |
michael@485 | 29 | Name: apr |
michael@485 | 30 | Summary: Apache Portable Runtime |
michael@485 | 31 | URL: http://apr.apache.org/ |
michael@485 | 32 | Vendor: Apache Software Foundation |
michael@485 | 33 | Packager: OpenPKG Foundation e.V. |
michael@485 | 34 | Distribution: OpenPKG Community |
michael@485 | 35 | Class: BASE |
michael@485 | 36 | Group: Libraries |
michael@485 | 37 | License: Apache |
michael@485 | 38 | Version: %{V_apr} |
michael@486 | 39 | Release: 20120800 |
michael@485 | 40 | |
michael@485 | 41 | # package options |
michael@485 | 42 | %option with_threads no |
michael@485 | 43 | %option with_db no |
michael@485 | 44 | %option with_gdbm no |
michael@485 | 45 | %option with_iconv no |
michael@485 | 46 | %option with_ldap no |
michael@485 | 47 | %option with_odbc no |
michael@485 | 48 | %option with_pgsql no |
michael@485 | 49 | %option with_mysql no |
michael@485 | 50 | %option with_sqlite no |
michael@485 | 51 | |
michael@485 | 52 | # list of sources |
michael@485 | 53 | Source0: http://www.apache.org/dist/apr/apr-%{V_apr}.tar.gz |
michael@485 | 54 | Source1: http://www.apache.org/dist/apr/apr-util-%{V_apr_util}.tar.gz |
michael@485 | 55 | Patch0: apr.patch |
michael@485 | 56 | |
michael@485 | 57 | # build information |
michael@485 | 58 | BuildPreReq: OpenPKG, openpkg >= 20100101, sed, make |
michael@485 | 59 | PreReq: OpenPKG, openpkg >= 20100101, sed |
michael@485 | 60 | BuildPreReq: expat |
michael@485 | 61 | PreReq: expat |
michael@485 | 62 | %if "%{with_db}" == "yes" |
michael@485 | 63 | BuildPreReq: db >= 4.6 |
michael@485 | 64 | PreReq: db >= 4.6 |
michael@485 | 65 | %endif |
michael@485 | 66 | %if "%{with_gdbm}" == "yes" |
michael@485 | 67 | BuildPreReq: gdbm |
michael@485 | 68 | PreReq: gdbm |
michael@485 | 69 | %endif |
michael@485 | 70 | %if "%{with_iconv}" == "yes" |
michael@485 | 71 | BuildPreReq: libiconv |
michael@485 | 72 | PreReq: libiconv |
michael@485 | 73 | %endif |
michael@485 | 74 | %if "%{with_ldap}" == "yes" |
michael@485 | 75 | BuildPreReq: openldap, openssl >= 0.9.8 |
michael@485 | 76 | PreReq: openldap, openssl >= 0.9.8 |
michael@485 | 77 | %endif |
michael@485 | 78 | %if "%{with_odbc}" == "yes" |
michael@485 | 79 | BuildPreReq: ODBC |
michael@485 | 80 | PreReq: ODBC |
michael@485 | 81 | %endif |
michael@485 | 82 | %if "%{with_pgsql}" == "yes" |
michael@485 | 83 | BuildPreReq: postgresql |
michael@485 | 84 | PreReq: postgresql |
michael@485 | 85 | %endif |
michael@485 | 86 | %if "%{with_mysql}" == "yes" |
michael@485 | 87 | BuildPreReq: mysql |
michael@485 | 88 | PreReq: mysql |
michael@485 | 89 | %endif |
michael@485 | 90 | %if "%{with_sqlite}" == "yes" |
michael@485 | 91 | BuildPreReq: sqlite |
michael@485 | 92 | PreReq: sqlite |
michael@485 | 93 | %endif |
michael@485 | 94 | |
michael@485 | 95 | %description |
michael@485 | 96 | Apache Portable Runtime (APR) is a library of C data structures |
michael@485 | 97 | and routines, forming a common system portability layer to as many |
michael@485 | 98 | operating systems as possible. |
michael@485 | 99 | |
michael@485 | 100 | %track |
michael@485 | 101 | prog apr = { |
michael@485 | 102 | version = %{V_apr} |
michael@485 | 103 | url = http://www.apache.org/dist/apr/ |
michael@485 | 104 | regex = apr-(__VER__)\.tar\.gz |
michael@485 | 105 | } |
michael@485 | 106 | prog apr:apr-util = { |
michael@485 | 107 | version = %{V_apr_util} |
michael@485 | 108 | url = http://www.apache.org/dist/apr/ |
michael@485 | 109 | regex = apr-util-(__VER__)\.tar\.gz |
michael@485 | 110 | } |
michael@485 | 111 | |
michael@485 | 112 | %prep |
michael@485 | 113 | %setup -q -c |
michael@485 | 114 | %setup -q -D -T -a 1 |
michael@485 | 115 | %patch -p0 |
michael@486 | 116 | %{l_shtool} subst \ |
michael@486 | 117 | -e 's;APR_USE_PROC_PTHREAD_SERIALIZE;APR_HAS_PROC_PTHREAD_SERIALIZE;' \ |
michael@486 | 118 | apr-%{V_apr}/locks/unix/proc_mutex.c |
michael@485 | 119 | |
michael@485 | 120 | %build |
michael@485 | 121 | ( cd apr-%{V_apr} |
michael@485 | 122 | CC="%{l_cc}" \ |
michael@485 | 123 | CFLAGS="%{l_cflags -O}" \ |
michael@485 | 124 | CONFIG_SHELL="/bin/sh" \ |
michael@485 | 125 | ./configure \ |
michael@485 | 126 | --enable-layout=GNU \ |
michael@485 | 127 | --prefix=%{l_prefix} \ |
michael@485 | 128 | --includedir=%{l_prefix}/include/apr \ |
michael@485 | 129 | --datadir=%{l_prefix}/share/apr \ |
michael@485 | 130 | %if "%{with_threads}" == "yes" |
michael@485 | 131 | --enable-threads \ |
michael@485 | 132 | %else |
michael@485 | 133 | --disable-threads \ |
michael@485 | 134 | %endif |
michael@485 | 135 | --enable-shared \ |
michael@485 | 136 | --enable-static |
michael@485 | 137 | %{l_make} %{l_mflags -O} |
michael@485 | 138 | ) || exit $? |
michael@485 | 139 | ( cd apr-util-%{V_apr_util} |
michael@485 | 140 | cp /dev/null config.cache |
michael@485 | 141 | %if "%{with_iconv}" == "no" |
michael@485 | 142 | ( echo "ac_cv_header_iconv_h=no" |
michael@485 | 143 | ) >config.cache |
michael@485 | 144 | %endif |
michael@485 | 145 | CC="%{l_cc}" \ |
michael@485 | 146 | CFLAGS="%{l_cflags -O}" \ |
michael@485 | 147 | %if "%{with_ldap}" == "yes" |
michael@485 | 148 | LIBS="-lssl -lcrypto" \ |
michael@485 | 149 | %endif |
michael@485 | 150 | ./configure \ |
michael@485 | 151 | --cache-file=./config.cache \ |
michael@485 | 152 | --enable-layout=GNU \ |
michael@485 | 153 | --prefix=%{l_prefix} \ |
michael@485 | 154 | --includedir=%{l_prefix}/include/apr \ |
michael@485 | 155 | --datadir=%{l_prefix}/share/apr \ |
michael@485 | 156 | --with-apr=`pwd`/../apr-%{V_apr} \ |
michael@485 | 157 | %if "%{with_db}" == "yes" |
michael@485 | 158 | --with-berkeley-db=%{l_prefix} \ |
michael@485 | 159 | %endif |
michael@485 | 160 | %if "%{with_gdbm}" == "yes" |
michael@485 | 161 | --with-gdbm=%{l_prefix} \ |
michael@485 | 162 | %endif |
michael@485 | 163 | %if "%{with_db}" == "yes" |
michael@485 | 164 | --with-dbm=db46 \ |
michael@485 | 165 | %else |
michael@485 | 166 | %if "%{with_gdbm}" == "yes" |
michael@485 | 167 | --with-dbm=gdbm \ |
michael@485 | 168 | %else |
michael@485 | 169 | --with-dbm=sdbm \ |
michael@485 | 170 | %endif |
michael@485 | 171 | %endif |
michael@485 | 172 | --with-expat=%{l_prefix} \ |
michael@485 | 173 | %if "%{with_iconv}" == "yes" |
michael@485 | 174 | --with-iconv=%{l_prefix} \ |
michael@485 | 175 | %endif |
michael@485 | 176 | %if "%{with_ldap}" == "yes" |
michael@485 | 177 | --with-ldap \ |
michael@485 | 178 | --with-ldap-include=%{l_prefix}/include/ \ |
michael@485 | 179 | --with-ldap-lib=%{l_prefix}/lib \ |
michael@485 | 180 | %endif |
michael@485 | 181 | %if "%{with_odbc}" == "yes" |
michael@485 | 182 | --with-odbc=%{l_prefix} \ |
michael@485 | 183 | %else |
michael@485 | 184 | --without-odbc \ |
michael@485 | 185 | %endif |
michael@485 | 186 | %if "%{with_pgsql}" == "yes" |
michael@485 | 187 | --with-pgsql=%{l_prefix} \ |
michael@485 | 188 | %else |
michael@485 | 189 | --without-pgsql \ |
michael@485 | 190 | %endif |
michael@485 | 191 | %if "%{with_mysql}" == "yes" |
michael@485 | 192 | --with-mysql=%{l_prefix} \ |
michael@485 | 193 | %else |
michael@485 | 194 | --without-mysql \ |
michael@485 | 195 | %endif |
michael@485 | 196 | %if "%{with_sqlite}" == "yes" |
michael@485 | 197 | --with-sqlite3=%{l_prefix} \ |
michael@485 | 198 | %else |
michael@485 | 199 | --without-sqlite3 \ |
michael@485 | 200 | %endif |
michael@485 | 201 | --enable-util-dso \ |
michael@485 | 202 | --enable-shared \ |
michael@485 | 203 | --enable-static |
michael@485 | 204 | %{l_make} %{l_mflags -O} |
michael@485 | 205 | ) || exit $? |
michael@485 | 206 | |
michael@485 | 207 | %install |
michael@485 | 208 | ( cd apr-%{V_apr} |
michael@485 | 209 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@485 | 210 | ) || exit $? |
michael@485 | 211 | ( cd apr-util-%{V_apr_util} |
michael@485 | 212 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@485 | 213 | ) || exit $? |
michael@485 | 214 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/apr.exp |
michael@485 | 215 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/aprutil.exp |
michael@485 | 216 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/apr-util-1/*.a |
michael@485 | 217 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la |
michael@485 | 218 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.so* |
michael@485 | 219 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@485 | 220 | |
michael@485 | 221 | %files -f files |
michael@485 | 222 | |
michael@485 | 223 | %clean |
michael@485 | 224 |