libiodbc.spec.in 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. #
  2. # libiodbc.spec
  3. #
  4. # $Id$
  5. #
  6. # RPM specification file to build binary distribution set
  7. #
  8. # The iODBC driver manager.
  9. #
  10. # Copyright (C) 1996-2021 OpenLink Software <[email protected]>
  11. # All Rights Reserved.
  12. #
  13. # This software is released under the terms of either of the following
  14. # licenses:
  15. #
  16. # - GNU Library General Public License (see LICENSE.LGPL)
  17. # - The BSD License (see LICENSE.BSD).
  18. #
  19. # Note that the only valid version of the LGPL license as far as this
  20. # project is concerned is the original GNU Library General Public License
  21. # Version 2, dated June 1991.
  22. #
  23. # While not mandated by the BSD license, any patches you make to the
  24. # iODBC source code may be contributed back into the iODBC project
  25. # at your discretion. Contributions will benefit the Open Source and
  26. # Data Access community as a whole. Submissions may be made at:
  27. #
  28. # http://www.iodbc.org
  29. #
  30. #
  31. # GNU Library Generic Public License Version 2
  32. # ============================================
  33. # This library is free software; you can redistribute it and/or
  34. # modify it under the terms of the GNU Library General Public
  35. # License as published by the Free Software Foundation; only
  36. # Version 2 of the License dated June 1991.
  37. #
  38. # This library is distributed in the hope that it will be useful,
  39. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  40. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  41. # Library General Public License for more details.
  42. #
  43. # You should have received a copy of the GNU Library General Public
  44. # License along with this library; if not, write to the Free
  45. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  46. #
  47. #
  48. # The BSD License
  49. # ===============
  50. # Redistribution and use in source and binary forms, with or without
  51. # modification, are permitted provided that the following conditions
  52. # are met:
  53. #
  54. # 1. Redistributions of source code must retain the above copyright
  55. # notice, this list of conditions and the following disclaimer.
  56. # 2. Redistributions in binary form must reproduce the above copyright
  57. # notice, this list of conditions and the following disclaimer in
  58. # the documentation and/or other materials provided with the
  59. # distribution.
  60. # 3. Neither the name of OpenLink Software Inc. nor the names of its
  61. # contributors may be used to endorse or promote products derived
  62. # from this software without specific prior written permission.
  63. #
  64. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  65. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  66. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  67. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR
  68. # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  69. # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  70. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  71. # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  72. # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  73. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  74. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  75. #
  76. # ----------------------------------------------------------------------
  77. # MACROS AND DEFINES
  78. # ----------------------------------------------------------------------
  79. # Disable generation of debug package
  80. %define debug_package %{nil}
  81. # Do we want to build the GTK based administrator?
  82. %define with_admin 1
  83. # on commandline: --define 'noadmin 1'
  84. %{?noadmin:%define with_admin 0}
  85. # ----------------------------------------------------------------------
  86. # BASE PACKAGE
  87. # ----------------------------------------------------------------------
  88. Name: libiodbc
  89. Version: @VERSION@
  90. Release: 1
  91. Summary: iODBC Driver Manager
  92. Group: Libraries
  93. License: LGPL or BSD license (see "LICENSE" file included in distribution)
  94. URL: http://www.iodbc.org/
  95. Source: http://www.iodbc.org/downloads/iODBC/libiodbc-%{PACKAGE_VERSION}.tar.gz
  96. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  97. %description
  98. The iODBC Driver Manager is a free implementation of the SAG CLI and
  99. ODBC compliant driver manager which allows developers to write ODBC
  100. compliant applications that can connect to various databases using
  101. appropriate backend drivers.
  102. The iODBC Driver Manager was originally created Ke Jin and is
  103. currently maintained by OpenLink Software under a LGPL or BSD license
  104. (see "LICENSE" file included in the distribution).
  105. %package devel
  106. Summary: header files and libraries for iODBC development
  107. Group: Development/Libraries
  108. Requires: libiodbc
  109. %description devel
  110. The iODBC Driver Manager is a free implementation of the SAG CLI and
  111. ODBC compliant driver manager which allows developers to write ODBC
  112. compliant applications that can connect to various databases using
  113. appropriate backend drivers.
  114. This package contains the header files and libraries needed to develop
  115. program that use the driver manager.
  116. The iODBC Driver Manager was originally created Ke Jin and is
  117. currently maintained by OpenLink Software under a LGPL or BSD license
  118. (see "LICENSE" file included in the distribution).
  119. %if %{with_admin}
  120. %package admin
  121. Summary: GTK based administrator for iODBC development
  122. Group: Development/Libraries
  123. Requires: libiodbc
  124. %description admin
  125. The iODBC Driver Manager is a free implementation of the SAG CLI and
  126. ODBC compliant driver manager which allows developers to write ODBC
  127. compliant applications that can connect to various databases using
  128. appropriate backend drivers.
  129. This package contains a GTK based administrator program for maintaining
  130. DSN information in odbc.ini and odbcinst.ini files.
  131. The iODBC Driver Manager was originally created Ke Jin and is
  132. currently maintained by OpenLink Software under a LGPL or BSD license
  133. (see "LICENSE" file included in the distribution).
  134. %endif
  135. %prep
  136. %setup
  137. %build
  138. #
  139. # Configure the package
  140. #
  141. %if %{with_admin}
  142. %configure --enable-odbc3 --with-iodbc-inidir=/etc --enable-pthreads --disable-libodbc
  143. %else
  144. %configure --enable-odbc3 --with-iodbc-inidir=/etc --enable-pthreads --disable-libodbc --disable-gui
  145. %endif
  146. #
  147. # Build the packages
  148. #
  149. make
  150. %install
  151. #
  152. # Carefully clean the build tree before use
  153. #
  154. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  155. #
  156. # Make sure we can find the necessary libraries
  157. #
  158. LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir}
  159. export LIBRARY_PATH
  160. #
  161. # Install binaries, include files and libraries
  162. #
  163. %makeinstall
  164. #
  165. # Install the sample odbc.ini and odbcinst.ini files
  166. #
  167. mkdir -p $RPM_BUILD_ROOT/etc
  168. #install -m644 etc/odbc.ini.sample $RPM_BUILD_ROOT/etc/odbc.ini
  169. #install -m644 etc/odbcinst.ini.sample $RPM_BUILD_ROOT/etc/odbcinst.ini
  170. %clean
  171. #
  172. # Carefully clean the build tree
  173. #
  174. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  175. %post -p /sbin/ldconfig
  176. %postun -p /sbin/ldconfig
  177. %files
  178. %attr(0755, root, root) %{_bindir}/iodbctest
  179. %attr(0755, root, root) %{_bindir}/iodbctestw
  180. %attr(0755, root, root) %{_libdir}/libiodbc.so.*
  181. %attr(0755, root, root) %{_libdir}/libiodbcinst.so.*
  182. %attr(0644, root, root) %{_mandir}/man1/iodbctest.1*
  183. %attr(0644, root, root) %{_mandir}/man1/iodbctestw.1*
  184. #%attr(0644, root, root) %config /etc/odbc.ini
  185. #%attr(0644, root, root) %config /etc/odbcinst.ini
  186. %files devel
  187. %defattr(-,root,root)
  188. %attr(0644, root, root) %doc AUTHORS
  189. %attr(0644, root, root) %doc LICENSE
  190. %attr(0644, root, root) %doc LICENSE.LGPL
  191. %attr(0644, root, root) %doc LICENSE.BSD
  192. %attr(0644, root, root) %doc ChangeLog
  193. %attr(0644, root, root) %doc NEWS
  194. %attr(0644, root, root) %doc README
  195. %attr(0644, root, root) %doc README.CVS
  196. %attr(0644, root, root) %doc etc/odbc.ini.sample
  197. %attr(0644, root, root) %doc etc/odbcinst.ini.sample
  198. %attr(0644, root, root) %{_includedir}/iodbcext.h
  199. %attr(0644, root, root) %{_includedir}/iodbcinst.h
  200. %attr(0644, root, root) %{_includedir}/iodbcunix.h
  201. %attr(0644, root, root) %{_includedir}/isqlext.h
  202. %attr(0644, root, root) %{_includedir}/isql.h
  203. %attr(0644, root, root) %{_includedir}/isqltypes.h
  204. %attr(0644, root, root) %{_includedir}/sql.h
  205. %attr(0644, root, root) %{_includedir}/sqltypes.h
  206. %attr(0644, root, root) %{_includedir}/sqlucode.h
  207. %attr(0644, root, root) %{_includedir}/sqlext.h
  208. %attr(0644, root, root) %{_includedir}/odbcinst.h
  209. %attr(0755, root, root) %{_bindir}/iodbc-config
  210. %attr(0644, root, root) %{_libdir}/libiodbc.a
  211. %attr(0644, root, root) %{_libdir}/libiodbc.la
  212. %attr(0755, root, root) %{_libdir}/libiodbc.so
  213. %attr(0644, root, root) %{_libdir}/libiodbcinst.a
  214. %attr(0644, root, root) %{_libdir}/libiodbcinst.la
  215. %attr(0755, root, root) %{_libdir}/libiodbcinst.so
  216. %attr(0644, root, root) %{_mandir}/man1/iodbc-config.1*
  217. %attr(0644, root, root) %{_datadir}/libiodbc/samples/Makefile
  218. %attr(0644, root, root) %{_datadir}/libiodbc/samples/iodbctest.c
  219. %attr(0644, root, root) %{_libdir}/pkgconfig/libiodbc.pc
  220. %if %{with_admin}
  221. %files admin
  222. %attr(0755, root, root) %{_bindir}/iodbcadm-gtk
  223. %ghost %{_libdir}/libdrvproxy.a
  224. %ghost %{_libdir}/libdrvproxy.la
  225. %ghost %{_libdir}/libdrvproxy.so
  226. %attr(0755, root, root) %{_libdir}/libdrvproxy.so.*
  227. %ghost %{_libdir}/libiodbcadm.a
  228. %ghost %{_libdir}/libiodbcadm.la
  229. %ghost %{_libdir}/libiodbcadm.so
  230. %attr(0755, root, root) %{_libdir}/libiodbcadm.so.*
  231. %attr(0644, root, root) %{_mandir}/man1/iodbcadm-gtk.1*
  232. %endif