Blame SPECS/pkgconf.spec

2b0472
# pkgconf acts as pkgconfig for Fedora and EL8+
2b0472
%if (0%{?rhel} && 0%{?rhel} <= 7)
2b0472
%bcond_with pkgconfig_compat
2b0472
%else
2b0472
%bcond_without pkgconfig_compat
2b0472
%endif
2b0472
2b0472
%if %{with pkgconfig_compat}
2b0472
%global pkgconfig_ver 0.29.1
2b0472
# For obsoleting pkgconfig
2b0472
%global pkgconfig_verrel %{pkgconfig_ver}-3
2b0472
%global pkgconfig_evr 1:%{pkgconfig_verrel}
2b0472
%endif
2b0472
2b0472
# Tests are disabled on RHEL 9 because of the extensive dependencies
2b0472
%if 0%{?rhel} >= 9
2b0472
%bcond_with tests
2b0472
%else
2b0472
%bcond_without tests
2b0472
%endif
2b0472
2b0472
# Search path for pc files for pkgconf
2b0472
%global pkgconf_libdirs %{_libdir}/pkgconfig:%{_datadir}/pkgconfig
2b0472
2b0472
Name:           pkgconf
2b0472
Version:        1.7.3
2d7c7c
Release:        10%{?dist}
2b0472
Summary:        Package compiler and linker metadata toolkit
2b0472
2b0472
License:        ISC
2b0472
URL:            http://pkgconf.org/
2b0472
# Mirror at https://releases.pagure.org/pkgconf/pkgconf/
2b0472
Source0:        https://distfiles.dereferenced.org/%{name}/%{name}-%{version}.tar.xz
2b0472
2b0472
# Simple wrapper scripts to offer platform versions of pkgconfig
2b0472
Source1:        platform-pkg-config.in
2b0472
Source2:        pkg-config.in
2b0472
2d7c7c
# Don't prepend sysroot_dir if pkg-config file lies outside of sysroot_dir
2d7c7c
# See https://github.com/pkgconf/pkgconf/issues/213
2d7c7c
# See https://bugzilla.redhat.com/show_bug.cgi?id=1974883
2d7c7c
# See https://bugzilla.redhat.com/1975416
2d7c7c
# Cherry picked from https://github.com/pkgconf/pkgconf/commit/ed86f2dda3bc99e34775f0fae54e314718037516
2d7c7c
Patch1:         0001-Don-t-prepend-sysroot_dir-if-pkg-config-file-lies-ou.patch
2d7c7c
2b0472
BuildRequires:  gcc
2b0472
BuildRequires:  make
2b0472
2b0472
# For regenerating autotools scripts
2b0472
BuildRequires:  autoconf
2b0472
BuildRequires:  automake
2b0472
BuildRequires:  libtool
2b0472
2b0472
%if %{with tests}
2b0472
# For unit tests
2b0472
BuildRequires:  kyua
2b0472
BuildRequires:  atf-tests
2b0472
%endif
2b0472
2b0472
# pkgconf uses libpkgconf internally
2b0472
Requires:       lib%{name}%{?_isa} = %{version}-%{release}
2b0472
2b0472
# This is defined within pkgconf code as a virtual pc (just like in pkgconfig)
2b0472
Provides:       pkgconfig(pkgconf) = %{version}
2b0472
2b0472
%description
2b0472
pkgconf is a program which helps to configure compiler and linker flags
2b0472
for development frameworks. It is similar to pkg-config from freedesktop.org
2b0472
and handles .pc files in a similar manner as pkg-config.
2b0472
2b0472
%package -n lib%{name}
2b0472
Summary:        Backend library for %{name}
2b0472
2b0472
%description -n lib%{name}
2b0472
This package provides libraries for applications to use the functionality
2b0472
of %{name}.
2b0472
2b0472
%package -n lib%{name}-devel
2b0472
Summary:        Development files for lib%{name}
2b0472
Requires:       lib%{name}%{?_isa} = %{version}-%{release}
2b0472
2b0472
%description -n lib%{name}-devel
2b0472
This package provides files necessary for developing applications
2b0472
to use functionality provided by %{name}.
2b0472
2b0472
%if %{with pkgconfig_compat}
2b0472
%package m4
2b0472
Summary:        m4 macros for pkgconf
2b0472
License:        GPLv2+ with exceptions
2b0472
BuildArch:      noarch
2b0472
# Ensure that it Conflicts and Obsoletes pkgconfig since it contains content formerly from it
2b0472
Conflicts:      pkgconfig < %{pkgconfig_evr}
2b0472
Obsoletes:      pkgconfig < %{pkgconfig_evr}
2b0472
2b0472
%description m4
2b0472
This package includes m4 macros used to support PKG_CHECK_MODULES
2b0472
when using pkgconf with autotools.
2b0472
2b0472
%package pkg-config
2b0472
Summary:        %{name} shim to provide /usr/bin/pkg-config
2b0472
# Ensure that it Conflicts with pkgconfig and is considered "better"
2b0472
Conflicts:      pkgconfig < %{pkgconfig_evr}
2b0472
Obsoletes:      pkgconfig < %{pkgconfig_evr}
2b0472
Provides:       pkgconfig = %{pkgconfig_evr}
2b0472
Provides:       pkgconfig%{?_isa} = %{pkgconfig_evr}
2b0472
# This is in the original pkgconfig package, set to match output from pkgconf
2b0472
Provides:       pkgconfig(pkg-config) = %{version}
2b0472
# Generic pkg-config Provides for those who might use alternate package name
2b0472
Provides:       pkg-config = %{pkgconfig_verrel}
2b0472
Provides:       pkg-config%{?_isa} = %{pkgconfig_verrel}
2b0472
Requires:       %{name}%{?_isa} = %{version}-%{release}
2b0472
Requires:       %{name}-m4 = %{version}-%{release}
2b0472
2b0472
%description pkg-config
2b0472
This package provides the shim links for pkgconf to be automatically
2b0472
used in place of pkgconfig. This ensures that pkgconf is used as
2b0472
the system provider of pkg-config.
2b0472
2b0472
%endif
2b0472
2b0472
2b0472
%prep
2b0472
%autosetup -p1
2b0472
2b0472
%build
2b0472
autoreconf -fiv
2b0472
%configure --disable-static \
2b0472
           --with-pkg-config-dir=%{pkgconf_libdirs} \
