Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 2009 05:44:47 +0200 (CEST)
From:      Alex de Kruijff <freebsd@akruijff.dds.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/133637: New port: sysutils/samesame Find files with identical contents and replaces them with links.
Message-ID:  <200904120344.n3C3ilUI060354@Alex1.lan>
Resent-Message-ID: <200904120400.n3C40C31068354@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         133637
>Category:       ports
>Synopsis:       New port: sysutils/samesame Find files with identical contents and replaces them with links.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 12 04:00:11 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Alex de Kruijff
>Release:        FreeBSD 7.1-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD Alex1.lan 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #0: Thu Feb  5 11:18:37 CET 2009     akruijff@Alex1.kruijff.org:/disk/temp/obj/disk/temp/src/sys/WORKSTATION  i386


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       /usr/ports/sysutils/samesame/
#       /usr/ports/sysutils/samesame/Makefile
#       /usr/ports/sysutils/samesame/pkg-descr
#       /usr/ports/sysutils/samesame/distinfo
#
echo c - /usr/ports/sysutils/samesame/
mkdir -p /usr/ports/sysutils/samesame/ > /dev/null 2>&1
echo x - /usr/ports/sysutils/samesame/Makefile
sed 's/^X//' >/usr/ports/sysutils/samesame/Makefile << 'END-of-/usr/ports/sysutils/samesame/Makefile'
X
X# Port containing applications to find and relink identical files.
X# Replacement for the port samefile. It is incompatible with samefile,
X# because it has it own faster version.
X#
X# Date created:                14 April 2009
X# Whom:                        Alex de Kruijff
X#
X# $FreeBSD$
X
XPORTNAME=      samesame
XPORTVERSION=   1.0
XCATEGORIES=    sysutils
XMASTER_SITES=  http://www.akruijff.dds.nl/freebsd/
X
XMAINTAINER=    freebsd@akruijff.dds.nl
XCOMMENT=       Find files with identical contents and replaces them with links.
XCONFLICTS=     samefile*
X
XMAN1=          samearchive.1 samearchive-lite.1 samefile.1 samelink.1
XMANCOMPRESSED= yes
XPLIST_FILES=   bin/samearchive \
X               bin/samearchive-lite \
X               bin/samefile \
X               bin/samelink
X
XUSE_BZIP2=     yes
X
XOPTIONS=       DEBUG "Enables debugging support" Off \
X               DISK_STORAGE "Allow temporarily storage paths on disk" On \
X               LOGIC "Determine results by using logic when posible" On
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_DEBUG)
XCFLAGS+= -DDEBUG
X.endif
X                 
X.if defined(WITH_DISK_STORAGE)
XCFLAGS+= -DWITH_DISK_STORAGE
X.endif
X
X.if defined(WITH_LOGIC)
XCFLAGS+= -DWITH_LOGIC
X.endif
X
X
XCFLAGS+= -DWITH_MMAP
XCFLAGS+= -D'TEMP_STORAGE_DIR=\"/tmp\"'
XCFLAGS+= -DPATH_INIT=256
XCFLAGS+= -DSTATIC_CACHE_CAPACITY=8192
X
Xpost-install:
X       ${STRIP_CMD} ${PREFIX}/bin/samefile
X       ${STRIP_CMD} ${PREFIX}/bin/samelink
X       ${STRIP_CMD} ${PREFIX}/bin/samearchive
X       ${STRIP_CMD} ${PREFIX}/bin/samearchive-lite
X
X.include <bsd.port.post.mk>
X
END-of-/usr/ports/sysutils/samesame/Makefile
echo x - /usr/ports/sysutils/samesame/pkg-descr
sed 's/^X//' >/usr/ports/sysutils/samesame/pkg-descr << 'END-of-/usr/ports/sysutils/samesame/pkg-descr'
X
XThis port contains applications to find identical files and hard- or
Xsymlink them to save space. This port was inspired by the port samefile.
XIt has a own version of samefile that is noticeable faster.
X
XThis port contains the application: samefile, samelink and samearchive.
X
X- Samefile reads a list of filenames from the stdin and outputs the
X  identical files.
X
X- Samelink reads the output of these two programd and creates relinks
X  the files to save space.
X
X- Samearchive reads a list of filenames from the stdin and reads a list
X  of directories passed as paramenters and outputs the identical files,
X  if the relative paths match.
X
X- Samearchive-lite does the same job as samearchive, but it does 80% of
X  the work in 50% of the time and with 20% of the resources.
X
XTypical usage would be:
X
X       find / | samefile -i | samelink
X
XThis would search for identical files and clean up wasted disk space by
Xlinking them together. Add the option -n after samelink for a dry-run.
X
END-of-/usr/ports/sysutils/samesame/pkg-descr
echo x - /usr/ports/sysutils/samesame/distinfo
sed 's/^X//' >/usr/ports/sysutils/samesame/distinfo << 'END-of-/usr/ports/sysutils/samesame/distinfo'
XMD5 (samesame-1.0.tar.bz2) = 085c2f4347f76eadc691af66342b44ee
XSHA256 (samesame-1.0.tar.bz2) = f099497053867964bc2ddfb028c0500a69836056252bc3ce92ea3b9bc655c127
XSIZE (samesame-1.0.tar.bz2) = 37884
END-of-/usr/ports/sysutils/samesame/distinfo
exit

>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904120344.n3C3ilUI060354>