Package pkg-config: Specfile

Name: pkg-config
Version: 0.23
Release: alt1

Summary: Pkgconfig helps make building packages easier
License: GPLv2+
Group: Development/Other
Url: http://pkg-config.freedesktop.org/wiki/
Packager: Dmitry V. Levin <ldv@altlinux.org>

Provides: pkgconfig-reqprov, pkgconfig-recursion, pkgconfig = 1:%version-%release
Obsoletes: pkgconfig

# http://pkg-config.freedesktop.org/releases/pkg-config-%version.tar.gz
Source: pkg-config-%version.tar
Patch: pkg-config-%version-%release.patch

%def_with installed_glib
%{?_with_installed_glib:BuildRequires: glib2-devel}
BuildRequires: libpopt-devel

%description
The pkg-config program is used to retrieve information about installed
libraries in the system.  It is typically used to compile and link
against one or more libraries.

%prep
%setup -q
%patch -p1

# remove old popt stuff
rm findme* popt*

%if_with installed_glib
# remove old glib as well
	rm -r glib-1.2.10
	sed -i '/glib-1\.2\.10/s/^/: #/' configure.in
	sed -i 's/\(GLIB_SUBDIR *=\).*/\1/' Makefile.am
%endif

%build
autoreconf -fisv
%configure \
	%{?_with_installed_glib:--with-installed-glib}
%make_build
%{?!__buildreqs:%{?!_without_check:%{?!_disable_check:%make_build -k check}}}

%install
%makeinstall
install -dm755 %buildroot{%_datadir,%_libdir}/pkgconfig

mkdir -p %buildroot%_sysconfdir/buildreqs/files/ignore.d
cat <<\EOF >%buildroot%_sysconfdir/buildreqs/files/ignore.d/%name
# %name buildreq filter.
^(%_libdir|%_datadir)/pkgconfig/[^/]+\.pc$
EOF

%files
%config %_sysconfdir/buildreqs/files/ignore.d/*
%_bindir/pkg-config
%dir %_libdir/pkgconfig
%dir %_datadir/pkgconfig
%_datadir/aclocal/*
%_man1dir/*
%doc AUTHORS NEWS README

%changelog
* Thu Apr 24 2008 Dmitry V. Levin <ldv@altlinux.org> 0.23-alt1
- Updated to 0.23.

* Fri Oct 05 2007 Dmitry V. Levin <ldv@altlinux.org> 0.22-alt2
- Added --enable-recursion and --disable-recursion hidden options.
- Added Provides: pkgconfig-recursion.
- Enabled recursion by default again because disabled recursion
  breaks build of many screwed packages.

* Tue Oct 02 2007 Dmitry V. Levin <ldv@altlinux.org> 0.22-alt1
- Updated to 0.22.
- Removed dead code.
- Disabled recursion while querying for libraries unless in --static mode.
  This change resurrects the behaviour which was introduced
  in 0.15.0-alt3 and lost in 0.18.

* Sun Nov 12 2006 Dmitry V. Levin <ldv@altlinux.org> 0.21-alt1
- Updated to 0.21.
- Do not package ChangeLog file, NEWS should be enough.
- Do not package COPYING symlink, License tag should be enough.

* Fri Feb 03 2006 Dmitry V. Levin <ldv@altlinux.org> 0.20-alt3.2
- Added buildreq ignore rule (#9015).

* Thu Feb 02 2006 Dmitry V. Levin <ldv@altlinux.org> 0.20-alt3.1
- Provides: pkgconfig-reqprov.

* Fri Jan 27 2006 Mikhail Zabaluev <mhz@altlinux.ru> 0.20-alt3
- Patch3: from Fedora CVS, add options for autoreqprov scripts

* Sun Jan 22 2006 Dmitry V. Levin <ldv@altlinux.org> 0.20-alt2.1
- Updated package provides.

* Mon Nov 21 2005 Mikhail Zabaluev <mhz@altlinux.ru> 0.20-alt2
- Patch2: always ignore Requires.private line
  unless --static option has been given

* Mon Nov 21 2005 Mikhail Zabaluev <mhz@altlinux.ru> 0.20-alt1
- 0.20
- Updated Patch0 and merged in Patch2 to it

* Sat Sep 10 2005 Mikhail Zabaluev <mhz@altlinux.ru> 0.19-alt1
- 0.19
- Do not remove /usr/share/pkg-config from the search path [bug #7911]
- Updated Patch1 & Patch2
- Added NEWS and COPYING do doc list

* Sun Apr 17 2005 Yuri N. Sedunov <aris@altlinux.ru> 0.17.2-alt1
- 0.17.2

* Tue Apr 12 2005 Yuri N. Sedunov <aris@altlinux.ru> 0.17.1-alt1
- 0.17.1
- recursion disabled in upstream.

* Mon Apr 04 2005 Yuri N. Sedunov <aris@altlinux.ru> 0.16.0-alt1
- 0.16.0
- updated patches.
- use only %%_libdir/pkgconfig as a default search path for .pc files.

* Thu Jan 13 2005 Yuri N. Sedunov <aris@altlinux.ru> 0.15.0-alt4
- fixed build with latest automake-1.9.4.

* Fri Mar 05 2004 Yuri N. Sedunov <aris@altlinux.ru> 0.15.0-alt3.2
- fix pkg.m4 for new automake.

* Thu Feb 12 2004 Yuri N. Sedunov <aris@altlinux.ru> 0.15.0-alt3.1
- provides /usr/lib/pkgconfig.

* Sat Jan 03 2004 Yuri N. Sedunov <aris@altlinux.ru> 0.15.0-alt3
- disable recursion while output linker flags. New --recursive option
  restores former behavior.

* Wed Dec 17 2003 Yuri N. Sedunov <aris@altlinux.ru> 0.15.0-alt2
- build with system glib and popt.

* Wed Jan 22 2003 Yuri N. Sedunov <aris@altlinux.ru> 0.15.0-alt1
- 0.15.0

* Wed Dec 04 2002 Yuri N. Sedunov <aris@altlinux.ru> 0.14.0-alt1
- 0.14.0, glib2-2.1.3 requires new version.
- removed empty NEWS from %%doc.
- small improvements in description.

* Mon Sep 23 2002 AEN <aen@altlinux.ru> 0.13.0-alt1
- new version

* Wed Mar 27 2002 AEN <aen@logic.ru> 0.12.0-alt1
- new version

* Tue Feb 12 2002 Stanislav Ievlev <inger@altlinux.ru> 0.10.0-alt1
- 0.10.0

* Thu Jul 26 2001 Stanislav Ievlev <inger@altlinux.ru> 0.8.0-alt1
- 0.8.0. Cleanup spec.

* Fri Jun 15 2001 AEN <aen@logic.ru> 0.7.0-alt2
- BuildReq added

* Fri Jun 15 2001 AEN <aen@logic.ru> 0.7.0-alt1
- new version

* Thu Apr 19 2001 Stanislav Ievlev <inger@altlinux.ru> 0.5.0-alt1
- Initial release for ALTLinux. Descriptions to spec from Mandrake package