summaryrefslogtreecommitdiff
path: root/social/diaspora-git/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'social/diaspora-git/PKGBUILD')
-rw-r--r--social/diaspora-git/PKGBUILD113
1 files changed, 69 insertions, 44 deletions
diff --git a/social/diaspora-git/PKGBUILD b/social/diaspora-git/PKGBUILD
index b15f66916..1cf183cf7 100644
--- a/social/diaspora-git/PKGBUILD
+++ b/social/diaspora-git/PKGBUILD
@@ -5,24 +5,33 @@
# After installing, see the Diaspora wiki page for more information:
# https://wiki.archlinux.org/index.php/Diaspora
-pkgname=diaspora-git
+pkgbase=diaspora-git
+pkgname=('diaspora-mysql-git' 'diaspora-postgresql-git' 'diaspora-sqlite-git')
pkgver=20110623
pkgrel=1
pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network"
arch=('i686' 'x86_64')
-url="http://www.joindiaspora.com/"
+url="https://diasporafoundation.org/"
license=('AGPL3')
-depends=('ruby' 'mysql-ruby' 'redis' 'imagemagick' 'libxslt')
+depends=('ruby' 'redis' 'imagemagick' 'libxslt')
makedepends=('git' 'ruby-headers')
+provides=('diaspora')
install=diaspora.install
source=('diaspora.bin'
'diaspora.rc'
'diaspora.logrotate'
'diaspora.pam')
+md5sums=('440ce2511485855030e74e28843a037d'
+ '7bffaaee41b515247ba19a19c77dc5bf'
+ '60f6b3972c73cbc6b1c9ab87c88fb655'
+ '96f82c38f3f540b53f3e5144900acf17')
-_gitroot="http://github.com/diaspora/diaspora.git"
+_gitroot="https://github.com/diaspora/diaspora.git"
_gitname="diaspora"
+# I use this because I'm behind an asshole proxy
+tsocks=tsocks
+
build() {
cd "$srcdir"
@@ -43,59 +52,75 @@ build() {
[[ -d $_gitname-build ]] && rm -fr $_gitname-build
git clone $_gitname $_gitname-build
- # Recover gems cache
- rm -fr $_gitname-gems
- mkdir -p $_gitname-gems
- [[ -d cache ]] && mv cache $_gitname-gems
-
# Include all gems
- export GEM_HOME="$srcdir/$_gitname-gems"
- export GEM_PATH="$srcdir/$_gitname-gems"
+ export GEM_HOME="${PWD}/vendor"
+ export GEM_PATH="${PWD}/vendor"
export PATH="${PATH}:${GEM_PATH}/bin"
+ cd ${srcdir}/${_gitname}-build
+
gem install bundler
+}
+
+# Helper
+_package() {
+ cd "${srcdir}"
+
+ usrdir="${pkgdir}/usr/share/webapps"
+
+ install -d "${usrdir}"
+ cp -a ${_gitname}-build "${usrdir}/${_gitname}"
+
+ cd "${usrdir}/${_gitname}"
- # Patch ruby_core_source to not install the headers in the system
- # Remove this if you are behind a proxy and install the ruby-headers package instead
-# gem install ruby_core_source
-# sed -i "s@^ dest_dir.*@ dest_dir = \"$srcdir/rubyhdrs/\" + ruby_dir@" \
-# $_gitname-gems/gems/ruby_core_source*/lib/ruby_core_source.rb
+# Set the example config
+ sed -e 's/rails_env:.*/rails_env: "production"/' \
+ -e "s/db:.*/db: \"${DB}\"/" \
+ -i config/script_server.yml.example
- pushd $_gitname-build
- bundle install --path vendor
+ ${tsocks} bundle install --local --path vendor --without development test
- # We make this now because we do not install the git history
- tar czf public/source.tar.gz `git ls-tree -r master | awk '{print $4}'`
+ find -type d -name ".git" -exec rm -fr '{}' \; &>/dev/null || true
- rm -fr .git
- popd
+ 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}"
- # Keep the gems cache
- mv $_gitname-gems/cache "$srcdir"
+ install -d ${pkgdir}/usr/share/licenses/${_gitname}/
+ install -Dm644 ${srcdir}/${_gitname}-build/{AUTHORS,COPYRIGHT,GNU-AGPL-3.0} \
+ ${pkgdir}/usr/share/licenses/${_gitname}/
}
-package() {
- cd "$srcdir"
- options=(!strip)
+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' 'mysql')
+ options=(!strip)
+
+ export DB="mysql"
- usrdir="$pkgdir/usr/share/webapps"
+ _package
+}
- install -d "$usrdir"
- cp -r $_gitname-build "$usrdir/$_gitname"
- #cp -r $_gitname-gems "$usrdir/"
- find "$usrdir/$_gitname-gems" \
- -type d -name ".git" -exec rm -fr '{}' \; &>/dev/null || true
+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' 'postgresql')
+ options=(!strip)
- 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"
+ export DB="postgresql"
- install -d $pkgdir/usr/share/licenses/$_gitname/
- install -Dm644 ${srcdir}/$_gitname-build/{AUTHORS,COPYRIGHT,GNU-AGPL-3.0} \
- $pkgdir/usr/share/licenses/$_gitname/
+ _package
+}
+
+package_diaspora-sqlite-git() {
+ pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network (SQLite3 version)"
+ provides=('diaspora-sqlite' 'diaspora')
+ depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'sqlite3')
+ options=(!strip)
+
+ export DB="sqlite"
+
+ _package
}
-md5sums=('7e7402127f9a05bc58aff0adc5057d1c'
- '7bffaaee41b515247ba19a19c77dc5bf'
- '60f6b3972c73cbc6b1c9ab87c88fb655'
- '96f82c38f3f540b53f3e5144900acf17')