libgda-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. %define major 4
  2. %define minor 0
  3. %define micro 9
  4. %define version %{major}.%{minor}.%{micro}
  5. %define __libtoolize :
  6. # Default provider build options (MySQL, Postgres & unixODBC)
  7. #
  8. # Package build options:
  9. # --with tds
  10. # --with db2
  11. # --with oracle
  12. # --without sqlite
  13. # --with sybase
  14. # --with mdb
  15. # --without ldap
  16. # --without mysql
  17. # --without odbc
  18. # --without postgres
  19. #
  20. %define FREETDS 0
  21. %define IBMDB2 0
  22. %define MYSQL 1
  23. %define ODBC 0
  24. %define ORACLE 0
  25. %define POSTGRES 1
  26. %define SQLITE 1
  27. %define SYBASE 0
  28. %define MDB 0
  29. %define LDAP 0
  30. %{?_with_tds:%define FREETDS 1}
  31. %{?_with_db2:%define IBMDB2 1}
  32. %{?_without_ldap:%define LDAP 0}
  33. %{?_with_mdb:%define MDB 1}
  34. %{?_with_oracle:%define ORACLE 1}
  35. %{?_without_sqlite:%define SQLITE 0}
  36. %{?_with_sybase:%define SYBASE 1}
  37. %{?_without_mysql:%define MYSQL 0}
  38. %{?_without_odbc:%define ODBC 0}
  39. %{?_without_postgres:%define POSTGRES 0}
  40. %define libver %{major}.%{minor}
  41. Summary: A (relatively small) database access library
  42. Name: libgda
  43. Version: %{version}
  44. Release: 2%{?_dist_release}
  45. Source: %{name}-%{version}.tar.bz2
  46. URL: http://www.gnome-db.org/
  47. Group: System Environment/Libraries
  48. License: LGPL
  49. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  50. Summary(ja): 比較的小規模なデータベース接続ライブラリ
  51. Vendor: Project Vine
  52. Distribution: Vine Linux
  53. Packager: yasumichi
  54. BuildRequires: pkgconfig >= 0.8
  55. BuildRequires: intltool >= 0.35.5
  56. BuildRequires: glib2-devel >= 2.12.0
  57. BuildRequires: libxml2-devel
  58. BuildRequires: libxslt-devel >= 1.0.9
  59. BuildRequires: db4-devel ncurses-devel
  60. BuildRequires: gamin-devel >= 0.1.8
  61. BuildRequires: libgcrypt-devel >= 1.1.42
  62. #BuildRequires: gnome-vfs2-devel >= 2.20 # use gio-2.0(in glib2)
  63. #BuildRequires: mono-devel gtk-sharp2 gtk-sharp2-gapi
  64. %if %{FREETDS}
  65. BuildRequires: freetds-devel
  66. %endif
  67. %if %{MYSQL}
  68. BuildRequires: MySQL-devel
  69. %endif
  70. %if %{POSTGRES}
  71. BuildRequires: postgresql-devel
  72. %endif
  73. %if %{ODBC}
  74. BuildRequires: unixODBC-devel
  75. %endif
  76. %if %{SQLITE}
  77. BuildRequires: sqlite3-devel
  78. %endif
  79. %if %{MDB}
  80. BuildRequires: mdbtools-devel
  81. %endif
  82. %if %{LDAP}
  83. BuildRequires: openldap-devel
  84. %endif
  85. %description
  86. Libgda is a (relatively small) database access library:
  87. - a wrapper like ODBC but with more features to access several database
  88. engines
  89. - a meta data extractor (to know all about database objects in a common
  90. way)
  91. - comes with an SQL console application (like mysql, psql or sqlite3
  92. consoles)
  93. - relies on GLib, coded in C, its API is easy to use
  94. - at the moment supports SQLite, MySQL, PostgreSQL, MSAccess and Bdb, work
  95. is in progress for other database types (such as Firebird and Oracle) and
  96. to wrap JDBC for more wider usage.
  97. Build option is:
  98. --with mysql postgres sqlite
  99. --without tds ibmdb2 ldap mdb odbc oracle sybase
  100. %package devel
  101. Summary: Development libraries and header files for libgda.
  102. Group: Development/Libraries
  103. Requires: %{name} = %{version}
  104. Requires: glib2-devel >= 2.12.0
  105. Requires: libxml2-devel
  106. Requires: libxslt-devel >= 1.0.9
  107. %description devel
  108. This package contains the header files and libraries needed to write
  109. or compile programs that use libgda.
  110. #%package sharp
  111. #Summary: Mono bindings for libgda
  112. #Group: System Environment/Libraries
  113. #Requires: %{name} = %{version}-%{release}
  114. #Requires: mono-core
  115. #
  116. #%description sharp
  117. #This package contains the dll files needed to run (and compile) Mono
  118. #applications which use libgda.
  119. %if %{FREETDS}
  120. %package -n gda-freetds
  121. Summary: GDA FreeTDS Provider
  122. Group: System Environment/Libraries
  123. %description -n gda-freetds
  124. This package includes the GDA FreeTDS provider.
  125. %endif
  126. %if %{IBMDB2}
  127. %package -n gda-ibmdb2
  128. Summary: GDA IBM DB2 Provider
  129. Group: System Environment/Libraries
  130. %description -n gda-ibmdb2
  131. This package includes the GDA IBM DB2 provider.
  132. %endif
  133. %if %{MYSQL}
  134. %package -n gda-mysql
  135. Summary: GDA MySQL Provider
  136. Group: System Environment/Libraries
  137. %description -n gda-mysql
  138. This package includes the GDA MySQL provider.
  139. %endif
  140. %if %{ODBC}
  141. %package -n gda-odbc
  142. Summary: GDA ODBC Provider
  143. Group: System Environment/Libraries
  144. %description -n gda-odbc
  145. This package includes the GDA ODBC provider.
  146. %endif
  147. %if %{ORACLE}
  148. %package -n gda-oracle
  149. Summary: GDA Oracle Provider
  150. Group: System Environment/Libraries
  151. %description -n gda-oracle
  152. This package includes the GDA Oracle provider.
  153. %endif
  154. %if %{POSTGRES}
  155. %package -n gda-postgres
  156. Summary: GDA PostgreSQL Provider
  157. Group: System Environment/Libraries
  158. %description -n gda-postgres
  159. This package includes the GDA PostgreSQL provider.
  160. %endif
  161. %if %{SQLITE}
  162. %package -n gda-sqlite
  163. Summary: GDA SQLite Provider
  164. Group: System Environment/Libraries
  165. %description -n gda-sqlite
  166. This package includes the GDA SQLite provider.
  167. %endif
  168. %if %{SYBASE}
  169. %package -n gda-sybase
  170. Summary: GDA Sybase Provider
  171. Group: System Environment/Libraries
  172. %description -n gda-sybase
  173. This package includes the GDA Sybase provider.
  174. %endif
  175. %if %{MDB}
  176. %package -n gda-mdb
  177. Summary: GDA MDB Provider
  178. Group: System Environment/Libraries
  179. %description -n gda-mdb
  180. This package includes the GDA MDB provider.
  181. %endif
  182. %if %{LDAP}
  183. %package -n gda-ldap
  184. Summary: GDA LDAP Provider
  185. Group: System Environment/Libraries
  186. %description -n gda-ldap
  187. This package includes the GDA LDAP provider.
  188. %endif
  189. %prep
  190. %setup -q -n %{name}-%{version}
  191. %build
  192. %if %{FREETDS}
  193. CONFIG="$CONFIG --with-tds"
  194. %else
  195. CONFIG="$CONFIG --without-tds"
  196. %endif
  197. %if %{IBMDB2}
  198. CONFIG="$CONFIG --with-ibmdb2"
  199. %else
  200. CONFIG="$CONFIG --without-ibmdb2"
  201. %endif
  202. %if %{MYSQL}
  203. CONFIG="$CONFIG --with-mysql"
  204. %else
  205. CONFIG="$CONFIG --without-mysql"
  206. %endif
  207. %if %{POSTGRES}
  208. CONFIG="$CONFIG --with-postgres"
  209. %else
  210. CONFIG="$CONFIG --without-postgres"
  211. %endif
  212. %if %{ODBC}
  213. CONFIG="$CONFIG --with-odbc"
  214. %else
  215. CONFIG="$CONFIG --without-odbc"
  216. %endif
  217. %if %{ORACLE}
  218. CONFIG="$CONFIG --with-oracle"
  219. %else
  220. CONFIG="$CONFIG --without-oracle"
  221. %endif
  222. %if %{SQLITE}
  223. CONFIG="$CONFIG --with-sqlite"
  224. %else
  225. CONFIG="$CONFIG --without-sqlite"
  226. %endif
  227. %if %{SYBASE}
  228. CONFIG="$CONFIG --with-sybase"
  229. %else
  230. CONFIG="$CONFIG --without-sybase"
  231. %endif
  232. %if %{MDB}
  233. CONFIG="$CONFIG --with-mdb"
  234. %else
  235. CONFIG="$CONFIG --without-mdb"
  236. %endif
  237. %if %{LDAP}
  238. CONFIG="$CONFIG --with-ldap"
  239. %else
  240. CONFIG="$CONFIG --without-ldap"
  241. %endif
  242. %configure $CONFIG --disable-gtk-doc
  243. make
  244. %install
  245. rm -rf $RPM_BUILD_ROOT
  246. #makeinstall LIBGDA_DTDDIR=%{buildroot}%{_datadir}/libgda/dtd
  247. make install DESTDIR=$RPM_BUILD_ROOT
  248. #fixup mono / sharp related files install
  249. #mkdir -p %{buildroot}/%{_datadir}/gapi-2.0
  250. #mv %{buildroot}/%{_libdir}/libgda/gda-api.xml %{buildroot}/%{_datadir}/gapi-2.0
  251. #mkdir -p %{buildroot}/usr/lib/mono/gda-sharp-2.0
  252. #mv %{buildroot}/%{_libdir}/libgda/* %{buildroot}/usr/lib/mono/gda-sharp-2.0
  253. #rmdir %{buildroot}/%{_libdir}/libgda
  254. # Cleanup unnecessary, unpackaged files
  255. rm -f %{buildroot}/%{_libdir}/lib*.la
  256. rm -f %{buildroot}/%{_libdir}/libgda-%{libver}/providers/*.{a,la}
  257. rm -f %{buildroot}/%{_sysconfdir}/libgda-%{libver}/sales_test.db
  258. %find_lang libgda-%{libver}
  259. %post -p /sbin/ldconfig
  260. %postun -p /sbin/ldconfig
  261. %clean
  262. rm -rf $RPM_BUILD_ROOT
  263. %files -f libgda-%{libver}.lang
  264. %defattr(-,root,root)
  265. %doc AUTHORS COPYING COPYING.LIB ChangeLog README NEWS
  266. %dir %{_sysconfdir}/libgda-%{libver}
  267. %config(noreplace) %{_sysconfdir}/libgda-%{libver}/config
  268. %{_bindir}/*
  269. %{_libdir}/*.so.*
  270. %dir %{_libdir}/libgda-%{libver}
  271. %dir %{_libdir}/libgda-%{libver}/providers
  272. %{_libdir}/libgda-%{libver}/providers/libgda-bdb.so
  273. %dir %{_datadir}/libgda-%{libver}
  274. %{_datadir}/libgda-%{libver}/dtd
  275. %{_datadir}/libgda-%{libver}/*.xml
  276. %{_datadir}/libgda-%{libver}/web
  277. %{_mandir}/man1/*
  278. %files devel
  279. %defattr(-,root,root)
  280. %{_includedir}/libgda-%{libver}
  281. %{_libdir}/*.a
  282. #{_libdir}/*.la
  283. %{_libdir}/*.so
  284. %{_libdir}/pkgconfig/*
  285. %{_datadir}/gtk-doc/html/*
  286. #%{_datadir}/omf/*
  287. #%{_mandir}/man5/*
  288. #files sharp
  289. #defattr(-,root,root)
  290. #{_datadir}/gapi-2.0
  291. #/usr/lib/mono/gda-sharp-2.0
  292. #{_libdir}/pkgconfig/gda-sharp-2.0.pc
  293. %if %{FREETDS}
  294. %files -n gda-freetds
  295. %{_libdir}/libgda-%{libver}/providers/libgda-freetds.so
  296. %endif
  297. %if %{IBMDB2}
  298. %files -n gda-ibmdb2
  299. %{_libdir}/libgda-%{libver}/providers/libgda-ibmdb2.so
  300. %endif
  301. %if %{MYSQL}
  302. %files -n gda-mysql
  303. %{_libdir}/libgda-%{libver}/providers/libgda-mysql.so
  304. %{_datadir}/libgda-%{libver}/mysql_*.xml
  305. %endif
  306. %if %{ODBC}
  307. %files -n gda-odbc
  308. %{_libdir}/libgda-%{libver}/providers/libgda-odbc.so
  309. %{_datadir}/libgda-%{libver}/odbc_*.xml
  310. %endif
  311. %if %{ORACLE}
  312. %files -n gda-oracle
  313. %{_libdir}/libgda-%{libver}/providers/libgda-oracle.so
  314. %endif
  315. %if %{POSTGRES}
  316. %files -n gda-postgres
  317. %{_libdir}/libgda-%{libver}/providers/libgda-postgres.so
  318. %{_datadir}/libgda-%{libver}/postgres_*.xml
  319. %endif
  320. %if %{SQLITE}
  321. %files -n gda-sqlite
  322. %{_libdir}/libgda-%{libver}/providers/libgda-sqlite.so
  323. %{_datadir}/libgda-%{libver}/sqlite_*.xml
  324. %endif
  325. %if %{SYBASE}
  326. %files -n gda-sybase
  327. %{_libdir}/libgda-%{libver}/providers/libgda-sybase.so
  328. %endif
  329. %if %{MDB}
  330. %files -n gda-mdb
  331. %{_libdir}/libgda-%{libver}/providers/libgda-mdb.so
  332. %endif
  333. %if %{LDAP}
  334. %files -n gda-ldap
  335. %{_libdir}/libgda-%{libver}/providers/libgda-ldap.so
  336. %{_datadir}/libgda-%{libver}/ldap_*.xml
  337. %endif
  338. %changelog
  339. * Sat Sep 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.0.9-2
  340. - rebuild with rpm-4.8.1 for pkg-config file
  341. * Mon Jun 21 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.0.9-1
  342. - new upstream release
  343. * Sun Mar 14 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.0.8-1
  344. - new upstream release
  345. * Mon Nov 02 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 4.0.5-1
  346. - new upstream release
  347. - remove gnome-vfs2-devel from BR.(use gio-2.0)
  348. - add Vendor, Distribution and Packager.
  349. - update summary and description.
  350. * Wed Jul 08 2009 Shu KONNO <owa@bg.wakwak.com> 4.0.2-3
  351. - rebuilt with postgresql-8.4.0
  352. * Fri May 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.2-2
  353. - added intltool to BuildRequires.
  354. - rebuilt with MySQL-5.1.34.
  355. * Wed Apr 29 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 4.0.2-1
  356. - update from upstream.
  357. - update description and files.
  358. - ODBC,LDAP outdated
  359. * Sat Jul 05 2008 Shu KONNO <owa@bg.wakwak.com> 3.1.4-2
  360. - rebuilt with postgresql-8.3.3
  361. * Sun Jun 22 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.1.4-1
  362. - new upstream release
  363. - not build sharp subpackage
  364. - built with db4-4.6.21, MySQL-5.0.51a
  365. * Tue Jan 08 2008 Shu KONNO <owa@bg.wakwak.com> 1.9.100-0vl8
  366. - rebuilt with postgresql-8.2.6
  367. * Wed Sep 19 2007 Shu KONNO <owa@bg.wakwak.com> 1.9.100-0vl7
  368. - rebuilt with postgresql-8.2.5
  369. * Sun May 20 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.9.100-0vl6
  370. - rebuilt with new toolchain
  371. * Wed Nov 1 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.9.100-0vl5
  372. - rebuilt with openldap 2.3.27, MySQL 5.0.27
  373. - added Patch0 from Fedora
  374. * Mon Aug 28 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.9.100-0vl4
  375. - rebuilt with openldap-devel-2.3.24-0vl4
  376. * Sat Jun 17 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.9.100-0vl3
  377. - rebuilt with gamin-devel in place of fam-devel
  378. * Sun Apr 30 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.9.100-0vl2
  379. - rebuilt with readline 5.1
  380. - added subpackage for Mono binding
  381. * Mon Jan 9 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.9.100-0vl1
  382. - new upstream release
  383. * Tue May 31 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.1-0vl1
  384. - new upstream release
  385. - rebuild with postgresql-devel-8.0.3-0vl2 and sqlite3-devel
  386. * Fri Feb 11 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.0-0vl1
  387. - new upstream release
  388. - fixed %files on devel package
  389. * Sun Aug 22 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.6-0vl1
  390. - new upstream release
  391. - re-define __libtoolize to compile shared object
  392. - updated summary
  393. - make sqlite package by default
  394. * Sun Mar 28 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.3-0vl1
  395. - new upstream release
  396. - build with new MySQL
  397. - make ldap package by default
  398. * Sat Dec 6 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.2-0vl1
  399. - new upstream release
  400. * Fri Oct 17 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.1-0vl1
  401. - new upstream release
  402. * Thu Sep 25 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.0-1vl1
  403. - updated to 1.0.0
  404. - based on original spec
  405. - disabled smp_flag at compile time
  406. * Sun Apr 20 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.2.96-0vl3
  407. - added BuildPreReq: bonobo >= 1.0.9
  408. (0.2.96-0vl2 seems to be lost by accident, so putting again here)
  409. * Sun Mar 9 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.2.96-0vl1
  410. - New upstream release.
  411. - use gcc-2.95.3 and g++-2.95.3
  412. * Thu Jan 24 2002 Akira TAGOH <tagoh@gnome.gr.jp> 0.2.94-0vl1
  413. - New upstream release.
  414. * Fri Jan 4 2002 Akira TAGOH <tagoh@gnome.gr.jp> 0.2.93-0vl1
  415. - Rebuild for Vine.
  416. * Thu May 31 2001 Serge Pavlovsky <pal@re.com.ua>
  417. - Cleaned
  418. * Sat Sep 2 2000 Rodrigo Moya <rodrigo@linuxave.net>
  419. - Initial spec imported from old GNOME-DB spec