| 1 | #define svn_url e:/trees/zlib/trunk
|
|---|
| 2 | %define svn_url http://svn.netlabs.org/repos/ports/zlib/trunk
|
|---|
| 3 | %define svn_rev 1948
|
|---|
| 4 |
|
|---|
| 5 | Summary: The compression and decompression library
|
|---|
| 6 | Name: zlib
|
|---|
| 7 | Version: 1.2.11
|
|---|
| 8 | Release: 1%{?dist}
|
|---|
| 9 | License: zlib and Boost
|
|---|
| 10 | Group: System Environment/Libraries
|
|---|
| 11 | URL: http://www.zlib.net
|
|---|
| 12 | Vendor: bww bitwise works GmbH
|
|---|
| 13 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 14 |
|
|---|
| 15 | # DEF files to create forwarders for the legacy package
|
|---|
| 16 | Source10: z.def
|
|---|
| 17 |
|
|---|
| 18 | BuildRequires: automake, autoconf, libtool
|
|---|
| 19 |
|
|---|
| 20 | %description
|
|---|
| 21 | Zlib is a general-purpose, patent-free, lossless data compression
|
|---|
| 22 | library which is used by many different programs.
|
|---|
| 23 |
|
|---|
| 24 | %package devel
|
|---|
| 25 | Summary: Header files and libraries for Zlib development
|
|---|
| 26 | Group: Development/Libraries
|
|---|
| 27 | Requires: %{name} = %{version}-%{release}
|
|---|
| 28 |
|
|---|
| 29 | %description devel
|
|---|
| 30 | The zlib-devel package contains the header files and libraries needed
|
|---|
| 31 | to develop programs that use the zlib compression and decompression
|
|---|
| 32 | library.
|
|---|
| 33 |
|
|---|
| 34 | %package static
|
|---|
| 35 | Summary: Static libraries for Zlib development
|
|---|
| 36 | Group: Development/Libraries
|
|---|
| 37 | Requires: %{name}-devel = %{version}-%{release}
|
|---|
| 38 |
|
|---|
| 39 | %description static
|
|---|
| 40 | The zlib-static package includes static libraries needed
|
|---|
| 41 | to develop programs that use the zlib compression and
|
|---|
| 42 | decompression library.
|
|---|
| 43 |
|
|---|
| 44 | %package -n minizip
|
|---|
| 45 | Summary: Library for manipulation with .zip archives
|
|---|
| 46 | Group: System Environment/Libraries
|
|---|
| 47 | Requires: %{name} = %{version}-%{release}
|
|---|
| 48 |
|
|---|
| 49 | %description -n minizip
|
|---|
| 50 | Minizip is a library for manipulation with files from .zip archives.
|
|---|
| 51 |
|
|---|
| 52 | %package -n minizip-devel
|
|---|
| 53 | Summary: Development files for the minizip library
|
|---|
| 54 | Group: Development/Libraries
|
|---|
| 55 | Requires: minizip = %{version}-%{release}
|
|---|
| 56 | Requires: %{name}-devel = %{version}-%{release}
|
|---|
| 57 | Requires: pkgconfig
|
|---|
| 58 |
|
|---|
| 59 | %description -n minizip-devel
|
|---|
| 60 | This package contains the libraries and header files needed for
|
|---|
| 61 | developing applications which use minizip.
|
|---|
| 62 |
|
|---|
| 63 | %debug_package
|
|---|
| 64 |
|
|---|
| 65 | %prep
|
|---|
| 66 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 67 | %setup -q
|
|---|
| 68 | %else
|
|---|
| 69 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 70 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 71 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 72 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 73 | %endif
|
|---|
| 74 |
|
|---|
| 75 | # Prepare forwarder DLLs.
|
|---|
| 76 | for m in %{SOURCE10}; do
|
|---|
| 77 | cp ${m} .
|
|---|
| 78 | done
|
|---|
| 79 |
|
|---|
| 80 | %build
|
|---|
| 81 | export CFLAGS="$RPM_OPT_FLAGS"
|
|---|
| 82 | export LDFLAGS="$LDFLAGS -Zomf -Zhigh-mem -lcx"
|
|---|
| 83 | export VENDOR="%{vendor}"
|
|---|
| 84 | ./configure --libdir=%{_libdir} --includedir=%{_includedir} --prefix=%{_prefix}
|
|---|
| 85 | make %{?_smp_mflags}
|
|---|
| 86 |
|
|---|
| 87 | cd contrib/minizip
|
|---|
| 88 | autoreconf -fvi
|
|---|
| 89 | %configure --enable-static=no
|
|---|
| 90 | make %{?_smp_mflags}
|
|---|
| 91 |
|
|---|
| 92 | %check
|
|---|
| 93 | make test
|
|---|
| 94 |
|
|---|
| 95 | %install
|
|---|
| 96 | make install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 97 |
|
|---|
| 98 | cd contrib/minizip
|
|---|
| 99 | make install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 100 | # we need to get back to root, as else the debugfile list is created at
|
|---|
| 101 | # the wrong location
|
|---|
| 102 | cd ..
|
|---|
| 103 | cd ..
|
|---|
| 104 |
|
|---|
| 105 | rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|---|
| 106 |
|
|---|
| 107 | # Generate & install forwarder DLLs.
|
|---|
| 108 | gcc -Zomf -Zdll -nostdlib z.def -l$RPM_BUILD_ROOT/%{_libdir}/z1.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/z.dll
|
|---|
| 109 |
|
|---|
| 110 | #post -p /sbin/ldconfig
|
|---|
| 111 |
|
|---|
| 112 | #postun -p /sbin/ldconfig
|
|---|
| 113 |
|
|---|
| 114 | #post -n minizip -p /sbin/ldconfig
|
|---|
| 115 |
|
|---|
| 116 | #postun -n minizip -p /sbin/ldconfig
|
|---|
| 117 |
|
|---|
| 118 | %files
|
|---|
| 119 | %{!?_licensedir:%global license %%doc}
|
|---|
| 120 | %license README
|
|---|
| 121 | %doc ChangeLog FAQ
|
|---|
| 122 | %{_libdir}/z*.dll
|
|---|
| 123 |
|
|---|
| 124 | %files devel
|
|---|
| 125 | %{!?_licensedir:%global license %%doc}
|
|---|
| 126 | %license README
|
|---|
| 127 | %doc doc/algorithm.txt test/example.c
|
|---|
| 128 | %{_libdir}/libz_dll.a
|
|---|
| 129 | %{_libdir}/pkgconfig/zlib.pc
|
|---|
| 130 | %{_includedir}/zlib.h
|
|---|
| 131 | %{_includedir}/zconf.h
|
|---|
| 132 | %{_mandir}/man3/zlib.3*
|
|---|
| 133 |
|
|---|
| 134 | %files static
|
|---|
| 135 | %{!?_licensedir:%global license %%doc}
|
|---|
| 136 | %license README
|
|---|
| 137 | %{_libdir}/libz.a
|
|---|
| 138 |
|
|---|
| 139 | %files -n minizip
|
|---|
| 140 | %doc contrib/minizip/MiniZip64_info.txt contrib/minizip/MiniZip64_Changes.txt
|
|---|
| 141 | %{_libdir}/minizip*.dll
|
|---|
| 142 |
|
|---|
| 143 | %files -n minizip-devel
|
|---|
| 144 | %dir %{_includedir}/minizip
|
|---|
| 145 | %{_includedir}/minizip/*.h
|
|---|
| 146 | %{_libdir}/minizip*_dll.a
|
|---|
| 147 | %{_libdir}/pkgconfig/minizip.pc
|
|---|
| 148 |
|
|---|
| 149 | %changelog
|
|---|
| 150 | * Tue Jan 24 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.2.11-1
|
|---|
| 151 | - update to version 1.2.11
|
|---|
| 152 |
|
|---|
| 153 | * Thu Feb 18 2016 yd <yd@os2power.com> 1.2.5-6
|
|---|
| 154 | - added .pc file to distribution.
|
|---|
| 155 | - use new debug macros.
|
|---|
| 156 |
|
|---|
| 157 | * Mon Jun 02 2014 yd
|
|---|
| 158 | - remove dll from devel package.
|
|---|
| 159 | - added debug package with symbolic info for exceptq.
|
|---|
| 160 |
|
|---|
| 161 | * Mon Jan 16 2012 yd
|
|---|
| 162 | - rebuild with libc 0.6.4 runtime.
|
|---|