2b0472
           --with-system-includedir=%{_includedir} \
2b0472
           --with-system-libdir=%{_libdir}
2b0472
2b0472
%make_build V=1
2b0472
2b0472
2b0472
%check
2b0472
%if %{with tests}
2b0472
make check
2b0472
%endif
2b0472
2b0472
2b0472
%install
2b0472
%make_install
2b0472
2b0472
find %{buildroot} -name '*.la' -print -delete
2b0472
2b0472
mkdir -p %{buildroot}%{_sysconfdir}/pkgconfig/personality.d
2b0472
mkdir -p %{buildroot}%{_datadir}/pkgconfig/personality.d
2b0472
2b0472
# pkgconf rpm macros
2b0472
mkdir -p %{buildroot}%{_rpmmacrodir}/
2b0472
2b0472
cat > %{buildroot}%{_rpmmacrodir}/macros.pkgconf <
2b0472
%%pkgconfig_personalitydir %{_datadir}/pkgconfig/personality.d
2b0472
EOM
2b0472
2b0472
%if %{with pkgconfig_compat}
2b0472
install -pm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
2b0472
2b0472
sed -e "s|@TARGET_PLATFORM@|%{_target_platform}|" \
2b0472
    -e "s|@PKGCONF_LIBDIRS_LOCAL@|/usr/local/%{_lib}/pkgconfig:/usr/local/share/pkgconfig:%{pkgconf_libdirs}|" \
2b0472
    -e "s|@PKGCONF_SYSLIBDIR_LOCAL@|/usr/local/%{_lib}:%{_libdir}|" \
2b0472
    -e "s|@PKGCONF_SYSINCDIR_LOCAL@|/usr/local/include:%{_includedir}|" \
