6 changed files with 168 additions and 0 deletions
-
9owncloud/README.md
-
26owncloud/doinst.sh
-
103owncloud/owncloud.SlackBuild
-
10owncloud/owncloud.info
-
19owncloud/slack-desc
-
1owncloud/slack-required
@ -0,0 +1,9 @@ |
|||
**ownCloud** gives you universal access to your files through a web interface or WebDAV. It also provides a platform to easily view & sync your contacts, calendars and bookmarks across all your devices and enables basic editing right on the web. Installation has minimal server requirements, doesn’t need special permissions and is quick. ownCloud is extendable via a simple but powerful API for applications and plugins. |
|||
|
|||
By default, there is only a sample config file included with the package. |
|||
|
|||
You can override **DOCROOT**, **PHPUSER**, **PHPGROUP** and **CRONUSER** at build time. |
|||
They default to **DOCROOT=/var/www/**, **PHPUSER=root**, **PHPGROUP=apache**, **CRONUSER=apache**. |
|||
|
|||
For configuration help, you can visit: |
|||
http://doc.owncloud.org/server/9.0/admin_manual/installation/index.html |
|||
@ -0,0 +1,26 @@ |
|||
config() { |
|||
NEW="$1" |
|||
OLD="`dirname $NEW`/`basename $NEW .new`" |
|||
# If there's no config file by that name, mv it over: |
|||
if [ ! -r $OLD ]; then |
|||
mv $NEW $OLD |
|||
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy |
|||
rm $NEW |
|||
fi |
|||
# Otherwise, we leave the .new copy for the admin to consider... |
|||
} |
|||
|
|||
preserve_perms() { |
|||
NEW="$1" |
|||
OLD="$(dirname $NEW)/$(basename $NEW .new)" |
|||
if [ -e $OLD ]; then |
|||
cp -a $OLD ${NEW}.incoming |
|||
cat $NEW > ${NEW}.incoming |
|||
mv ${NEW}.incoming $NEW |
|||
fi |
|||
config $NEW |
|||
} |
|||
|
|||
config %DOCROOT%/owncloud/.htaccess.new |
|||
preserve_perms etc/cron.d/owncloud.new |
|||
|
|||
@ -0,0 +1,103 @@ |
|||
#!/bin/bash |
|||
|
|||
# Slackware package build script for ownCloud |
|||
# Home Page http://www.owncloud.org/ |
|||
|
|||
# Copyright 2013-2015 Mykyta Solomko, Kyiv, Ukraine, <sev@nix.org.ua> |
|||
# All rights reserved. |
|||
# |
|||
# Redistribution and use of this script, with or without modification, is |
|||
# permitted provided that the following conditions are met: |
|||
# |
|||
# 1. Redistributions of this script must retain the above copyright |
|||
# notice, this list of conditions and the following disclaimer. |
|||
# |
|||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED |
|||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
|||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
|||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
|||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|||
|
|||
PRGNAM="owncloud" |
|||
VERSION=${VERSION:-9.0.2} |
|||
ARCH="noarch" |
|||
BUILD=${BUILD:-1} |
|||
TAG=${TAG:-sev} |
|||
|
|||
DOCROOT=${DOCROOT:-/var/www} |
|||
|
|||
PHPUSER=${PHPUSER:-root} |
|||
PHPGROUP=${PHPGROUP:-apache} |
|||
CRONUSER=${CRONUSER:-apache} |
|||
|
|||
CWD=$(pwd) |
|||
TMP=${TMP:-/tmp/build/${ARCH}} |
|||
PKG=$TMP/package-$PRGNAM |
|||
OUTPUT=${OUTPUT:-/tmp} |
|||
|
|||
set -eu |
|||
|
|||
rm -rf $PKG |
|||
mkdir -p $TMP $PKG $OUTPUT |
|||
cd $TMP |
|||
rm -rf $PRGNAM |
|||
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* |
|||
mv $PRGNAM $TMP/$PRGNAM-$VERSION |
|||
cd $PRGNAM-$VERSION |
|||
chown -R ${PHPUSER}:${PHPGROUP} . |
|||
find . \ |
|||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 -o -perm 755 \) \ |
|||
-exec chmod 755 {} \; -o \ |
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 -o -perm 644 \) \ |
|||
-exec chmod 644 {} \; |
|||
|
|||
mkdir -p $PKG/$DOCROOT |
|||
cp -a $TMP/$PRGNAM-$VERSION $PKG/$DOCROOT/$PRGNAM |
|||
|
|||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |
|||
cp -a \ |
|||
AUTHORS COPYING-AGPL \ |
|||
$PKG/usr/doc/$PRGNAM-$VERSION |
|||
|
|||
# Change ownership and perms and create a link. |
|||
chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/$PRGNAM |
|||
chmod 0755 $PKG/$DOCROOT/$PRGNAM |
|||
|
|||
mkdir $PKG/$DOCROOT/$PRGNAM/{data,assets} |
|||
chown -R $PHPGROUP:$PHPGROUP $PKG/$DOCROOT/$PRGNAM/{apps,config,data,assets} |
|||
chmod 770 $PKG/$DOCROOT/$PRGNAM/{data,config} |
|||
chmod 775 $PKG/$DOCROOT/$PRGNAM/{apps,assets} |
|||
|
|||
|
|||
# Rename default configuration files |
|||
mv $PKG/$DOCROOT/$PRGNAM/.htaccess \ |
|||
$PKG/$DOCROOT/$PRGNAM/.htaccess.new |
|||
|
|||
# Cron job |
|||
mkdir -p ${PKG}/etc/cron.d |
|||
install -m 0644 ${CWD}/owncloud.cron ${PKG}/etc/cron.d/owncloud.new |
|||
|
|||
mkdir -p $PKG/install |
|||
for METAFILE in 'doinst.sh' \ |
|||
'slack-conflicts' \ |
|||
'slack-desc' \ |
|||
'slack-required' \ |
|||
'slack-suggests' |
|||
do |
|||
[[ -f $CWD/$METAFILE ]] \ |
|||
&& cat $CWD/$METAFILE > $PKG/install/$METAFILE |
|||
done |
|||
|
|||
sed -i \ |
|||
-e "s|%DOCROOT%|${DOCROOT#/}|g" \ |
|||
-e "s|%CRONUSER%|${CRONUSER}|" \ |
|||
${PKG}/etc/cron.d/owncloud.new \ |
|||
${PKG}/install/doinst.sh |
|||
|
|||
cd $PKG |
|||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz} |
|||
@ -0,0 +1,10 @@ |
|||
PRGNAM="owncloud" |
|||
VERSION="9.0.2" |
|||
HOMEPAGE="http://owncloud.org" |
|||
DOWNLOAD="https://download.owncloud.org/community/owncloud-9.0.2.tar.bz2" |
|||
MD5SUM="a0131f5cae2b1503b8de6796487c1bdc" |
|||
DOWNLOAD_x86_64="" |
|||
MD5SUM_x86_64="" |
|||
REQUIRES="" |
|||
MAINTAINER="Mykyta Solomko" |
|||
EMAIL="sev@nix.org.ua" |
|||
@ -0,0 +1,19 @@ |
|||
# HOW TO EDIT THIS FILE: |
|||
# The "handy ruler" below makes it easier to edit a package description. Line |
|||
# up the first '|' above the ':' following the base package name, and the '|' |
|||
# on the right side marks the last column you can put a character in. You must |
|||
# make exactly 11 lines for the formatting to be correct. It's also |
|||
# customary to leave one space after the ':'. |
|||
|
|||
|-----handy-ruler------------------------------------------------------| |
|||
owncloud: owncloud (Data syncronisation, cloud web engine) |
|||
owncloud: |
|||
owncloud: ownCloud is written in the PHP and JavaScript scripting languages. |
|||
owncloud: For change management, it employs SabreDAV, an open-source WebDAV |
|||
owncloud: server. ownCloud is designed to work with several database management |
|||
owncloud: systems, including SQLite, MariaDB, MySQL, Oracle Database, and |
|||
owncloud: PostgreSQL. |
|||
owncloud: |
|||
owncloud: |
|||
owncloud: Homepage: http://owncloud.org/ |
|||
owncloud: |
|||
@ -0,0 +1 @@ |
|||
php |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue