unixODBC-vl.spec 11 KB

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