apr/apr.spec

Wed, 08 Aug 2012 00:07:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 08 Aug 2012 00:07:34 +0200
changeset 485
aa99e75f2e06
child 486
87f4014366d2
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

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@485 39 Release: 20120214
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@485 116
michael@485 117 %build
michael@485 118 ( cd apr-%{V_apr}
michael@485 119 CC="%{l_cc}" \
michael@485 120 CFLAGS="%{l_cflags -O}" \
michael@485 121 CONFIG_SHELL="/bin/sh" \
michael@485 122 ./configure \
michael@485 123 --enable-layout=GNU \
michael@485 124 --prefix=%{l_prefix} \
michael@485 125 --includedir=%{l_prefix}/include/apr \
michael@485 126 --datadir=%{l_prefix}/share/apr \
michael@485 127 %if "%{with_threads}" == "yes"
michael@485 128 --enable-threads \
michael@485 129 %else
michael@485 130 --disable-threads \
michael@485 131 %endif
michael@485 132 --enable-shared \
michael@485 133 --enable-static
michael@485 134 %{l_make} %{l_mflags -O}
michael@485 135 ) || exit $?
michael@485 136 ( cd apr-util-%{V_apr_util}
michael@485 137 cp /dev/null config.cache
michael@485 138 %if "%{with_iconv}" == "no"
michael@485 139 ( echo "ac_cv_header_iconv_h=no"
michael@485 140 ) >config.cache
michael@485 141 %endif
michael@485 142 CC="%{l_cc}" \
michael@485 143 CFLAGS="%{l_cflags -O}" \
michael@485 144 %if "%{with_ldap}" == "yes"
michael@485 145 LIBS="-lssl -lcrypto" \
michael@485 146 %endif
michael@485 147 ./configure \
michael@485 148 --cache-file=./config.cache \
michael@485 149 --enable-layout=GNU \
michael@485 150 --prefix=%{l_prefix} \
michael@485 151 --includedir=%{l_prefix}/include/apr \
michael@485 152 --datadir=%{l_prefix}/share/apr \
michael@485 153 --with-apr=`pwd`/../apr-%{V_apr} \
michael@485 154 %if "%{with_db}" == "yes"
michael@485 155 --with-berkeley-db=%{l_prefix} \
michael@485 156 %endif
michael@485 157 %if "%{with_gdbm}" == "yes"
michael@485 158 --with-gdbm=%{l_prefix} \
michael@485 159 %endif
michael@485 160 %if "%{with_db}" == "yes"
michael@485 161 --with-dbm=db46 \
michael@485 162 %else
michael@485 163 %if "%{with_gdbm}" == "yes"
michael@485 164 --with-dbm=gdbm \
michael@485 165 %else
michael@485 166 --with-dbm=sdbm \
michael@485 167 %endif
michael@485 168 %endif
michael@485 169 --with-expat=%{l_prefix} \
michael@485 170 %if "%{with_iconv}" == "yes"
michael@485 171 --with-iconv=%{l_prefix} \
michael@485 172 %endif
michael@485 173 %if "%{with_ldap}" == "yes"
michael@485 174 --with-ldap \
michael@485 175 --with-ldap-include=%{l_prefix}/include/ \
michael@485 176 --with-ldap-lib=%{l_prefix}/lib \
michael@485 177 %endif
michael@485 178 %if "%{with_odbc}" == "yes"
michael@485 179 --with-odbc=%{l_prefix} \
michael@485 180 %else
michael@485 181 --without-odbc \
michael@485 182 %endif
michael@485 183 %if "%{with_pgsql}" == "yes"
michael@485 184 --with-pgsql=%{l_prefix} \
michael@485 185 %else
michael@485 186 --without-pgsql \
michael@485 187 %endif
michael@485 188 %if "%{with_mysql}" == "yes"
michael@485 189 --with-mysql=%{l_prefix} \
michael@485 190 %else
michael@485 191 --without-mysql \
michael@485 192 %endif
michael@485 193 %if "%{with_sqlite}" == "yes"
michael@485 194 --with-sqlite3=%{l_prefix} \
michael@485 195 %else
michael@485 196 --without-sqlite3 \
michael@485 197 %endif
michael@485 198 --enable-util-dso \
michael@485 199 --enable-shared \
michael@485 200 --enable-static
michael@485 201 %{l_make} %{l_mflags -O}
michael@485 202 ) || exit $?
michael@485 203
michael@485 204 %install
michael@485 205 ( cd apr-%{V_apr}
michael@485 206 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@485 207 ) || exit $?
michael@485 208 ( cd apr-util-%{V_apr_util}
michael@485 209 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@485 210 ) || exit $?
michael@485 211 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/apr.exp
michael@485 212 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/aprutil.exp
michael@485 213 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/apr-util-1/*.a
michael@485 214 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
michael@485 215 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.so*
michael@485 216 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@485 217
michael@485 218 %files -f files
michael@485 219
michael@485 220 %clean
michael@485 221

mercurial