/[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 56455 - (show annotations) (download)
Tue Feb 22 14:26:14 2011 UTC (13 years, 2 months ago) by dmorgan
Original Path: cauldron/mysql-connector-c++/current/SPECS/mysql-connector-c++.spec
File size: 3311 byte(s)
Update to 1.1.0 snapshot
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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
34
35 %description
36 Connector/C++ is a tool that enables easy deployment and management of MySQL
37 server and database through your C++ application.
38
39 %package -n %{libname}
40 Summary: The shared mysql-connector-cpp library
41 Group: System/Libraries
42
43 %description -n %{libname}
44 Connector/C++ is a tool that enables easy deployment and management of MySQL
45 server and database through your C++ application.
46
47 This package provides the shared mysql-connector-cpp library.
48
49
50 %package -n %{develname}
51 Summary: Development library and header files for development with mysql-connector-cpp
52 Group: Development/C++
53 Requires: %{libname} = %{version}
54 Provides: mysql-connector-c++-devel = %{version}-%{release}
55
56 %description -n %{develname}
57 Connector/C++ is a tool that enables easy deployment and management of MySQL
58 server and database through your C++ application.
59
60 This package is only needed if you plan to develop or compile applications
61 which requires the mysql-connector-cpp library.
62
63 %prep
64 %setup -q
65
66 %{__sed} -i -e 's/lib$/%{_lib}/' driver/CMakeLists.txt
67 %{__chmod} -x examples/*.cpp examples/*.txt
68
69 # Save examples to keep directory clean (for doc)
70 %{__mkdir} _doc_examples
71 %{__cp} -pr examples _doc_examples
72
73
74 %build
75 %{cmake} -DMYSQLCPPCONN_BUILD_EXAMPLES:BOOL=0
76
77 %{__make}
78
79
80 %install
81 %{__rm} -rf %{buildroot}
82
83 %{__make} install DESTDIR=%{buildroot}
84
85
86 %check
87 # for documentation purpose only (A MySQL server is required)
88 # cd test
89 # ./static_test tcp://127.0.0.1 user password test_database
90 # Should output : Loops= 2 Tests= 592 Failures= 0
91 # ./driver_test tcp://127.0.0.1 user password test_database
92 # Should output : Loops= 2 Tests= 592 Failures= 0
93
94
95 %clean
96 rm -rf %{buildroot}
97
98 %files -n %{libname}
99 %defattr(-,root,root)
100 %doc README ANNOUNCEMENT COPYING CHANGES
101 %attr(0755,root,root) %{_libdir}/*.so.%{major}*
102
103 %files -n %{develname}
104 %defattr(-,root,root)
105 %dir %{_includedir}/mysql-connector
106 %dir %{_includedir}/mysql-connector/cppconn
107 %attr(0644,root,root) %{_includedir}/mysql-connector/*.h
108 %attr(0644,root,root) %{_includedir}/mysql-connector/cppconn/*.h
109 %attr(0644,root,root) %{_libdir}/*.so
110
111
112

  ViewVC Help
Powered by ViewVC 1.1.30