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
|
||||
Name: zlib
|
||||
Version: 1.2.3
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Group: System Environment/Libraries
|
||||
Source: http://www.zlib.net/zlib-%{version}.tar.gz
|
||||
Patch0: zlib-1.1.4-make-test.patch
|
||||
Patch1: zlib-1.2.3-cflags.patch
|
||||
Patch2: zlib-1.2.3-lib.patch
|
||||
#Patch0: zlib-1.1.4-make-test.patch
|
||||
#Patch1: zlib-1.2.3-cflags.patch
|
||||
#Patch2: zlib-1.2.3-lib.patch
|
||||
Patch3: zlib-1.2.3-autotools.patch
|
||||
URL: http://www.gzip.org/zlib/
|
||||
License: BSD
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: automake, autoconf, libtool
|
||||
|
||||
%description
|
||||
Zlib is a general-purpose, patent-free, lossless data compression
|
||||
@ -27,33 +29,32 @@ library.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .make-test
|
||||
%patch1 -p1 -b .cflags
|
||||
%patch2 -p1 -b .lib
|
||||
#%patch0 -p1 -b .make-test
|
||||
#%patch1 -p1 -b .cflags
|
||||
#%patch2 -p1 -b .lib
|
||||
%patch3 -p1 -b .autotools
|
||||
|
||||
%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
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=${RPM_BUILD_ROOT}%{_prefix} \
|
||||
--libdir=${RPM_BUILD_ROOT}%{_libdir}
|
||||
mv Makefile Makefile.static
|
||||
|
||||
make -f Makefile.shared
|
||||
make -f Makefile.static clean
|
||||
make -f Makefile.static
|
||||
autoreconf --install;
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make -f Makefile.shared install
|
||||
make -f Makefile.static install
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%check
|
||||
make -f Makefile.shared %{?_smp_mflags} test
|
||||
make -f Makefile.static %{?_smp_mflags} test
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
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
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
@ -76,6 +77,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_mandir}/man3/zlib.3*
|
||||
|
||||
%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
|
||||
- remove the compilation part to build section
|
||||
some minor changes
|
||||
|
Loading…
Reference in New Issue
Block a user