# pkgconf acts as pkgconfig for F26+ %if (0%{?fedora} && 0%{?fedora} < 26) || (0%{?rhel} && 0%{?rhel} <= 7) %bcond_with pkgconfig_compat %else %bcond_without pkgconfig_compat %endif %if %{with pkgconfig_compat} %global pkgconfig_ver 0.29.1 # For obsoleting pkgconfig %global pkgconfig_verrel %{pkgconfig_ver}-3 %global pkgconfig_evr 1:%{pkgconfig_verrel} %endif Name: pkgconf Version: 1.3.8 Release: 1.1%{?dist} Summary: Package compiler and linker metadata toolkit License: ISC URL: http://pkgconf.org/ Source0: https://distfiles.dereferenced.org/%{name}/%{name}-%{version}.tar.xz BuildRequires: gcc BuildRequires: make # For regenerating autotools scripts BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool # For unit tests BuildRequires: %{_bindir}/kyua BuildRequires: atf-tests # pkgconf uses libpkgconf internally Requires: lib%{name}%{?_isa} = %{version}-%{release} # This is defined within pkgconf code as a virtual pc (just like in pkgconfig) Provides: pkgconfig(pkgconf) = %{version} %description pkgconf is a program which helps to configure compiler and linker flags for development frameworks. It is similar to pkg-config from freedesktop.org and handles .pc files in a similar manner as pkg-config. %package -n lib%{name} Summary: Backend library for %{name} %description -n lib%{name} This package provides libraries for applications to use the functionality of %{name}. %package -n lib%{name}-devel Summary: Development files for lib%{name} Requires: lib%{name}%{?_isa} = %{version}-%{release} %description -n lib%{name}-devel This package provides files necessary for developing applications to use functionality provided by %{name}. %if %{with pkgconfig_compat} %package m4 Summary: m4 macros for pkgconf License: GPLv2+ with exceptions BuildArch: noarch # Ensure that it Conflicts and Obsoletes pkgconfig since it contains content formerly from it Conflicts: pkgconfig < %{pkgconfig_evr} Obsoletes: pkgconfig < %{pkgconfig_evr} %description m4 This package includes m4 macros used to support PKG_CHECK_MODULES when using pkgconf with autotools. %package pkg-config Summary: %{name} shim to provide /usr/bin/pkg-config # Ensure that it Conflicts with pkgconfig and is considered "better" Conflicts: pkgconfig < %{pkgconfig_evr} Obsoletes: pkgconfig < %{pkgconfig_evr} Provides: pkgconfig = %{pkgconfig_evr} Provides: pkgconfig%{?_isa} = %{pkgconfig_evr} # This is in the original pkgconfig package, set to match output from pkgconf Provides: pkgconfig(pkg-config) = %{version} # Generic pkg-config Provides for those who might use alternate package name Provides: pkg-config = %{pkgconfig_verrel} Provides: pkg-config%{?_isa} = %{pkgconfig_verrel} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-m4 = %{version}-%{release} %description pkg-config This package provides the shim links for pkgconf to be automatically used in place of pkgconfig. This ensures that pkgconf is used as the system provider of pkg-config. %endif %prep %autosetup -p1 %build autoreconf -fiv %configure --disable-static \ --with-pkg-config-dir=%{_libdir}/pkgconfig:%{_datadir}/pkgconfig \ --with-system-includedir=%{_includedir} \ --with-system-libdir=%{_libdir} %make_build V=1 %check make check %install %make_install find %{buildroot} -name '*.la' -print -delete %if %{with pkgconfig_compat} ln -sf pkgconf %{buildroot}%{_bindir}/pkg-config ln -sf pkgconf %{buildroot}%{_bindir}/%{_target_platform}-pkg-config # I don't have a better way to deal with this... cp -a %{buildroot}%{_mandir}/man1/pkgconf.1 %{buildroot}%{_mandir}/man1/pkg-config.1 mkdir -p %{buildroot}%{_libdir}/pkgconfig mkdir -p %{buildroot}%{_datadir}/pkgconfig %endif # If we're not providing pkgconfig override & compat # we should not provide the pkgconfig m4 macros %if ! %{with pkgconfig_compat} rm -rf %{buildroot}%{_datadir}/aclocal %endif %post -n lib%{name} -p /sbin/ldconfig %postun -n lib%{name} -p /sbin/ldconfig %files %license COPYING %doc README.md AUTHORS NEWS %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %{_datadir}/doc/%{name} %files -n lib%{name} %license COPYING %{_libdir}/lib%{name}*.so.* %files -n lib%{name}-devel %{_libdir}/lib%{name}*.so %{_includedir}/%{name}/ %{_libdir}/pkgconfig/lib%{name}.pc %if %{with pkgconfig_compat} %files m4 %{_datadir}/aclocal/pkg.m4 %files pkg-config %{_bindir}/pkg-config %{_bindir}/%{_target_platform}-pkg-config %{_mandir}/man1/pkg-config.1* %dir %{_libdir}/pkgconfig %dir %{_datadir}/pkgconfig %endif %changelog * Mon Jul 17 2017 Igor Gnatenko - 1.3.8-1 - Update to 1.3.8 * Sun May 28 2017 Neal Gompa - 1.3.7-1 - Update to 1.3.7 * Wed May 10 2017 Igor Gnatenko - 1.3.6-1 - Update to 1.3.6 * Tue Apr 04 2017 Igor Gnatenko - 1.3.5-1 - Update to 1.3.5 * Thu Mar 30 2017 Igor Gnatenko - 1.3.4-1 - Update to 1.3.4 * Mon Mar 27 2017 Neal Gompa - 1.3.3-1 - Update to 1.3.3 * Fri Mar 24 2017 Igor Gnatenko - 1.3.2-1 - Update to 1.3.2 * Sat Feb 25 2017 Neal Gompa - 1.3.0-1 - Update to 1.3.0 * Tue Feb 07 2017 Neal Gompa - 1.2.2-2 - Backport patch from upstream to remove extraneous whitespace (#1419685) * Fri Feb 03 2017 Igor Gnatenko - 1.2.2-1 - Update to 1.2.2 * Thu Feb 02 2017 Neal Gompa - 1.2.1-3 - Fix Obsoletes and Conflicts to prevent self-conflicts * Thu Feb 02 2017 Neal Gompa - 1.2.1-2 - Adjust Obsoletes and Conflicts to use inclusive range * Tue Jan 24 2017 Igor Gnatenko - 1.2.1-1 - Update to 1.2.1 * Sat Jan 21 2017 Neal Gompa - 1.2.0-1 - Upgrade to 1.2.0 - Enable pkgconf-pkg-config and pkgconf-m4 for F26+ * Sat Jan 14 2017 Neal Gompa - 1.1.1-3 - Add missing pkgconfig() Provides for virtual .pc files defined in pkgconf * Fri Jan 13 2017 Neal Gompa - 1.1.1-2 - Add missing Epoch to pkgconfig Provides/Conflicts for pkgconf-pkg-config - Add copy of pkgconf.1 as pkg-config.1 in pkgconf-pkg-config * Sat Jan 07 2017 Neal Gompa - 1.1.1-1 - Upgrade to 1.1.1 - Add missing directories to pkgconf-pkg-config * Sun Jan 01 2017 Neal Gompa - 1.1.0-3 - Fix up spec per package review (#1409332) * Sat Dec 31 2016 Neal Gompa - 1.1.0-2 - Rework package to not generate conflict with pkgconfig - Disable pkgconf-m4 and pkgconf-pkg-config by default * Sat Dec 31 2016 Neal Gompa - 1.1.0-1 - Upgrade to 1.1.0 - Enable libpkgconf libraries now that they are ABI+API stable * Tue Oct 25 2016 Neal Gompa - 1.0.2-1 - Upgrade to 1.0.2 * Fri Aug 26 2016 Neal Gompa - 1.0.1-2 - Add subpackage for providing pkg-config shim - Enable tests * Thu Aug 25 2016 Neal Gompa - 1.0.1-1 - Upgrade to 1.0.1 * Wed Aug 24 2016 Neal Gompa - 1-1 - Initial packaging