contrib/yacy/Pkgfile

72 lines
1.8 KiB
Plaintext
Raw Normal View History

# Description: P2P application for web searching.
# URL: http://www.yacy.net/yacy/
2008-03-26 03:45:31 +01:00
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
# Packager: Danny Rawlins, monster dot romster at gmail dot com
# Depends on: ant
name=yacy
2008-06-09 19:49:33 +02:00
version=0.59
date=20080605_4890
2008-07-07 21:15:34 +02:00
release=2
source=(http://www.yacy.net/release/yacy_v${version}_$date.tar.gz
yacy-start.sh yacy-stop.sh yacy.rc)
build() {
cd yacy
# ant wont build without this directory.
install -d $SRC/yacy/libx
# compile
ant
# remove un-needed files
2008-07-07 21:15:34 +02:00
find $SRC/yacy -type f \( \
-name '*.bat' -o \
-name '*.txt' -o \
-name '*.css.old' -o \
-name '*.readme' -o \
-name '*.License' -o \
-name '*.java' \) -delete
rm -r \
source \
locales \
RELEASE
rm \
build.xml \
build.properties \
lib/tar.license \
addon/jsmooth/skeletons/console-wrapper/consolewrapper.exe \
addon/jsmooth/skeletons/windowed-wrapper/jwrap.exe
# install
2008-04-23 20:31:34 +02:00
install -d $PKG/usr/lib/yacy $PKG/etc/yacy $PKG/var/cache/yacy
cp -R * $PKG/usr/lib/yacy/
2008-04-23 20:31:34 +02:00
# move cache directory
mv $PKG/usr/lib/yacy/DATA $PKG/var/cache/yacy/
2008-07-07 21:15:34 +02:00
chmod 0560 $PKG/var/cache/yacy/DATA
2008-04-23 20:31:34 +02:00
ln -sf /var/cache/yacy/DATA $PKG/usr/lib/yacy/DATA
local files='yacy.logging yacy.stopwords yacy.yellow'
for file in $files; do
2008-04-23 20:31:34 +02:00
mv $PKG/usr/lib/yacy/$file $PKG/etc/yacy/
ln -sf /etc/yacy/$file $PKG/usr/lib/yacy/$file
done
# add some protection by limitng what and who can access the p2p files.
2008-07-07 21:15:34 +02:00
chown -R root:yacy $PKG/usr/lib/yacy
chown -R root:yacy $PKG/var/cache/yacy
chown -R root:yacy $PKG/etc/yacy
chmod 0665 $PKG/etc/yacy
chmod -R 0575 $PKG/var/cache/yacy
2008-07-07 21:15:34 +02:00
install -m 0554 -D -o yacy -g yacy $SRC/yacy-start.sh $PKG/usr/sbin/yacy-start
install -m 0554 -D -o yacy -g yacy $SRC/yacy-stop.sh $PKG/usr/sbin/yacy-stop
install -m 0554 -D $SRC/yacy.rc $PKG/etc/rc.d/yacy
}