libgda.spec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. ##
  2. ## libgda.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_major 2.99
  26. %define V_minor 5
  27. # package information
  28. Name: libgda
  29. Summary: GNU Data Access Library
  30. URL: http://www.gnome-db.org/
  31. Vendor: The GNOME Project
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: Database
  36. License: GPL/LGPL
  37. Version: %{V_major}.%{V_minor}
  38. Release: 20070213
  39. # package options
  40. %option with_sqlite yes
  41. %option with_pgsql no
  42. %option with_mysql no
  43. %option with_mdb no
  44. %option with_odbc no
  45. %option with_db no
  46. %option with_ldap no
  47. # list of sources
  48. Source0: http://ftp.gnome.org/pub/GNOME/sources/libgda/%{V_major}/libgda-%{version}.tar.gz
  49. Patch0: libgda.patch
  50. # build information
  51. Prefix: %{l_prefix}
  52. BuildRoot: %{l_buildroot}
  53. BuildPreReq: OpenPKG, openpkg >= 20040130, make, pkgconfig
  54. PreReq: OpenPKG, openpkg >= 20040130
  55. BuildPreReq: glib2, libxml, libxslt, perl-xml
  56. PreReq: glib2, libxml, libxslt, perl-xml
  57. %if "%{with_sqlite}" == "yes"
  58. BuildPreReq: sqlite
  59. PreReq: sqlite
  60. %endif
  61. %if "%{with_pgsql}" == "yes"
  62. BuildPreReq: postgresql
  63. PreReq: postgresql
  64. %endif
  65. %if "%{with_mysql}" == "yes"
  66. BuildPreReq: mysql
  67. PreReq: mysql
  68. %endif
  69. %if "%{with_mdb}" == "yes"
  70. BuildPreReq: mdbtools
  71. PreReq: mdbtools
  72. %endif
  73. %if "%{with_odbc}" == "yes"
  74. BuildPreReq: ODBC
  75. PreReq: ODBC
  76. %endif
  77. %if "%{with_db}" == "yes"
  78. BuildPreReq: db
  79. PreReq: db
  80. %endif
  81. %if "%{with_ldap}" == "yes"
  82. BuildPreReq: openldap
  83. PreReq: openldap
  84. %endif
  85. AutoReq: no
  86. AutoReqProv: no
  87. %description
  88. GNU Data Access (GDA) is an attempt to provide uniform access to
  89. different kinds of data sources (databases, information servers,
  90. mail spools, etc). It is a complete architecture that provides all
  91. you need to access data. It is defined by a set of plugin APIs as
  92. generic as possible (but very powerful at the same time) so that
  93. any kind of data source can be accessed through them. libgda is an
  94. interface to the GDA architecture, providing a nice wrapper around
  95. the GDA interfaces, for both the client and the server parts. It
  96. also provides a bunch of tools to help you both in the development
  97. and management of your data sources, all done through the GDA
  98. model's interfaces.
  99. %track
  100. prog libgda = {
  101. version = %{version}
  102. url = http://ftp.gnome.org/pub/GNOME/sources/libgda/%{V_major}/
  103. regex = libgda-(__VER__)\.tar\.gz
  104. }
  105. %prep
  106. %setup -q
  107. %patch -p0
  108. %build
  109. export CC="%{l_cc}"
  110. export CFLAGS="%{l_cflags -O}"
  111. export CPPFLAGS="%{l_cppflags}"
  112. export LDFLAGS="%{l_ldflags}"
  113. ./configure \
  114. --prefix=%{l_prefix} \
  115. --mandir=%{l_prefix}/man \
  116. %if "%{with_sqlite}" == "yes"
  117. --with-sqlite=%{l_prefix} \
  118. %else
  119. --without-sqlite \
  120. %endif
  121. %if "%{with_pgsql}" == "yes"
  122. --with-postgres=%{l_prefix} \
  123. %else
  124. --without-postgres \
  125. %endif
  126. %if "%{with_mysql}" == "yes"
  127. --with-mysql=%{l_prefix} \
  128. %else
  129. --without-mysql \
  130. %endif
  131. %if "%{with_mdb}" == "yes"
  132. --with-mdb=%{l_prefix} \
  133. %else
  134. --without-mdb \
  135. %endif
  136. %if "%{with_odbc}" == "yes"
  137. --with-odbc=%{l_prefix} \
  138. %else
  139. --without-odbc \
  140. %endif
  141. %if "%{with_db}" == "yes"
  142. --with-bdb=%{l_prefix} \
  143. %else
  144. --without-bdb \
  145. %endif
  146. %if "%{with_ldap}" == "yes"
  147. --with-ldap=%{l_prefix} \
  148. %else
  149. --without-ldap \
  150. %endif
  151. --disable-rebuilds \
  152. --enable-shared \
  153. --enable-static
  154. %{l_make} %{l_mflags}
  155. %install
  156. rm -rf $RPM_BUILD_ROOT
  157. %{l_make} %{l_mflags} install \
  158. AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
  159. mkinstalldirs="%{l_shtool} mkdir -f -p -m 755"
  160. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  161. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  162. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gtk-doc
  163. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.s[ol]*
  164. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
  165. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  166. %{l_files_std} \
  167. '%not %dir %{l_prefix}/lib/pkgconfig'
  168. %files -f files
  169. %clean
  170. rm -rf $RPM_BUILD_ROOT