create required dirctory hierarchy and copy over required scripts
This commit is contained in:
parent
65f337bd15
commit
bc63307993
|
@ -67,6 +67,13 @@ let
|
||||||
nativeBuildInputs = [ autoconf automake libtool pkgconfig vala autoreconfHook which pythonPackages.wrapPython ];
|
nativeBuildInputs = [ autoconf automake libtool pkgconfig vala autoreconfHook which pythonPackages.wrapPython ];
|
||||||
buildInputs = [ sqlite glib python libuuid openssl oniguruma fuse libarchive libevent libevhtp ];
|
buildInputs = [ sqlite glib python libuuid openssl oniguruma fuse libarchive libevent libevhtp ];
|
||||||
propagatedBuildInputs = [ libsearpc ] ++ seahubPythonDependencies;
|
propagatedBuildInputs = [ libsearpc ] ++ seahubPythonDependencies;
|
||||||
|
# copy manual to required location
|
||||||
|
postInstall = ''
|
||||||
|
mkdir $out/doc
|
||||||
|
cp ${src}/doc/*.doc $out/doc/
|
||||||
|
'';
|
||||||
|
# prevent doc directory from being moved to share in fixupPhase
|
||||||
|
forceShare = [ "man" "info" ];
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
buildPythonPath $propagatedBuildInputs
|
buildPythonPath $propagatedBuildInputs
|
||||||
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
||||||
|
@ -123,12 +130,21 @@ stdenv.mkDerivation {
|
||||||
buildInputs = [ seahub seafile-server-core libsearpc ]
|
buildInputs = [ seahub seafile-server-core libsearpc ]
|
||||||
++ lib.optional withMysql libmysqlclient;
|
++ lib.optional withMysql libmysqlclient;
|
||||||
phases = [ "installPhase" "fixupPhase" "distPhase" ];
|
phases = [ "installPhase" "fixupPhase" "distPhase" ];
|
||||||
# todo: create data directory in /srv in activation script
|
# create required directory structure
|
||||||
|
# Which files need to be copied is specified in the function `copy_scripts_and_libs`
|
||||||
|
# of ${seafile-server-core.src}/scripts/build/build-server.py
|
||||||
|
# The install script below has been hand crafted from that list of files and needs to be updated on new releases.
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir "$out"
|
mkdir "$out"
|
||||||
cd "$out"
|
cd "$out"
|
||||||
ln -s ${seahub} seahub
|
ln -s ${seahub} seahub
|
||||||
ln -s ${seafile-server-core} seafile-server-latest
|
ln -s ${seafile-server-core} seafile-server
|
||||||
|
# copy general scripts
|
||||||
|
cp ${seafile-server-core.src}/scripts/{setup-seafile.sh,setup-seafile-mysql.sh,setup-seafile-mysql.py,seafile.sh,seahub.sh,reset-admin.sh,seaf-fuse.sh,check_init_admin.py,seaf-gc.sh,seaf-fsck.sh} .
|
||||||
|
# copy update scripts (and their sql)
|
||||||
|
cp -r ${seafile-server-core.src}/scripts/upgrade .
|
||||||
|
cp -r ${seafile-server-core.src}/scripts/sql .
|
||||||
|
# copy_user_manual is already done in the postInstall hook of seafile-server-core
|
||||||
'';
|
'';
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
maintainers = with maintainers; [ schmittlauch ];
|
maintainers = with maintainers; [ schmittlauch ];
|
||||||
|
|
Loading…
Reference in a new issue