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@97 | 1 | ## |
michael@97 | 2 | ## xbase.spec -- OpenPKG RPM Package Specification |
michael@97 | 3 | ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@97 | 4 | ## |
michael@97 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@97 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@97 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@97 | 8 | ## copies. |
michael@97 | 9 | ## |
michael@97 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@97 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@97 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@97 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@97 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@97 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@97 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@97 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@97 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@97 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@97 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@97 | 21 | ## SUCH DAMAGE. |
michael@97 | 22 | ## |
michael@97 | 23 | |
michael@97 | 24 | # package version |
michael@97 | 25 | %define V_xbase 2.0.0 |
michael@97 | 26 | %define V_xbsql 0.11 |
michael@97 | 27 | |
michael@97 | 28 | # package information |
michael@97 | 29 | Name: xbase |
michael@97 | 30 | Summary: Xbase DBMS Toolkit |
michael@97 | 31 | URL: http://www.rekallrevealed.org/ |
michael@97 | 32 | Vendor: OpenPKG |
michael@97 | 33 | Packager: OpenPKG Foundation e.V. |
michael@97 | 34 | Distribution: OpenPKG Community |
michael@97 | 35 | Class: EVAL |
michael@97 | 36 | Group: Database |
michael@97 | 37 | License: GPL |
michael@97 | 38 | Version: %{V_xbase} |
michael@98 | 39 | Release: 20090106 |
michael@97 | 40 | |
michael@97 | 41 | # list of sources |
michael@97 | 42 | Source0: http://www.rekallrevealed.org/packages/xbase-%{V_xbase}.tgz |
michael@97 | 43 | Source1: http://www.rekallrevealed.org/packages/xbsql-%{V_xbsql}.tgz |
michael@97 | 44 | Patch0: xbase.patch |
michael@97 | 45 | |
michael@97 | 46 | # build information |
michael@97 | 47 | Prefix: %{l_prefix} |
michael@97 | 48 | BuildRoot: %{l_buildroot} |
michael@97 | 49 | BuildPreReq: OpenPKG, openpkg >= 20040130, gcc |
michael@97 | 50 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@97 | 51 | AutoReq: no |
michael@97 | 52 | AutoReqProv: no |
michael@97 | 53 | |
michael@97 | 54 | %description |
michael@97 | 55 | Xbase DBMS is a collection of specifications, programs, utilities |
michael@97 | 56 | and a C++ class library for manipulating Xbase type datafiles and |
michael@97 | 57 | indices. XBase is dBase/FoxPro/etc compatible and is useful for |
michael@97 | 58 | accessing data in legacy dBase 3 and 4 database files as well as a |
michael@97 | 59 | general light-weight database engine. It includes support for DBF |
michael@97 | 60 | (dBase version 3 and 4) data files, NDX and NTX indexes, and DBT |
michael@97 | 61 | (dBase version 3 and 4). It supports file and record locking. |
michael@97 | 62 | |
michael@97 | 63 | %track |
michael@97 | 64 | prog xbase = { |
michael@97 | 65 | version = %{V_xbase} |
michael@97 | 66 | url = http://www.rekallrevealed.org/packages/ |
michael@97 | 67 | regex = xbase-(__VER__)\.tgz |
michael@97 | 68 | } |
michael@97 | 69 | prog xbase:xbsql = { |
michael@97 | 70 | version = %{V_xbsql} |
michael@97 | 71 | url = http://www.rekallrevealed.org/packages/ |
michael@97 | 72 | regex = xbsql-(__VER__)\.tgz |
michael@97 | 73 | } |
michael@97 | 74 | |
michael@97 | 75 | %prep |
michael@97 | 76 | %setup -q -c |
michael@97 | 77 | %setup -q -T -D -a 1 |
michael@98 | 78 | ( cd xbase-%{V_xbase} |
michael@98 | 79 | %patch -p0 |
michael@98 | 80 | ) || exit $? |
michael@98 | 81 | %{l_shtool} subst \ |
michael@98 | 82 | -e "s;/usr\(/lib/libncurses\)\.so;%{l_prefix}/\1.a;" \ |
michael@98 | 83 | xbsql-%{V_xbsql}/configure |
michael@98 | 84 | %{l_shtool} subst \ |
michael@98 | 85 | -e 's;^\(libxbsql_la_LDFLAGS = -lxbase\);\1 @LDFLAGS@;' \ |
michael@98 | 86 | -e 's;^\(xql_LDADD =\) \(-lxbase\);\1 @LDFLAGS@ \2;' \ |
michael@98 | 87 | xbsql-%{V_xbsql}/xbsql/Makefile.in |
michael@97 | 88 | |
michael@97 | 89 | %build |
michael@98 | 90 | platcomp="%{l_platform -t}" |
michael@98 | 91 | case "%{l_platform -t}" in |
michael@98 | 92 | sun4[uv]-sunos* ) platcomp="sparc-solaris" ;; |
michael@98 | 93 | *-sunos* ) platcomp="i386-solaris" ;; |
michael@98 | 94 | *-linux* ) platcomp="i386-linux" ;; |
michael@98 | 95 | *-freebsd* ) platcomp="i386-freebsd" ;; |
michael@98 | 96 | esac |
michael@97 | 97 | ( cd xbase-%{V_xbase} |
michael@97 | 98 | CC="%{l_cc}" \ |
michael@97 | 99 | CXX="%{l_cxx}" \ |
michael@97 | 100 | CFLAGS="%{l_cflags -O}" \ |
michael@97 | 101 | CXXFLAGS="%{l_cxxflags -O}" \ |
michael@97 | 102 | CPPFLAGS="%{l_cppflags}" \ |
michael@97 | 103 | LDFLAGS="%{l_ldflags}" \ |
michael@97 | 104 | ./configure \ |
michael@98 | 105 | --host=$platcomp \ |
michael@97 | 106 | --prefix=%{l_prefix} \ |
michael@97 | 107 | --disable-shared |
michael@97 | 108 | %{l_make} %{l_mflags -O} |
michael@97 | 109 | ) || exit $? |
michael@97 | 110 | ( cd xbsql-%{V_xbsql} |
michael@97 | 111 | CC="%{l_cc}" \ |
michael@97 | 112 | CXX="%{l_cxx}" \ |
michael@97 | 113 | CFLAGS="%{l_cflags -O}" \ |
michael@97 | 114 | CXXFLAGS="%{l_cxxflags -O}" \ |
michael@97 | 115 | CPPFLAGS="-I`pwd`/../xbase-%{V_xbase} %{l_cppflags}" \ |
michael@97 | 116 | LDFLAGS="-L`pwd`/../xbase-%{V_xbase}/xbase %{l_ldflags}" \ |
michael@97 | 117 | ./configure \ |
michael@97 | 118 | --prefix=%{l_prefix} \ |
michael@97 | 119 | --disable-shared |
michael@97 | 120 | %{l_make} %{l_mflags -O} |
michael@97 | 121 | ) || exit $? |
michael@97 | 122 | |
michael@97 | 123 | %install |
michael@97 | 124 | rm -rf $RPM_BUILD_ROOT |
michael@97 | 125 | ( cd xbase-%{V_xbase} |
michael@97 | 126 | %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
michael@97 | 127 | ) || exit $? |
michael@97 | 128 | ( cd xbsql-%{V_xbsql} |
michael@97 | 129 | %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
michael@97 | 130 | ) || exit $? |
michael@97 | 131 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@97 | 132 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@97 | 133 | |
michael@97 | 134 | %files -f files |
michael@97 | 135 | |
michael@97 | 136 | %clean |
michael@97 | 137 | rm -rf $RPM_BUILD_ROOT |
michael@97 | 138 |