- rewrite extraction stage to make this behave with WRKOBJDIR
- fix warnings - improve installation
This commit is contained in:
parent
1a1dd2fb41
commit
3a1c57a475
@ -1,10 +1,4 @@
|
||||
# OpenBSD makefile for: mmv
|
||||
# Version required: 1.01b
|
||||
# Date created: June 6 1998
|
||||
# Whom: Angelos D. Keromytis
|
||||
#
|
||||
# $OpenBSD: Makefile,v 1.10 2000/10/22 15:42:49 espie Exp $
|
||||
#
|
||||
# $OpenBSD: Makefile,v 1.11 2001/02/27 22:32:26 naddy Exp $
|
||||
|
||||
DISTNAME= mmv
|
||||
PKGNAME= mmv-1.01b
|
||||
@ -25,19 +19,11 @@ PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
DIST_SUBDIR= ${DISTNAME}
|
||||
WRKDIST= ${WRKDIR}
|
||||
EXTRACT_CASES= *.Z) ${GZIP_CMD} -cd ${FULLDISTDIR}/$$archive | \
|
||||
sed '1,/^\#! \/bin\/sh/d' | sh ;;
|
||||
PATCH_DIST_ARGS= -d ${WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP} mmv.c
|
||||
|
||||
do-extract:
|
||||
@rm -rf ${WRKDIR}
|
||||
@mkdir -p ${WRKDIR}/tmp
|
||||
@for file in ${DISTFILES}; do \
|
||||
cp ${FULLDISTDIR}/$$file ${WRKDIR}/tmp; \
|
||||
done ; \
|
||||
uncompress ${WRKDIR}/tmp/*; \
|
||||
cd ${WRKDIR}; \
|
||||
for file in tmp/part0* ; do \
|
||||
${SH} ${SCRIPTDIR}/unshar $$file; \
|
||||
done ; \
|
||||
cat mmv.c.? >mmv.c ; rm mmv.c.?
|
||||
post-extract:
|
||||
@cd ${WRKSRC} && cat mmv.c.? >mmv.c && rm mmv.c.?
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,98 +1,71 @@
|
||||
*** mmv.c.old Wed Mar 1 05:23:56 1995
|
||||
--- mmv.c Thu Mar 2 05:43:37 1995
|
||||
***************
|
||||
*** 88,94 ****
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
- #include <ctype.h>
|
||||
|
||||
#ifdef MSDOS
|
||||
/* for MS-DOS (under Turbo C 1.5)*/
|
||||
--- 88,93 ----
|
||||
***************
|
||||
*** 126,132 ****
|
||||
#include <sys/file.h>
|
||||
|
||||
extern char *getenv();
|
||||
- extern long lseek();
|
||||
extern char *malloc();
|
||||
|
||||
#ifdef DIRENT
|
||||
--- 125,130 ----
|
||||
***************
|
||||
*** 176,182 ****
|
||||
|
||||
#else
|
||||
/* for System V and BSD */
|
||||
- #include <string.h>
|
||||
#include <sys/signal.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
--- 174,179 ----
|
||||
***************
|
||||
*** 370,376 ****
|
||||
static int snap(/* REP *first, REP *p */);
|
||||
static void showdone(/* REP *fin */);
|
||||
static void breakout(/* */);
|
||||
! static int breakrep(/* */);
|
||||
static void breakstat(/* */);
|
||||
static void quit(/* */);
|
||||
static int copymove(/* REP *p */);
|
||||
--- 367,373 ----
|
||||
static int snap(/* REP *first, REP *p */);
|
||||
static void showdone(/* REP *fin */);
|
||||
static void breakout(/* */);
|
||||
! static void breakrep(/* */);
|
||||
static void breakstat(/* */);
|
||||
static void quit(/* */);
|
||||
static int copymove(/* REP *p */);
|
||||
***************
|
||||
*** 389,395 ****
|
||||
static int getstat(/* char *full, FILEINFO *f */);
|
||||
static int dwritable(/* HANDLE *h */);
|
||||
static int fwritable(/* char *hname, FILEINFO *f */);
|
||||
- static void memmove(/* void *to, void *from, int k */);
|
||||
#endif
|
||||
#ifndef RENAME
|
||||
static int rename(/* char *from, char *to */);
|
||||
--- 386,391 ----
|
||||
***************
|
||||
*** 2550,2559 ****
|
||||
}
|
||||
|
||||
|
||||
! static int breakrep()
|
||||
{
|
||||
gotsig = 1;
|
||||
- return(1);
|
||||
}
|
||||
|
||||
|
||||
--- 2546,2554 ----
|
||||
}
|
||||
|
||||
|
||||
! static void breakrep()
|
||||
{
|
||||
gotsig = 1;
|
||||
}
|
||||
|
||||
|
||||
***************
|
||||
*** 2832,2838 ****
|
||||
}
|
||||
|
||||
|
||||
! #ifndef MSDOS
|
||||
static void memmove(to, from, k)
|
||||
char *to, *from;
|
||||
unsigned k;
|
||||
--- 2827,2833 ----
|
||||
}
|
||||
|
||||
|
||||
! #if 0
|
||||
static void memmove(to, from, k)
|
||||
char *to, *from;
|
||||
unsigned k;
|
||||
$OpenBSD: patch-aa,v 1.2 2001/02/27 22:32:26 naddy Exp $
|
||||
--- mmv.c.orig Tue Feb 27 23:12:39 2001
|
||||
+++ mmv.c Tue Feb 27 23:13:11 2001
|
||||
@@ -88,7 +88,6 @@ on the command line.\n";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <ctype.h>
|
||||
|
||||
#ifdef MSDOS
|
||||
/* for MS-DOS (under Turbo C 1.5)*/
|
||||
@@ -121,12 +120,12 @@ extern unsigned _stklen = 10000;
|
||||
#else
|
||||
/* for various flavors of UN*X */
|
||||
|
||||
+#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
extern char *getenv();
|
||||
-extern long lseek();
|
||||
extern char *malloc();
|
||||
|
||||
#ifdef DIRENT
|
||||
@@ -176,7 +175,6 @@ extern char *strcpy(), *strchr();
|
||||
|
||||
#else
|
||||
/* for System V and BSD */
|
||||
-#include <string.h>
|
||||
#include <sys/signal.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
@@ -370,7 +368,7 @@ static int movealias(/* REP *first, REP
|
||||
static int snap(/* REP *first, REP *p */);
|
||||
static void showdone(/* REP *fin */);
|
||||
static void breakout(/* */);
|
||||
-static int breakrep(/* */);
|
||||
+static void breakrep(/* */);
|
||||
static void breakstat(/* */);
|
||||
static void quit(/* */);
|
||||
static int copymove(/* REP *p */);
|
||||
@@ -389,7 +387,6 @@ static void cleanup(/* */);
|
||||
static int getstat(/* char *full, FILEINFO *f */);
|
||||
static int dwritable(/* HANDLE *h */);
|
||||
static int fwritable(/* char *hname, FILEINFO *f */);
|
||||
-static void memmove(/* void *to, void *from, int k */);
|
||||
#endif
|
||||
#ifndef RENAME
|
||||
static int rename(/* char *from, char *to */);
|
||||
@@ -2550,10 +2547,9 @@ static void breakout()
|
||||
}
|
||||
|
||||
|
||||
-static int breakrep()
|
||||
+static void breakrep()
|
||||
{
|
||||
gotsig = 1;
|
||||
- return(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -2832,7 +2828,7 @@ static void chgive(p, k)
|
||||
}
|
||||
|
||||
|
||||
-#ifndef MSDOS
|
||||
+#if 0
|
||||
static void memmove(to, from, k)
|
||||
char *to, *from;
|
||||
unsigned k;
|
||||
|
@ -1,22 +1,18 @@
|
||||
--- Makefile.orig Thu Apr 20 19:56:55 2000
|
||||
+++ Makefile Thu Apr 20 19:57:51 2000
|
||||
@@ -1,10 +1,16 @@
|
||||
+INSTALL_PROGRAM = install -c -s -o root -g bin -m 555
|
||||
+INSTALL_MAN = install -c -o root -g bin -m 444
|
||||
+
|
||||
all: mmv mmv.1
|
||||
|
||||
$OpenBSD: patch-ab,v 1.2 2001/02/27 22:32:26 naddy Exp $
|
||||
--- Makefile.orig Tue Feb 27 23:14:13 2001
|
||||
+++ Makefile Tue Feb 27 23:17:01 2001
|
||||
@@ -3,8 +3,11 @@ all: mmv mmv.1
|
||||
mmv: mmv.c
|
||||
$(CC) -o mmv $(CFLAGS) mmv.c
|
||||
install: all
|
||||
- @echo "Install mmv according to local convention,"
|
||||
- @echo "then make links named mcp, mad, and mln to mmv."
|
||||
- @echo "Under System V, edit mmv.1 to uncomment the .nr O 1 line."
|
||||
+ ${INSTALL_PROGRAM} mmv ${PREFIX}/bin ; \
|
||||
+ ${BSD_INSTALL_PROGRAM} mmv ${PREFIX}/bin ; \
|
||||
+ ln -fs mmv ${PREFIX}/bin/mad ; \
|
||||
+ ln -fs mmv ${PREFIX}/bin/mcp ; \
|
||||
+ ln -fs mmv ${PREFIX}/bin/mln ; \
|
||||
+ ${INSTALL_MAN} mmv.1 ${PREFIX}/man/man1
|
||||
+ ${BSD_INSTALL_MAN} mmv.1 ${PREFIX}/man/man1
|
||||
+
|
||||
clean:
|
||||
rm -f core a.out mmv mmv.o
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
ed $1 <<XXXEOF > /dev/null
|
||||
/#! \/bin\/sh
|
||||
1,.-1d
|
||||
w
|
||||
q
|
||||
XXXEOF
|
||||
/bin/sh $1 > /dev/null
|
Loading…
Reference in New Issue
Block a user