diff options
Diffstat (limited to 'social/diaspora-git')
-rw-r--r-- | social/diaspora-git/PKGBUILD | 172 | ||||
-rw-r--r-- | social/diaspora-git/diaspora.bashrc | 6 | ||||
-rw-r--r-- | social/diaspora-git/diaspora.bin | 9 | ||||
-rw-r--r-- | social/diaspora-git/diaspora.install | 28 | ||||
-rw-r--r-- | social/diaspora-git/diaspora.logrotate | 5 | ||||
-rw-r--r-- | social/diaspora-git/diaspora.pam | 3 | ||||
-rw-r--r-- | social/diaspora-git/diaspora.rc | 65 |
7 files changed, 0 insertions, 288 deletions
diff --git a/social/diaspora-git/PKGBUILD b/social/diaspora-git/PKGBUILD deleted file mode 100644 index 7d48edcb2..000000000 --- a/social/diaspora-git/PKGBUILD +++ /dev/null @@ -1,172 +0,0 @@ -# Maintainer: fauno <fauno@kiwwwi.com.ar> -# Maintainer (Arch): Hilton Medeiros <medeiros.hilton at gmail dot com> -# Contributor (Arch): Jonne Haß <me@mrzyx.de> -# Contributor (Arch): Splashy <splash at open-web dot fr> - -# After installing, see the Diaspora wiki page for more information: -# https://wiki.archlinux.org/index.php/Diaspora - -pkgbase=diaspora-git -pkgname=('diaspora-mysql-git' 'diaspora-postgresql-git') -pkgver=20120105 -pkgrel=2 -pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network" -arch=('i686' 'x86_64' 'mips64el') -url="https://diasporafoundation.org/" -license=('AGPL3') -depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'net-tools') -makedepends=('git' 'libmysqlclient' 'postgresql-libs') -provides=('diaspora') -install=diaspora.install -source=('diaspora.bin' - 'diaspora.rc' - 'diaspora.logrotate' - 'diaspora.pam' - 'diaspora.bashrc') -md5sums=('547b0015c83da22bd739dc85fd79f9b9' - 'b7a893271d9ba778f74569eff4190c06' - '60f6b3972c73cbc6b1c9ab87c88fb655' - '96f82c38f3f540b53f3e5144900acf17' - '53867bfd389dd267eefcefb053fecc5b') - -_gitroot="git://github.com/diaspora/diaspora.git" -_gitname="diaspora" - -build() { - cd "$srcdir" - - msg "Connecting to the Git server..." - - if [[ -d $_gitname ]] ; then - pushd $_gitname - git pull origin - msg "The local files are updated." - popd - else - git clone $_gitroot - msg "Git clone done." - fi - - msg "Start making..." - - [[ -d $_gitname-build ]] && rm -fr $_gitname-build - git clone $_gitname $_gitname-build - cd ${srcdir}/${_gitname}-build - - # Symlink configs - ln -s /etc/webapps/$_gitname/application.yml config/application.yml - ln -s /etc/webapps/$_gitname/database.yml config/database.yml - ln -s /etc/webapps/$_gitname/script_server.yml config/script_server.yml - ln -s /etc/webapps/$_gitname/oauth_keys.yml config/oauth_keys.yml - - # Set version header - sed "s|git_cmd = \`git log -1 --pretty=\"format:%H %ci\"\`|git_cmd = \"$(git log -1 --pretty="format:%H %ci")\"|" \ - -i config/initializers/version_header.rb - - # Preconfigure config/script_server.yml.example - sed 's|rails_env: "development"|rails_env: "production"|' \ - -i config/script_server.yml.example - - # Preconfigure right ca_file - sed "s|ca_file: '/etc/pki/tls/certs/ca-bundle.crt' # CentOS|ca_file: '/etc/ssl/certs/ca-certificates.crt' # Arch|" \ - -i config/application.yml.example - - # We make this now because we do not install the git history - # Comply with AGPLv3 - tar czf public/source.tar.gz `git ls-tree -r master | awk '{print $4}'` - - # Remove git repo - rm -fr .git - - # Create gem cache - mkdir -p ${srcdir}/gem-cache -} - -# Helper -_package() { - cd "${srcdir}" - - usrdir="${pkgdir}/usr/share/webapps" - - install -d "${usrdir}" - cp -a ${_gitname}-build "${usrdir}/${_gitname}" - - install -Dm755 $_gitname.bin "$pkgdir/usr/bin/$_gitname" - install -Dm755 $_gitname.rc "$pkgdir/etc/rc.d/$_gitname" - install -Dm644 $_gitname.logrotate "$pkgdir/etc/logrotate.d/$_gitname" - install -Dm644 $_gitname.pam "$pkgdir/etc/pam.d/$_gitname" - install -Dm644 $_gitname.bashrc "$usrdir/$_gitname/.bashrc" - -# Set the DB in the environment - sed -i "s/-DB-/$DB/g" "$usrdir/$_gitname/.bashrc" - sed -i "s/-DB-/$_db_rc/g" "$pkgdir/etc/rc.d/$_gitname" - - install -Dm644 $_gitname-build/config/application.yml.example "$pkgdir/etc/webapps/$_gitname/application.yml" - install -Dm644 $_gitname-build/config/database.yml.example "$pkgdir/etc/webapps/$_gitname/database.yml" - install -Dm644 $_gitname-build/config/script_server.yml.example "$pkgdir/etc/webapps/$_gitname/script_server.yml" - install -Dm644 $_gitname-build/config/oauth_keys.yml.example "$pkgdir/etc/webapps/$_gitname/oauth_keys.yml" - - # Include all gems - cd "${usrdir}/${_gitname}" - mkdir -p ${usrdir}/${_gitname}/vendor/ruby/1.9.1/ - ln -s ${srcdir}/gem-cache ${usrdir}/${_gitname}/vendor/cache - ln -s ${srcdir}/gem-cache ${usrdir}/${_gitname}/vendor/ruby/1.9.1/cache - - export GEM_HOME="${PWD}/vendor" - export GEM_PATH="${PWD}/vendor" - export PATH="${GEM_PATH}/bin:${PATH}" - -# TODO extract mysql2 version from Gemfile - case $DB in - mysql) - gem install mysql2 -v "0.2.17" -- --with-mysql-config=/usr/bin/mysql_config - - ;; - posgres) - gem install pg -- --with-pg-config=/usr/bin/pg_config - - # Preconfigure right subsection in database.yml.example - sed -e "s/<<: \*mysql/#<<: \*mysql/" \ - -e "s/#<<: \*postgres/<<: \*postgres/" \ - -i $_gitname-build/config/database.yml.example - - # Preconfigure right db in script_server.yml - sed "s/db: \"mysql\"/db: \"postgres\"/" \ - -i $_gitname-build/config/script_server.yml.example - - esac - - gem install bundler - bundle install --path ${GEM_PATH} --without development test heroku - - install -d $pkgdir/usr/share/licenses/$_gitname/ - install -Dm644 ${srcdir}/$_gitname-build/{AUTHORS,COPYRIGHT,GNU-AGPL-3.0} \ - $pkgdir/usr/share/licenses/$_gitname/ - - msg "Removing gem cache" - rm -vr ${usrdir}/${_gitname}/vendor/{,ruby/1.9.1/}cache -} - -package_diaspora-mysql-git() { - pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network (MySQL version)" - provides=('diaspora-mysql' 'diaspora') - depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'net-tools' 'mysql' 'libmysqlclient') - options=(!strip) - - export DB="mysql" - export _db_rc="mysqld" - - _package -} - -package_diaspora-postgresql-git() { - pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network (PostgreSQL version)" - provides=('diaspora-postgresql' 'diaspora') - depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'net-tools' 'postgresql') - options=(!strip) - - export DB="postgres" - export _db_rc="postgresql" - - _package -} diff --git a/social/diaspora-git/diaspora.bashrc b/social/diaspora-git/diaspora.bashrc deleted file mode 100644 index b694ca0b0..000000000 --- a/social/diaspora-git/diaspora.bashrc +++ /dev/null @@ -1,6 +0,0 @@ -export GEM_HOME="${HOME}/.gems" -export GEM_PATH="${HOME}/.gems" -export PATH="${GEM_PATH}/bin:${PATH}" -export RAILS_ENV="production" -export DB="-DB-" - diff --git a/social/diaspora-git/diaspora.bin b/social/diaspora-git/diaspora.bin deleted file mode 100644 index dfd0d026f..000000000 --- a/social/diaspora-git/diaspora.bin +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if [ "$(whoami)" == "diaspora" ]; then - cd /usr/share/webapps/diaspora - source ./.bashrc - ./script/server &>>/var/log/diaspora.log -else - echo 'Please run this as the "diaspora" user!' -fi diff --git a/social/diaspora-git/diaspora.install b/social/diaspora-git/diaspora.install deleted file mode 100644 index 7833be058..000000000 --- a/social/diaspora-git/diaspora.install +++ /dev/null @@ -1,28 +0,0 @@ - -dusr=diaspora -dhome=/usr/share/webapps/diaspora -dlog=/var/log/diaspora.log - -post_install() { - getent passwd $dusr &>/dev/null || useradd -r -d $dhome -s /bin/bash $dusr &>/dev/null - chown -R $dusr:$dusr $dhome &>/dev/null - [[ -f $dlog ]] && chown $dusr:$dusr $dlog -} - -pre_upgrade(){ - etc/rc.d/diaspora stop &>/dev/null - return 0 -} - -post_upgrade(){ - post_install $1 -} - -pre_remove(){ - pre_upgrade $1 -} - -post_remove(){ - getent passwd $dusr &>/dev/null && userdel -f $dusr - return 0 -} diff --git a/social/diaspora-git/diaspora.logrotate b/social/diaspora-git/diaspora.logrotate deleted file mode 100644 index bb5564a79..000000000 --- a/social/diaspora-git/diaspora.logrotate +++ /dev/null @@ -1,5 +0,0 @@ -/var/log/diaspora.log { - notifempty - copytruncate - missingok -} diff --git a/social/diaspora-git/diaspora.pam b/social/diaspora-git/diaspora.pam deleted file mode 100644 index 53724d1f8..000000000 --- a/social/diaspora-git/diaspora.pam +++ /dev/null @@ -1,3 +0,0 @@ -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so diff --git a/social/diaspora-git/diaspora.rc b/social/diaspora-git/diaspora.rc deleted file mode 100644 index 8464f3947..000000000 --- a/social/diaspora-git/diaspora.rc +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -daemon_name=diaspora -dusr=diaspora - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pgrep -u $daemon_name` - -case "$1" in - start) - #Check if db and redis are running, start them if not - ck_daemon -DB- && /etc/rc.d/-DB- start - ck_daemon redis && /etc/rc.d/redis start - - if [ ! -e /var/log/$daemon_name.log ]; then - touch /var/log/$daemon_name.log - chown $dusr:$dusr /var/log/$daemon_name.log - fi - - stat_busy "Starting $daemon_name daemon" - [ -z "$PID" ] && /bin/su - $dusr -c "/usr/bin/$daemon_name &" - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - add_daemon $daemon_name - stat_done - fi - ;; - - stop) - stat_busy "Stopping $daemon_name daemon" - kill $PID &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - while [ ! -z "$(pgrep -u $daemon_name)" ]; do - sleep 1; - done - rm_daemon $daemon_name - stat_done - fi - ;; - - restart) - $0 stop - sleep 3 - $0 start - ;; - - status) - stat_busy "Checking $daemon_name status" - ck_status $daemon_name - ;; - - *) - echo "usage: $0 {start|stop|restart|status}" -esac - -exit 0 - -# vim: syntax=sh |