add install target

This commit is contained in:
Uwe Steinmann 2025-09-23 18:13:41 +02:00
parent e11e563e6c
commit 72efa6cd47
2 changed files with 28 additions and 1 deletions

View File

@ -6,6 +6,8 @@ NODISTFILES=utils/importmail.php utils/seedddms-importmail utils/remote-email-up
PHPDOC=~/Downloads/phpDocumentor.phar
INSTALL_PATH=/home/www-data/seeddms-test
all: dist
olddist:
@ -34,6 +36,9 @@ quickstart:
quickstart-dev:
php vendor/bin/phing -Dversion=$(VERSION) -Dmode=development package
install:
php vendor/bin/phing -Dversion=$(VERSION) -Dinstallpath=$(INSTALL_PATH) -Ddomain=dms.seeddms.org install
unittest:
vendor/bin/phing -Dversion=$(VERSION) phpunitfast
@ -103,4 +108,4 @@ PKGFILE=SeedDMS_Core/package.xml
changelog:
@sgrep 'stag("DATE") .. etag("DATE") or ((stag("RELEASE") .. etag("RELEASE")) in (stag("VERSION") .. etag("VERSION"))) or inner(stag("NOTES") __ etag("NOTES"))' ${PKGFILE} | sed -e 's#^ *<date>\([-0-9]*\)</date><release>\([0-9.preRC]*\)</release>#\n\n\2 (\1)\n---------------------#' | awk -F'\n' -vRS='' -vOFS='|' '{$$1=$$1}1' | sort -V -r | sed 's/$$/\n/' | tr '|' '\n'
.PHONY: doc webdav webapp repository changelog
.PHONY: doc webdav webapp repository changelog install

View File

@ -294,4 +294,26 @@
</exec>
<echo message="Built in ${builddir}/packages/seeddms-quickstart-${version}.tar.gz" />
</target>
<target name="install" description="Install SeedDMS">
<phingcall target="package">
</phingcall>
<exec executable="tar" passthru="true" checkreturn="true" dir="${installpath}">
<arg line="-xzvf ${builddir}/packages/seeddms-quickstart-${version}.tar.gz ${shortversion} --strip-components=1" />
</exec>
<copy file="${srcdir}/conf/apache.virtualhost.template" tofile="${installpath}/conf/apache.virtualhost.conf">
<filterchain>
<replaceregexp>
<regexp pattern="_INSTALL_PATH_" replace="${installpath}"/>
<regexp pattern="_DOMAIN_" replace="${domain}"/>
</replaceregexp>
</filterchain>
</copy>
<exec executable="bash" passthru="true" dir="${installpath}">
<arg value="-c"/>
<arg line="'sudo chown -R www-data:www-data ${installpath}/data ${installpath}/conf'" />
</exec>
<echo message="Create a link in /etc/apache2/sites-enabled/" />
<echo message="sudo -u www-data ln -s ${installpath}/conf/apache.virtualhost.conf /etc/apache2/sites-enabled/001-seeddms.conf" />
</target>
</project>