2b0472
    -e "s|@PKGCONF_LIBDIRS@|%{pkgconf_libdirs}|" \
2b0472
    -e "s|@PKGCONF_SYSLIBDIR@|%{_libdir}|" \
2b0472
    -e "s|@PKGCONF_SYSINCDIR@|%{_includedir}|" \
2b0472
    -i %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
2b0472
2b0472
install -pm 0755 %{SOURCE2} %{buildroot}%{_bindir}/pkg-config
2b0472
2b0472
sed -e "s|@PKGCONF_BINDIR@|%{_bindir}|" \
2b0472
    -i %{buildroot}%{_bindir}/pkg-config
2b0472
2b0472
# Link pkg-config(1) to pkgconf(1)
2b0472
echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/pkg-config.1
2b0472
2b0472
mkdir -p %{buildroot}%{_libdir}/pkgconfig
2b0472
mkdir -p %{buildroot}%{_datadir}/pkgconfig
2b0472
%endif
2b0472
2b0472
# If we're not providing pkgconfig override & compat
2b0472
# we should not provide the pkgconfig m4 macros
2b0472
%if ! %{with pkgconfig_compat}
2b0472
rm -rf %{buildroot}%{_datadir}/aclocal
2b0472
%endif
2b0472
2b0472
%ldconfig_scriptlets -n lib%{name}
2b0472
2b0472
%files
2b0472
%license COPYING
2b0472
%doc README.md AUTHORS NEWS
2b0472
%{_bindir}/%{name}
2b0472
%{_mandir}/man1/%{name}.1*
2b0472
%{_mandir}/man5/pc.5*
2b0472
%{_mandir}/man5/%{name}-personality.5*
2b0472
%{_rpmmacrodir}/macros.pkgconf
2b0472
%dir %{_sysconfdir}/pkgconfig
2b0472
%dir %{_sysconfdir}/pkgconfig/personality.d
2b0472
%dir %{_datadir}/pkgconfig/personality.d
2b0472
2b0472
%files -n lib%{name}
2b0472
%license COPYING
2b0472
%{_libdir}/lib%{name}*.so.*
2b0472
2b0472
%files -n lib%{name}-devel
2b0472
%{_libdir}/lib%{name}*.so
2b0472
%{_includedir}/%{name}/
2b0472
%{_libdir}/pkgconfig/lib%{name}.pc
2b0472
2b0472
%if %{with pkgconfig_compat}
2b0472
%files m4
2b0472
%{_datadir}/aclocal/pkg.m4
2b0472
%{_mandir}/man7/pkg.m4.7*
2b0472
2b0472
%files pkg-config
2b0472
%{_bindir}/pkg-config
2b0472
%{_bindir}/%{_target_platform}-pkg-config
2b0472
%{_mandir}/man1/pkg-config.1*
2b0472
%dir %{_libdir}/pkgconfig
2b0472
%dir %{_datadir}/pkgconfig
2b0472
%endif
2b0472
2b0472
%changelog
2d7c7c
* Thu Oct 07 2021 Richard W.M. Jones <rjones@redhat.com> - 1.7.3-10
2d7c7c
- Don't prepend sysroot_dir if pkg-config file lies outside of sysroot_dir
2d7c7c
  resolves: rhbz#1975416
2d7c7c
2b0472
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.3-9
2b0472
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
2b0472
  Related: rhbz#1991688
