compilation is fully automatized
This commit is contained in:
parent
d44953292a
commit
71c9339ff3
55
zlib.spec
55
zlib.spec
@ -1,15 +1,17 @@
|
|||||||
Summary: The zlib compression and deprefix=${RPM_BUILD_ROOT}%{_prefix}compression library
|
Summary: The zlib compression and deprefix=${RPM_BUILD_ROOT}%{_prefix}compression library
|
||||||
Name: zlib
|
Name: zlib
|
||||||
Version: 1.2.3
|
Version: 1.2.3
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: http://www.zlib.net/zlib-%{version}.tar.gz
|
Source: http://www.zlib.net/zlib-%{version}.tar.gz
|
||||||
Patch0: zlib-1.1.4-make-test.patch
|
#Patch0: zlib-1.1.4-make-test.patch
|
||||||
Patch1: zlib-1.2.3-cflags.patch
|
#Patch1: zlib-1.2.3-cflags.patch
|
||||||
Patch2: zlib-1.2.3-lib.patch
|
#Patch2: zlib-1.2.3-lib.patch
|
||||||
|
Patch3: zlib-1.2.3-autotools.patch
|
||||||
URL: http://www.gzip.org/zlib/
|
URL: http://www.gzip.org/zlib/
|
||||||
License: BSD
|
License: BSD
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
BuildRequires: automake, autoconf, libtool
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Zlib is a general-purpose, patent-free, lossless data compression
|
Zlib is a general-purpose, patent-free, lossless data compression
|
||||||
@ -27,33 +29,32 @@ library.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .make-test
|
#%patch0 -p1 -b .make-test
|
||||||
%patch1 -p1 -b .cflags
|
#%patch1 -p1 -b .cflags
|
||||||
%patch2 -p1 -b .lib
|
#%patch2 -p1 -b .lib
|
||||||
|
%patch3 -p1 -b .autotools
|
||||||
|
|
||||||
%build
|
%build
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
|
||||||
# created Makefile for the shared lib
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS -fPIC" ./configure --shared --prefix=${RPM_BUILD_ROOT}%{_prefix} \
|
|
||||||
--libdir=${RPM_BUILD_ROOT}%{_libdir}
|
|
||||||
mv Makefile Makefile.shared
|
|
||||||
|
|
||||||
# created Makefile for the static lib
|
autoreconf --install;
|
||||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=${RPM_BUILD_ROOT}%{_prefix} \
|
%configure
|
||||||
--libdir=${RPM_BUILD_ROOT}%{_libdir}
|
make %{?_smp_mflags}
|
||||||
mv Makefile Makefile.static
|
|
||||||
|
|
||||||
make -f Makefile.shared
|
|
||||||
make -f Makefile.static clean
|
|
||||||
make -f Makefile.static
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make -f Makefile.shared install
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
make -f Makefile.static install
|
|
||||||
|
|
||||||
%check
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
make -f Makefile.shared %{?_smp_mflags} test
|
|
||||||
make -f Makefile.static %{?_smp_mflags} test
|
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
|
||||||
|
cp zconf.h ${RPM_BUILD_ROOT}%{_includedir}
|
||||||
|
cp zlib.h ${RPM_BUILD_ROOT}%{_includedir}
|
||||||
|
cp zutil.h ${RPM_BUILD_ROOT}%{_includedir}
|
||||||
|
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man3
|
||||||
|
cp zlib.3 ${RPM_BUILD_ROOT}%{_mandir}/man3
|
||||||
|
|
||||||
|
# Remove bogus files created by libtool
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libz.la
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
@ -76,6 +77,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_mandir}/man3/zlib.3*
|
%{_mandir}/man3/zlib.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 20 2007 Adam Tkac <atkac redhat com> - 1.2.3-7
|
||||||
|
- building is now automatized
|
||||||
|
- specfile cleanup
|
||||||
|
|
||||||
* Tue Feb 20 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-6
|
* Tue Feb 20 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-6
|
||||||
- remove the compilation part to build section
|
- remove the compilation part to build section
|
||||||
some minor changes
|
some minor changes
|
||||||
|
Loading…
Reference in New Issue
Block a user