Postfix rpm build with MySQL support
Im trying to build a postfix rpm with mysql support for my fedora distro. If anyone knows of one that would be great… ,)
So I have installed the source rpm (as a non root user, would this be a problem? i have previously read that you should always build rpms as non root ??)
Then I have modified the spec file so that:
%define mysql 1
is set.
I then run.. rpmbuild -bb postfix.spec
And it complains that:
error: Failed build dependencies:
MySQL-shared is needed by postfix-2.1.3-4.rhel3
MySQL-devel is needed by postfix-2.1.3-4.rhel3
So. This is all very nice, however I think both of these are installed in /usr/include/mysql and /usr/lib/mysql however trying to get the specfile to see them is the problem.
I think they are installed for this reason. If I do a yum list installed mysql-devel comes up. The package mysql-shared does not, however perhaps that is part of the mysql server package?? as I the files libmysqlclient.so.10 and libmysqlclient_r.so.10 which are both in the mysql-shared package.
So I modified the spec file which has the lines…
%define mysql 1
%define mysql_redhat 0
%define mysql_paths /usr/include/mysql:/usr/lib/mysql
%define mysql_local %(test "%{mysql_paths}" != 0 && echo 1 || echo 0)
%define mysql_include %(echo "%{mysql_paths}" | cut -d: -f1)
%define mysql_lib %(echo "%{mysql_paths}" | cut -d: -f2)
To my way of thinking that should cut the mysqlpaths up for mysqllocal and mysql_lib but I still get the same errors
Anyone have any ideas? I tried changing the mysql_redhat flag, but same error.
Thanks
2 Replies
So far it appears to be working, so I guess it must be some error in my .rpmmacros file in my home dir.