2b0472
2b0472
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.3-8
2b0472
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
2b0472
2b0472
* Mon Feb 22 2021 Tomas Popela <tpopela@redhat.com> - 1.7.3-7
2b0472
- Conditionalize the unit tests, disable them on RHEL 9
2b0472
2b0472
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-6
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2b0472
2b0472
* Mon Oct 19 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-5
2b0472
- Use internal target platform definition for pkg-config wrapper
2b0472
2b0472
* Thu Oct 15 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-4
2b0472
- Fix pkg-config wrapper for armv7hl
2b0472
2b0472
* Thu Oct 15 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-3
2b0472
- Make /usr/bin/pkg-config multilib safe
2b0472
2b0472
* Mon Aug 10 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-2
2b0472
- Add /usr/local paths to pkg-config(1) search path for non RPM builds
2b0472
2b0472
* Mon Aug 03 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-1
2b0472
- Update to 1.7.3
2b0472
2b0472
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
2b0472
- Second attempt - Rebuilt for
2b0472
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2b0472
2b0472
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2b0472
2b0472
* Mon May 25 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.7.0-1
2b0472
- Update to 1.7.0
2b0472
2b0472
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-3
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2b0472
2b0472
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-2
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2b0472
2b0472
* Sun Jul 14 13:23:30 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.3-1
2b0472
- Update to 1.6.3
2b0472
2b0472
* Fri Jul 12 09:36:57 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.2-1
2b0472
- Update to 1.6.2
2b0472
2b0472
* Mon Mar 25 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.1-1
2b0472
- Update to 1.6.1
2b0472
2b0472
* Sat Feb 09 2019 Neal Gompa <ngompa13@gmail.com> - 1.6.0-1
2b0472
- Update to 1.6.0
2b0472
- Add personality.d directories for cross-targets
2b0472
- Add pkgconf rpm macros for pkgconf directories
2b0472
2b0472
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-2
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2b0472
2b0472
* Tue Nov 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5.4-1
2b0472
- Update to 1.5.4
2b0472
2b0472
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 1.5.3-2
2b0472
- Rebuild with fixed binutils
2b0472
2b0472
* Sun Jul 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5.3-1
2b0472
- Update to 1.5.3
2b0472
2b0472
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-3
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2b0472
2b0472
* Fri Jun 29 2018 Neal Gompa <ngompa13@gmail.com> - 1.5.1-2
2b0472
- Add patch to fix system path override issue
2b0472
2b0472
* Wed Jun 27 2018 Neal Gompa <ngompa13@gmail.com> - 1.5.1-1
2b0472
- Upgrade to 1.5.1
2b0472
2b0472
* Sat Mar 31 2018 Neal Gompa <ngompa13@gmail.com> - 1.4.2-1
2b0472
- Update to 1.4.2
2b0472
- Drop conditionals for old Fedora releases
2b0472
2b0472
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-3
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2b0472
2b0472
* Wed Jan 31 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.4.1-2
2b0472
- Switch to %%ldconfig_scriptlets
2b0472
2b0472
* Tue Jan 23 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.4.1-1
2b0472
- Update to 1.4.1
2b0472
2b0472
* Sun Jan 07 2018 Neal Gompa <ngompa13@gmail.com> - 1.4.0-2
2b0472
- Move pc(5) manpage to main pkgconf package
2b0472
2b0472
* Fri Jan 05 2018 Neal Gompa <ngompa13@gmail.com> - 1.4.0-1
2b0472
- Update to 1.4.0
2b0472
2b0472
* Fri Jan 05 2018 Neal Gompa <ngompa13@gmail.com> - 1.3.90-2
2b0472
- Add simple wrapper to support platform-specific pkg-config paths (#1513810)
2b0472
2b0472
* Tue Dec 19 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.90-1
2b0472
- Update to 1.3.90
2b0472
2b0472
* Sun Dec 10 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.12-1
2b0472
- Update to 1.3.12
2b0472
2b0472
* Wed Nov 01 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.10-1
2b0472
- Update to 1.3.10
2b0472
2b0472
* Wed Sep 20 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.9-1
2b0472
- Update to 1.3.9
2b0472
2b0472
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-3
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
2b0472
2b0472
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-2
2b0472
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2b0472
2b0472
* Mon Jul 17 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.8-1
2b0472
- Update to 1.3.8
2b0472
2b0472
* Sun May 28 2017 Neal Gompa <ngompa13@gmail.com> - 1.3.7-1
2b0472
- Update to 1.3.7
2b0472
2b0472
* Wed May 10 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.6-1
2b0472
- Update to 1.3.6
2b0472
2b0472
* Tue Apr 04 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.5-1
2b0472
- Update to 1.3.5
2b0472
2b0472
* Thu Mar 30 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.4-1
2b0472
- Update to 1.3.4
2b0472
2b0472
* Mon Mar 27 2017 Neal Gompa <ngompa13@gmail.com> - 1.3.3-1
2b0472
- Update to 1.3.3
2b0472
2b0472
* Fri Mar 24 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.2-1
2b0472
- Update to 1.3.2
2b0472
2b0472
* Sat Feb 25 2017 Neal Gompa <ngompa13@gmail.com> - 1.3.0-1
2b0472
- Update to 1.3.0
2b0472
2b0472
* Tue Feb 07 2017 Neal Gompa <ngompa13@gmail.com> - 1.2.2-2
2b0472
- Backport patch from upstream to remove extraneous whitespace (#1419685)
2b0472
2b0472
* Fri Feb 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.2.2-1
2b0472
- Update to 1.2.2
2b0472
2b0472
* Thu Feb 02 2017 Neal Gompa <ngompa13@gmail.com> - 1.2.1-3
2b0472
- Fix Obsoletes and Conflicts to prevent self-conflicts
2b0472
2b0472
* Thu Feb 02 2017 Neal Gompa <ngompa13@gmail.com> - 1.2.1-2
2b0472
- Adjust Obsoletes and Conflicts to use inclusive range
2b0472
2b0472
* Tue Jan 24 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.2.1-1
2b0472
- Update to 1.2.1
2b0472
2b0472
* Sat Jan 21 2017 Neal Gompa <ngompa13@gmail.com> - 1.2.0-1
2b0472
- Upgrade to 1.2.0
2b0472
- Enable pkgconf-pkg-config and pkgconf-m4 for F26+
2b0472
2b0472
* Sat Jan 14 2017 Neal Gompa <ngompa13@gmail.com> - 1.1.1-3
2b0472
- Add missing pkgconfig() Provides for virtual .pc files defined in pkgconf
2b0472
2b0472
* Fri Jan 13 2017 Neal Gompa <ngompa13@gmail.com> - 1.1.1-2
2b0472
- Add missing Epoch to pkgconfig Provides/Conflicts for pkgconf-pkg-config
2b0472
- Add copy of pkgconf.1 as pkg-config.1 in pkgconf-pkg-config
2b0472
2b0472
* Sat Jan 07 2017 Neal Gompa <ngompa13@gmail.com> - 1.1.1-1
2b0472
- Upgrade to 1.1.1
2b0472
- Add missing directories to pkgconf-pkg-config
2b0472
2b0472
* Sun Jan 01 2017 Neal Gompa <ngompa13@gmail.com> - 1.1.0-3
2b0472
- Fix up spec per package review (#1409332)
2b0472
2b0472
* Sat Dec 31 2016 Neal Gompa <ngompa13@gmail.com> - 1.1.0-2
2b0472
- Rework package to not generate conflict with pkgconfig
2b0472
- Disable pkgconf-m4 and pkgconf-pkg-config by default
2b0472
2b0472
* Sat Dec 31 2016 Neal Gompa <ngompa13@gmail.com> - 1.1.0-1
2b0472
- Upgrade to 1.1.0
2b0472
- Enable libpkgconf libraries now that they are ABI+API stable
2b0472
2b0472
* Tue Oct 25 2016 Neal Gompa <ngompa13@gmail.com> - 1.0.2-1
2b0472
- Upgrade to 1.0.2
2b0472
2b0472
* Fri Aug 26 2016 Neal Gompa <ngompa13@gmail.com> - 1.0.1-2
2b0472
- Add subpackage for providing pkg-config shim
2b0472
- Enable tests
2b0472
2b0472
* Thu Aug 25 2016 Neal Gompa <ngompa13@gmail.com> - 1.0.1-1
2b0472
- Upgrade to 1.0.1
2b0472
2b0472
* Wed Aug 24 2016 Neal Gompa <ngompa13@gmail.com> - 1-1
2b0472
- Initial packaging