|
|
|
<project name="YaCy" default="all" basedir=".">
|
|
|
|
<description>
|
|
|
|
YaCy - a Peer to Peer Web Search Engine
|
|
|
|
</description>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
# THIS IS THE YACY MAKE-RELEASE SCRIPT
|
|
|
|
# YOU CAN USE IT TO COMPILE YOUR OWN RELEASE
|
|
|
|
# THE TARGET OF THE COMPILATION CAN BE FOUND
|
|
|
|
# IN THE 'RELEASE' DIRECTORY AFTERWARDS
|
|
|
|
# ==========================================
|
|
|
|
# This Software is Copyrighted
|
|
|
|
# (C) by Michael Peter Christen; mc@anomic.de
|
|
|
|
# first published on http://www.anomic.de
|
|
|
|
# Frankfurt, Germany, 2005
|
|
|
|
# last major change: 06.05.2005
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
# Using this software in any meaning (reading, learning, copying, compiling,
|
|
|
|
# running) means that you agree that the Author(s) is (are) not responsible
|
|
|
|
# for cost, loss of data or any harm that may be caused directly or indirectly
|
|
|
|
# by usage of this softare or this documentation. The usage of this software
|
|
|
|
# is on your own risk. The installation and usage (starting/running) of this
|
|
|
|
# software may allow other people or application to access your computer and
|
|
|
|
# any attached devices and is highly dependent on the configuration of the
|
|
|
|
# software which must be done by the user of the software; the author(s) is
|
|
|
|
# (are) also not responsible for proper configuration and usage of the
|
|
|
|
# software, even if provoked by documentation provided together with
|
|
|
|
# the software.
|
|
|
|
#
|
|
|
|
# Any changes to this file according to the GPL as documented in the file
|
|
|
|
# gpl.txt aside this file in the shipment you received can be done to the
|
|
|
|
# lines that follows this copyright notice here, but changes must not be
|
|
|
|
# done inside the copyright notive above. A re-distribution must contain
|
|
|
|
# the intact and unchanged copyright notice.
|
|
|
|
# Contributions and changes to the program code must be marked as such.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<tstamp>
|
|
|
|
<format property="REPL_DATE_FORMAT" pattern="yyyymmdd" />
|
|
|
|
</tstamp>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- defining all needed directory names -->
|
|
|
|
<property name="addon" location="addon"/>
|
|
|
|
<property name="src" location="source"/>
|
|
|
|
<property name="doc" location="doc"/>
|
|
|
|
<property name="data" location="DATA"/>
|
|
|
|
<property name="lib" location="lib"/>
|
|
|
|
<property name="libx" location="libx"/>
|
|
|
|
<property name="build" location="classes"/>
|
|
|
|
<property name="htroot" location="htroot"/>
|
|
|
|
<property name="release" location="RELEASE"/>
|
|
|
|
|
|
|
|
<!-- defining some compiler arguments -->
|
|
|
|
<property name="javacSource" value="1.4"/>
|
|
|
|
<property name="javacTarget" value="1.4"/>
|
|
|
|
|
|
|
|
<!-- Release Configuration -->
|
|
|
|
<property name="releaseVersion" value="0.374"/>
|
|
|
|
<property name="releaseFile" value="yacy_dev_v${releaseVersion}_${DSTAMP}.tar.gz"/>
|
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<mkdir dir="${build}/de/anomic/data"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/htmlFilter"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/http"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/kelondro"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/net"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/plasma"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/plasma/parser"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/server"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/tools"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/yacy"/>
|
|
|
|
<mkdir dir="${build}/de/anomic/yacy/seedUpload"/>
|
|
|
|
|
|
|
|
<mkdir dir="${doc}"/>
|
|
|
|
<mkdir dir="${data}"/>
|
|
|
|
<mkdir dir="${release}"/>
|
|
|
|
|
|
|
|
<move file="${src}/yacy.java" tofile="${src}/yacy.java.orig" />
|
|
|
|
|
|
|
|
<filter token="REPL_VERSION" value="${releaseVersion}" />
|
|
|
|
<filter token="REPL_DATE" value="${DSTAMP}"/>
|
|
|
|
<copy file="${src}/yacy.java.orig" tofile="${src}/yacy.java" filtering="true" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="init" description="Compiling the yacy sources ...">
|
|
|
|
|
|
|
|
<!-- defining the classpath that should be used for compiling -->
|
|
|
|
<path id="project.class.path">
|
|
|
|
<pathelement location="${build}"/>
|
|
|
|
|
|
|
|
<!-- libs needed for the yacy thread/object-pools -->
|
|
|
|
<pathelement location="${lib}/commons-collections.jar" />
|
|
|
|
<pathelement location="${lib}/commons-pool-1.2.jar" />
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<!-- compiling the main sources -->
|
|
|
|
<javac srcdir="${src}/" destdir="${build}"
|
|
|
|
excludes="de/anomic/plasma/parser/*/*,de/anomic/yacy/seedUpload/**,de/anomic/soap/**"
|
|
|
|
debug="true"
|
|
|
|
source="${javacSource}" target="${javacTarget}">
|
|
|
|
<classpath refid="project.class.path"/>
|
|
|
|
</javac>
|
|
|
|
<!-- compiling the two standard seed uploader methods -->
|
|
|
|
<javac srcdir="${src}" destdir="${build}"
|
|
|
|
classpathref="project.class.path"
|
|
|
|
source="1.4" target="1.4">
|
|
|
|
<include name="de/anomic/yacy/seedUpload/yacySeedUploadFile.java" />
|
|
|
|
<include name="de/anomic/yacy/seedUpload/yacySeedUploadFtp.java"/>
|
|
|
|
</javac>
|
|
|
|
<!-- compiling htroot and htdocsdefault -->
|
|
|
|
<javac srcdir="${htroot}/" destdir="${htroot}"
|
|
|
|
classpathref="project.class.path"
|
|
|
|
source="1.4" target="1.4"/>
|
|
|
|
<javac srcdir="${htroot}/htdocsdefault" destdir="${htroot}/htdocsdefault"
|
|
|
|
classpathref="project.class.path"
|
|
|
|
source="1.4" target="1.4"/>
|
|
|
|
<!-- compiling yacy.java -->
|
|
|
|
<javac srcdir="${htroot}/yacy" destdir="${htroot}/yacy"
|
|
|
|
classpathref="project.class.path"
|
|
|
|
source="1.4" target="1.4"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="all" depends="compile">
|
|
|
|
<delete file="${src}/yacy.java" />
|
|
|
|
<move file="${src}/yacy.java.orig" tofile="${src}/yacy.java" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- compiling optional content parsers and building install packages -->
|
|
|
|
<target name="parsers" depends="compile" description="Compiling and zipping all additional parsers">
|
|
|
|
<subant target="">
|
|
|
|
<property name="src" location="${src}"/>
|
|
|
|
<property name="build" location="${build}"/>
|
|
|
|
<property name="libx" location="${libx}"/>
|
|
|
|
<property name="release" location="${release}"/>
|
|
|
|
<property name="javacSource" value="${javacSource}"/>
|
|
|
|
<property name="javacTarget" value="${javacTarget}"/>
|
|
|
|
<!-- each optional parser must have its own build file -->
|
|
|
|
<fileset dir="${src}/" includes="de/anomic/plasma/parser/*/build.xml"/>
|
|
|
|
</subant>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- compiling optional seed uploaders and building install packages -->
|
|
|
|
<target name="seedUploaders" depends="compile" description="Compiling and zipping additional seed uploaders">
|
|
|
|
<subant target="">
|
|
|
|
<property name="src" location="${src}"/>
|
|
|
|
<property name="build" location="${build}"/>
|
|
|
|
<property name="libx" location="${libx}"/>
|
|
|
|
<property name="htroot" value="${htroot}"/>
|
|
|
|
<property name="release" location="${release}"/>
|
|
|
|
<property name="javacSource" value="${javacSource}"/>
|
|
|
|
<property name="javacTarget" value="${javacTarget}"/>
|
|
|
|
<!-- each optionl uploader module must have its own build file -->
|
|
|
|
<fileset dir="${src}/" includes="de/anomic/yacy/seedUpload/yacySeedUpload*.xml"/>
|
|
|
|
</subant>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- making a release file for yacy -->
|
|
|
|
<target name="dist" depends="all,parsers,seedUploaders" description="Compiling sources and make a release file ...">
|
|
|
|
|
|
|
|
<!-- defining some file/directory access rights -->
|
|
|
|
<property name="accessRightsDir" value="755"/>
|
|
|
|
<property name="accessRightsFile" value="644"/>
|
|
|
|
|
|
|
|
<tar destfile="${release}/${releaseFile}" compression="gzip" defaultexcludes="yes">
|
|
|
|
|
|
|
|
<!-- copy class files -->
|
|
|
|
<tarfileset dir="${build}" prefix="classes" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >
|
|
|
|
<include name="**/*.*"/>
|
|
|
|
<exclude name="de/anomic/plasma/parser/*/*"/>
|
|
|
|
<exclude name="de/anomic/yacy/seedUpload/**"/>
|
|
|
|
<exclude name="de/anomic/soap/**"/>
|
|
|
|
</tarfileset>
|
|
|
|
<tarfileset dir="${build}" prefix="classes" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >
|
|
|
|
<include name="de/anomic/yacy/seedUpload/yacySeedUploadFile.class"/>
|
|
|
|
<include name="de/anomic/yacy/seedUpload/yacySeedUploadFtp.class"/>
|
|
|
|
</tarfileset>
|
|
|
|
|
|
|
|
<!-- copy libs -->
|
|
|
|
<tarfileset dir="${lib}" includes="**/*" prefix="lib" dirmode="${accessRightsDir}" mode="${accessRightsFile}"/>
|
|
|
|
|
|
|
|
<!-- copy configuration files -->
|
|
|
|
<tarfileset dir="." dirmode="${accessRightsDir}" mode="${accessRightsFile}">
|
|
|
|
<include name="yacy.init"/>
|
|
|
|
<include name="yacy.yellow"/>
|
|
|
|
<include name="yacy.black"/>
|
|
|
|
<include name="yacy.blue"/>
|
|
|
|
<include name="yacy.stopwords"/>
|
|
|
|
<include name="yacy.parser"/>
|
|
|
|
<include name="httpd.mime"/>
|
|
|
|
<include name="superseed.txt"/>
|
|
|
|
</tarfileset>
|
|
|
|
|
|
|
|
<!-- copy wrappers -->
|
|
|
|
<tarfileset dir="." dirmode="${accessRightsDir}" mode="${accessRightsFile}">
|
|
|
|
<include name="startYACY.command"/>
|
|
|
|
<include name="startYACY.bat"/>
|
|
|
|
<include name="startYACY_noconsole.bat"/>
|
|
|
|
<include name="startYACY.sh"/>
|
|
|
|
<include name="stopYACY.command"/>
|
|
|
|
<include name="stopYACY.bat"/>
|
|
|
|
<include name="stopYACY.sh"/>
|
|
|
|
<include name="killYACY.sh"/>
|
|
|
|
</tarfileset>
|
|
|
|
|
|
|
|
<!-- copy documentation -->
|
|
|
|
<tarfileset dir="." dirmode="${accessRightsDir}" mode="${accessRightsFile}">
|
|
|
|
<include name="readme.txt"/>
|
|
|
|
<include name="gpl.txt"/>
|
|
|
|
</tarfileset>
|
|
|
|
<tarfileset dir="${doc}" prefix="doc" dirmode="${accessRightsDir}" mode="${accessRightsFile}">
|
|
|
|
<include name="**/*"/>
|
|
|
|
</tarfileset>
|
|
|
|
|
|
|
|
<!-- copy source code -->
|
|
|
|
<tarfileset dir="${src}" prefix="source" dirmode="${accessRightsDir}" mode="${accessRightsFile}">
|
|
|
|
<include name="**/*.*"/>
|
|
|
|
<exclude name="de/anomic/plasma/parser/*/*"/>
|
|
|
|
<exclude name="de/anomic/yacy/seedUpload/yacySeedUpload**"/>
|
|
|
|
<exclude name="de/anomic/soap/**"/>
|
|
|
|
</tarfileset>
|
|
|
|
<tarfileset dir="${src}" prefix="source" dirmode="${accessRightsDir}" mode="${accessRightsFile}">
|
|
|
|
<include name="de/anomic/yacy/seedUpload/yacySeedUploadFile.java"/>
|
|
|
|
<include name="de/anomic/yacy/seedUpload/yacySeedUploadFtp.java"/>
|
|
|
|
</tarfileset>
|
|
|
|
|
|
|
|
<!-- copy server pages -->
|
|
|
|
<tarfileset dir="${htroot}" prefix="htroot" dirmode="${accessRightsDir}" mode="${accessRightsFile}">
|
|
|
|
<include name="**/*"/>
|
|
|
|
<exclude name="yacy/seedUpload/**"/>
|
|
|
|
</tarfileset>
|
|
|
|
<tarfileset dir="${htroot}" prefix="htroot" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >
|
|
|
|
<include name="yacy/seedUpload/yacySeedUploadFile.html"/>
|
|
|
|
<include name="yacy/seedUpload/yacySeedUploadFtp.html"/>
|
|
|
|
</tarfileset>
|
|
|
|
|
|
|
|
<!-- copy add-on's -->
|
|
|
|
<tarfileset dir="${addon}" prefix="addon" dirmode="${accessRightsDir}" mode="${accessRightsFile}">
|
|
|
|
<include name="**/*"/>
|
|
|
|
</tarfileset>
|
|
|
|
</tar>
|
|
|
|
|
|
|
|
<!-- writing the current release version into a file -->
|
|
|
|
<echo message="${releaseVersion}" file="${doc}/release.txt"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- make clean -->
|
|
|
|
<target name="clean" description="make clean">
|
|
|
|
<delete>
|
|
|
|
<fileset dir="${build}" includes="**/*.class" />
|
|
|
|
<fileset dir="${htroot}" includes="**/*.class" />
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|