unixODBC-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. %define __libtoolize true
  2. %define _qt4_version %(pkg-config --modversion --silence-errors Qt 2>/dev/null || echo 4.7.2)
  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.2.14
  7. Release: 2%{?_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. Source2: ODBCConfig.desktop
  15. Source3: DataManager.desktop
  16. Source4: conffile.h
  17. Patch1: depcomp.patch
  18. Patch2: multilib-config.patch
  19. Patch3: warning-cleanup.patch
  20. Patch6: export-symbols.patch
  21. Patch7: libtool-config.patch
  22. Patch8: so-version-bump.patch
  23. Patch9: keep-typedefs.patch
  24. Patch10: odbcint64-config.patch
  25. Patch11: enable-items.patch
  26. Patch12: isql-fixes.patch
  27. Conflicts: iodbc
  28. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  29. BuildRequires: libX11-devel libXt-devel libXext-devel
  30. BuildRequires: qt4-devel qt-assistant-adp-devel readline-devel
  31. BuildRequires: automake autoconf libtool libtool-ltdl-devel bison flex
  32. BuildRequires: desktop-file-utils
  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. %patch2 -p1
  59. %patch3 -p1
  60. %patch6 -p1
  61. %patch7 -p1
  62. %patch8 -p1
  63. %patch9 -p1
  64. %patch10 -p1
  65. %patch11 -p1
  66. %patch12 -p1
  67. chmod 0644 Drivers/MiniSQL/*.c
  68. chmod 0644 Drivers/nn/*.c
  69. chmod 0644 Drivers/template/*.c
  70. chmod 0644 doc/ProgrammerManual/Tutorial/*.html
  71. chmod 0644 doc/lst/*
  72. chmod 0644 include/odbcinst.h
  73. # Blow away the embedded libtool and replace with build system's libtool.
  74. # (We will use the installed libtool anyway, but this makes sure they match.)
  75. rm -rf config.guess config.sub install-sh ltmain.sh libltdl
  76. # this hack is so we can build with either libtool 2.2 or 1.5
  77. libtoolize --install || libtoolize
  78. %build
  79. # pick up qt path
  80. export PATH="%{_qt4_bindir}:$PATH"
  81. # clean up old moc files
  82. (cd odbcinstQ4 && rm -f mC*.cpp)
  83. aclocal
  84. automake --add-missing
  85. autoconf
  86. # unixODBC 2.2.14 is not aliasing-safe
  87. CFLAGS="%{optflags} -fno-strict-aliasing"
  88. CXXFLAGS="$CFLAGS"
  89. export CFLAGS CXXFLAGS
  90. %configure --with-gnu-ld=yes --enable-threads=yes --enable-gui=yes --enable-drivers --enable-ltdllib --with-qt-programs="%{_qt4_bindir}" --with-qt-libraries="%{_qt4_libdir}" --with-qt-includes="%{_qt4_headerdir}"
  91. make all
  92. %install
  93. # pick up qt path
  94. export PATH="%{_qt4_bindir}:$PATH"
  95. rm -rf $RPM_BUILD_ROOT
  96. mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
  97. mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
  98. make DESTDIR=$RPM_BUILD_ROOT install
  99. cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
  100. # install *.desktop files
  101. desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2}
  102. # package doesn't supply an icon for ODBCConfig, so use the one for DataManager
  103. cp DataManager/LinuxODBC.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps
  104. # multilib header hacks
  105. # we only apply this to known Red Hat multilib arches, per bug #181335
  106. case `uname -i` in
  107. i386 | x86_64 | ppc | ppc64 | s390 | s390x | sparc | sparc64 )
  108. mv $RPM_BUILD_ROOT%{_includedir}/unixodbc_conf.h $RPM_BUILD_ROOT%{_includedir}/unixodbc_conf_`uname -i`.h
  109. rm -f unixodbc_conf.h
  110. sed s/CONFFILE/unixodbc_conf/ %{SOURCE4} >unixodbc_conf.h
  111. install -m 644 unixodbc_conf.h $RPM_BUILD_ROOT%{_includedir}
  112. ;;
  113. *)
  114. ;;
  115. esac
  116. # remove obsolete Postgres drivers from the package (but not the setup code)
  117. rm -f $RPM_BUILD_ROOT%{_libdir}/libodbcpsql.so*
  118. # copy text driver documentation into main doc directory
  119. # currently disabled because upstream no longer includes text driver
  120. # mkdir -p doc/Drivers/txt
  121. # cp -pr Drivers/txt/doc/* doc/Drivers/txt
  122. # don't want to install doc Makefiles as docs
  123. #find doc -name 'Makefile*' | xargs rm
  124. # we do not want to ship static libraries
  125. rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
  126. # remove unpackaged files from the buildroot
  127. rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
  128. rm -f $RPM_BUILD_ROOT%{_libdir}/libltdl.*
  129. rm -rf $RPM_BUILD_ROOT%{_datadir}/libtool
  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
  137. %defattr(-,root,root)
  138. %doc README COPYING AUTHORS ChangeLog NEWS INSTALL doc
  139. %config(noreplace) %{_sysconfdir}/odbc*
  140. %{_bindir}/dltest
  141. %{_bindir}/isql
  142. %{_bindir}/iusql
  143. %{_bindir}/odbcinst
  144. %{_libdir}/libboundparam.so.*
  145. %{_libdir}/libesoobS.so.*
  146. %{_libdir}/libgtrtst.so.*
  147. %{_libdir}/libmimerS.so.*
  148. %{_libdir}/libnn.so.*
  149. %{_libdir}/libodbc.so.*
  150. %{_libdir}/libodbccr.so.*
  151. %{_libdir}/libodbcdrvcfg1S.so.*
  152. %{_libdir}/libodbcdrvcfg2S.so.*
  153. #%{_libdir}/libodbcextras.so.*
  154. %{_libdir}/libodbcinst.so.*
  155. %{_libdir}/libodbcminiS.so.*
  156. %{_libdir}/libodbcmyS.so.*
  157. %{_libdir}/libodbcnnS.so.*
  158. #%{_libdir}/libodbcpsql.so.*
  159. %{_libdir}/libodbcpsqlS.so.*
  160. #%{_libdir}/libodbctxt.so.*
  161. %{_libdir}/libodbctxtS.so.*
  162. %{_libdir}/liboplodbcS.so.*
  163. %{_libdir}/liboraodbcS.so.*
  164. %{_libdir}/libsapdbS.so.*
  165. %{_libdir}/libtdsS.so.*
  166. %{_libdir}/libtemplate.so.*
  167. %files devel
  168. %defattr(-,root,root)
  169. %{_bindir}/odbc_config
  170. %{_includedir}/*
  171. %{_libdir}/libboundparam.so
  172. %{_libdir}/libesoobS.so
  173. %{_libdir}/libgtrtst.so
  174. %{_libdir}/libmimerS.so
  175. %{_libdir}/libnn.so
  176. %{_libdir}/libodbc.so
  177. %{_libdir}/libodbccr.so
  178. %{_libdir}/libodbcdrvcfg1S.so
  179. %{_libdir}/libodbcdrvcfg2S.so
  180. #%{_libdir}/libodbcextras.so
  181. %{_libdir}/libodbcinst.so
  182. %{_libdir}/libodbcminiS.so
  183. %{_libdir}/libodbcmyS.so
  184. %{_libdir}/libodbcnnS.so
  185. #%{_libdir}/libodbcpsql.so
  186. %{_libdir}/libodbcpsqlS.so
  187. #%{_libdir}/libodbctxt.so
  188. %{_libdir}/libodbctxtS.so
  189. %{_libdir}/liboplodbcS.so
  190. %{_libdir}/liboraodbcS.so
  191. %{_libdir}/libsapdbS.so
  192. %{_libdir}/libtdsS.so
  193. %{_libdir}/libtemplate.so
  194. #{_libdir}/*.a
  195. #{_libdir}/*.la
  196. %files kde
  197. %defattr(-,root,root)
  198. %{_bindir}/ODBCConfig
  199. %{_datadir}/applications/ODBCConfig.desktop
  200. %{_datadir}/pixmaps/LinuxODBC.xpm
  201. %{_libdir}/libodbcinstQ*so
  202. %{_libdir}/libodbcinstQ*so.*
  203. %changelog
  204. * Tue Apr 12 2011 IWAI, Masaharu <iwai@alib.jp> 2.2.14-2
  205. - add --with-qt-includes option for configure
  206. * Sat Apr 09 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.14-1
  207. - updated to 2.2.14
  208. * Sat Sep 20 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.12-1
  209. - applied new versioning policy
  210. - removed *.la files from devel package
  211. * Sun Sep 02 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.12-0vl1
  212. - updated to 2.2.12
  213. - rebuilt with new toolchain
  214. * Thu Sep 07 2006 NAKAMURA Kenta <kenta@vinelinux.org> 2.2.11-0vl3
  215. - use installed libltdl
  216. - added unixODBC-2.2.11-symbols.patch and nortldglobal.patch
  217. * Sat Apr 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.11-0vl2
  218. - rebuilt with readline 5.1
  219. * Wed Aug 24 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.11-0vl1
  220. - updated to 2.2.11
  221. - not libtoolize
  222. * Sat Sep 27 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.2.5-0vl2
  223. - added Patch100 to fix typo in doc/Makefile.am from failure on compiling
  224. * Fri Jun 6 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.5-0vl1
  225. - source upgrade
  226. - remove patch (no need)
  227. - run libtoolize etc for VineSeed
  228. * Wed Feb 12 2003 Tomoya TAKA <taka@vinelinux.org> 2.2.4-0vl2
  229. - enable -kde subpackage on alpha, but still disable for Vine2.5/2.6
  230. * Sun Feb 9 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.4-0vl1
  231. - source upgrade
  232. - change spec to build both VineSeed and Vine2.5/2.6
  233. - add patch from rawhide 2.2.3-6
  234. * Sun Oct 13 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.3-0vl2
  235. - Requires: libjpeg (not libjpeg-6b)
  236. * Sun Oct 6 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.3-0vl1
  237. - source upgrade
  238. - add BuildPrereq: autoconf253 automake15
  239. - add PreReq: ldconfig
  240. - fix %files section and clean up spec
  241. - for unixODBC-kde package
  242. - add Requires: unixODBC = %{version}
  243. - add Requires: XFree86-libs qt freetype2 libjpeg-6b libmng libpng zlib
  244. - delete .desktop files
  245. * Thu Apr 4 2002 AKIYAMA Kazuhito <akiyama@karen.servepics.com> 2.2.0-0vl2
  246. - rebuild with KDE3
  247. * Sat Feb 23 2002 Satoshi MACHINO <machino@vinelinux.org> 2.2.0-0vl1
  248. - updated unixODBC-2.2.0
  249. - fixed LinuxODBC.xpm and smallLinuxODBC.xpm dir
  250. * Wed Jan 30 2002 Tomoya TAKA <taka@vinelinux.org> 2.0.7-3vl2
  251. - remove -kde package on alpha
  252. * Fri Jan 4 2002 Akira TAGOH <tagoh@gnome.gr.jp> 2.0.7-3vl1
  253. - Rebuild for Vine.
  254. * Sun Jun 24 2001 Than Ngo <than@redhat.com>
  255. - rebuild against qt-2.3.1, kde-2.1.x
  256. * Fri Jun 15 2001 Trond Eivind Glomsrød <teg@redhat.com>
  257. - Better default odbcinst.ini
  258. - Minor cleanups
  259. * Wed Jun 6 2001 Trond Eivind Glomsrød <teg@redhat.com>
  260. - 2.0.7
  261. * Wed Apr 25 2001 Trond Eivind Glomsrød <teg@redhat.com>
  262. - Fix for isql segfault on EOF/ctrl-d exit
  263. * Fri Apr 20 2001 Trond Eivind Glomsrød <teg@redhat.com>
  264. - 2.0.6
  265. - add patch for 64 bit archs (dword shouldn't be "long int")
  266. * Wed Feb 28 2001 Trond Eivind Glomsrød <teg@redhat.com>
  267. - rebuild
  268. * Tue Nov 28 2000 Trond Eivind Glomsrød <teg@redhat.com>
  269. - 1.8.13
  270. * Tue Oct 10 2000 Trond Eivind Glomsrød <teg@redhat.com>
  271. - enable GUI now that we have KDE compiled with the standard
  272. compiler
  273. - move the applnk entries to the KDE package
  274. * Thu Aug 24 2000 Nalin Dahyabhai <nalin@redhat.com>
  275. - add the missing shared libs to the non-devel package
  276. * Wed Aug 23 2000 Preston Brown <pbrown@redhat.com>
  277. - 1.8.12 fixes problems with the postgresql driver
  278. * Mon Jul 31 2000 Trond Eivind Glomsrød <teg@redhat.com>
  279. - disable KDE subpackage to avoid the mess that is C++ binary
  280. compatibility
  281. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  282. - automatic rebuild
  283. * Fri Jun 30 2000 Florian La Roche <laroche@redhat.com>
  284. - improved QTDIR detection
  285. * Thu Jun 28 2000 Trond Eivind Glomsrød <teg@redhat.com>
  286. - 1.8.10
  287. - use %%{_tmppath}
  288. - update URL
  289. - including two missing libraries
  290. * Tue Jun 13 2000 Preston Brown <pbrown@redhat.com>
  291. - 1.8.9
  292. * Fri Jun 09 2000 Preston Brown <pbrown@redhat.com>
  293. - adopted for Winston, changed to Red Hat packaging standards
  294. * Tue Apr 18 2000 Murray Todd Williams <murray@codingapes.com>
  295. - added a unixODBC-devel RPM to the group, added KDE links and icons to system
  296. - all of which came from recommendations from Fredrick Meunier
  297. - <Fredrick.Meunier@computershare.com.au>
  298. * Mon Apr 17 2000 Murray Todd Williams <murray@codingapes.com>
  299. - unixODBC-1.8.7
  300. - moved install to $RPM_BUILD_ROOT so it didn't overrun existing files.