libmysqlclient-6.1.6.recipe revision 5a2f0fde
1SUMMARY="MySQL database development files"
2DESCRIPTION="C connector for MySQL. MySQL is a fast, stable and true multi-user, \
3multi-threaded SQL database server. SQL (Structured Query Language) is the \
4most popular database query language in the world. The main goals of MySQL \
5are speed, robustness and ease of use."
6HOMEPAGE="https://dev.mysql.com/downloads/connector/c/"
7COPYRIGHT="1997-2015 Oracle and/or its affiliates"
8LICENSE="GNU GPL v2"
9REVISION="3"
10SOURCE_URI="http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-6.1.6-src.tar.gz"
11CHECKSUM_SHA256="2222433012c415871958b61bc4f3683e1ebe77e3389f698b267058c12533ea78"
12SOURCE_DIR="mysql-connector-c-6.1.6-src"
13PATCHES="libmysqlclient-6.1.6.patchset"
14
15ARCHITECTURES="!x86_gcc2 x86 x86_64"
16SECONDARY_ARCHITECTURES="x86"
17
18libVersion="18.3.0"
19libVersionCompat="$libVersion compat >= ${libVersion%.*}"
20
21PROVIDES="
22	libmysqlclient$secondaryArchSuffix = $portVersion
23	lib:libmysqlclient$secondaryArchSuffix = $libVersionCompat
24	"
25REQUIRES="
26	haiku$secondaryArchSuffix
27	lib:libz$secondaryArchSuffix
28	"
29
30PROVIDES_devel="
31	libmysqlclient${secondaryArchSuffix}_devel = $portVersion
32	cmd:mysql_config$secondaryArchSuffix
33	devel:libmysqlclient$secondaryArchSuffix = $libVersionCompat
34	devel:libmysqlclient_r$secondaryArchSuffix = $libVersionCompat
35	"
36REQUIRES_devel="
37	libmysqlclient$secondaryArchSuffix == $portVersion base
38	"
39
40PROVIDES_tools="
41	libmysqlclient${secondaryArchSuffix}_tools = $portVersion
42	cmd:my_print_defaults$secondaryArchSuffix
43	cmd:perror$secondaryArchSuffix
44	"
45REQUIRES_tools="
46	haiku$secondaryArchSuffix
47	libmysqlclient$secondaryArchSuffix == $portVersion base
48	"
49
50BUILD_REQUIRES="
51	haiku${secondaryArchSuffix}_devel
52	devel:libz$secondaryArchSuffix
53	"
54BUILD_PREREQUIRES="
55	cmd:cmake
56	cmd:gcc$secondaryArchSuffix
57	cmd:ld$secondaryArchSuffix
58	cmd:make
59	"
60
61defineDebugInfoPackage libmysqlclient$secondaryArchSuffix \
62	$libDir/libmysqlclient.so.$libVersion \
63	"$(getPackagePrefix tools)/$relativeBinDir"/perror \
64	"$(getPackagePrefix tools)/$relativeBinDir"/my_print_defaults
65
66BUILD()
67{
68	cmake . -DCMAKE_INSTALL_PREFIX=$prefix -DINSTALL_BINDIR=$relativeBinDir \
69		-DINSTALL_INCLUDEDIR=$relativeIncludeDir -DINSTALL_LIBDIR=$relativeLibDir \
70		-DINSTALL_MANDIR=$relativeManDir -DINSTALL_SHAREDIR=$relativeDataDir \
71		-DINSTALL_MYSQLDATADIR=$relativeDataDir -DINSTALL_MYSQLSHAREDIR=$relativeDataDir \
72		-DWITH_EXTRA_CHARSETS=all -DCOMPILATION_COMMENT="Haiku" \
73		-DSYSTEM_TYPE="Haiku"
74	make $jobArgs
75}
76
77INSTALL()
78{
79	make install
80	mkdir -p $developLibDir
81	mv $libDir/libmysqlclient_r.a $developLibDir
82
83	prepareInstalledDevelLibs libmysqlclient libmysqlclient_r
84
85	packageEntries devel $developDir \
86		$binDir/mysql_config
87
88	packageEntries tools \
89		$binDir/my_print_defaults \
90		$binDir/perror
91
92	rm $prefix/COPYING
93	rm $prefix/README
94	rm -rf $prefix/docs
95}
96