Use the built .pc file instead of manually generating it

This commit is contained in:
Kalev Lember 2011-05-10 13:32:45 +03:00
parent 3aba1adffd
commit 3db3beac16

View File

@ -7,7 +7,7 @@
Name: mingw32-zlib
Version: 1.2.5
Release: 3%{?dist}
Release: 4%{?dist}
Summary: MinGW Windows zlib compression library
License: zlib
@ -70,7 +70,7 @@ pushd x
CC=%{_mingw32_cc} \
CFLAGS="%{_mingw32_cflags}" \
RANLIB=%{_mingw32_ranlib} \
./configure
./configure --prefix=%{_mingw32_prefix}
make -f win32/Makefile.gcc \
CFLAGS="%{_mingw32_cflags}" \
@ -94,15 +94,6 @@ cp x/libzdll.a .libs/libz.dll.a
cp x/zlib1.dll .libs/
make %{?_smp_mflags}
sed \
-e 's|@prefix@|%{_mingw32_prefix}|g' \
-e 's|@exec_prefix@|${prefix}|g' \
-e 's|@libdir@|%{_mingw32_libdir}|g' \
-e 's|@sharedlibdir@|${libdir}|g' \
-e 's|@includedir@|%{_mingw32_includedir}|g' \
-e 's|@VERSION@|%{version}|g' \
zlib.pc.in > zlib.pc
%install
rm -rf $RPM_BUILD_ROOT
@ -113,7 +104,7 @@ rm -rf $RPM_BUILD_ROOT/%{_mingw32_mandir}
rm -f $RPM_BUILD_ROOT/%{_mingw32_bindir}/libz-1.dll
install x/zlib1.dll $RPM_BUILD_ROOT/%{_mingw32_bindir}/
install -m 644 zlib.pc $RPM_BUILD_ROOT%{_mingw32_libdir}/pkgconfig/
install -m 644 x/zlib.pc $RPM_BUILD_ROOT%{_mingw32_libdir}/pkgconfig/
%clean
rm -rf $RPM_BUILD_ROOT
@ -145,6 +136,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue May 10 2011 Kalev Lember <kalev@smartlink.ee> - 1.2.5-4
- Use the built .pc file instead of manually generating it
* Tue Apr 26 2011 Kalev Lember <kalev@smartlink.ee> - 1.2.5-3
- Install zlib pkgconfig file