unixODBC-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. %define __libtoolize true
  2. %define _qt4_version %(pkg-config --modversion --silence-errors Qt 2>/dev/null || echo 4.8.5)
  3. %define _qt4_bindir %(pkg-config --variable bindir --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt-%{_qt4_version}/bin)
  4. Name: unixODBC
  5. Summary: A complete ODBC Driver Manager for Linux
  6. Version: 2.3.2
  7. Release: 1%{?_dist_release}
  8. Group: System Environment/Libraries
  9. # Programs are GPL, libraries are LGPL, except News Server library is GPL.
  10. License: GPLv2+ and LGPLv2+
  11. URL: http://www.unixODBC.org/
  12. Source: http://www.unixODBC.org/%{name}-%{version}.tar.gz
  13. Source1: odbcinst.ini
  14. Source4: conffile.h
  15. Source5: README.dist
  16. Source6: iusql.1
  17. Source7: dltest.1
  18. Source8: odbc_config.1
  19. Source9: unixODBC.7
  20. Patch1: depcomp.patch
  21. Patch6: export-symbols.patch
  22. Patch8: so-version-bump.patch
  23. Patch9: keep-typedefs.patch
  24. Patch10: unixODBC-isql.1.patch
  25. Conflicts: iodbc
  26. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  27. BuildRequires: libX11-devel libXt-devel libXext-devel
  28. BuildRequires: qt4-devel qt-assistant-adp-devel readline-devel
  29. BuildRequires: automake autoconf libtool libtool-ltdl-devel bison flex
  30. BuildRequires: desktop-file-utils
  31. Vendor: Project Vine
  32. Distribution: Vine Linux
  33. %description
  34. The unixODBC Project goals are to develop and promote unixODBC to
  35. be the definitive standard for ODBC on the Linux platform. This is to
  36. include GUI support for KDE.
  37. Install unixODBC if you'd like to access databases through ODBC. This
  38. package include drivers for PostgreSQL and local files.
  39. If you want to develop programs that will access data through ODBC,
  40. you'll also need to have the unixODBC package installed.
  41. %package devel
  42. Summary: Development files for programs which will use the unixODBC library.
  43. Group: Development/Libraries
  44. Requires: %{name} = %{version}-%{release}
  45. %description devel
  46. Install unixODBC if you'd like to access databases through ODBC drivers.
  47. If you want to develop programs that will access data through ODBC,
  48. you'll also need to install the unixODBC-devel (this) package.
  49. %package kde
  50. Summary: KDE DriverManager components for ODBC
  51. Group: System Environment/Libraries
  52. Requires: %{name} = %{version}-%{release}
  53. %description kde
  54. Components for the ODBCConfig and DataManager (KDE) Components of unixODBC.
  55. %prep
  56. %setup -q
  57. %patch1 -p1
  58. %patch6 -p1
  59. %patch8 -p1
  60. %patch9 -p1
  61. %patch10 -p1
  62. chmod 0644 Drivers/MiniSQL/*.c
  63. chmod 0644 Drivers/nn/*.c
  64. chmod 0644 Drivers/template/*.c
  65. chmod 0644 doc/ProgrammerManual/Tutorial/*.html
  66. chmod 0644 doc/lst/*
  67. chmod 0644 include/odbcinst.h
  68. # Blow away the embedded libtool and replace with build system's libtool.
  69. # (We will use the installed libtool anyway, but this makes sure they match.)
  70. rm -rf config.guess config.sub install-sh ltmain.sh libltdl
  71. # this hack is so we can build with either libtool 2.2 or 1.5
  72. libtoolize --install || libtoolize
  73. %build
  74. aclocal
  75. automake --add-missing
  76. autoconf
  77. # unixODBC 2.2.14 is not aliasing-safe
  78. CFLAGS="%{optflags} -fno-strict-aliasing"
  79. CXXFLAGS="$CFLAGS"
  80. export CFLAGS CXXFLAGS
  81. %configure --with-gnu-ld=yes --enable-threads=yes \
  82. --enable-drivers=yes --enable-driverc=yes --enable-ltdllib
  83. make all
  84. %install
  85. make DESTDIR=$RPM_BUILD_ROOT install
  86. install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
  87. # multilib header hacks
  88. # we only apply this to known Red Hat multilib arches, per bug #181335
  89. case `uname -i` in
  90. i386 | x86_64 | ia64 | ppc | ppc64 | s390 | s390x | sparc | sparc64 )
  91. mv $RPM_BUILD_ROOT%{_includedir}/unixodbc_conf.h $RPM_BUILD_ROOT%{_includedir}/unixodbc_conf_`uname -i`.h
  92. rm -f unixodbc_conf.h
  93. sed s/CONFFILE/unixodbc_conf/ %{SOURCE4} >unixodbc_conf.h
  94. install -m 644 unixodbc_conf.h $RPM_BUILD_ROOT%{_includedir}
  95. ;;
  96. *)
  97. ;;
  98. esac
  99. # add some explanatory documentation
  100. cp %{SOURCE5} README.dist
  101. # remove obsolete Postgres drivers from the package (but not the setup code)
  102. rm -f $RPM_BUILD_ROOT%{_libdir}/libodbcpsql.so*
  103. # copy text driver documentation into main doc directory
  104. # currently disabled because upstream no longer includes text driver
  105. # mkdir -p doc/Drivers/txt
  106. # cp -pr Drivers/txt/doc/* doc/Drivers/txt
  107. # don't want to install doc Makefiles as docs
  108. find doc -name 'Makefile*' | xargs rm
  109. # we do not want to ship static libraries
  110. rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
  111. # remove unpackaged files from the buildroot
  112. rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
  113. rm -f $RPM_BUILD_ROOT%{_libdir}/libltdl.*
  114. rm -rf $RPM_BUILD_ROOT%{_datadir}/libtool
  115. # initialize lists of .so files
  116. find $RPM_BUILD_ROOT%{_libdir} -name "*.so.*" | sed "s|^$RPM_BUILD_ROOT||" > base-so-list
  117. find $RPM_BUILD_ROOT%{_libdir} -name "*.so" | sed "s|^$RPM_BUILD_ROOT||" > devel-so-list
  118. # move these to main package, they're often dlopened...
  119. for lib in libodbc.so libodbcinst.so libodbcpsqlS.so libodbcmyS.so
  120. do
  121. echo "%{_libdir}/$lib" >> base-so-list
  122. grep -v "/$lib$" devel-so-list > devel-so-list.x
  123. mv -f devel-so-list.x devel-so-list
  124. done
  125. # install man pages that are not part of the upstream yet
  126. install -Dm644 %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/man1/iusql.1
  127. install -Dm644 %{SOURCE7} $RPM_BUILD_ROOT%{_mandir}/man1/dltest.1
  128. install -Dm644 %{SOURCE8} $RPM_BUILD_ROOT%{_mandir}/man1/odbc_config.1
  129. install -Dm644 %{SOURCE9} $RPM_BUILD_ROOT%{_mandir}/man7/unixODBC.7
  130. %clean
  131. rm -rf $RPM_BUILD_ROOT
  132. %post -p /sbin/ldconfig
  133. %postun -p /sbin/ldconfig
  134. %post kde -p /sbin/ldconfig
  135. %postun kde -p /sbin/ldconfig
  136. %files -f base-so-list
  137. %doc README COPYING AUTHORS ChangeLog NEWS doc
  138. %doc README.dist
  139. %config(noreplace) %{_sysconfdir}/odbc*
  140. %{_bindir}/odbcinst
  141. %{_bindir}/isql
  142. %{_bindir}/dltest
  143. %{_bindir}/iusql
  144. %{_bindir}/odbc_config
  145. %{_bindir}/slencheck
  146. %{_mandir}/man*/*
  147. %files devel -f devel-so-list
  148. %{_includedir}/*
  149. %changelog
  150. * Tue Jul 8 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.2-1
  151. - new upstream release.
  152. - gui was discontinued in upstream.
  153. * Fri Dec 27 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.14-3
  154. - rebuild with VineSeed environment
  155. * Tue Apr 12 2011 IWAI, Masaharu <iwai@alib.jp> 2.2.14-2
  156. - add --with-qt-includes option for configure
  157. * Sat Apr 09 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.14-1
  158. - updated to 2.2.14
  159. * Sat Sep 20 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.12-1
  160. - applied new versioning policy
  161. - removed *.la files from devel package
  162. * Sun Sep 02 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.12-0vl1
  163. - updated to 2.2.12
  164. - rebuilt with new toolchain
  165. * Thu Sep 07 2006 NAKAMURA Kenta <kenta@vinelinux.org> 2.2.11-0vl3
  166. - use installed libltdl
  167. - added unixODBC-2.2.11-symbols.patch and nortldglobal.patch
  168. * Sat Apr 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.11-0vl2
  169. - rebuilt with readline 5.1
  170. * Wed Aug 24 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.11-0vl1
  171. - updated to 2.2.11
  172. - not libtoolize
  173. * Sat Sep 27 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.2.5-0vl2
  174. - added Patch100 to fix typo in doc/Makefile.am from failure on compiling
  175. * Fri Jun 6 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.5-0vl1
  176. - source upgrade
  177. - remove patch (no need)
  178. - run libtoolize etc for VineSeed
  179. * Wed Feb 12 2003 Tomoya TAKA <taka@vinelinux.org> 2.2.4-0vl2
  180. - enable -kde subpackage on alpha, but still disable for Vine2.5/2.6
  181. * Sun Feb 9 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.4-0vl1
  182. - source upgrade
  183. - change spec to build both VineSeed and Vine2.5/2.6
  184. - add patch from rawhide 2.2.3-6
  185. * Sun Oct 13 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.3-0vl2
  186. - Requires: libjpeg (not libjpeg-6b)
  187. * Sun Oct 6 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.3-0vl1
  188. - source upgrade
  189. - add BuildPrereq: autoconf253 automake15
  190. - add PreReq: ldconfig
  191. - fix %files section and clean up spec
  192. - for unixODBC-kde package
  193. - add Requires: unixODBC = %{version}
  194. - add Requires: XFree86-libs qt freetype2 libjpeg-6b libmng libpng zlib
  195. - delete .desktop files
  196. * Thu Apr 4 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 2.2.0-0vl2
  197. - rebuild with KDE3
  198. * Sat Feb 23 2002 Satoshi MACHINO <machino@vinelinux.org> 2.2.0-0vl1
  199. - updated unixODBC-2.2.0
  200. - fixed LinuxODBC.xpm and smallLinuxODBC.xpm dir
  201. * Wed Jan 30 2002 Tomoya TAKA <taka@vinelinux.org> 2.0.7-3vl2
  202. - remove -kde package on alpha
  203. * Fri Jan 4 2002 Akira TAGOH <tagoh@gnome.gr.jp> 2.0.7-3vl1
  204. - Rebuild for Vine.
  205. * Sun Jun 24 2001 Than Ngo <than@redhat.com>
  206. - rebuild against qt-2.3.1, kde-2.1.x
  207. * Fri Jun 15 2001 Trond Eivind Glomsrød <teg@redhat.com>
  208. - Better default odbcinst.ini
  209. - Minor cleanups
  210. * Wed Jun 6 2001 Trond Eivind Glomsrød <teg@redhat.com>
  211. - 2.0.7
  212. * Wed Apr 25 2001 Trond Eivind Glomsrød <teg@redhat.com>
  213. - Fix for isql segfault on EOF/ctrl-d exit
  214. * Fri Apr 20 2001 Trond Eivind Glomsrød <teg@redhat.com>
  215. - 2.0.6
  216. - add patch for 64 bit archs (dword shouldn't be "long int")
  217. * Wed Feb 28 2001 Trond Eivind Glomsrød <teg@redhat.com>
  218. - rebuild
  219. * Tue Nov 28 2000 Trond Eivind Glomsrød <teg@redhat.com>
  220. - 1.8.13
  221. * Tue Oct 10 2000 Trond Eivind Glomsrød <teg@redhat.com>
  222. - enable GUI now that we have KDE compiled with the standard
  223. compiler
  224. - move the applnk entries to the KDE package
  225. * Thu Aug 24 2000 Nalin Dahyabhai <nalin@redhat.com>
  226. - add the missing shared libs to the non-devel package
  227. * Wed Aug 23 2000 Preston Brown <pbrown@redhat.com>
  228. - 1.8.12 fixes problems with the postgresql driver
  229. * Mon Jul 31 2000 Trond Eivind Glomsrød <teg@redhat.com>
  230. - disable KDE subpackage to avoid the mess that is C++ binary
  231. compatibility
  232. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  233. - automatic rebuild
  234. * Fri Jun 30 2000 Florian La Roche <laroche@redhat.com>
  235. - improved QTDIR detection
  236. * Wed Jun 28 2000 Trond Eivind Glomsrød <teg@redhat.com>
  237. - 1.8.10
  238. - use %%{_tmppath}
  239. - update URL
  240. - including two missing libraries
  241. * Tue Jun 13 2000 Preston Brown <pbrown@redhat.com>
  242. - 1.8.9
  243. * Fri Jun 09 2000 Preston Brown <pbrown@redhat.com>
  244. - adopted for Winston, changed to Red Hat packaging standards
  245. * Tue Apr 18 2000 Murray Todd Williams <murray@codingapes.com>
  246. - added a unixODBC-devel RPM to the group, added KDE links and icons to system
  247. - all of which came from recommendations from Fredrick Meunier
  248. - <Fredrick.Meunier@computershare.com.au>
  249. * Mon Apr 17 2000 Murray Todd Williams <murray@codingapes.com>
  250. - unixODBC-1.8.7
  251. - moved install to $RPM_BUILD_ROOT so it didn't overrun existing files.