%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

Summary: A tool for determining compilation options.
Summary(ja): コンパイルオプションを決定するためのツール
Name: pkgconfig
Version: 0.23
Release: 5%{?_dist_release}
Epoch: 1
License: GPL
Group: Development/Tools
Source: http://pkgconfig.freedesktop.org/releases/pkg-config-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
The pkgconfig tool determines compilation options. For each required
library, it reads the configuration file and outputs the necessary
compiler and linker flags.

%description -l ja
pkgconfigは、コンパイルオプションを決定するツールです。それぞれ必
要なライブラリ向けにその設定ファイルを読み込み、必要なコンパイラ
フラグとリンカフラグを出力します。


## to build compat32 for x86_64 architecture support
%package -n compat32-%{name}
Summary: A tool for determining compilation options.
Group: Development/Tools

%description -n compat32-%{name}
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 -n pkg-config-%{version}

%build
%configure
make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
#strip $RPM_BUILD_ROOT%{_bindir}/*

%if %{build_compat32}
%__cp -a %{buildroot}%{_bindir}/pkg-config %{buildroot}%{_bindir}/pkg-config-32
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/pkg-config
%dir %{_libdir}/pkgconfig
%{_datadir}/aclocal/*.m4
%{_mandir}/*/*

%if %{build_compat32}
%files -n compat32-%{name}
%defattr(-,root,root)
%{_bindir}/pkg-config-32
%dir %{_libdir}/pkgconfig
%endif


%changelog
* Mon Jul 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1:0.23-5
- rebuild to fix the package built with broken environment.

* Sun Jul 05 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1:0.23-4
- corrected to copy pkg-config to pkg-config-32 for %%if %%{build_compat32} case

* Sun Jul 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1:0.23-3
- removed %%if !%%{build_compat32} case condition

* Mon Apr 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1:0.23-2
- spec in utf-8

* Fri May 16 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1:0.23-1
- applied new versioning policy

* Wed Mar  5 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1:0.23-0vl1
- new upstream release

* Sun Aug 19 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1:0.22-0vl1
- new upstream release

* Fri Aug 25 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1:0.20-0vl3
- fix compat32 package
  - rename %%{_bindir}/pkg-config to %%{_bindir}/pkg-config-32
  - add %%{_bindir}/pkg-config-32
- not srtip at %%install, it should be done by %__install_spec_post

* Tue Feb 28 2006 Shu KONNO <owa@bg.wakwak.com>
- added compat32-* packages for x86_64 architecture support

* Wed Nov 16 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1:0.20-0vl1
- new upstream release

* Wed Aug 17 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1:0.19-0vl1
- new upstream release

* Sun Apr 24 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1:0.17.2-0vl1
- new upstream release
- added Japanese description (from vinedocs.sourceforge.jp)

* Thu Jun 05 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1:0.15.0-0vl2
- add Epoch: 1 to be able to upgrade from VinePlus package.

* Thu Jan 23 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.15.0-0vl1
- new upstream release

* Thu Dec 12 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.14.0-1vl1
- rebuild for Vine Linux

* Fri Nov  8 2002 Havoc Pennington <hp@redhat.com>
- 0.14

* Tue Oct  8 2002 Havoc Pennington <hp@redhat.com>
- use libdir, so we do move .pc files to /usr/lib64

* Tue Oct  8 2002 Havoc Pennington <hp@redhat.com>
- use prefix/lib not libdir, so we don't move .pc files to /usr/lib64

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu Mar  7 2002 Havoc Pennington <hp@redhat.com>
- 0.12.0

* Thu Feb  7 2002 Havoc Pennington <hp@redhat.com>
- 0.11.0

* Sun Feb  3 2002 Havoc Pennington <hp@redhat.com>
- backbuild in gnomehide

* Sun Feb  3 2002 Havoc Pennington <hp@redhat.com>
- 0.10.0

* Sun Feb  3 2002 Havoc Pennington <hp@redhat.com>
- 0.9.0

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed Jun 13 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- call libtoolize to make porting to new archs easier

* Thu Jun 07 2001 Havoc Pennington <hp@redhat.com>
- put pkg.m4 in file list

* Wed Jun 06 2001 Havoc Pennington <hp@redhat.com>
- Upgrade to 0.7
- add man page

* Wed Jan 03 2001 Havoc Pennington <hp@redhat.com>
- Upgrade to 0.5

* Thu Dec 14 2000 Bill Nottingham <notting@redhat.com>
- rebuild because of broken fileutils

* Wed Oct 04 2000 Owen Taylor <otaylor@redhat.com>
- Initial package
