Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Steven Lumos

1 total

mtree from pkgsrc without pkgsrc on solaris

# get-mtree.sh
# the patch may not be necessary on systems other than solaris 8.

prefix=/local/mtree-20070710
libnbcompat=pkgsrc/pkgtools/libnbcompat
mtree=pkgsrc/pkgtools/mtree

set -a

CVSROOT=anoncvs@anoncvs.NetBSD.org:/cvsroot
CVS_RSH=ssh

cvs get "$libnbcompat"
cvs get "$mtree"

patch -p0 <<EOF
diff -u -u -r1.5 create.c
--- pkgsrc/pkgtools/mtree/files/create.c    19 Nov 2007 08:41:25 -0000      1.5
+++ pkgsrc/pkgtools/mtree/files/create.c    20 Mar 2008 22:50:41 -0000
@@ -96,7 +96,7 @@

 #ifndef NO_MD5
 #if HAVE_MD5_H
-#include <md5.h>
+/* #include <md5.h> */
 #endif
 #endif
 #ifndef NO_RMD160
EOF

CC="cc -xO4 -xtarget=ultra3cu -xarch=v9a"

(cd "$libnbcompat/files" && ./configure && make)

CPPFLAGS="-I$PWD/$libnbcompat/files"
LDFLAGS="-L$PWD/$libnbcompat/files"
LIBS=-lnbcompat

cd "$mtree/files" \
&& ./configure --prefix="$prefix" \
&& make

echo "if it worked, you can 'cd $mtree/files; make install' now"
1 total