%define _libdir64 %{_prefix}/lib64 Summary: A tool for determining compilation options Name: pkg-config Version: 0.27 Release: 1 License: GPLv2+ URL: http://pkgconfig.freedesktop.org Group: Development/Tools Source0: http://www.freedesktop.org/software/pkgconfig/releases/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: glib2-devel >= 2.22.5-2 Requires: glib2 >= 2.22.5-2 Obsoletes: pkgconfig < %{version} Provides: pkgconfig = %{version} %description The pkgconfig tool determines compilation options. For each required library, it reads the configuration file and outputs the necessary compiler and linker flags. %prep %setup -q %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="xlc_r" # first compile pkg-config for 64-bit packages ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-pc-path=%{_libdir64}/pkgconfig make %{?_smp_mflags} mv pkg-config pkg-config_64 make distclean # now compile pkg-config for 32-bit packages ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-pc-path=%{_libdir}/pkgconfig make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install cp pkg-config_64 ${RPM_BUILD_ROOT}%{_bindir} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig mkdir -p ${RPM_BUILD_ROOT}%{_libdir64}/pkgconfig cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS README NEWS COPYING %{_bindir}/* %{_libdir}/pkgconfig %{_libdir64}/pkgconfig %{_datadir}/aclocal/* %{_mandir}/man?/* /usr/bin/* %changelog * Fri Aug 24 2012 Michael Perzl - 0.26-1 - updated to version 0.27 * Fri Aug 24 2012 Michael Perzl - 0.26-1 - updated to version 0.26 * Sat Feb 05 2011 Michael Perzl - 0.25-2 - fixed pkg-config for 64-bit packages * Mon Nov 22 2010 Michael Perzl - 0.25-1 - updated to version 0.25 * Mon Aug 31 2009 Michael Perzl - 0.23-1 - first version for AIX V5.1 and higher