最近在学 rpm 构建
http://i1.piimg.com/4851/15443e4ab46f21d3.png
Summary: The compression and decompression library
Name: zlib
Version: 1.2.11
Release: 1%{?dist}
License: zlib and Boost
Group: System Environment/Libraries
URL:
http://www.zlib.net/
Source:
http://www.zlib.net/zlib-%{version}.tar.xz
#BuildRequires: automake, autoconf, libtool, pkgconfig
%description
Zlib is a general-purpose, patent-free, lossless data compression
library which is used by many different programs.
%package devel
Summary: Header files and libraries for Zlib development
Group: Development/Libraries
Requires: %{name}-%{version}-%{release}
%description devel
The zlib-devel package contains the header files and libraries needed
to develop programs that use the zlib compression and decompression
library.
%prep
%setup -q
%build
export LDFLAGS="$LDFLAGS -Wl,-z,relro"
./configure --libdir=%{_libdir} --includedir=%{_includedir} --prefix=%{_prefix} --64
make %{?_smp_mflags}
%check
make test
%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/libz.a
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc README ChangeLog FAQ
%{_libdir}/libz.so.*
%files devel
%doc README doc/algorithm.txt test/example.c
%{_libdir}/libz.so
%{_libdir}/pkgconfig/zlib.pc
%{_includedir}/zlib.h
%{_includedir}/zconf.h
%{_mandir}/man3/zlib.3*
%changelog