- create minizip subpackage thanks to Rick L Vinyard Jr and Tomas Mraz
This commit is contained in:
parent
1f5833e3ef
commit
70919f0ca4
211
minizip-1.2.3-autotools.patch
Normal file
211
minizip-1.2.3-autotools.patch
Normal file
@ -0,0 +1,211 @@
|
||||
diff -rN -U 5 zlib-1.2.3.orig/contrib/minizip/autogen.sh zlib-1.2.3.patched/contrib/minizip/autogen.sh
|
||||
--- zlib-1.2.3.orig/contrib/minizip/autogen.sh 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ zlib-1.2.3.patched/contrib/minizip/autogen.sh 2007-06-30 23:31:01.000000000 -0600
|
||||
@@ -0,0 +1,53 @@
|
||||
+#! /bin/sh
|
||||
+set -e
|
||||
+
|
||||
+# $Id: autogen.sh,v 1.2 2006/09/07 22:19:58 rvinyard Exp $
|
||||
+#
|
||||
+# Copyright (c) 2002 Daniel Elstner <daniel.elstner@gmx.net>
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License VERSION 2 as
|
||||
+# published by the Free Software Foundation. You are not allowed to
|
||||
+# use any other version of the license; unless you got the explicit
|
||||
+# permission from the author to do so.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
+# 02110-1301, USA.
|
||||
+
|
||||
+
|
||||
+dir=`echo "$0" | sed 's,[^/]*$,,'`
|
||||
+test "x${dir}" = "x" && dir='.'
|
||||
+
|
||||
+if test "x`cd "${dir}" 2>/dev/null && pwd`" != "x`pwd`"
|
||||
+then
|
||||
+ echo "This script must be executed directly from the source directory."
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
|
||||
+AUTOCONF=${AUTOCONF:-autoconf}
|
||||
+AUTOMAKE=${AUTOMAKE:-automake}
|
||||
+AUTOHEADER=${AUTOHEADER:-autoheader}
|
||||
+
|
||||
+ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/`
|
||||
+
|
||||
+rm -f config.cache acconfig.h
|
||||
+
|
||||
+do_cmd() {
|
||||
+ echo "- $@"
|
||||
+ $@
|
||||
+}
|
||||
+
|
||||
+do_cmd $ACLOCAL
|
||||
+do_cmd $LIBTOOLIZE -c --force
|
||||
+do_cmd $AUTOHEADER
|
||||
+do_cmd $AUTOCONF
|
||||
+do_cmd $AUTOMAKE -c --add-missing --foreign
|
||||
+#do_cmd ./configure "$@"
|
||||
diff -rN -U 5 zlib-1.2.3.orig/contrib/minizip/configure.ac zlib-1.2.3.patched/contrib/minizip/configure.ac
|
||||
--- zlib-1.2.3.orig/contrib/minizip/configure.ac 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ zlib-1.2.3.patched/contrib/minizip/configure.ac 2007-06-28 14:57:39.000000000 -0600
|
||||
@@ -0,0 +1,12 @@
|
||||
+AC_INIT([minizip], 1.2.3, [info@winimage.com])
|
||||
+
|
||||
+AC_PROG_LIBTOOL
|
||||
+
|
||||
+AM_INIT_AUTOMAKE([1.9 tar-ustar dist-bzip2 dist-zip])
|
||||
+AM_CONFIG_HEADER([config.h])
|
||||
+
|
||||
+AC_LANG_C
|
||||
+AC_PROG_CC
|
||||
+AC_PROG_INSTALL
|
||||
+
|
||||
+AC_OUTPUT(Makefile minizip.pc)
|
||||
diff -rN -U 5 zlib-1.2.3.orig/contrib/minizip/Makefile.am zlib-1.2.3.patched/contrib/minizip/Makefile.am
|
||||
--- zlib-1.2.3.orig/contrib/minizip/Makefile.am 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ zlib-1.2.3.patched/contrib/minizip/Makefile.am 2007-06-28 15:01:34.000000000 -0600
|
||||
@@ -0,0 +1,39 @@
|
||||
+METASOURCES = AUTO
|
||||
+
|
||||
+pkgconfigdir = $(libdir)/pkgconfig
|
||||
+pkgconfig_DATA = minizip.pc
|
||||
+
|
||||
+lib_LTLIBRARIES = libminizip.la
|
||||
+library_includedir = $(prefix)/include/minizip
|
||||
+
|
||||
+libminizip_la_SOURCES = \
|
||||
+ ioapi.c \
|
||||
+ mztools.c \
|
||||
+ unzip.c \
|
||||
+ zip.c
|
||||
+
|
||||
+libminizip_la_LDFLAGS = -version-number 1:0:1
|
||||
+
|
||||
+library_include_HEADERS = \
|
||||
+ crypt.h \
|
||||
+ ioapi.h \
|
||||
+ mztools.h \
|
||||
+ unzip.h \
|
||||
+ zip.h
|
||||
+
|
||||
+EXTRA_DIST = \
|
||||
+ crypt.h \
|
||||
+ ioapi.h \
|
||||
+ mztools.h \
|
||||
+ unzip.h \
|
||||
+ zip.h
|
||||
+
|
||||
+bin_PROGRAMS = miniunzip minizip
|
||||
+
|
||||
+miniunzip_SOURCES = miniunz.c
|
||||
+miniunzip_LDADD = -L$(top_builddir) -lminizip -lz
|
||||
+
|
||||
+minizip_SOURCES = minizip.c
|
||||
+minizip_LDADD = -L$(top_builddir) -lminizip -lz
|
||||
+
|
||||
+
|
||||
diff -rN -U 5 zlib-1.2.3.orig/contrib/minizip/minizip.pc.in zlib-1.2.3.patched/contrib/minizip/minizip.pc.in
|
||||
--- zlib-1.2.3.orig/contrib/minizip/minizip.pc.in 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ zlib-1.2.3.patched/contrib/minizip/minizip.pc.in 2007-06-28 14:55:38.000000000 -0600
|
||||
@@ -0,0 +1,11 @@
|
||||
+prefix=@prefix@
|
||||
+exec_prefix=@exec_prefix@
|
||||
+libdir=@libdir@
|
||||
+includedir=@includedir@
|
||||
+
|
||||
+Name: @PACKAGE_NAME@
|
||||
+Description: Minizip zip file manipulation library
|
||||
+Requires:
|
||||
+Version: @PACKAGE_VERSION@
|
||||
+Libs: -L${libdir} -lminizip -lz
|
||||
+Cflags: -I${includedir}
|
||||
diff -rN -U 5 zlib-1.2.3.orig/contrib/minizip/minizip.spec zlib-1.2.3.patched/contrib/minizip/minizip.spec
|
||||
--- zlib-1.2.3.orig/contrib/minizip/minizip.spec 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ zlib-1.2.3.patched/contrib/minizip/minizip.spec 2007-07-01 00:00:41.000000000 -0600
|
||||
@@ -0,0 +1,76 @@
|
||||
+Summary: Minizip manipulates files from a .zip archive
|
||||
+Name: minizip
|
||||
+Version: 1.2.3
|
||||
+Release: 1
|
||||
+License: BSD
|
||||
+Group: System Environment/Libraries
|
||||
+URL: http://www.winimage.com/zLibDll/minizip.html
|
||||
+Source0: http://www.zlib.net/zlib-%{version}.tar.gz
|
||||
+Patch0: minizip-%{version}-autotools.patch
|
||||
+Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
+BuildRequires: automake, autoconf, libtool
|
||||
+BuildRequires: zlib-devel >= %{version}
|
||||
+
|
||||
+%description
|
||||
+Minizip manipulates files from a .zip archive
|
||||
+
|
||||
+
|
||||
+%package devel
|
||||
+Summary: Development files for the minizip library
|
||||
+Group: Development/Libraries
|
||||
+Requires: %{name} = %{version}-%{release}
|
||||
+BuildRequires: zlib-devel >= %{version}
|
||||
+
|
||||
+%description devel
|
||||
+This package contains the libraries and header files needed for
|
||||
+developing applications which use minizip.
|
||||
+
|
||||
+
|
||||
+%prep
|
||||
+%setup -q -n zlib-%{version}
|
||||
+%patch0 -p1
|
||||
+
|
||||
+%build
|
||||
+cd contrib/minizip
|
||||
+sh autogen.sh
|
||||
+%configure --enable-static=no
|
||||
+# SMP flags are explicitly omitted due to a libtool/autoconf
|
||||
+# dependency race condition
|
||||
+%{__make}
|
||||
+
|
||||
+
|
||||
+%install
|
||||
+cd contrib/minizip
|
||||
+%{__rm} -rf %{buildroot}
|
||||
+
|
||||
+%{__make} DESTDIR=%{buildroot} INSTALL="%{__install} -p" install
|
||||
+find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
|
||||
+
|
||||
+
|
||||
+%clean
|
||||
+%{__rm} -rf %{buildroot}
|
||||
+
|
||||
+
|
||||
+%post -p /sbin/ldconfig
|
||||
+
|
||||
+
|
||||
+%postun -p /sbin/ldconfig
|
||||
+
|
||||
+
|
||||
+%files
|
||||
+%defattr(-,root,root,-)
|
||||
+%doc contrib/minizip/ChangeLogUnzip
|
||||
+%{_bindir}/minizip
|
||||
+%{_bindir}/miniunzip
|
||||
+%{_libdir}/libminizip.so.*
|
||||
+
|
||||
+%files devel
|
||||
+%defattr(-,root,root,-)
|
||||
+%{_includedir}/minizip
|
||||
+%{_libdir}/libminizip.so
|
||||
+%{_libdir}/pkgconfig/minizip.pc
|
||||
+
|
||||
+%changelog
|
||||
+* Sat Jun 30 2007 Rick L Vinyard Jr <rvinyard@cs.nmsu.edu> - 1.2.3-1
|
||||
+- Initial version
|
||||
+
|
65
zlib.spec
65
zlib.spec
@ -1,13 +1,11 @@
|
||||
Summary: The zlib compression and decompression library
|
||||
Name: zlib
|
||||
Version: 1.2.3
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?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
|
||||
Patch3: zlib-1.2.3-autotools.patch
|
||||
Patch4: minizip-1.2.3-autotools.patch
|
||||
URL: http://www.gzip.org/zlib/
|
||||
License: BSD
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -27,19 +25,40 @@ The zlib-devel package contains the header files and libraries needed
|
||||
to develop programs that use the zlib compression and decompression
|
||||
library.
|
||||
|
||||
%package -n minizip
|
||||
Summary: Minizip manipulates files from a .zip archive
|
||||
Group: System Environment/Libraries
|
||||
Requires: zlib = %{version}-%{release}
|
||||
|
||||
%description -n minizip
|
||||
Minizip manipulates files from a .zip archive
|
||||
|
||||
%package -n minizip-devel
|
||||
Summary: Development files for the minizip library
|
||||
Group: Development/Libraries
|
||||
Requires: minizip = %{version}-%{release}
|
||||
Requires: zlib-devel = %{version}-%{release}
|
||||
|
||||
%description -n minizip-devel
|
||||
This package contains the libraries and header files needed for
|
||||
developing applications which use minizip.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
#%patch0 -p1 -b .make-test
|
||||
#%patch1 -p1 -b .cflags
|
||||
#%patch2 -p1 -b .lib
|
||||
%patch3 -p1 -b .autotools
|
||||
%patch4 -p1 -b .autotools2
|
||||
|
||||
%build
|
||||
|
||||
make %{?_smp_mflags}
|
||||
autoreconf --install;
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
cd contrib/minizip
|
||||
sh autogen.sh
|
||||
%configure --enable-static=no
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
@ -62,6 +81,15 @@ cp -p zlib.3 ${RPM_BUILD_ROOT}%{_mandir}/man3
|
||||
# Remove unuseful files created by libtool
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/libz.la
|
||||
|
||||
# install minizip subpackage
|
||||
cd contrib/minizip
|
||||
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
rm -f $RPM_BUILD_ROOT/%{_bindir}/miniunzip
|
||||
rm -f $RPM_BUILD_ROOT/%{_bindir}/minizip
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/libminizip.la
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
@ -69,6 +97,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%post -n minizip -p /sbin/ldconfig
|
||||
|
||||
%postun -n minizip -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc README ChangeLog FAQ
|
||||
@ -77,12 +109,25 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc algorithm.txt minigzip.c example.c
|
||||
%{_libdir}/*.a
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/libz.a
|
||||
%{_libdir}/libz.so
|
||||
%{_includedir}/*
|
||||
%{_mandir}/man3/zlib.3*
|
||||
|
||||
%files -n minizip
|
||||
%defattr(-,root,root,-)
|
||||
%doc contrib/minizip/ChangeLogUnzip
|
||||
%{_libdir}/libminizip.so.*
|
||||
|
||||
%files -n minizip-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libminizip.so
|
||||
%{_libdir}/pkgconfig/minizip.pc
|
||||
|
||||
%changelog
|
||||
* Wed Aug 15 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-14
|
||||
- create minizip subpackage
|
||||
|
||||
* Mon May 21 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-13
|
||||
- remove .so,.a
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user