1 Summary: MySQL: a very fast and reliable SQL database engine
3 Version: 3.22.14b-gamma
5 Vendor: LinuxLand International
6 Copyright: MySQL FREE PUBLIC LICENSE (See the file PUBLIC)
7 Group: Applications/Databases
8 Source0: http://www.tcx.se/Downloads/MySQL-3.22/mysql-%{mysql-version}.tar.gz
10 URL: http://www.tcx.se/
11 BuildRoot: /tmp/%{Name}-%{Version}-root
14 MySQL is a true multi-user, multi-threaded SQL (Structured Query Language)
15 database server. SQL is the most popular database language in the world.
16 MySQL is a client/server implementation that consists of a server daemon
17 mysqld and many different client programs/libraries. The main goals of MySQL
18 are speed, robustness and easy to use. The base upon which MySQL is built
19 is a set of routines that have been used in a highly demanding production
20 environment for many years. While MySQL is still in development, it already
21 offers a rich and highly useful function set. See the documentation for more
25 Summary: MySQL client programs and libs
26 Group: Applications/Databases
27 Requires: %{name} = %{version}-%{release}
30 This package contains the client part of the MySQL database. It includes
31 utilities and libraries to access and manipulate data on a MySQL database
35 Summary: MySQL development header files and libraries
36 Group: Applications/Databases
37 Requires: %{name} = %{version}-%{release}
40 This package contains the header files and libraries (shared and static) for
41 developing applications that use the MySQL database.
48 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
49 ./configure %{_target} \
53 --with-mysqld-user=mysql \
54 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
57 --localstatedir=/var/lib/mysql
59 # benchdir does not fit in above model. Fix when we make a separate package
60 make benchdir=$RPM_BUILD_ROOT/usr/share/sql-bench
66 # Ensure that needed directories exists
67 install -d $DESTDIR/var/lib/mysql/mysql
68 install -d $DESTDIR/usr/share/sql-bench
69 install -d $DESTDIR/usr/{sbin,share,man,include}
70 install -d $DESTDIR/usr/doc/MySQL-%{mysql-version}
73 make install-strip DESTDIR=$DESTDIR benchdir=/usr/share/sql-bench
75 # fixme: can´t this be done via configure?
76 mv $DESTDIR%{_libdir}/mysql/*.so* $DESTDIR/usr/lib
78 # Install logrotate and autostart
79 MBD=$RPM_BUILD_DIR/mysql-%{mysql-version}
80 mkdir -p $DESTDIR/etc/logrotate.d
81 install -m644 $MBD/support-files/mysql-log-rotate $DESTDIR/etc/logrotate.d/mysql
82 mkdir -p $DESTDIR/etc/rc.d/init.d
83 install -m755 $MBD/support-files/mysql.server $DESTDIR/etc/rc.d/init.d/mysql
85 # daemon startup control
86 mkdir -p $DESTDIR/etc/sysconfig/daemons
87 cat <<EOF > $DESTDIR/etc/sysconfig/daemons/mysql
89 DESCRIPTIVE="MySQL database server"
94 install -m644 $RPM_BUILD_DIR/mysql-%{mysql-version}/Docs/mysql.info \
95 $DESTDIR%{_infodir}/mysql.info
96 for file in README PUBLIC Docs/manual_toc.html Docs/manual.html \
97 Docs/manual.txt Docs/manual.texi Docs/manual.ps
100 install -m644 $MBD/$file $DESTDIR/usr/doc/MySQL-%{mysql-version}/$b
111 if test -x /etc/rc.d/init.d/mysql
113 /etc/rc.d/init.d/mysql stop > /dev/null 2>&1
114 echo "Giving mysqld a couple of seconds to exit nicely"
119 mysql_datadir=/var/lib/mysql
121 # Create data directory if needed
122 if test ! -d $mysql_datadir; then mkdir $mysql_datadir; fi
123 if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
124 if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
126 # Make MySQL start/shutdown automatically when the machine does it.
127 lisa --SysV-init install mysql S35 3:4:5 K65 0:1:2:6
129 # Create a MySQL user. Do not report any problems if it already
131 echo "Creating system group mysql with GID 83"
132 #lisa --group create mysql :sys:
133 /usr/sbin/groupadd -g 83 mysql
135 echo "Creating system user mysql with UID 83"
136 #lisa --user create mysql :sys: mysql "MySQL Database" $mysql_datadir /bin/bash
137 /usr/sbin/useradd -u 83 -g mysql -d $mysql_datadir -s /bin/bash mysql
139 # Change permissions so that the user that will run the MySQL daemon
140 # owns all database files.
141 chown -R mysql.mysql $mysql_datadir
144 mysql_install_db -IN-RPM
146 # Change permissions again to fix any new files.
147 chown -R mysql.mysql $mysql_datadir
149 # Restart in the same way that mysqld will be started normally.
150 /etc/rc.d/init.d/mysql start
152 # Allow safe_mysqld to start mysqld and print a message before we exit
157 if test -x /etc/rc.d/init.d/mysql
159 /etc/rc.d/init.d/mysql stop > /dev/null
161 # Remove autostart of mysql
162 lisa --SysV-init remove mysql $1
164 %postun -p /sbin/ldconfig
166 %post client -p /sbin/ldconfig
168 # We do not remove the mysql user since it may still own a lot of
172 %defattr(644,root,root,755)
173 %doc /usr/doc/MySQL-%{mysql-version}/
175 %attr(755,root,root) /usr/bin/isamchk
176 %attr(755,root,root) /usr/bin/isamlog
177 %attr(755,root,root) /usr/bin/mysql_fix_privilege_tables
178 %attr(755,root,root) /usr/bin/mysql_install_db
179 %attr(755,root,root) /usr/bin/mysql_setpermission
180 %attr(755,root,root) /usr/bin/mysql_zap
181 %attr(755,root,root) /usr/bin/mysqlbug
182 %attr(755,root,root) /usr/bin/perror
183 %attr(755,root,root) /usr/bin/replace
184 %attr(755,root,root) /usr/bin/resolveip
185 %attr(755,root,root) /usr/bin/safe_mysqld
187 %attr(644,root,root) %{_infodir}/mysql.info
189 %attr(755,root,root) /usr/sbin/mysqld
191 %attr(644,root,root) /etc/logrotate.d/mysql
192 %attr(754,root,root) /etc/rc.d/init.d/mysql
193 %config /etc/sysconfig/daemons/mysql
195 %attr(755,root,root) /usr/share/mysql/
198 %attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*
200 %attr(755,root,root) /usr/bin/msql2mysql
201 %attr(755,root,root) /usr/bin/mysql
202 %attr(755,root,root) /usr/bin/mysqlaccess
203 %attr(755,root,root) /usr/bin/mysqladmin
204 %attr(755,root,root) /usr/bin/mysqlbug
205 %attr(755,root,root) /usr/bin/mysqldump
206 %attr(755,root,root) /usr/bin/mysqlimport
207 %attr(755,root,root) /usr/bin/mysqlshow
209 %{_mandir}/man1/mysql.1.*
213 %dir /usr/include/mysql
214 %dir %{_libdir}/mysql
215 %attr(644,root,root) /usr/include/mysql/*
216 %attr(644,root,root) %{_libdir}/mysql/*
217 %attr(644,root,root) %{_libdir}/libmysqlclient.so
218 %attr(755,root,root) /usr/bin/comp_err
221 * Thu Jan 25 1999 Stephan Seyboth <sseyboth@linuxland.de>
222 - user/group creation doesn´t work with lisa-3.2, use useradd/groupadd,
223 hope nothing else uses uid/gid 83???
225 * Thu Jan 07 1999 Stephan Seyboth <sseyboth@linuxland.de>
226 - converted to COL style init
227 - updated to 3.22.14b-gamma
229 * Mon Dec 14 1998 Stephan Seyboth <sseyboth@linuxland.de>
230 - updated to mysql 3.22.12-beta
232 * Fri Dec 11 1998 Stephan Seyboth <sseyboth@linuxland.de>
233 - added mysql_fix_privilege_tables, needed by postin
235 * Thu Dec 10 1998 Stephan Seyboth <sseyboth@linuxland.de>
236 - don´t build mysqld with all-static (where´s libdl.a on COL?)
238 * Wed Dec 09 1998 Stephan Seyboth <sseyboth@linuxland.de>
239 - initial Version based on rpm by David Axmark <david@detron.se>