浏览代码

Fix building under Linux and installation under Solaris.

Ralf S. Engelschall 24 年之前
父节点
当前提交
7a0020d469
共有 2 个文件被更改,包括 28 次插入1 次删除
  1. 22 0
      lrzsz/lrzsz.patch
  2. 6 1
      lrzsz/lrzsz.spec

+ 22 - 0
lrzsz/lrzsz.patch

@@ -0,0 +1,22 @@
+--- src/lrz.c.orig	Wed Dec 30 08:49:24 1998
++++ src/lrz.c	Sun Nov 25 12:17:49 2001
+@@ -41,7 +41,7 @@
+ #include "xstrtoul.h"
+ #include "error.h"
+ 
+-#ifndef STRICT_PROTOTYPES
++#if !defined(STRICT_PROTOTYPES) && !defined(__linux__)
+ extern time_t time();
+ extern char *strerror();
+ extern char *strstr();
+--- src/lsz.c.orig	Sun Nov 25 12:18:46 2001
++++ src/lsz.c	Sun Nov 25 12:18:10 2001
+@@ -50,7 +50,7 @@
+ #include "xstrtoul.h"
+ #include "error.h"
+ 
+-#ifndef STRICT_PROTOTYPES
++#if !defined(STRICT_PROTOTYPES) && !defined(__linux__)
+ extern time_t time();
+ extern char *strerror();
+ extern char *strstr();

+ 6 - 1
lrzsz/lrzsz.spec

@@ -36,11 +36,12 @@ Release:      20011121.0
 
 #   list of sources
 Source0:      http://www.ohse.de/uwe/releases/lrzsz-%{version}.tar.gz
+Patch0:       lrzsz.patch
 
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 0.9-20011025.0
+BuildPreReq:  OpenPKG, openpkg >= 0.9-20011025.0, make
 PreReq:       OpenPKG, openpkg >= 0.9-20011025.0
 AutoReq:      no
 AutoReqProv:  no
@@ -52,6 +53,7 @@ AutoReqProv:  no
 
 %prep
     %setup -q 
+    %patch -p0
 
 %build
     CC="%{l_cc}" \
@@ -63,6 +65,9 @@ AutoReqProv:  no
 
 %install
     rm -rf $RPM_BUILD_ROOT
+    %{l_rpmtool} subst \
+        's;rm -f $(bindir);rm -f $(DESTDIR)/$(bindir);g' \
+        -- src/Makefile
     %{l_make} %{l_mflags} install \
         AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
         DESTDIR=$RPM_BUILD_ROOT