2007-12-06 00:32:21 +00:00
|
|
|
args : with args;
|
2008-01-18 12:36:56 +00:00
|
|
|
let localDefs = builderDefs {
|
2007-12-06 00:32:21 +00:00
|
|
|
src = /* put a fetchurl here */
|
2008-02-18 10:42:04 +00:00
|
|
|
if args ? src then args.src else fetchcvs {
|
2008-02-29 09:15:28 +00:00
|
|
|
cvsRoot = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs";
|
2007-12-06 00:32:21 +00:00
|
|
|
module = "relfs";
|
|
|
|
date = "2007-12-01";
|
2008-03-07 06:11:08 +00:00
|
|
|
sha256 = "39d97d0aa16b8bc953b2ef5f6308e9f9eda300c1de8a7acb6f8c8e5897c0c7b5";
|
2007-12-06 00:32:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ocaml fuse postgresql pcre
|
|
|
|
e2fsprogs gnomevfs pkgconfig GConf];
|
|
|
|
configureFlags = [];
|
|
|
|
} null; /* null is a terminator for sumArgs */
|
2008-01-18 12:36:56 +00:00
|
|
|
in with localDefs;
|
2009-05-20 00:25:58 +01:00
|
|
|
let build = fullDepEntry ("
|
2007-12-06 00:32:21 +00:00
|
|
|
cd deps
|
|
|
|
sed -e 's/^CPP/#&/ ; s/^# CPP=gcc/CPP=gcc/' -i Makefile.camlidl
|
|
|
|
make
|
|
|
|
cd ../src
|
|
|
|
sed -e 's/NULL\\|FALSE/0/g' -i Mimetype_lib.c
|
|
|
|
sed -e 's@/usr/local/@'\$out/'@' -i Makefile
|
|
|
|
sed -e '/install:/a\\\tmkdir -p '\$out'/share' -i Makefile
|
|
|
|
make
|
|
|
|
mkdir -p \$out/bin
|
2007-12-25 12:29:02 +00:00
|
|
|
echo '
|
|
|
|
createuser -A -D \$1
|
|
|
|
dropdb relfs_\$1 ;
|
2007-12-06 00:32:21 +00:00
|
|
|
rm -rf /tmp/relfs-\$1-tmp;
|
|
|
|
mkdir /tmp/relfs-\$1-tmp;
|
2008-03-16 10:31:17 +00:00
|
|
|
USER=\$1 relfs -f -s /tmp/relfs-\$1-tmp &
|
2007-12-06 00:32:21 +00:00
|
|
|
sleep 1 &&
|
|
|
|
kill -15 \${!};
|
|
|
|
rm -rf /tmp/relfs-\$1-tmp ;
|
2008-03-16 10:31:17 +00:00
|
|
|
psql -d relfs_\$1 <<< \"ALTER DATABASE relfs_\$1 OWNER TO \$1;
|
2007-12-06 00:32:21 +00:00
|
|
|
ALTER TABLE obj OWNER TO \$1;
|
|
|
|
ALTER TABLE obj_mimetype OWNER TO \$1;
|
|
|
|
ALTER TABLE membership OWNER TO \$1;\"' > \$out/bin/relfs_grant;
|
|
|
|
chmod a+x \$out/bin/relfs_grant;
|
|
|
|
") [minInit doUnpack addInputs];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "relfs-"+version;
|
|
|
|
builder = writeScript (name + "-builder")
|
2008-01-18 12:36:56 +00:00
|
|
|
(textClosure localDefs [build doMakeInstall doForceShare doPropagate]);
|
2007-12-06 00:32:21 +00:00
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "A relational filesystem on top of FUSE";
|
2008-03-02 18:49:31 +00:00
|
|
|
inherit src;
|
2007-12-06 00:32:21 +00:00
|
|
|
};
|
|
|
|
}
|