/[packages]/updates/8/mysql-connector-c++/current/SPECS/mysql-connector-c++.spec
ViewVC logotype

Contents of /updates/8/mysql-connector-c++/current/SPECS/mysql-connector-c++.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 61353 - (show annotations) (download)
Mon Feb 28 00:46:15 2011 UTC (13 years, 1 month ago) by dmorgan
Original Path: cauldron/mysql-connector-c++/current/SPECS/mysql-connector-c++.spec
File size: 3339 byte(s)
Remove patch0, this is not the good way to fix
1 %define major 1
2 %define libname %mklibname mysqlcppconn %{major}
3 %define develname %mklibname mysqlcppconn -d
4
5 %global bzr 895
6
7 Summary: A MySQL database connector for C++
8 Name: mysql-connector-c++
9 Version: 1.1.0
10 %if 0%{?bzr}
11 Release: %mkrel 0.6.bzr%{?bzr}
12 %else
13 Release: %mkrel 1
14 %endif
15 Group: System/Libraries
16 License: GPL
17 URL: http://dev.mysql.com/downloads/connector/cpp/
18 %if 0%{?bzr}
19 # bzr branch -r 895 lp:~mysql/mysql-connector-cpp/trunk mysql-connector-c++-1.1.0
20 # less mysql-connector-c++-1.1.0/driver/mysql_metadata.cpp
21 # check getDriverMajorVersion / getDriverMinorVersion / getDriverPatchVersion
22 # tar czf mysql-connector-c++-bzr895.tgz --exclude .bzr mysql-connector-c++-1.1.0
23 # rm -rf mysql-connector-c++-1.1.0
24 Source0: %{name}-bzr%{bzr}.tgz
25 %else
26 # Upstream has a mirror redirector for downloads, so the URL is hard to
27 # represent statically. You can get the tarball by following a link from
28 # http://dev.mysql.com/downloads/connector/cpp
29 Source0: http://mirrors.dotsrc.org/mysql/Downloads/Connector-C++/%{name}-%{version}.tar.gz
30 %endif
31 BuildRequires: cmake
32 BuildRequires: mysql-devel
33 BuildRequires: boost-devel
34 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
35
36 %description
37 Connector/C++ is a tool that enables easy deployment and management of MySQL
38 server and database through your C++ application.
39
40 %package -n %{libname}
41 Summary: The shared mysql-connector-cpp library
42 Group: System/Libraries
43
44 %description -n %{libname}
45 Connector/C++ is a tool that enables easy deployment and management of MySQL
46 server and database through your C++ application.
47
48 This package provides the shared mysql-connector-cpp library.
49
50
51 %package -n %{develname}
52 Summary: Development library and header files for development with mysql-connector-cpp
53 Group: Development/C++
54 Requires: %{libname} = %{version}
55 Provides: mysql-connector-c++-devel = %{version}-%{release}
56
57 %description -n %{develname}
58 Connector/C++ is a tool that enables easy deployment and management of MySQL
59 server and database through your C++ application.
60
61 This package is only needed if you plan to develop or compile applications
62 which requires the mysql-connector-cpp library.
63
64 %prep
65 %setup -q
66
67 %{__sed} -i -e 's/lib$/%{_lib}/' driver/CMakeLists.txt
68 %{__chmod} -x examples/*.cpp examples/*.txt
69
70 # Save examples to keep directory clean (for doc)
71 %{__mkdir} _doc_examples
72 %{__cp} -pr examples _doc_examples
73
74
75 %build
76 %{cmake} -DMYSQLCPPCONN_BUILD_EXAMPLES:BOOL=0
77
78 %{__make}
79
80
81 %install
82 %{__rm} -rf %{buildroot}
83
84 %{__make} install DESTDIR=%{buildroot}
85
86
87 %check
88 # for documentation purpose only (A MySQL server is required)
89 # cd test
90 # ./static_test tcp://127.0.0.1 user password test_database
91 # Should output : Loops= 2 Tests= 592 Failures= 0
92 # ./driver_test tcp://127.0.0.1 user password test_database
93 # Should output : Loops= 2 Tests= 592 Failures= 0
94
95
96 %clean
97 rm -rf %{buildroot}
98
99 %files -n %{libname}
100 %defattr(-,root,root)
101 %doc README ANNOUNCEMENT COPYING CHANGES
102 %attr(0755,root,root) %{_libdir}/*.so.%{major}*
103
104 %files -n %{develname}
105 %defattr(-,root,root)
106 %dir %{_includedir}/mysql-connector
107 %dir %{_includedir}/mysql-connector/cppconn
108 %attr(0644,root,root) %{_includedir}/mysql-connector/*.h
109 %attr(0644,root,root) %{_includedir}/mysql-connector/cppconn/*.h
110 %attr(0644,root,root) %{_libdir}/*.so
111
112
113

  ViewVC Help
Powered by ViewVC 1.1.30