summaryrefslogtreecommitdiff
path: root/archivers/rar/Makefile.netbsd-i386
blob: f1e7a6070500dfc516d873f089f398f0fb50eb1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# $NetBSD: Makefile.netbsd-i386,v 1.2 2007/08/23 18:20:30 jlam Exp $

DISTNAME=		rarbsd
PKGNAME=		rar-2.02
MASTER_SITES=		ftp://ftp.elf.stuba.sk/pub/pc/pack/
EXTRACT_SUFX=		.sfx

EMUL_REQD=		netbsd>=1.2

WRKSRC=			${WRKDIR}
EXTRACT_CMD=		exec "$$extract_file" >/dev/null

DATADIR=		${PREFIX}/share/rar
DOCDIR=			${PREFIX}/share/doc/rar

INSTALLATION_DIRS=	${DATADIR} ${DOCDIR}

CHECK_KSYMS_CMD=	${SETENV} ECHO=${TOOLS_ECHO:Q}			\
				GREP=${TOOLS_GREP:Q}			\
				GZIP_CMD=${TOOLS_GZIP_CMD:Q}		\
				NM=${NM:Q} RM=${TOOLS_RM:Q}		\
				TMPDIR=${WRKDIR:Q}			\
	   		${SH} ${FILESDIR}/check-ksyms.sh

pre-extract:
	${RUN} set -e;							\
	if ${CHECK_KSYMS_CMD} compat_12 exec_nomid exec_aout; then	\
		${TEST} -x ${DISTDIR}/${DISTFILES:Q} ||			\
			${CHMOD} a+x ${DISTDIR:Q}/${DISTFILES:Q};	\
	else								\
		${ECHO} "==========================================================================="; \
		${ECHO} "In order to extract this package,"		\
			"you must have have booted from a";		\
		${ECHO} "kernel with options COMPAT_NOMID and"		\
			"COMPAT_12, and EXEC_AOUT if on";		\
		${ECHO} "an ELF system.";				\
		${ECHO} "==========================================================================="; \
		${FALSE};						\
	fi

# DOS to Unix line conversion
do-build:
	${RUN} set -e; set -u;						\
	cd ${WRKSRC:Q} && for i in *.Txt *.Lst; do			\
		${TR} -d '\015' < "$$i" > "$$i".tmp;			\
		${MV} -f "$$i".tmp "$$i";				\
	done

do-install:
	${INSTALL_SCRIPT} ${WRKSRC:Q}/rar ${PREFIX:Q}/bin/rar
	${INSTALL_DATA} ${WRKSRC:Q}/RarFiles.Lst ${DATADIR:Q}/rarfiles.lst
	${INSTALL_DATA} ${WRKSRC:Q}/default.sfx ${DATADIR:Q}/default.sfx
	${INSTALL_DATA} ${WRKSRC:Q}/Dos.SFX ${DATADIR:Q}/dos.sfx
	cd ${WRKSRC:Q} && ${INSTALL_MAN} Rar.Txt Rar_FAQ.txt		\
		TechNote.Txt License.Txt Internet.Txt ${DOCDIR:Q}