summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-14 22:16:26 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-14 22:16:26 +0900
commit5c8f562c198ee96990868b1014217fb01b03bf6a (patch)
treeaef757b2abf225284bf0ccb0df3a7b7aab6765aa /packaging
parent3101b2a7be8f0e3cc6ff469ce2597945c862264b (diff)
downloadzip-5c8f562c198ee96990868b1014217fb01b03bf6a.tar.gz
zip-5c8f562c198ee96990868b1014217fb01b03bf6a.tar.bz2
zip-5c8f562c198ee96990868b1014217fb01b03bf6a.zip
Tizen 2.0 Release2.0_release
Diffstat (limited to 'packaging')
-rw-r--r--packaging/exec-shield.patch19
-rw-r--r--packaging/zcrypt29.tar.gzbin0 -> 17484 bytes
-rw-r--r--packaging/zip-2.3-currdir.patch11
-rw-r--r--packaging/zip-2.31-configure.patch213
-rw-r--r--packaging/zip-2.31-install.patch11
-rw-r--r--packaging/zip-2.31-near-4GB.patch293
-rw-r--r--packaging/zip.spec180
-rw-r--r--packaging/zip23-umask.patch23
-rw-r--r--packaging/zip23.patch93
9 files changed, 843 insertions, 0 deletions
diff --git a/packaging/exec-shield.patch b/packaging/exec-shield.patch
new file mode 100644
index 0000000..3d2a1eb
--- /dev/null
+++ b/packaging/exec-shield.patch
@@ -0,0 +1,19 @@
+diff -ur zip-2.3/crc_i386.S zip-2.3-lhh/crc_i386.S
+--- zip-2.3/crc_i386.S 1999-10-09 16:10:26.000000000 -0400
++++ zip-2.3-lhh/crc_i386.S 2003-10-24 16:15:52.000000000 -0400
+@@ -230,3 +230,6 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++
++.section .note.GNU-stack, "", @progbits
++.previous
+diff -ur zip-2.3/match.S zip-2.3-lhh/match.S
+--- zip-2.3/match.S 1999-07-27 17:18:14.000000000 -0400
++++ zip-2.3-lhh/match.S 2003-10-24 16:15:38.000000000 -0400
+@@ -405,3 +405,5 @@
+ #endif /* i386 || _I386 || _i386 || __i386 */
+
+ #endif /* !USE_ZLIB */
++.section .note.GNU-stack, "", @progbits
++.previous
diff --git a/packaging/zcrypt29.tar.gz b/packaging/zcrypt29.tar.gz
new file mode 100644
index 0000000..44de3cf
--- /dev/null
+++ b/packaging/zcrypt29.tar.gz
Binary files differ
diff --git a/packaging/zip-2.3-currdir.patch b/packaging/zip-2.3-currdir.patch
new file mode 100644
index 0000000..1ff00f6
--- /dev/null
+++ b/packaging/zip-2.3-currdir.patch
@@ -0,0 +1,11 @@
+--- zip-2.3/util.c.pom 1999-11-07 11:29:38.000000000 +0100
++++ zip-2.3/util.c 2005-01-17 13:46:26.165396792 +0100
+@@ -190,6 +190,8 @@
+ /* Compare the sh pattern p with the string s and return true if they match,
+ false if they don't or if there is a syntax error in the pattern. */
+ {
++ while (s[0] == '.' && s[1] == '/')
++ s += 2; /* strip redundant leading "./" sections */
+ return recmatch((ZCONST uch *) p, (ZCONST uch *) s, cs) == 1;
+ }
+
diff --git a/packaging/zip-2.31-configure.patch b/packaging/zip-2.31-configure.patch
new file mode 100644
index 0000000..00b09d1
--- /dev/null
+++ b/packaging/zip-2.31-configure.patch
@@ -0,0 +1,213 @@
+--- zip-2.31/unix/configure.lhh 2005-11-10 13:25:26.000000000 +0100
++++ zip-2.31/unix/configure 2005-11-10 13:40:44.311641648 +0100
+@@ -76,14 +76,20 @@
+ done
+ fi
+
+-echo Check for prototypes
++echo -n Check for prototypes...
+ echo "int main(int argc, char *argv[]) { return 0; }" > conftest.c
+ $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_PROTO"
++if [ $? -ne 0 ]; then
++ echo no
++ CFLAGS="${CFLAGS} -DNO_PROTO"
++else
++ echo yes
++fi
++
+
+ # const check currently handles mips cc and non ANSI compilers.
+ # does it need more ?
+-echo Check the handling of const
++echo -n Check the handling of const...
+ cat > conftest.c << _EOF_
+ typedef int charset[2];
+ int main()
+@@ -94,9 +100,15 @@
+ }
+ _EOF_
+ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_CONST"
++if [ $? -ne 0 ]; then
++ echo no
++ CFLAGS="${CFLAGS} -DNO_CONST"
++else
++ echo yes
++fi
++
+
+-echo Check for time_t
++echo -n Check for time_t...
+ cat > conftest.c << _EOF_
+ #include <sys/types.h>
+ #include <time.h>
+@@ -107,9 +119,15 @@
+ }
+ _EOF_
+ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_TIME_T"
++if [ $? -ne 0 ]; then
++ echo no
++ CFLAGS="${CFLAGS} -DNO_TIME_T"
++else
++ echo yes
++fi
++
+
+-echo Check for size_t
++echo -n Check for size_t...
+ cat > conftest.c << _EOF_
+ #include <sys/types.h>
+ int main()
+@@ -119,7 +137,13 @@
+ }
+ _EOF_
+ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_SIZE_T"
++if [ $? -ne 0 ]; then
++ echo no
++ CFLAGS="${CFLAGS} -DNO_SIZE_T"
++else
++ echo yes
++fi
++
+
+ echo Check for gcc no-builtin flag
+ # -fno-builtin since version 2
+@@ -140,18 +164,29 @@
+ # add NO_'function_name' to flags if missing
+ for func in rmdir strchr strrchr rename mktemp mktime mkstemp
+ do
+- echo Check for $func
+- echo "int main(){ $func(); return 0; }" > conftest.c
++ echo -n Check for $func...
++ echo "char $func(void); int main(){ $func(); return 0; }" > conftest.c
+ $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
+- [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
++ if [ $? -ne 0 ]; then
++ echo no
++ CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
++ else
++ echo yes
++ fi
+ done
+
+-echo Check for memset
++echo -n Check for memset...
+ echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
+ $CC -o conftest conftest.c >/dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
++if [ $? -ne 0 ]; then
++ echo no
++ CFLAGS="${CFLAGS} -DZMEM"
++else
++ echo yes
++fi
++
+
+-echo Check for errno declaration
++echo -n Check for errno declaration...
+ cat > conftest.c << _EOF_
+ #include <errno.h>
+ main()
+@@ -161,9 +196,14 @@
+ }
+ _EOF_
+ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_ERRNO"
++if [ $? -ne 0 ]; then
++ echo no
++ CFLAGS="${CFLAGS} -DNO_ERRNO"
++else
++ echo yes
++fi
+
+-echo Check for directory libraries
++echo -n Check for directory libraries...
+ cat > conftest.c << _EOF_
+ int main() { return closedir(opendir(".")); }
+ _EOF_
+@@ -178,21 +218,30 @@
+ done
+ if [ ${OPT} ]; then
+ LFLAGS2="${LFLAGS2} ${OPT}"
++ echo yes, ${OPT}
+ else
+ CFLAGS="${CFLAGS} -DNO_DIR"
++ echo no
+ fi
+ fi
+
+ # Dynix/ptx 1.3 needed this
+-echo Check for readlink
++echo -n Check for readlink...
+ echo "int main(){ return readlink(); }" > conftest.c
+ $CC -o conftest conftest.c >/dev/null 2>/dev/null
+ if [ $? -ne 0 ]; then
+ $CC -o conftest conftest.c -lseq >/dev/null 2>/dev/null
+- [ $? -eq 0 ] && LFLAGS2="${LFLAGS2} -lseq"
++ if [ $? -eq 0 ]; then
++ LFLAGS2="${LFLAGS2} -lseq"
++ echo yes, -lseq
++ else
++ echo no
++ fi
++else
++ echo yes
+ fi
+
+-echo Check for directory include file
++echo -n Check for directory include file...
+ OPT=""
+ for inc in dirent.h sys/ndir.h ndir.h sys/dir.h
+ do
+@@ -200,17 +249,19 @@
+ $CPP conftest.c > /dev/null 2>/dev/null
+ [ $? -eq 0 ] && OPT="-DHAVE_`echo $inc | tr '[a-z]./' '[A-Z]__'`" && break
+ done
++echo "${OPT}"
+ CFLAGS="${CFLAGS} ${OPT}"
+
+-echo Check for non existent include files
++echo -n Check for non existent include files...
+ for inc in stdlib.h stddef.h unistd.h fcntl.h string.h
+ do
+ echo "#include <$inc>" > conftest.c
+ $CPP conftest.c >/dev/null 2>/dev/null
+ [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $inc | tr '[a-z]./' '[A-Z]__'`"
+ done
++echo ok
+
+-echo Check for terminal I/O include file
++echo -n Check for terminal I/O include file...
+ OPT=""
+ for inc in termios.h termio.h sgtty.h
+ do
+@@ -219,9 +270,10 @@
+ [ $? -eq 0 ] && OPT="-DHAVE_`echo $inc | tr '[a-z]./' '[A-Z]__'`" && break
+ done
+ CFLAGS="${CFLAGS} ${OPT}"
++echo $OPT
+
+ # needed for AIX (and others ?) when mmap is used
+-echo Check for valloc
++echo -n Check for valloc...
+ cat > conftest.c << _EOF_
+ main()
+ {
+@@ -231,7 +283,13 @@
+ }
+ _EOF_
+ $CC ${CFLAGS} conftest.c > /dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_VALLOC"
++if [ $? -ne 0 ]; then
++ echo no
++ CFLAGS="${CFLAGS} -DNO_VALLOC"
++else
++ echo yes
++fi
++
+
+ echo Check for 64bit fseek
+ for func in fseeko fseek64
diff --git a/packaging/zip-2.31-install.patch b/packaging/zip-2.31-install.patch
new file mode 100644
index 0000000..7a1f69f
--- /dev/null
+++ b/packaging/zip-2.31-install.patch
@@ -0,0 +1,11 @@
+--- zip-2.31/unix/Makefile.install 2005-02-28 08:33:50.000000000 +0100
++++ zip-2.31/unix/Makefile 2005-11-10 12:58:33.221425848 +0100
+@@ -129,7 +129,7 @@
+ $(INSTALL_PROGRAM) $(ZIPS) $(BINDIR)
+ -cd $(BINDIR); $(CHMOD) $(BINFLAGS) $(ZIPS)
+ -$(INSTALL_D) $(MANDIR)
+- $(INSTALL) man/zip.1 $(MANDIR)/zip.$(manext)
++ $(INSTALL_PROGRAM) man/zip.1 $(MANDIR)/zip.$(manext)
+ $(CHMOD) $(MANFLAGS) $(MANDIR)/zip.$(manext)
+
+ uninstall:
diff --git a/packaging/zip-2.31-near-4GB.patch b/packaging/zip-2.31-near-4GB.patch
new file mode 100644
index 0000000..210b183
--- /dev/null
+++ b/packaging/zip-2.31-near-4GB.patch
@@ -0,0 +1,293 @@
+--- zip-2.31/unix/zipup.h.4GB 2005-01-29 07:47:58.000000000 +0100
++++ zip-2.31/unix/zipup.h 2005-11-10 13:18:02.990593904 +0100
+@@ -6,13 +6,19 @@
+ If, for some reason, both of these files are missing, the Info-ZIP license
+ also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
+ */
++#include <features.h>
++#include <fcntl.h>
+ #ifndef O_RDONLY
+ # define O_RDONLY 0
+ #endif
+ #ifndef O_BINARY
+ # define O_BINARY 0
+ #endif
+-#define fhow (O_RDONLY|O_BINARY)
++#ifdef _LARGEFILE64_SOURCE
++#define fhow (O_RDONLY | O_LARGEFILE)
++#else
++#define fhow O_RDONLY
++#endif
+ #define fbad (-1)
+ typedef int ftype;
+ #define zopen(n,p) open(n,p)
+--- zip-2.31/unix/unix.c.4GB 2005-02-11 03:35:02.000000000 +0100
++++ zip-2.31/unix/unix.c 2005-11-10 13:24:19.573344624 +0100
+@@ -113,7 +113,11 @@
+ char *e; /* pointer to name from readd() */
+ int m; /* matched flag */
+ char *p; /* path for recursion */
++#ifdef _LARGEFILE64_SOURCE
++ struct stat64 s; /* result of stat() */
++#else
+ struct stat s; /* result of stat() */
++#endif
+ struct zlist far *z; /* steps through zfiles list */
+
+ if (strcmp(n, "-") == 0) /* if compressing stdin */
+@@ -202,6 +206,15 @@
+ } /* (s.st_mode & S_IFDIR) */
+ else
+ zipwarn("ignoring special file: ", n);
++
++ /* Zip uses negative error codes (IIRC, to -3). Make sure file size
++ doesn't collide with error values. 2^32 - 8193 should be plenty until
++ info-zip supports zip64. */
++ if (s.st_size > MAX_ZIP_SIZE) {
++ zipwarn("file too large: ", a);
++ return ZE_MISS;
++ }
++
+ return ZE_OK;
+ }
+
+@@ -321,7 +334,12 @@
+ If f is "-", use standard input as the file. If f is a device, return
+ a file size of -1 */
+ {
+- struct stat s; /* results of stat() */
++#ifdef _LARGEFILE64_SOURCE
++ struct stat64 s; /* results of stat() */
++#else
++ struct stat s;
++#endif
++
+ /* converted to pointer from using FNMAX - 11/8/04 EG */
+ char *name;
+ int len = strlen(f);
+@@ -343,7 +361,11 @@
+ name[len - 1] = '\0';
+ /* not all systems allow stat'ing a file with / appended */
+ if (strcmp(f, "-") == 0) {
++#ifdef _LARGEFILE64_SOURCE
++ if (fstat64(fileno(stdin), &s) != 0) {
++#else
+ if (fstat(fileno(stdin), &s) != 0) {
++#endif
+ free(name);
+ error("fstat(stdin)");
+ }
+@@ -422,7 +444,11 @@
+ /* store full data in local header but just modification time stamp info
+ in central header */
+ {
++#ifdef _LARGEFILE64_SOURCE
++ struct stat64 s;
++#else
+ struct stat s;
++#endif
+ char *name;
+ int len = strlen(z->name);
+
+--- zip-2.31/unix/configure.4GB 2004-12-05 09:51:18.000000000 +0100
++++ zip-2.31/unix/configure 2005-11-10 13:12:47.010630160 +0100
+@@ -12,7 +12,7 @@
+ trap "rm -f conftest* core a.out; exit 1" 1 2 3 15
+
+ CC=${1-cc}
+-CFLAGS=${2-"-O2 -I. -DUNIX"}
++CFLAGS=${2-"-O2 -I. -DUNIX -g -D_LARGEFILE64_SOURCE"}
+ LFLAGS1=""
+ LN="ln -s"
+
+--- zip-2.31/fileio.c.4GB 2005-11-10 12:59:43.000000000 +0100
++++ zip-2.31/fileio.c 2005-11-10 13:07:13.190378552 +0100
+@@ -599,7 +599,11 @@
+ this will be done by setfileattr() later.
+ */
+ {
++#ifdef _LARGEFILE64_SOURCE
++ struct stat64 t; /* results of stat64() */
++#else
+ struct stat t; /* results of stat() */
++#endif
+ #if defined(CMS_MVS)
+ /* cmsmvs.h defines FOPW_TEMP as memory(hiperspace). Since memory is
+ * lost at end of run, always do copy instead of rename.
+@@ -698,8 +702,11 @@
+
+ return _dos_files(&buf, f, 0xff) < 0 ? 0x20 : buf.atr;
+ #else
++#ifdef _LARGEFILE64_SOURCE
++ struct stat64 s;
++#else
+ struct stat s;
+-
++#endif
+ return SSTAT(f, &s) == 0 ? (int) s.st_mode : 0;
+ #endif
+ }
+@@ -920,3 +927,108 @@
+ }
+
+ #endif /* NO_RENAME */
++
++/*
++ Wrapper functions for fopen/fseek/ftell for >2GB files.
++
++ So, what we do here is add support for 4GB seeks. More appropriately,
++ 2^32 - 8193 bytes. This is tailored to the way zip uses fseek; it never
++ seeks backwards more than 8192 bytes.
++ */
++#ifdef _LARGEFILE64_SOURCE
++FILE *
++lfopen(const char *path, const char *mode)
++{
++ int fd;
++ FILE *f;
++ int flags;
++ int x;
++ char prev;
++
++ if (!path || !mode | !strlen(mode))
++ return NULL;
++
++ for (x = 0; x < strlen(mode); x++) {
++ switch (mode[x]) {
++ case 'r':
++ flags = O_RDONLY | O_LARGEFILE;
++ break;
++ case 'w':
++ flags = O_WRONLY | O_LARGEFILE | O_CREAT | O_TRUNC;
++ break;
++ case 'a':
++ flags = O_RDWR | O_LARGEFILE;
++ break;
++ case 'b': /* b has no effect */
++ continue;
++ case '+':
++ if (prev == 'r') {
++ flags = O_RDWR | O_LARGEFILE;
++ } else if (prev == 'w') {
++ flags = O_RDWR | O_LARGEFILE | O_CREAT |
++ O_TRUNC;
++ } else if (prev == 'a') {
++ flags = O_RDWR | O_LARGEFILE | O_CREAT;
++ } else
++ return NULL;
++ break;
++ }
++ prev = mode[x];
++ }
++
++ fd = open(path, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
++ if (fd == -1)
++ return NULL;
++
++ f = fdopen(fd, mode);
++ return f;
++}
++
++int
++lfseek(FILE *f, ulg pos, int whence)
++{
++ struct stat64 sb;
++ ulg o, delta;
++ int ret;
++
++ /* Hurts performance */
++ fflush(f);
++
++ if (pos <= MAX_ZIP_SIZE) {
++ return (lseek64(fileno(f), pos, whence) == (off64_t)-1);
++ }
++
++ delta = ~((off64_t)pos - 1);
++ if (whence == SEEK_CUR) {
++ o = lseek64(fileno(f), 0, SEEK_CUR);
++ if (o < delta)
++ return -1;
++
++ o -= delta;
++ return (lseek64(fileno(f), o, SEEK_SET) == (off64_t)-1);
++ }
++
++ if (whence == SEEK_END) {
++ fstat64(fileno(f), &sb);
++
++ if ((ulg)sb.st_size < delta)
++ return -1;
++
++ o = (off64_t)((sb.st_size) - delta);
++ return (lseek64(fileno(f), o, SEEK_SET) == (off64_t)-1);
++ }
++
++ return -1;
++}
++
++
++ulg
++lftell(FILE *f)
++{
++ /* Hurts performance */
++ fflush(f);
++ return (ulg)lseek64(fileno(f), 0, SEEK_CUR);
++}
++
++#endif /* _LARGEFILE64_SOURCE */
++
+--- zip-2.31/zip.h.4GB 2005-11-10 12:59:43.000000000 +0100
++++ zip-2.31/zip.h 2005-11-10 13:18:57.653283912 +0100
+@@ -236,6 +236,7 @@
+ #define DOSTIME_MINIMUM ((ulg)0x00210000L)
+ #define DOSTIME_2038_01_18 ((ulg)0x74320000L)
+
++#define MAX_ZIP_SIZE 0xffffdffe /* Max archive / archive member size */
+
+ /* Public globals */
+ extern uch upper[256]; /* Country dependent case map table */
+@@ -411,6 +412,11 @@
+ int putcentral OF((struct zlist far *, FILE *));
+ int putend OF((int, ulg, ulg, extent, char *, FILE *));
+ int zipcopy OF((struct zlist far *, FILE *, FILE *));
++#ifdef _LARGEFILE64_SOURCE
++int lfseek OF((FILE *, ulg, int));
++ulg lftell OF((FILE *));
++FILE *lfopen OF((const char *, const char *));
++#endif /* LF64 */
+
+ /* in fileio.c */
+ #ifndef UTIL
+--- zip-2.31/tailor.h.4GB 2005-03-04 08:45:26.000000000 +0100
++++ zip-2.31/tailor.h 2005-11-10 13:11:18.909023640 +0100
+@@ -368,12 +368,27 @@
+ # define DYN_ALLOC
+ #endif
+
++#ifdef _LARGEFILE64_SOURCE
++#define fopen lfopen
++#define fseek lfseek
++#define ftell lftell
++#endif /* LF64 */
++
+ #ifndef SSTAT
+-# define SSTAT stat
++# ifdef _LARGEFILE64_SOURCE
++# define SSTAT stat64
++# else
++# define SSTAT stat
++# endif /* LF64 */
+ #endif
+ #ifdef S_IFLNK
+-# define LSTAT lstat
+-# define LSSTAT(n, s) (linkput ? lstat((n), (s)) : SSTAT((n), (s)))
++# ifdef _LARGEFILE64_SOURCE
++# define LSTAT lstat64
++# define LSSTAT(n, s) (linkput ? lstat64((n), (s)) : SSTAT((n), (s)))
++# else
++# define LSTAT lstat64
++# define LSSTAT(n, s) (linkput ? lstat64((n), (s)) : SSTAT((n), (s)))
++# endif /* LF64 */
+ #else
+ # define LSTAT SSTAT
+ # define LSSTAT SSTAT
diff --git a/packaging/zip.spec b/packaging/zip.spec
new file mode 100644
index 0000000..19846da
--- /dev/null
+++ b/packaging/zip.spec
@@ -0,0 +1,180 @@
+Summary: A file compression and packaging utility compatible with PKZIP.
+Name: zip
+Version: 2.31
+Release: 1.2.2
+License: distributable
+Group: Applications/Archiving
+Source: http://ftp.info-zip.org/pub/infozip/src/zip-2.31.tar.gz
+Source1: ftp://ftp.freesoftware.com/pub/infozip/src/zcrypt29.tar.gz
+URL: http://www.info-zip.org/pub/infozip/Zip.html
+Patch0: zip23.patch
+Patch1: exec-shield.patch
+Patch2: zip23-umask.patch
+Patch5: zip-2.3-currdir.patch
+Patch6: zip-2.31-install.patch
+Patch7: zip-2.31-near-4GB.patch
+Patch8: zip-2.31-configure.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+The zip program is a compression and file packaging utility. Zip is
+analogous to a combination of the UNIX tar and compress commands and
+is compatible with PKZIP (a compression and file packaging utility for
+MS-DOS systems).
+
+Install the zip package if you need to compress files using the zip
+program.
+
+%prep
+%setup -q -a 1
+%patch0 -p1 -b .zip
+%patch1 -p1 -b .zip
+%patch2 -p1 -b .umask
+%patch5 -p1 -b .currdir
+%patch6 -p1 -b .install
+%patch7 -p1 -b .4gb
+%patch8 -p1 -b .lhh
+
+%build
+make -f unix/Makefile prefix=/usr "CFLAGS=$RPM_OPT_FLAGS -I. -DUNIX -D_LARGEFILE64_SOURCE" generic_gcc
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/usr/bin
+mkdir -p $RPM_BULD_ROOT%{_mandir}/man1
+
+make -f unix/Makefile prefix=$RPM_BUILD_ROOT/usr \
+ MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 install
+
+pushd $RPM_BUILD_ROOT
+for n in zipnote zipsplit zip zipcloak ; do
+ chmod 755 ./usr/bin/$n
+done
+popd
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc README BUGS CHANGES MANUAL TODO WHATSNEW WHERE LICENSE
+%doc proginfo/algorith.txt
+/usr/bin/zipnote
+/usr/bin/zipsplit
+/usr/bin/zip
+/usr/bin/zipcloak
+%{_mandir}/man1/zip.1*
+
+%changelog
+* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.31-1.2.2
+- rebuild
+
+* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.31-1.2.1
+- bump again for double-long bug on ppc(64)
+
+* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.31-1.2
+- rebuilt for new gcc4.1 snapshot and glibc changes
+
+* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
+- rebuilt
+
+* Thu Nov 10 2005 Ivana Varekova <varekova@redhat.com> 2.31-1
+- update to 2.31
+
+* Mon Mar 7 2005 Ivana Varekova <varekova@redhat.com> 2.3-30
+- rebuilt
+
+* Mon Jan 17 2005 Ivana Varekova <varekova@redhat.com> 2.3-29
+- Fix bug #142237 - problem with -d and ./files containing archives
+
+* Mon Jun 21 2004 Lon Hohberger <lhh@redhat.com> 2.3-24
+- Extend max file/archive size to 2^32-8193 (4294959103) bytes
+- Include better debugging output for configure script
+
+* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Fri Mar 19 2004 Lon Hohberger <lhh@redhat.com> 2.3-22
+- Fix typos
+
+* Tue Feb 17 2004 Lon Hohberger <lhh@redhat.com> 2.3-21
+- Include LICENSE file per bugzilla #116004
+
+* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Mon Dec 22 2003 Lon Hohberger <lhh@redhat.com> 2.3-19
+- Make temp file have umask 0066 mode (#112516)
+
+* Fri Oct 24 2003 Lon Hohberger <lhh@redhat.com> 2.3-18
+- Incorporate Arjan's exec-shield patch for i386
+
+* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
+- rebuilt
+
+* Thu Dec 19 2002 Tim Powers <timp@redhat.com>
+- bump and rebuild
+
+* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Thu May 23 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Tue Apr 2 2002 Trond Eivind Glomsrød <teg@redhat.com>
+- Don't strip explicitly
+
+* Wed Mar 13 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.3-11
+- Add URL
+
+* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
+- Bump release + rebuild.
+
+* Thu Aug 25 2000 Bill Nottingham <notting@redhat.com>
+- add encryption code (#16878)
+
+* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
+- automatic rebuild
+
+* Sun Jun 11 2000 Bill Nottingham <notting@redhat.com>
+- rebuild in new environment
+
+* Mon Mar 13 2000 Bill Nottingham <notting@redhat.com>
+- spec file cleanups (#10143)
+
+* Mon Feb 7 2000 Bill Nottingham <notting@redhat.com>
+- fix some perms
+
+* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
+- fix description
+- man pages are compressed
+
+* Tue Jan 11 2000 Bill Nottingham <notting@redhat.com>
+- update to 2.3
+
+* Fri Jul 30 1999 Bill Nottingham <notting@redhat.com>
+- update to 2.2
+
+* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
+- auto rebuild in the new build environment (release 8)
+
+* Thu Mar 18 1999 Cristian Gafton <gafton@redhat.com>
+- updated text in the spec file
+
+* Fri Jan 15 1999 Cristian Gafton <gafton@redhat.com>
+- patch top build on the arm
+
+* Mon Dec 21 1998 Michael Maher <mike@redhat.com>
+- built package for 6.0
+
+* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com>
+- build root
+
+* Fri May 08 1998 Prospector System <bugs@redhat.com>
+- translations modified for de, fr, tr
+
+* Thu Jul 10 1997 Erik Troan <ewt@redhat.com>
+- built against glibc
diff --git a/packaging/zip23-umask.patch b/packaging/zip23-umask.patch
new file mode 100644
index 0000000..7ab6005
--- /dev/null
+++ b/packaging/zip23-umask.patch
@@ -0,0 +1,23 @@
+diff -ur zip-2.3/zip.c zip-2.3-lhh/zip.c
+--- zip-2.3/zip.c 1999-11-16 15:08:10.000000000 -0500
++++ zip-2.3-lhh/zip.c 2003-12-22 09:32:56.000000000 -0500
+@@ -849,6 +849,7 @@
+ /* Add, update, freshen, or delete zip entries in a zip file. See the
+ command help in help() above. */
+ {
++ mode_t old_umask; /* umask prior to temp file creation */
+ int a; /* attributes of zip file */
+ ulg c; /* start of central directory */
+ int d; /* true if just adding to a zip file */
+@@ -1830,9 +1831,11 @@
+ if ((tempzip = tempname(zipfile)) == NULL) {
+ ZIPERR(ZE_MEM, "allocating temp filename");
+ }
++ old_umask = umask(0066);
+ if ((tempzf = y = fopen(tempzip, FOPW_TMP)) == NULL) {
+ ZIPERR(ZE_TEMP, tempzip);
+ }
++ umask(old_umask);
+ }
+
+ #if (!defined(VMS) && !defined(CMS_MVS))
diff --git a/packaging/zip23.patch b/packaging/zip23.patch
new file mode 100644
index 0000000..690630c
--- /dev/null
+++ b/packaging/zip23.patch
@@ -0,0 +1,93 @@
+--- zip-2.3/zip.h.zip Mon Nov 8 14:36:51 1999
++++ zip-2.3/zip.h Tue Jan 11 11:46:06 2000
+@@ -60,6 +60,7 @@
+
+ /* Set up portability */
+ #include "tailor.h"
++#include <strings.h>
+
+ #ifdef USE_ZLIB
+ # include "zlib.h"
+@@ -433,12 +434,6 @@
+ int setfileattr OF((char *, int));
+ char *tempname OF((char *));
+ int fcopy OF((FILE *, FILE *, ulg));
+-
+-#ifdef ZMEM
+- char *memset OF((char *, int, unsigned int));
+- char *memcpy OF((char *, char *, unsigned int));
+- int memcmp OF((char *, char *, unsigned int));
+-#endif /* ZMEM */
+
+ /* in system dependent fileio code (<system>.c) */
+ #ifndef UTIL
+--- zip-2.3/fileio.c.zip Sun Nov 7 05:29:03 1999
++++ zip-2.3/fileio.c Tue Jan 11 11:46:43 2000
+@@ -918,67 +918,3 @@
+ }
+
+ #endif /* NO_RENAME */
+-
+-
+-#ifdef ZMEM
+-
+-/************************/
+-/* Function memset() */
+-/************************/
+-
+-/*
+- * memset - for systems without it
+- * bill davidsen - March 1990
+- */
+-
+-char *
+-memset(buf, init, len)
+-register char *buf; /* buffer loc */
+-register int init; /* initializer */
+-register unsigned int len; /* length of the buffer */
+-{
+- char *start;
+-
+- start = buf;
+- while (len--) *(buf++) = init;
+- return(start);
+-}
+-
+-
+-/************************/
+-/* Function memcpy() */
+-/************************/
+-
+-char *
+-memcpy(dst,src,len) /* v2.0f */
+-register char *dst, *src;
+-register unsigned int len;
+-{
+- char *start;
+-
+- start = dst;
+- while (len--)
+- *dst++ = *src++;
+- return(start);
+-}
+-
+-
+-/************************/
+-/* Function memcmp() */
+-/************************/
+-
+-int
+-memcmp(b1,b2,len) /* jpd@usl.edu -- 11/16/90 */
+-register char *b1, *b2;
+-register unsigned int len;
+-{
+-
+- if (len) do { /* examine each byte (if any) */
+- if (*b1++ != *b2++)
+- return (*((uch *)b1-1) - *((uch *)b2-1)); /* exit when miscompare */
+- } while (--len);
+-
+- return(0); /* no miscompares, yield 0 result */
+-}
+-
+-#endif /* ZMEM */