summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-08-22 16:43:31 +0000
committerjlam <jlam@pkgsrc.org>2007-08-22 16:43:31 +0000
commit9f033cc1354529a9b35b5971e217486692233bbe (patch)
treebe679890d447631d4718fd2b1ce0ce8367980241 /archivers
parentdd8fde84994329146d49a9f1b9879d59b52eb15c (diff)
downloadpkgsrc-9f033cc1354529a9b35b5971e217486692233bbe.tar.gz
Merge archivers/rar-bin into archivers/rar and convert archivers/rar to
use the emulator framework.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/Makefile3
-rw-r--r--archivers/rar-bin/DESCR13
-rw-r--r--archivers/rar-bin/Makefile33
-rw-r--r--archivers/rar-bin/distinfo5
-rw-r--r--archivers/rar/DESCR17
-rw-r--r--archivers/rar/MESSAGE.linux-i386 (renamed from archivers/rar-bin/MESSAGE)3
-rw-r--r--archivers/rar/MESSAGE.netbsd-i386 (renamed from archivers/rar/MESSAGE)3
-rw-r--r--archivers/rar/Makefile61
-rw-r--r--archivers/rar/Makefile.linux-i38624
-rw-r--r--archivers/rar/Makefile.netbsd-i38655
-rw-r--r--archivers/rar/PLIST.linux-i386 (renamed from archivers/rar-bin/PLIST)2
-rw-r--r--archivers/rar/PLIST.netbsd-i386 (renamed from archivers/rar/PLIST)2
-rw-r--r--archivers/rar/distinfo5
-rw-r--r--archivers/rar/files/check-ksyms.sh96
14 files changed, 209 insertions, 113 deletions
diff --git a/archivers/Makefile b/archivers/Makefile
index 0c168e1bb89..c0d5a9c3201 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.98 2007/08/15 22:28:22 joerg Exp $
+# $NetBSD: Makefile,v 1.99 2007/08/22 16:43:32 jlam Exp $
#
COMMENT= Archivers
@@ -61,7 +61,6 @@ SUBDIR+= php-zlib
SUBDIR+= ppmd
SUBDIR+= ppunpack
SUBDIR+= rar
-SUBDIR+= rar-bin
SUBDIR+= rox-archive
SUBDIR+= ruby-zip
SUBDIR+= rzip
diff --git a/archivers/rar-bin/DESCR b/archivers/rar-bin/DESCR
deleted file mode 100644
index 5c870933e7b..00000000000
--- a/archivers/rar-bin/DESCR
+++ /dev/null
@@ -1,13 +0,0 @@
-RAR is a powerful tool allowing you to manage and control archive
-files.
-
-RAR features include:
-
-* Highly sophisticated, original compression algorithm
-* Special compression algorithms optimized for text, audio,
- graphics data, 32 and 64-bit Intel executables
-* Better compression than similar tools, using 'solid' archiving
-* Authenticity verification (registered version only)
-* Self-extracting archives and volumes (SFX)
-* Ability to recover physically damaged archives
-* Locking, password, file order list, file security & more ...
diff --git a/archivers/rar-bin/Makefile b/archivers/rar-bin/Makefile
deleted file mode 100644
index 594aab4a71d..00000000000
--- a/archivers/rar-bin/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# $NetBSD: Makefile,v 1.7 2007/07/29 05:18:36 jlam Exp $
-
-DISTNAME= rarlinux-3.6.0
-PKGNAME= ${DISTNAME:C/linux/-bin/}
-CATEGORIES= archivers
-MASTER_SITES= http://www.rarsoft.com/rar/ \
- ftp://ftp.rarsoft.com/rar/
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.rarsoft.com/rar_archiver.htm
-COMMENT= RAR command line archiver (Linux binary)
-
-CONFLICTS= rarlinux-[0-9]* rar-linux-[0-9]*
-
-LICENSE= rar-license
-
-EMUL_PLATFORMS= linux-i386
-EMUL_MODULES.linux= base compat
-
-WRKSRC= ${WRKDIR}/rar
-BUILD_DIRS= # empty
-
-INSTALLATION_DIRS= bin lib
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/rar_static ${PREFIX}/bin/rar-bin
-# ${INSTALL_PROGRAM} ${WRKSRC}/unrar ${PREFIX}/bin/unrar-bin
- ${INSTALL_DATA} ${WRKSRC}/default.sfx ${PREFIX}/lib
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/rar-bin
- ${INSTALL_DATA} ${WRKSRC}/*.txt ${PREFIX}/share/doc/rar-bin
- ${INSTALL_DATA} ${WRKSRC}/rarfiles.lst ${PREFIX}/share/doc/rar-bin
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/archivers/rar-bin/distinfo b/archivers/rar-bin/distinfo
deleted file mode 100644
index c20c28e1872..00000000000
--- a/archivers/rar-bin/distinfo
+++ /dev/null
@@ -1,5 +0,0 @@
-$NetBSD: distinfo,v 1.2 2006/09/16 11:29:16 wiz Exp $
-
-SHA1 (rarlinux-3.6.0.tar.gz) = 4b43766371fd2f117fb3af5826001a7eab7a0f3b
-RMD160 (rarlinux-3.6.0.tar.gz) = c0f6d19738f69deb9fd75589e461a7a0ed430d39
-Size (rarlinux-3.6.0.tar.gz) = 752997 bytes
diff --git a/archivers/rar/DESCR b/archivers/rar/DESCR
index c1d8f624fa7..5c870933e7b 100644
--- a/archivers/rar/DESCR
+++ b/archivers/rar/DESCR
@@ -1,6 +1,13 @@
- The rar archiver adds and extracts files to and from an archive. The
- archive is usually a regular file, which name has ".rar" suffix in its
- end. Archive could be a media like a floppy diskette, tape or any other
- storage device.
+RAR is a powerful tool allowing you to manage and control archive
+files.
- *** You will need COMPAT_12 in your kernel for this to work. ***
+RAR features include:
+
+* Highly sophisticated, original compression algorithm
+* Special compression algorithms optimized for text, audio,
+ graphics data, 32 and 64-bit Intel executables
+* Better compression than similar tools, using 'solid' archiving
+* Authenticity verification (registered version only)
+* Self-extracting archives and volumes (SFX)
+* Ability to recover physically damaged archives
+* Locking, password, file order list, file security & more ...
diff --git a/archivers/rar-bin/MESSAGE b/archivers/rar/MESSAGE.linux-i386
index 68937ff5bf6..7a488acf078 100644
--- a/archivers/rar-bin/MESSAGE
+++ b/archivers/rar/MESSAGE.linux-i386
@@ -1,7 +1,6 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 2006/03/03 22:36:09 wiz Exp $
+$NetBSD: MESSAGE.linux-i386,v 1.1 2007/08/22 16:43:33 jlam Exp $
For best compression performance, please install
${PREFIX}/share/doc/rar-bin/rarfiles.lst into /etc.
-
===========================================================================
diff --git a/archivers/rar/MESSAGE b/archivers/rar/MESSAGE.netbsd-i386
index a4e01853f26..f1002db01dd 100644
--- a/archivers/rar/MESSAGE
+++ b/archivers/rar/MESSAGE.netbsd-i386
@@ -1,7 +1,6 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.4 2005/05/25 22:51:15 rillig Exp $
+$NetBSD: MESSAGE.netbsd-i386,v 1.1 2007/08/22 16:43:33 jlam Exp $
You must have COMPAT_12, COMPAT_13, COMPAT_43, COMPAT_NOMID and a.out
support compiled into your kernel to use this program.
-
===========================================================================
diff --git a/archivers/rar/Makefile b/archivers/rar/Makefile
index 531ba293aea..33ae8e862f3 100644
--- a/archivers/rar/Makefile
+++ b/archivers/rar/Makefile
@@ -1,64 +1,29 @@
-# $NetBSD: Makefile,v 1.46 2006/06/22 21:38:06 rillig Exp $
+# $NetBSD: Makefile,v 1.47 2007/08/22 16:43:33 jlam Exp $
-DISTNAME= rarbsd
-PKGNAME= rar-2.02
+DISTNAME= rar # overridden in Makefile.${EMUL_PLATFORM}
CATEGORIES= archivers
-MASTER_SITES= ftp://ftp.elf.stuba.sk/pub/pc/pack/
-EXTRACT_SUFX= .sfx
+MASTER_SITES= # empty
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.rarsoft.com/
-COMMENT= File archiver (binary port)
+COMMENT= RAR file archiver (binary)
-ONLY_FOR_PLATFORM= NetBSD-*-i386
+EMUL_PLATFORMS= linux-i386 netbsd-i386
LICENSE= rar-license
RESTRICTED= Only unmodified original package can be distributed
NO_BIN_ON_CDROM= ${RESTRICTED}
NO_BIN_ON_FTP= ${RESTRICTED}
-WRKSRC= ${WRKDIR}
-EXTRACT_CMD= exec "$$extract_file" >/dev/null
+MESSAGE_SRC= ${PKGDIR}/MESSAGE.${EMUL_PLATFORM}
-pre-extract:
- ${_PKG_SILENT}${_PKG_DEBUG} set -e; set -u; \
- if [ -z "$${KERNEL-}" ]; then \
- KERNEL=/`env PATH="$${PATH}:/sbin:/usr/sbin" sysctl -n machdep.booted_kernel`; \
- fi; \
- if [ ! -f "$$KERNEL" ]; then \
- ${ECHO} "No kernel image found. Let's try without."; \
- elif (${NM} "$$KERNEL" | ${GREP} -q compat_12 && \
- ${NM} "$$KERNEL" | ${GREP} -q exec_nomid && \
- ${NM} "$$KERNEL" | ${GREP} -q exec_aout); then \
- ${TRUE}; \
- else \
- ${ECHO} "Make can not proceed! In order to extract (and run)"; \
- ${ECHO} "this package, you must have have booted from a kernel"; \
- ${ECHO} "with options COMPAT_NOMID and COMPAT_12 (and EXEC_AOUT, if ELF)."; \
- ${FALSE}; \
- fi
- ${TEST} -x ${DISTDIR}/${DISTFILES:Q} \
- || ${CHMOD} a+x ${DISTDIR:Q}/${DISTFILES:Q}
+.include "../../mk/bsd.prefs.mk"
-do-build:
- ${_PKG_SILENT}${_PKG_DEBUG} set -e; set -u; \
- cd ${WRKSRC:Q}; \
- for i in *.Txt *.Lst; do \
- ${TR} -d '\015' < "$$i" > "$$i".tmp; \
- ${MV} "$$i".tmp "$$i"; \
- done
-
-do-install:
- ${INSTALL_DATA_DIR} ${PREFIX:Q}/share/doc/rar ${PREFIX:Q}/share/rar
- cd ${WRKSRC:Q} && \
- ${INSTALL_SCRIPT} rar ${PREFIX:Q}/bin/rar && \
- ${INSTALL_MAN} Rar.Txt Rar_FAQ.txt TechNote.Txt \
- License.Txt Internet.Txt ${PREFIX:Q}/share/doc/rar && \
- ${INSTALL_DATA} RarFiles.Lst \
- ${PREFIX:Q}/share/rar/rarfiles.lst && \
- ${INSTALL_DATA} default.sfx \
- ${PREFIX:Q}/share/rar/default.sfx && \
- ${INSTALL_DATA} Dos.SFX \
- ${PREFIX:Q}/share/rar/dos.sfx
+.if exists(Makefile.${EMUL_PLATFORM})
+. include "Makefile.${EMUL_PLATFORM}"
+.else
+NO_BUILD= yes
+do-install: # nothing
+.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/archivers/rar/Makefile.linux-i386 b/archivers/rar/Makefile.linux-i386
new file mode 100644
index 00000000000..b0b8c2ac294
--- /dev/null
+++ b/archivers/rar/Makefile.linux-i386
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile.linux-i386,v 1.1 2007/08/22 16:43:34 jlam Exp $
+
+DISTNAME= rarlinux-3.6.0
+PKGNAME= ${DISTNAME:S/linux//}
+MASTER_SITES= http://www.rarsoft.com/rar/ \
+ ftp://ftp.rarsoft.com/rar/
+
+CONFLICTS= rarlinux-[0-9]* rar-linux-[0-9]*
+
+EMUL_MODULES.linux= base compat
+
+WRKSRC= ${WRKDIR}/rar
+BUILD_DIRS= # empty
+
+DATADIR= ${PREFIX}/lib
+DOCDIR= ${PREFIX}/share/doc/rar
+
+INSTALLATION_DIRS= bin lib ${DATADIR} ${DOCDIR}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC:Q}/rar_static ${PREFIX:Q}/bin/rar
+ ${INSTALL_DATA} ${WRKSRC:Q}/default.sfx ${DATADIR:Q}
+ ${INSTALL_DATA} ${WRKSRC}/*.txt ${DOCDIR:Q}
+ ${INSTALL_DATA} ${WRKSRC}/rarfiles.lst ${DOCDIR:Q}
diff --git a/archivers/rar/Makefile.netbsd-i386 b/archivers/rar/Makefile.netbsd-i386
new file mode 100644
index 00000000000..6782c1ab499
--- /dev/null
+++ b/archivers/rar/Makefile.netbsd-i386
@@ -0,0 +1,55 @@
+# $NetBSD: Makefile.netbsd-i386,v 1.1 2007/08/22 16:43:34 jlam Exp $
+
+DISTNAME= rarbsd
+PKGNAME= rar-2.02
+MASTER_SITES= ftp://ftp.elf.stuba.sk/pub/pc/pack/
+EXTRACT_SUFX= .sfx
+
+NETBSD_VERSION_REQD= 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}
diff --git a/archivers/rar-bin/PLIST b/archivers/rar/PLIST.linux-i386
index 69fcd11e605..fea96973ad6 100644
--- a/archivers/rar-bin/PLIST
+++ b/archivers/rar/PLIST.linux-i386
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2006/03/03 22:36:09 wiz Exp $
+@comment $NetBSD: PLIST.linux-i386,v 1.1 2007/08/22 16:43:35 jlam Exp $
bin/rar-bin
lib/default.sfx
share/doc/rar-bin/license.txt
diff --git a/archivers/rar/PLIST b/archivers/rar/PLIST.netbsd-i386
index 21c8cf96a9b..5ead2b225d9 100644
--- a/archivers/rar/PLIST
+++ b/archivers/rar/PLIST.netbsd-i386
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2005/09/02 23:15:36 rillig Exp $
+@comment $NetBSD: PLIST.netbsd-i386,v 1.1 2007/08/22 16:43:35 jlam Exp $
bin/rar
share/doc/rar/Internet.Txt
share/doc/rar/License.Txt
diff --git a/archivers/rar/distinfo b/archivers/rar/distinfo
index f350fb4729f..4e40273cf46 100644
--- a/archivers/rar/distinfo
+++ b/archivers/rar/distinfo
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 14:45:25 agc Exp $
+$NetBSD: distinfo,v 1.4 2007/08/22 16:43:36 jlam Exp $
SHA1 (rarbsd.sfx) = bafd5d6e4956ad10898ab19d601fa506d1681b4a
RMD160 (rarbsd.sfx) = 3510af235244162f47d85fb7744468c9b093ffdf
Size (rarbsd.sfx) = 246569 bytes
+SHA1 (rarlinux-3.6.0.tar.gz) = 4b43766371fd2f117fb3af5826001a7eab7a0f3b
+RMD160 (rarlinux-3.6.0.tar.gz) = c0f6d19738f69deb9fd75589e461a7a0ed430d39
+Size (rarlinux-3.6.0.tar.gz) = 752997 bytes
diff --git a/archivers/rar/files/check-ksyms.sh b/archivers/rar/files/check-ksyms.sh
new file mode 100644
index 00000000000..8e1fb3b569d
--- /dev/null
+++ b/archivers/rar/files/check-ksyms.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+#
+# $NetBSD: check-ksyms.sh,v 1.1 2007/08/22 16:43:36 jlam Exp $
+#
+# check-ksyms.sh verifies that the given symbols are found in the booted
+# kernel file.
+#
+
+: ${ECHO=echo}
+: ${GREP=grep}
+: ${GZIP_CMD=gzip}
+: ${NM=nm}
+: ${RM=rm}
+: ${TMPDIR=/tmp}
+
+self="check-ksyms"
+
+verbose=
+while [ $# -gt 0 ]; do
+ case $1 in
+ -v) verbose=yes; shift ;;
+ --) shift; break ;;
+ -*) ${ECHO} 1>&2 "$self [-v] symbol ..."; exit 2 ;;
+ *) break ;;
+ esac
+done
+
+# Locate kernel.
+PATH=/sbin:/usr/sbin:${PATH}; export PATH
+
+booted_kernel=
+kernlist="/netbsd /netbsd.gz /onetbsd /onetbsd.gz"
+kern=`sysctl -n machdep.booted_kernel 2>/dev/null`
+if [ -z "$kern" ]; then
+ kernlist="$kern $kernlist"
+fi
+for k in $kernlist; do
+ if [ -f "$k" ]; then
+ booted_kernel="$k"
+ break
+ fi
+done
+
+if [ -z "$booted_kernel" ]; then
+ ${ECHO} 1>&2 "$self: could not determine the booted kernel."
+ exit 2
+fi
+
+pattern=
+for symbol # in command-line arguments
+do
+ if [ -z "$pattern" ]; then
+ pattern="$symbol"
+ else
+ pattern="$pattern\|$symbol"
+ fi
+done
+
+# If there are no symbols to check, then exit with success.
+[ -n "$pattern" ] || exit 0
+
+if [ ! -d "${TMPDIR}" ]; then
+ ${ECHO} 1>&2 "$self: ${TMPDIR} does not exist."
+ exit 2
+fi
+
+ksymsfile="${TMPDIR}/ksyms.$self.$$"
+
+# Clean up when we receive the following signals: INT QUIT ABRT KILL TERM.
+trap "${RM} -f \"$ksymsfile\"" 2 3 6 9 15
+
+case $booted_kernel in
+*.gz) ${GZIP_CMD} -d < "$booted_kernel" | ${NM} > "$ksymsfile" ;;
+*) ${NM} "$booted_kernel" > "$ksymsfile" ;;
+esac
+
+# Loop through the symbols and check that each of them are in $ksymsfile.
+exitcode=0
+while [ $# -gt 0 ]; do
+ symbol="$1"; shift
+ if [ x"$verbose" = xyes ]; then
+ cmd="${GREP} \"$symbol\" \"$ksymsfile\" 2>/dev/null"
+ else
+ cmd="${GREP} \"$symbol\" \"$ksymsfile\" >/dev/null 2>&1"
+ fi
+ if eval $cmd; then
+ :
+ else
+ ${ECHO} 1>&2 "$self: symbol $symbol not found in $booted_kernel"
+ exitcode=1
+ break
+ fi
+done
+
+${RM} -f "$ksymsfile"
+exit $exitcode